/* ================================
   OUR WORK PAGE STYLES
   ================================ */

.page-our-work {
  padding-top: 80px;
}

.our-work-hero {
  background: var(--hero-gradient);
  color: var(--text-white);
  text-align: center;
  padding: 8rem 1.5rem 4rem;
}

.our-work-hero-title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  margin-bottom: 1rem;
}

.our-work-hero-subtitle {
  font-size: var(--text-xl);
  color: var(--hero-text-muted);
  max-width: 42rem;
  margin: 0 auto;
}

/* Work Intro */
.work-intro {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 3rem;
}

.work-intro-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.work-intro-text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: 1.5rem;
}

.work-intro-callout {
  padding: 1rem 1.5rem;
  background: var(--badge-teal-bg);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-primary);
  font-size: var(--text-sm);
  color: var(--text-primary);
  text-align: left;
}

/* Info Cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 56rem;
  margin: 0 auto 3rem;
}

.page-our-work .info-card {
  display: block;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

.page-our-work .info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.page-our-work .info-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.page-our-work .info-card-icon {
  width: 24px;
  height: 24px;
  background: transparent;
  border-radius: 0;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.page-our-work .info-card-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: 0.75rem;
}

.page-our-work .info-card-link {
  display: inline-block;
  color: var(--accent-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  transition: transform 0.15s ease;
}

.page-our-work .info-card:hover .info-card-link {
  transform: translateX(4px);
}

/* Work CTA Box */
.work-cta-box {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem;
  background: var(--badge-teal-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.work-cta-box p {
  font-size: var(--text-base);
  color: var(--text-primary);
  margin: 0;
}

.work-cta-box-link {
  color: var(--accent-primary);
  text-decoration: underline;
  font-weight: var(--weight-semibold);
}

.work-cta-box-link:hover {
  color: var(--accent-secondary);
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Portfolio Item - Dark Theme */
.portfolio-item {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: #111827;
  border: 1px solid var(--color-gray-800);
}

.portfolio-item-image {
  width: 100%;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.portfolio-item-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.portfolio-item-image:hover img {
  transform: scale(1.02);
}

.portfolio-item-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-white);
  margin-bottom: 0.75rem;
}

.portfolio-item-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.portfolio-item-tag {
  padding: 0.25rem 0.75rem;
  background: var(--color-gray-800);
  border: 1px solid var(--color-gray-600);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-weight: var(--weight-semibold);
}

.portfolio-item-description {
  font-size: var(--text-sm);
  color: var(--color-gray-400);
  line-height: var(--line-height-relaxed);
  margin-bottom: 1rem;
  flex: 1;
}

/* Portfolio Stats */
.portfolio-item-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  background: var(--color-gray-800);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.portfolio-item-stat {
  text-align: center;
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-green-500);
  display: block;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Portfolio CTA */
.portfolio-item-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Test Site Section */
.test-site-box {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.test-site-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.test-site-text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: var(--line-height-relaxed);
}

.test-site-input-group {
  max-width: 36rem;
  margin: 0 auto;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.test-site-input {
  flex: 1;
  min-width: 280px;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.test-site-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--badge-teal-bg);
}

.test-site-input::placeholder {
  color: var(--text-tertiary);
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal-container {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 1.5rem;
  background: var(--badge-teal-bg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--accent-primary);
  margin: 0;
}

.modal-close {
  width: 40px;
  height: 40px;
  background: var(--hero-gradient);
  border: none;
  color: var(--text-white);
  font-size: var(--text-2xl);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
  padding: 0;
  font-weight: var(--weight-bold);
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.1);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(80vh - 80px);
}

.modal-body p {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.modal-body ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.modal-image-container {
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.modal-pagespeed-image {
  width: 100%;
  height: auto;
  display: block;
}

.modal-note {
  padding: 1rem;
  background: var(--badge-teal-bg);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

/* PageSpeed Modal */
.pagespeed-modal-container {
  max-width: 1400px;
  width: 95%;
  max-height: 95vh;
}

.pagespeed-modal-loading {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.pagespeed-modal-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  border: 4px solid var(--border-light);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pagespeed-modal-loading-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.pagespeed-modal-loading-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.pagespeed-modal-info-box {
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
  background: var(--badge-teal-bg);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.pagespeed-modal-info-title {
  color: var(--accent-primary);
  font-weight: var(--weight-semibold);
  margin-bottom: 0.75rem;
  font-size: var(--text-sm);
}

.pagespeed-modal-info-list {
  list-style: none;
  padding: 0;
  font-size: var(--text-sm);
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
}

.pagespeed-modal-info-list li {
  margin-bottom: 0.5rem;
}

.pagespeed-modal-info-list li strong {
  color: var(--accent-primary);
}

.pagespeed-modal-info-footer {
  margin-top: 1rem;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-style: italic;
}

.pagespeed-modal-iframe {
  display: none;
  width: 100%;
  height: 80vh;
  border: none;
  border-radius: var(--radius-md);
}

.pagespeed-modal-iframe.active {
  display: block;
}

@media (max-width: 768px) {
  .our-work-hero {
    padding: 6rem 1rem 3rem;
  }

  .our-work-hero-title {
    font-size: var(--text-3xl);
  }

  .our-work-hero-subtitle {
    font-size: var(--text-lg);
  }

  .info-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-item-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .portfolio-item-cta {
    flex-direction: column;
  }

  .portfolio-item-cta .btn {
    width: 100%;
  }

  .test-site-input-group {
    flex-direction: column;
  }

  .test-site-input {
    min-width: 100%;
  }

  .modal-container {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-title {
    font-size: var(--text-lg);
  }

  .modal-body {
    padding: 1rem;
  }

  .pagespeed-modal-container {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .pagespeed-modal-iframe {
    height: 70vh;
  }
}
