/* ============================================================================
   INSTITUTO HIJAS DE LA CRUZ - Custom Styles
   Nivel Secundario - Diseño Profesional con Paleta Azul
   ============================================================================ */

/* ==================== Variables de color — Instituto Hijas de la Cruz (paleta azul) ==================== */
/* Valores alineados con tailwind.config.mjs (paleta ihc) para uso en reglas que no son Tailwind. */
:root {
  /* Semánticas: títulos y texto */
  --ihc-heading: #1A2B4F;
  --ihc-body: #2C3E50;
  --ihc-text-muted: #4A5568;

  /* Paleta: principal y acentos */
  --ihc-primary: #1A2B4F;
  --ihc-accent: #215491;
  --ihc-primary-mid: #4A8AC6;
  --ihc-light: #95BDDA;

  /* Neutros */
  --ihc-white: #FFFFFF;
  --ihc-bg: #F8FAFC;
  --ihc-bg-light: #EEF4F8;
}

/* ==================== KEYFRAME ANIMATIONS ==================== */
@keyframes zoomSlide {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* ==================== HERO SECTION - INSTITUTO HIJAS DE LA CRUZ ==================== */
.hero-instituto {
  background-color: transparent;
  position: relative;
  overflow: hidden;
  height: calc(100vh - 112px);
  max-height: calc(100vh - 112px);
}

/* Gradiente de transición inferior del Hero hacia la siguiente sección */
.hero-instituto::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(26, 43, 79, 0.08) 20%,
    rgba(26, 43, 79, 0.15) 35%,
    rgba(255, 255, 255, 0.3) 55%,
    rgba(255, 255, 255, 0.7) 80%,
    #ffffff 100%
  );
  z-index: 8;
  pointer-events: none;
}

/* Asegurar que el Swiper llene todo el contenedor */
.heroSwiper {
  height: 100%;
  min-height: 100%;
}

.heroSwiper .swiper-wrapper,
.heroSwiper .swiper-slide {
  height: 100%;
}

/* Hero Slide Container */
.hero-instituto .hero-slide {
  position: relative;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ihc-primary) 0%, var(--ihc-accent) 50%, var(--ihc-primary-mid) 100%);
}

/* Layer 1: The Kid/Student Image (Bottom) */
.hero-instituto .hero-layer-kid {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%; /* Full width */
  height: 100%;
  z-index: 1;
}

.hero-instituto .hero-kid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: zoomSlide 8s ease-in-out infinite;
}

@media (min-width: 1025px) {
  .hero-instituto .hero-layer-kid {
    transform: translateX(27%);
  }
}

/* Layer 2: The Background Frame (Overlay with mask) */
.hero-instituto .hero-layer-frame {
  position: absolute;
  top: -24px;
  left: -24px;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  z-index: 2;
  pointer-events: none;
  /* Use the clip path defined in the HTML */
  clip-path: url(#heroMaskPath);
}

.hero-instituto .hero-frame-img {
  width: 100%;
  height: 100%;
  filter: blur(3px);
  -webkit-filter: blur(3px);
  object-fit: cover;
  object-position: center;
  -webkit-mask-image: linear-gradient(
    to right,
    black 0%,
    black 40%,
    rgba(0, 0, 0, 0.5) 65%,
    rgba(0, 0, 0, 0.15) 85%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    black 0%,
    black 40%,
    rgba(0, 0, 0, 0.5) 65%,
    rgba(0, 0, 0, 0.15) 85%,
    transparent 100%
  );
}

/* Content Layer */
.hero-instituto .hero-layer-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 6%;
  padding-right: 2rem;
}

.hero-instituto .hero-content-inner {
  width: 45%;
  padding: 1.5rem;
}

/* Hero Title */
.hero-instituto .hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(3.5rem, 5.5vw, 6rem);
  /* Fully responsive */
  line-height: 1.15;
  color: var(--ihc-white);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 1.5rem;
  /* Override global animation that hides title */
  opacity: 1 !important;
  animation: slideInDown 0.8s ease-out forwards;
  animation-play-state: running;
}

.hero-instituto .hero-title span {
  display: block;
}

