/* ============================================
   ACORDEÓN — SISTEMA DE ESTILOS COMPLETO
   ============================================ */

  /* Contenedor */
  #accordion {
    display: flex;
    height: 500px;
    border: 1px solid rgba(23,55,96,0.08);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 40px rgba(23,55,96,0.06);
    margin: 0 1.5rem;
  }

  /* Panel base */
  .pillar {
    flex: 1;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-right: 1px solid rgba(23,55,96,0.1);
    transition: flex 0.5s ease, background 0.3s ease;
    background: white;
  }
  .pillar:last-child {
    border-right: none;
  }

  /* --- Estado 1: todos cerrados --- */
  .pillar-closed {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
  }
  .pillar-label {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: rgba(23,55,96,0.4);
    text-transform: uppercase;
    white-space: nowrap;
    font-family: var(--font-primary);
    transition: color 0.3s ease;
  }
  .pillar-title {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-primary);
    line-height: 1.3;
    text-align: center;
    transition: color 0.3s ease;
  }
  .pillar[data-index="0"] .pillar-title { color: #173760; }
  .pillar[data-index="1"] .pillar-title { color: #3BA99C; }
  .pillar[data-index="2"] .pillar-title { color: #4FA0FF; }
  .pillar[data-index="0"] .pillar-label { color: rgba(23,55,96,0.5); }
  .pillar[data-index="1"] .pillar-label { color: rgba(59,169,156,0.5); }
  .pillar[data-index="2"] .pillar-label { color: rgba(79,160,255,0.5); }

  /* Hover Estado 1: solo cuando no hay ningún pilar activo */
  #accordion:not(.has-active) .pillar:hover {
    background: #173760;
  }
  #accordion:not(.has-active) .pillar:hover .pillar-title {
    color: #ffffff;
  }
  #accordion:not(.has-active) .pillar:hover .pillar-label {
    color: rgba(255,255,255,0.6);
  }

  /* --- Estado 2: panel colapsado --- */
  .pillar-closed.collapsed {
    justify-content: center;
    align-items: center;
    padding: 1rem;
  }
  .pillar-closed.collapsed .pillar-label {
    position: static;
    transform: none;
    white-space: normal;
    text-align: center;
    margin-bottom: 0.5rem;
  }
  .pillar-closed.collapsed .pillar-title {
    font-size: 0.875rem;
    text-align: center;
    color: rgba(23,55,96,0.5);
  }

  /* --- Estado 3: panel activo/expandido --- */
  .pillar.is-active {
    flex: 4;
    cursor: default;
  }
  .pillar.is-active .pillar-closed {
    display: none;
  }

  /* Panel abierto: oculto por defecto, flex cuando activo */
  .pillar-open {
    display: none;
    height: 100%;
    flex-direction: column;
    justify-content: flex-start;
    padding: 4rem 3rem 3rem;
    gap: 1.25rem;
    background-size: cover;
    background-position: center;
  }
  .pillar.is-active .pillar-open {
    display: flex;
  }

  /* Imágenes de fondo */
  .pillar-open--01 { background-image: url('/images/pilar-01.jpg'); }
  .pillar-open--02 { background-image: url('/images/pilar-02.jpg'); }
  .pillar-open--03 { background-image: url('/images/pilar-03.jpg'); }

  /* Overlays para pilares 02 y 03 */
  .pillar-open--02::before,
  .pillar-open--03::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
  }
  .pillar-open--02::before { background: rgba(59, 169, 156, 0.55); }
  .pillar-open--03::before { background: rgba(79, 160, 255, 0.45); }
  .pillar-open--02 > *,
  .pillar-open--03 > * {
    position: relative;
    z-index: 1;
  }

  /* Contenido del panel abierto */
  .pillar-open-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-family: var(--font-primary);
  }
  .pillar-open--01 .pillar-open-label { color: #4FA0FF; }
  .pillar-open--02 .pillar-open-label { color: #ffffff; }
  .pillar-open--03 .pillar-open-label { color: #E8EBEF; }

  .pillar-open h3 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 2.5vw, 2.75rem);
    color: white;
    line-height: 1.1;
  }
  .pillar-open p {
    color: rgba(232,235,239,0.9);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 32rem;
    font-family: var(--font-primary);
  }

  /* Botones */
  .pillar-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-decoration: none;
    width: fit-content;
    font-family: var(--font-primary);
    transition: background 0.25s ease, color 0.25s ease;
  }
  .pillar-btn--01 { background: white; color: #173760; }
  .pillar-btn--01:hover { background: #4FA0FF; color: white; }
  .pillar-btn--02 { background: #173760; color: white; }
  .pillar-btn--02:hover { background: white; color: #173760; }
  .pillar-btn--03 { background: white; color: #173760; }
  .pillar-btn--03:hover { background: #173760; color: white; }

  /* Botón CTA */
  .cta-btn {
    transition: background 0.25s ease, color 0.25s ease;
  }
  .cta-btn:hover {
    background: #4FA0FF !important;
    color: white !important;
  }

  /* ============================================
     HERO — ANIMACIONES DE ENTRADA
     ============================================ */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero-line-1,
  .hero-line-2,
  .hero-line-3,
  .hero-subtitle,
  .hero-desc {
    opacity: 0;
    animation: fadeUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .hero-line-1   { animation-delay: 0s; }
  .hero-line-2   { animation-delay: 0.5s; }
  .hero-line-3   { animation-delay: 1s; }
  .hero-subtitle { animation-delay: 1.4s; }
  .hero-desc     { animation-delay: 1.6s; }
  .hero-cta      { animation-delay: 1.8s; }

  /* ══════════════════════════════════════════
     ANIMACIONES DE SCROLL
  ══════════════════════════════════════════ */
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE — TABLET Y MÓVIL
   ============================================ */

@media (max-width: 1023px) {
  #home-hero-content {
    padding: 0 2rem !important;
    margin-left: 1.5rem !important;
  }
  .intro-grid {
    grid-template-columns: 1fr !important;
    gap: 4rem !important;
  }
  #vision-and-pillars {
    padding: 5rem 0 !important;
  }
}

@media (max-width: 767px) {
  #home-hero-section {
    height: auto !important;
    min-height: 100svh !important;
    align-items: flex-start !important;
    padding-top: 5rem !important;
    padding-bottom: 3rem !important;
  }
  #home-hero-content {
    padding: 0 1.5rem !important;
    margin-left: 0 !important;
    max-width: 100% !important;
  }
  .intro-grid {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
  }
  #vision-and-pillars {
    padding: 4rem 0 !important;
  }
  #accordion {
    flex-direction: column !important;
    height: auto !important;
    margin: 0 1rem !important;
  }
  .pillar {
    flex: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(23,55,96,0.1) !important;
    min-height: 64px;
  }
  .pillar:last-child {
    border-bottom: none !important;
  }
  .pillar-closed {
    height: auto !important;
    min-height: 64px;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1rem 1.25rem !important;
    gap: 0.75rem;
  }
  .pillar-label {
    position: static !important;
    transform: none !important;
    white-space: nowrap !important;
    flex-shrink: 0;
  }
  .pillar-title {
    font-size: 0.9375rem !important;
    text-align: left !important;
    flex: 1;
  }
  .pillar.is-active {
    flex: none !important;
  }
  .pillar-open {
    height: auto !important;
    min-height: 260px;
    padding: 2rem 1.25rem !important;
  }
  .pillar-closed.collapsed {
    height: auto !important;
    min-height: 64px;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1rem 1.25rem !important;
  }
  .pillar-closed.collapsed .pillar-label {
    position: static !important;
    transform: none !important;
    white-space: nowrap !important;
    margin-bottom: 0 !important;
    text-align: left !important;
  }
  .pillar-closed.collapsed .pillar-title {
    text-align: left !important;
    font-size: 0.9375rem !important;
    flex: 1;
  }
}
