/**
 * Developers Page Styles
 * Follows CVR brand system: yellow #D4A017, blue #1E3A5F, white #F8F7F4
 */

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2a5080 100%);
  color: #f8f7f4;
  padding: 4rem 0;
  text-align: center;
  margin-top: 70px;
}

.page-header h1 {
  font-family: "Playfair Display", serif;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.page-header .subtitle {
  font-family: "DM Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #e8eef5;
  max-width: 600px;
  margin: 0 auto;
}

/* ── Page header ── */
.about-hero {
  background-color: var(--color-blue);
  padding: var(--space-20) 0;
  position: relative;
  overflow: hidden;
}

/* Diagonal gold stripe accent */
.about-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: -80px;
  width: 340px;
  height: 100%;
  background-color: rgba(212, 160, 23, 0.07);
  transform: skewX(-12deg);
  pointer-events: none;
}

.about-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.about-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: var(--space-5);
}

.about-hero__title em {
  font-style: italic;
  color: var(--color-yellow-light);
}

.about-hero__sub {
  font-size: var(--text-lg);
  color: rgba(248, 247, 244, 0.72);
  line-height: var(--leading-normal);
  max-width: 520px;
}

@media (max-width: 768px) {
  .page-header {
    padding: 2.5rem 0;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .page-header .subtitle {
    font-size: 1rem;
  }
}

/* Developers Section */
.developers-section {
  padding: 4rem 0;
  background-color: #f8f7f4;
  min-height: 600px;
}

.developers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Developer Card */
.developer-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  /* border-top: 4px solid #d4a017; */
}

.developer-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.15);
}

.card-header {
  background: linear-gradient(135deg, #f0c84a 0%, #d4a017 100%);
  /* padding: 2rem; */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(20px, 20px);
  }
}

.developer-logo {
  max-width: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.card-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.developer-name {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e3a5f;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.developer-description {
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.btn-learn-more {
  display: inline-block;
  background-color: #1e3a5f;
  color: #f8f7f4;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 2px solid #1e3a5f;
  text-align: center;
  width: fit-content;
}

.btn-learn-more:hover {
  background-color: #d4a017;
  color: #1e3a5f;
  border-color: #d4a017;
}

/* Skeleton Loaders */
.skeleton-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.1);
  animation: pulse 2s infinite;
}

.skeleton-card::before {
  content: "";
  display: block;
  width: 100%;
  height: 180px;
  background: linear-gradient(90deg, #e8eef5 0%, #f0c84a 50%, #e8eef5 100%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Error Message */
.error-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background: #fbf4e0;
  border-radius: 8px;
  border-left: 4px solid #d4a017;
}

.error-message p {
  font-family: "DM Sans", sans-serif;
  color: #6b7280;
  font-size: 1rem;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, #1e3a5f 0%, #2a5080 100%);
  color: #f8f7f4;
  padding: 3rem 0;
  text-align: center;
  margin: 1rem;
}

.cta-banner h2 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #e8eef5;
}

.cta-banner p {
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: #e8eef5;
}

.btn-primary {
  display: inline-block;
  background-color: #d4a017;
  color: #1e3a5f;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 2px solid #d4a017;
}

.btn-primary:hover {
  background-color: #f0c84a;
  border-color: #f0c84a;
}

/* Responsive Design */
@media (max-width: 768px) {
  .developers-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card-header {
    min-height: 150px;
  }

  .developer-logo {
    width: 735px;
  }

  .developer-name {
    font-size: 1.25rem;
  }

  .cta-banner h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 1.5rem;
  }

  .developer-description {
    font-size: 0.9rem;
  }

  .card-body {
    padding: 1rem;
  }
}

/* ── Mobile fixes ── */

/* Hero padding on small screens */
@media (max-width: 768px) {
  /* .developer-logo {
    width: 140px;
    height: 90px;
  } */

  .about-hero {
    padding: var(--space-12) 0;
  }

  .about-hero__title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .about-hero__sub {
    font-size: var(--text-base);
  }
}

/* Card grid — tighten min-width so it doesn't overflow on small phones */
@media (max-width: 480px) {
  .developers-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 0.25rem;
  }

  /* .developer-logo {
    width: 120px;
    height: 80px;
  } */
}

/* CTA banner — remove side margin that creates gaps on mobile */
@media (max-width: 768px) {
  .cta-banner {
    margin: 0; /* remove the 1rem side gap */
    padding: 2rem 0;
    border-radius: 0;
  }

  .cta-banner h2 {
    font-size: 1.4rem;
    padding: 0 1rem;
  }

  .cta-banner p {
    padding: 0 1rem;
  }
}

/* Skeleton cards — match single column on mobile */
@media (max-width: 480px) {
  .skeleton-card {
    min-height: 280px;
  }
}