/* Hero Text */
/* Increased specificity to ensure override */
.hero-instituto .hero-content-inner .hero-text {
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.2rem, 1.5vw, 1.4rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 500px;
  font-weight: 400 !important;
  opacity: 0;
  animation: slideInUp 0.8s ease-out 0.2s forwards;
  animation-play-state: running;
}

.hero-instituto .hero-content-inner .hero-text strong {
  font-weight: 700 !important;
  color: var(--ihc-light) !important;
}

/* ==================== MATERIALS ==================== */
.csf-materials-block {
  display: grid;
  gap: 1rem;
}

.csf-materials-intro {
  margin: 0;
  color: var(--ihc-text-muted);
  font-family: "Lato", sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
}

.csf-materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.csf-material-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(33, 84, 145, 0.18);
  background: linear-gradient(135deg, #ffffff 0%, #eaf2f8 100%);
  color: var(--ihc-primary) !important;
  text-decoration: none !important;
  font-family: "Lato", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 22px rgba(26, 43, 79, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.csf-material-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(33, 84, 145, 0.32);
  box-shadow: 0 14px 28px rgba(26, 43, 79, 0.12);
}

.csf-materials-empty {
  margin: 0;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(238, 244, 248, 0.9);
  color: var(--ihc-text-muted);
  font-family: "Lato", sans-serif;
}

.csf-material-text-preview {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(74, 90, 118, 0.15);
}

.csf-material-text-preview p {
  margin: 0 0 0.65rem;
  color: var(--ihc-body);
  font-family: "Lato", sans-serif;
  line-height: 1.6;
}

/* ==================== UNIFORMES ==================== */
.csf-uniformes-section {
  margin-top: 1.5rem;
}

.csf-uniformes-card {
  padding: 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(33, 84, 145, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(238, 244, 248, 0.96) 100%);
  box-shadow: 0 18px 40px rgba(26, 43, 79, 0.08);
}

.csf-uniformes-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(149, 189, 218, 0.35);
}

.csf-uniformes-header h3 {
  margin: 0.15rem 0 0;
  color: var(--ihc-heading);
  font-family: "Playfair Display", serif;
  font-size: clamp(1.6rem, 2vw, 2rem);
}

.csf-uniformes-intro {
  max-width: 460px;
  margin: 0;
  color: var(--ihc-text-muted);
  font-family: "Lato", sans-serif;
  font-size: 0.96rem;
  line-height: 1.7;
}

.csf-uniformes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 767px) {
  .csf-uniformes-header,
  .csf-uniformes-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

.csf-uniformes-column {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(149, 189, 218, 0.32);
}

.csf-uniformes-column-featured {
  background: linear-gradient(180deg, rgba(230, 239, 247, 0.96) 0%, rgba(244, 248, 251, 0.98) 100%);
}

.csf-uniformes-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(149, 189, 218, 0.45);
  color: var(--ihc-primary);
  font-family: "Lato", sans-serif;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.csf-uniformes-list {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.csf-uniformes-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f2f7fb 100%);
  border: 1px solid rgba(149, 189, 218, 0.24);
}

.csf-uniformes-item-name {
  color: var(--ihc-body);
  font-family: "Lato", sans-serif;
  font-weight: 700;
  line-height: 1.45;
}

.csf-uniformes-item-price {
  color: var(--ihc-accent);
  font-family: "Lato", sans-serif;
  font-weight: 800;
  white-space: nowrap;
}

.csf-uniformes-column-empty,
.csf-uniformes-empty {
  margin: 0;
  color: var(--ihc-text-muted);
  font-family: "Lato", sans-serif;
}



