/* ============================================
   ESCUELA HÍPICA EQUISAPIENS — Theme
   Palette: Navy primary, Gold secondary, Orange accent
   Sits ON TOP of base.css — overrides semantic aliases
   ============================================ */

/* --- Color Overrides --- */
:root {
  --color-primary:         #1a2e5a;
  --color-primary-dark:    #111e3d;
  --color-primary-light:   #2e4f8c;
  --color-secondary:       #d4a254;
  --color-secondary-light: #e4be80;
  --color-accent:          #e8732c;
  --gradient-navy:         linear-gradient(135deg, #111e3d 0%, #243f7a 100%);
}

/* ============================================
   HERO — FULL WIDTH HOMEPAGE HERO
   ============================================ */
.hero-club {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-white);
}

.hero-club .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-club .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.hero-club .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    160deg,
    rgba(17, 30, 61, 0.85) 0%,
    rgba(26, 46, 90, 0.70) 50%,
    rgba(17, 30, 61, 0.82) 100%
  );
}

.hero-club .hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
}

.hero-club .hero-content h1 {
  font-family: var(--font-heading);
  font-size: var(--font-size-4xl);
  line-height: 1.1;
  color: var(--color-white);
  margin-bottom: var(--spacing-md);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero-club .hero-content .tagline {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  opacity: 0.9;
  color: var(--color-white);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 24px var(--color-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base),
              border-bottom-color var(--transition-base);
  border-bottom: 3px solid transparent;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px var(--color-shadow);
  border-bottom-color: var(--color-secondary);
}

.service-card .card-image {
  height: 320px;
  overflow: hidden;
  flex-shrink: 0;
}

.service-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  transition: transform var(--transition-slow);
}

.service-card:hover .card-image img {
  transform: scale(1.06);
}

.service-card .card-body {
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-card .card-body h3 {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
  line-height: 1.2;
}

.service-card .card-body p {
  font-family: var(--font-body);
  color: var(--color-text-light);
  font-size: var(--font-size-base);
  line-height: 1.65;
  flex: 1;
  margin-bottom: var(--spacing-md);
}

/* ============================================
   GALLERY GRID
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: var(--spacing-sm);
}

.gallery-grid .gallery-item {
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  position: relative;
}

.gallery-grid .gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform var(--transition-slow);
}

.gallery-grid .gallery-item:hover img {
  transform: scale(1.05);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: var(--gradient-navy);
  color: var(--color-white);
  text-align: center;
  padding: var(--spacing-3xl) var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  max-width: var(--max-width);
  margin-inline: auto;
}

.cta-section h2 {
  font-family: var(--font-heading);
  font-size: var(--font-size-3xl);
  color: var(--color-white);
  margin-bottom: var(--spacing-sm);
  line-height: 1.15;
}

.cta-section p {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  opacity: 0.85;
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.cta-section .btn {
  margin-top: var(--spacing-xs);
}

/* ============================================
   ABOUT GRID
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

.about-grid .about-image {
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.about-grid .about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform var(--transition-slow);
}

.about-grid .about-image:hover img {
  transform: scale(1.04);
}

/* ============================================
   NAV CROSS-LINK
   (e.g. "Ir a Fundacion →" inside the navbar)
   ============================================ */
.nav-cross-link {
  margin-left: auto;
  font-size: var(--font-size-sm);
  opacity: 0.7;
  transition: opacity var(--transition-fast);
  white-space: nowrap;
}

.nav-cross-link:hover {
  opacity: 1;
}

/* ============================================
   PAGE HERO — COMPACT INNER PAGE HERO
   ============================================ */
.page-hero {
  background: var(--gradient-navy);
  min-height: 30vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  padding: var(--spacing-2xl) var(--spacing-md);
}

.page-hero .page-hero-inner {
  max-width: 640px;
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-size: var(--font-size-3xl);
  color: var(--color-white);
  margin-bottom: var(--spacing-xs);
  line-height: 1.15;
}

.page-hero .subtitle {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  opacity: 0.85;
  color: var(--color-white);
  line-height: 1.5;
}

/* ============================================
   RESPONSIVE — TABLET (max 1024px)
   ============================================ */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
  }

  .gallery-grid .gallery-item:first-child {
    grid-column: 1 / -1;
    grid-row: span 1;
  }

  .about-grid {
    gap: var(--spacing-xl);
  }
}

/* ============================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================ */
@media (max-width: 768px) {
  /* Hero title shrinks */
  .hero-club .hero-content h1 {
    font-size: var(--font-size-3xl);
  }

  .hero-club .hero-content .tagline {
    font-size: var(--font-size-base);
  }

  /* Gallery stays 2 columns on mobile */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

  .gallery-grid .gallery-item:first-child {
    grid-column: 1 / -1;
    grid-row: span 1;
  }

  /* About grid stacks vertically */
  .about-grid {
    grid-template-columns: 1fr;
  }

  /* CTA section padding reduction */
  .cta-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    border-radius: var(--border-radius);
  }

  .cta-section h2 {
    font-size: var(--font-size-2xl);
  }

  /* Page hero compact */
  .page-hero {
    min-height: 24vh;
  }

  .page-hero h1 {
    font-size: var(--font-size-2xl);
  }
}

/* ============================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ============================================ */
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }

  .gallery-grid .gallery-item:first-child {
    grid-column: 1;
    grid-row: span 1;
  }
}