/* Hero Button */
.hero-instituto .hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-family: "Lato", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ihc-primary);
  background: var(--ihc-white);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-instituto .hero-btn:hover {
  background: var(--ihc-light);
  color: var(--ihc-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Hero Pagination Dots */
.hero-instituto .hero-swiper-pagination {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

.hero-instituto .hero-carousel-dot {
  width: 12px;
  height: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-instituto .hero-carousel-dot.active {
  background: var(--ihc-white);
  width: 32px;
  border-radius: 6px;
}

/* ==================== MOBILE HERO RESPONSIVE ==================== */
/* ==================== MOBILE HERO RESPONSIVE ==================== */
@media (max-width: 1024px) {
  /* 1. FORZAR LA SECCIÓN PADRE A ALTURA COMPLETA (restando header) */
  .hero-instituto {
    height: calc(100vh - 112px) !important;
    min-height: calc(100vh - 112px) !important;
    max-height: calc(100vh - 112px) !important;
    height: calc(100dvh - 112px) !important;
    min-height: calc(100dvh - 112px) !important;
    max-height: calc(100dvh - 112px) !important;
    height: calc(100svh - 112px) !important;
    min-height: calc(100svh - 112px) !important;
    max-height: calc(100svh - 112px) !important;
    padding: 0 !important;
    margin-top: 0 !important;
    box-sizing: border-box;
    overflow: hidden !important;
    /* FLEXBOX FIX: Ensure children fill the min-height */
    display: flex !important;
    flex-direction: column !important;
    
    /* BACKGROUND FIX: Apply background to parent to ensure full coverage */
    background-image: url('../../images/instituto-hijas-de-la-cruz/bg-instituto-hijas.webp') !important;
    background-size: cover !important;
    background-position: left center !important;
  }

  /* Ensure Swiper container fills height */
  .hero-instituto .heroSwiper {
    height: 100% !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  /* 2. EL SLIDE CONTENEDOR */
  .hero-instituto .swiper-slide {
    height: 100% !important;
    display: flex !important;
  }

  .hero-instituto .hero-slide {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 0 !important;
    /* Background moved to parent .hero-instituto */
    background: transparent !important;
    height: 100% !important;
    width: 100% !important;
    min-height: unset !important;
    min-width: unset !important;
    padding: 0 !important;
    position: relative;
  }

  /* 3. BACKGROUND FRAME (Hide in mobile to show background) */
  .hero-instituto .hero-layer-frame {
    display: none !important;
  }

  .hero-instituto .hero-frame-img {
    display: none !important;
  }

  /* 4. KID IMAGE (Full Width, touches header, blur only bottom) */
  .hero-instituto .hero-layer-kid {
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 38vh !important;
    max-height: none !important;
    flex: 0 0 auto;
    margin: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    order: 1;
    z-index: 1;
    filter: none;
    border-radius: 0;
    overflow: hidden;
    clip-path: none !important;

    /* Fade only at bottom */
    -webkit-mask-image: linear-gradient(
      to bottom,
      black 0%,
      black 70%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to bottom,
      black 0%,
      black 70%,
      transparent 100%
    );
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
  }

  .hero-instituto .hero-kid-img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center 30% !important;
  }

  /* 5. CONTENT (Text & Button) */
  .hero-instituto .hero-layer-content {
    position: relative !important;
    order: 2;
    width: 100% !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center;
    z-index: 10;
    padding: 3vh 1.5rem 4vh !important;
    margin: 0 !important;
    background: transparent !important;
    margin-top: -10vh !important;
  }

  .hero-instituto .hero-content-inner {
    width: 100%;
    max-width: 90%;
    padding: 0 !important; /* Reset ALL padding, not just top */
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: transparent !important;
  }

  /* Typography - Title */
  .hero-instituto .hero-title {
    font-family: "Playfair Display", serif;
    font-size: clamp(1.85rem, 5vw, 2.8rem) !important;
    line-height: 1.15;
    margin-bottom: 1.5vh !important;
    color: var(--ihc-white) !important;
    text-shadow: none !important;
  }

  /* Extra safety for very narrow screens */
  @media (max-width: 380px) {
    .hero-instituto .hero-title {
      font-size: 1.25rem !important;
    }
  }

  /* Force 2 lines logic */
  .hero-instituto .hero-title span {
    display: block;
  }

  /* Typography - Paragraph */
  .hero-instituto .hero-text {
    font-family: inherit;
    font-size: clamp(0.95rem, 2.5vw, 1.15rem) !important;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 2vh !important;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    text-shadow: none !important;
  }

  /* Wide Mobile Optimization (> 450px) - Boost text slightly */
  @media (min-width: 450px) {
    .hero-instituto .hero-text {
      font-size: clamp(1.05rem, 2.2vh, 1.4rem) !important;
      line-height: 1.55;
      max-width: 90%;
    }
  }

  /* Button synced with Instituto palette */
  .hero-instituto .hero-btn {
    padding: 0.9rem 2.5rem !important;
    font-size: 0.9rem !important;
    margin-bottom: 2vh !important;
    background-color: var(--ihc-white) !important;
    color: var(--ihc-primary) !important;
    box-shadow: 0 4px 15px rgba(26, 43, 79, 0.3) !important;
    font-weight: 700 !important;
  }

  .hero-instituto .hero-btn:hover {
    background-color: var(--ihc-light) !important;
    color: var(--ihc-primary) !important;
  }
}

/* ==================== Intermediate Mobile (600px - 767px) ==================== */
@media (min-width: 600px) and (max-width: 767px) {
  .hero-instituto .hero-layer-kid {
    height: 40vh !important;
  }

  .hero-instituto .hero-layer-content {
    padding: 2.4vh 1.75rem 2.8vh !important;
    margin-top: -7vh !important;
  }

  .hero-instituto .hero-content-inner {
    max-width: 86% !important;
  }

  .hero-instituto .hero-title {
    font-size: clamp(2.5rem, 4.5vw, 3.2rem) !important;
    line-height: 1.14 !important;
    margin-bottom: 1.6vh !important;
  }

  .hero-instituto .hero-text {
    font-size: clamp(1.05rem, 2vw, 1.25rem) !important;
    line-height: 1.5 !important;
    max-width: 88% !important;
    margin-bottom: 1.8vh !important;
  }

  .hero-instituto .hero-btn {
    font-size: 0.9rem !important;
    padding: 0.8rem 2.3rem !important;
  }
}

/* ==================== Tablet (768px - 1024px) ==================== */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-instituto .hero-layer-kid {
    height: 44vh !important;
  }

  .hero-instituto .hero-layer-content {
    padding: 2.2vh 2.2rem 2.6vh !important;
    margin-top: -6vh !important;
  }

  .hero-instituto .hero-content-inner {
    max-width: 86% !important;
  }

  .hero-instituto .hero-title {
    font-size: clamp(3rem, 5.5vw, 4rem) !important;
    line-height: 1.12 !important;
    margin-bottom: 1.5vh !important;
  }

  .hero-instituto .hero-text {
    font-size: clamp(1.15rem, 2.2vw, 1.45rem) !important;
    line-height: 1.52 !important;
    max-width: 82% !important;
    margin-bottom: 1.7vh !important;
  }

  .hero-instituto .hero-btn {
    font-size: 0.93rem !important;
    padding: 0.82rem 2.4rem !important;
  }
}

/* ==================== Extra Small Devices Optimization (iPhone SE and similar) ==================== */
@media (max-width: 400px) {
  /* Further reduce hero padding for tiny screens */
  .hero-instituto .hero-slide {
    padding: 0 !important;
    gap: 0 !important;
  }

  /* Reduce kid image height significantly to make room for content */
  .hero-instituto .hero-layer-kid {
    height: 45vh !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* Make title even more compact */
  .hero-title {
    font-size: clamp(1.8rem, 4vh, 2.5rem) !important; /* Increased from 1.5rem/2vh */
    margin-bottom: 3vh !important;
  }

  /* Reduce text size and margin */
  .hero-text {
    font-size: clamp(1rem, 2vh, 1.1rem) !important; /* Increased from 0.85rem/1.6vh */
    line-height: 1.35;
    margin-bottom: 3vh !important;
    max-width: 95%;
  }

  /* Slightly smaller button */
  .hero-btn {
    padding: 0.7rem 2rem !important;
    font-size: 0.85rem !important;
    margin-bottom: 5px !important;
  }
}

/* ==================== Taller Mobile Screens Optimization (iPhone 12/13/14 Pro Max, etc.) ==================== */
@media (min-width: 768px) and (max-width: 1024px) and (min-height: 700px) {
  /* Keep taller screens compact to avoid clipping CTA/text */
  .hero-instituto .hero-layer-bg-kid {
    height: 48vh !important;
  }

  .hero-instituto .hero-slide {
    gap: 1vh !important;
  }
}

/* ==================== Animations matching Colegio ==================== */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply animations to hero elements */
.hero-instituto .hero-title {
  animation: slideInDown 0.8s ease-out;
}

.hero-instituto .hero-text {
  animation: slideInUp 0.8s ease-out 0.2s both;
}

.hero-instituto .hero-btn {
  animation: slideInUp 0.8s ease-out 0.4s both;
}

/* ==================== PROPUESTA EDUCATIVA SECTION ==================== */
.propuesta-instituto {
  position: relative;
  overflow: hidden;
}

/* ==================== SHARED: section-bg-fade for IHC ==================== */
.section-bg-fade {
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.4) 5%,
    black 15%,
    black 75%,
    rgba(0, 0, 0, 0.4) 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.4) 5%,
    black 15%,
    black 75%,
    rgba(0, 0, 0, 0.4) 90%,
    transparent 100%
  );
}

.section-bg-fade-bottom {
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 75%,
    rgba(0, 0, 0, 0.4) 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 75%,
    rgba(0, 0, 0, 0.4) 90%,
    transparent 100%
  );
}

/* Glass Card Style for Instituto */
.glass-card-instituto {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(149, 189, 218, 0.3);
  box-shadow: 
    0 4px 30px rgba(26, 43, 79, 0.1),
    0 1px 3px rgba(26, 43, 79, 0.05);
}

/* Subject Badge - Instituto Style */
.subject-badge-ihc {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--ihc-light) 0%, #b8d4e8 100%);
  border: 1px solid rgba(33, 84, 145, 0.2);
  border-radius: 50px;
  font-family: "Lato", sans-serif;
  font-size: 0.9rem;
  color: var(--ihc-primary);
  transition: all 0.3s ease;
}

.subject-badge-ihc:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(33, 84, 145, 0.2);
  background: linear-gradient(135deg, #b8d4e8 0%, var(--ihc-light) 100%);
}

/* ==================== CUOTAS Y MATERIALES SECTION ==================== */
.cuotas-instituto {
  position: relative;
  overflow: hidden;
}

/* ==================== NEWS SECTION - INSTITUTO ==================== */
.news-instituto {
  position: relative;
  overflow: hidden;
}

/* News filter buttons - Instituto style */
.news-filter-btn-ihc {
  position: relative;
  padding: 0.625rem 1.5rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: white;
  border: 2px solid transparent;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

/* Background Colors - Instituto palette */
.news-filter-btn-ihc.filter-todas { background: var(--altar-primary, #2C3E50); }
.news-filter-btn-ihc.filter-pastoral { background: #C9A961; }
.news-filter-btn-ihc.filter-secundario { background: #34495E; }
.news-filter-btn-ihc.filter-comunidad { background: #8B9B7A; }

/* Hover States */
.news-filter-btn-ihc:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  filter: brightness(1.15);
}

/* Active States */
.news-filter-btn-ihc.active {
  font-weight: 700;
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.news-filter-btn-ihc.filter-todas.active { 
  border-color: rgba(44, 62, 80, 0.8);
  background: linear-gradient(135deg, #2C3E50 0%, #223244 100%);
}

.news-filter-btn-ihc.filter-pastoral.active { 
  border-color: rgba(184, 147, 90, 0.8);
  background: linear-gradient(135deg, #C9A961 0%, #B8935A 100%);
}

.news-filter-btn-ihc.filter-secundario.active { 
  border-color: rgba(52, 73, 94, 0.8);
  background: linear-gradient(135deg, #34495E 0%, #2C3E50 100%);
}

.news-filter-btn-ihc.filter-comunidad.active { 
  border-color: rgba(122, 139, 111, 0.8);
  background: linear-gradient(135deg, #8B9B7A 0%, #7A8B6F 100%);
}

/* Category Badges - Instituto palette (match filters) */
.news-instituto .bg-amber-600 {
  background: linear-gradient(135deg, #C9A961 0%, #B8935A 100%) !important;
  color: white !important;
}

.news-instituto .bg-purple-600 {
  background: linear-gradient(135deg, #34495E 0%, #2C3E50 100%) !important;
  color: white !important;
}

.news-instituto .bg-orange-600 {
  background: linear-gradient(135deg, #8B9B7A 0%, #7A8B6F 100%) !important;
  color: white !important;
}

/* News Swiper Pagination - Instituto */
.ihcNewsSwiper .swiper-pagination {
  position: relative;
  margin-top: 2rem;
  bottom: auto;
}

.ihcNewsSwiper .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: var(--ihc-light);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.ihcNewsSwiper .swiper-pagination-bullet-active {
  background: var(--ihc-accent);
  opacity: 1;
  width: 24px;
  border-radius: 5px;
}

/* ==================== CONTACT SECTION ==================== */
/* Fondo y colores: Tailwind en template (bg-ihc-bg, text-ihc-*, from-ihc-primary to-ihc-accent) */

#contacto-ihc .contact-card {
  border-color: rgba(74, 138, 198, 0.2) !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

/* Helper para acordeones cerrados en mobile */
@media(max-width: 767px) {
  .unified-accordion-toggle.accordion-closed {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  .unified-accordion-toggle i {
    color: var(--ihc-accent) !important;
  }
}

/* ==================== ACCORDION ANIMATION ==================== */
@media(max-width: 767px) {
  .accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
  }
  .accordion-content.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 1rem;
    visibility: visible;
  }
  .accordion-inner {
    overflow: hidden;
    padding-bottom: 0.5rem;
  }
}
@media(min-width: 768px) {
  .accordion-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* ==================== UNIFIED ACCORDION TOGGLE ==================== */
.unified-accordion-toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(149, 189, 218, 0.45) !important;
  background: transparent !important;
  color: var(--ihc-primary) !important;
  font-family: "Lato", sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.unified-accordion-toggle:hover {
  opacity: 0.7;
}
@media(min-width: 768px) {
  .unified-accordion-toggle.mobile-only {
    display: none !important;
  }
}

#contacto-ihc .contact-form-card input,
#contacto-ihc .contact-form-card textarea,
#contacto-ihc .contact-form-card select {
  text-align: left !important;
}

#contacto-ihc .paragraph-divider {
  background: linear-gradient(to right, transparent, var(--ihc-primary-mid), transparent) !important;
}

/* ==================== FOOTER OVERRIDES ==================== */
body.page-template-page-instituto-hijas-de-la-cruz footer.bg-gradient-to-b {
  background: linear-gradient(
    to bottom,
    var(--ihc-primary) 0%,
    var(--ihc-accent) 85%,
    var(--ihc-primary-mid) 100%
  ) !important;
}

body.page-template-page-instituto-hijas-de-la-cruz footer .text-global-accent {
  color: var(--ihc-light) !important;
}

body.page-template-page-instituto-hijas-de-la-cruz footer .border-global-accent {
  border-color: var(--ihc-light) !important;
}

/* Scroll to Top - Instituto Aesthetic */
/* Scroll-to-top: colores en Tailwind (footer args scroll_btn_classes) */

/* ==================== NAVIGATION BUTTONS ==================== */
.news-instituto .news-swiper-button-prev,
.news-instituto .news-swiper-button-next {
  background: var(--ihc-primary);
  color: var(--ihc-white);
  border: 2px solid var(--ihc-white);
  box-shadow: 0 4px 15px rgba(26, 43, 79, 0.2);
}

.news-instituto .news-swiper-button-prev:hover,
.news-instituto .news-swiper-button-next:hover {
  background: var(--ihc-accent);
  border-color: var(--ihc-light);
}

/* ==================== DECORATIVE ELEMENTS ==================== */
.decoration-instituto path,
.decoration-instituto circle,
.decoration-instituto polygon,
.decoration-instituto ellipse {
  stroke: var(--ihc-primary-mid);
  stroke-width: 2.5;
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */
@media (max-width: 640px) {
  .news-filter-btn-ihc {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .ihcNewsSwiper .swiper-pagination {
    margin-top: 1.5rem;
  }
  
  .ihcNewsSwiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
  }
  
  .ihcNewsSwiper .swiper-pagination-bullet-active {
    width: 20px;
  }
}

/* ============================================================================
   END OF FILE
   ============================================================================ */

/* ====== RESTORED MISSING HEADER & BUTTON STYLES ====== */
.header-bg-glass-ihc {
  background-color: rgba(248, 250, 252, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.ihc-btn-primary {
  background-color: var(--ihc-primary, #1A2B4F) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 0.75rem !important;
  padding: 0.75rem 2rem !important;
  font-family: "Times New Roman", Times, serif !important;
  font-weight: bold !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.ihc-btn-primary:hover {
  background-color: var(--ihc-accent, #215491) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(26, 43, 79, 0.3) !important;
  color: #ffffff !important;
}

.text-ihc-heading {
  color: #1A2B4F !important;
}
