/* =======================================================
   VARIABLES GLOBALES (PALETA MODERNA)
   ======================================================= */
:root {
    --primary: #1A426B;       /* Azul C.E.D. */
    --primary-light: #265a91; 
    --accent: #eef2f6;        /* Gris azulado muy suave para fondos */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --radius-lg: 24px;
    --radius-md: 16px;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: #ffffff;
    scroll-behavior: smooth;
}

/* =======================================================
   NAVEGACIÓN FLOTANTE (ESTILO APP)
   ======================================================= */
.navbar-floating {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(26, 66, 107, 0.08);
    margin-top: 20px;
    padding: 10px 30px;
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}
.navbar-brand { font-weight: 800; color: var(--primary) !important; letter-spacing: -0.5px; }
.nav-link { font-weight: 500; font-size: 0.95rem; color: var(--text-muted) !important; margin: 0 10px; transition: 0.3s; }
.nav-link:hover { color: var(--primary) !important; }

.btn-cta {
    background-color: var(--primary);
    color: #ffffff !important;
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(26, 66, 107, 0.25); }

/* =======================================================
   HERO SECTION (SPLIT LAYOUT)
   ======================================================= */
.hero-split {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
    position: relative;
    overflow: hidden;
}
.hero-title { font-size: 4rem; font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; color: var(--text-main); margin-bottom: 25px; }
.hero-title span { color: var(--primary); }
.hero-text { font-size: 1.2rem; color: var(--text-muted); font-weight: 300; margin-bottom: 40px; }

/* Composición de imágenes superpuestas 
.hero-img-container { position: relative; height: 500px; }
.hero-img-main { width: 80%; height: 400px; object-contain: cover; object-position: center; border-radius: var(--radius-lg); box-shadow: 0 20px 40px rgba(0,0,0,0.1); position: absolute; right: 0; top: 0; z-index: 2; border: 8px solid white; }
.hero-img-sub { width: 50%; height: 250px; object-fit: cover; object-position: center; border-radius: var(--radius-md); box-shadow: 0 15px 30px rgba(0,0,0,0.1); position: absolute; left: 0; bottom: 40px; z-index: 3; border: 6px solid white; }
*/

/* Composición de imágenes superpuestas */
.hero-img-container { position: relative; height: 500px; }
.hero-img-main { width: 82%; height: 400px; object-fit: cover; object-position: center; border-radius: var(--radius-lg); box-shadow: 0 20px 40px rgba(0,0,0,0.1); position: absolute; right: 0; top: 0; z-index: 2; border: 8px solid white; }
.hero-img-sub { width: 55%; height: 300px; object-fit: cover; object-position: center; border-radius: var(--radius-md); box-shadow: 0 15px 30px rgba(0,0,0,0.1); position: absolute; left: 0; bottom: 40px; z-index: 3; border: 6px solid white; }
/* =======================================================
   SERVICIOS (TARJETAS MODERNAS)
   ======================================================= */
.section-tag { display: inline-block; background: var(--accent); color: var(--primary); font-weight: 600; padding: 8px 20px; border-radius: 50px; font-size: 0.85rem; margin-bottom: 15px; letter-spacing: 1px; text-transform: uppercase; }
.section-title { font-size: 2.5rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; margin-bottom: 50px; }

.service-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 40px;
    height: 100%;
    border: 1px solid #e2e8f0;
    transition: all 0.4s ease;
}
.service-card:hover { border-color: var(--primary); box-shadow: 0 20px 40px rgba(26, 66, 107, 0.08); transform: translateY(-5px); }
.service-icon-wrapper { width: 70px; height: 70px; background: var(--accent); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--primary); margin-bottom: 25px; transition: 0.4s; }
.service-card:hover .service-icon-wrapper { background: var(--primary); color: white; transform: rotate(-10deg); }
.service-card h4 { font-weight: 700; font-size: 1.4rem; margin-bottom: 20px; }
.service-list li { margin-bottom: 12px; font-size: 0.95rem; color: var(--text-muted); display: flex; align-items: flex-start; }
.service-list li i { color: #10b981; margin-right: 12px; font-size: 0.8rem; background: #d1fae5; padding: 4px; border-radius: 50%; margin-top: 3px; }

/* =======================================================
   PREPARACIONES (SISTEMA DE PESTAÑAS - TABS)
   ======================================================= */
.preparaciones-bg { background-color: var(--primary); color: white; border-radius: var(--radius-lg); padding: 60px; margin-top: 40px; }

.nav-pills-custom .nav-link { color: #ffffff !important; opacity: 1 !important; font-weight: 500; padding: 15px 25px; border-radius: 12px; margin-bottom: 10px; text-align: left; transition: 0.3s; }
.nav-pills-custom .nav-link:hover { background: rgba(255,255,255,0.2); color: white; border-color: rgba(255,255,255,0.3); }
.nav-pills-custom .nav-link.active { background: #ffffff; color: var(--primary) !important; font-weight: 700; box-shadow: 0 10px 20px rgba(0,0,0,0.1); border: 1px solid transparent; }
.tab-pane-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-md); padding: 40px; backdrop-filter: blur(10px); }
.btn-download-horario { background: var(--primary-light); color: #ffffff; border: none; padding: 15px 25px; border-radius: 12px; font-weight: 600; font-size: 0.95rem; transition: 0.3s; width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; text-decoration: none; }
.btn-download-horario:hover { background: var(--primary); color: #ffffff; transform: translateX(5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* =======================================================
   OBRAS SOCIALES Y RESEÑAS
   ======================================================= */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.brand-item { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; text-align: center; font-weight: 600; color: var(--text-muted); transition: 0.3s; }
.brand-item:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.review-box { background: white; border-radius: var(--radius-lg); padding: 40px; border: 1px solid #e2e8f0; box-shadow: 0 10px 30px rgba(0,0,0,0.02); height: 100%; }
.review-box .stars { color: #fbbc05; margin-bottom: 15px; font-size: 1.1rem; }
.review-text { font-size: 1.05rem; line-height: 1.6; color: var(--text-main); font-style: italic; margin-bottom: 25px; }
.review-author { display: flex; align-items: center; }
.review-author-avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.2rem; margin-right: 15px; }

/* =======================================================
   INFRAESTRUCTURA MASONRY (GRILLA ASIMÉTRICA OPTIMIZADA)
   ======================================================= 
.infra-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.infra-grid img { width: 100%; border-radius: var(--radius-md); object-fit: cover; object-position: center; display: block; }
.img-tall { height: 520px; }
.img-short { height: 250px; } */
/* =======================================================
COMPOSICIÓN ASIMÉTRICA DE IMÁGENES (3 FOTOS)
======================================================= */
.infra-composition {
  display: grid;
  grid-template-columns: 1.1fr 1fr;   /* Columna izquierda un poco más ancha */
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  height: 520px;                      /* Altura fija para mantener proporción */
}

/* Imagen grande izquierda: ocupa las 2 filas */
.infra-img-tall {
  grid-row: 1 / 3;
  grid-column: 1 / 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Stack derecho: 2 imágenes apiladas */
.infra-stack {
  grid-row: 1 / 3;
  grid-column: 2 / 3;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.infra-img-short {
  width: 100%;
  height: calc(50% - 8px);            /* Mitad menos la mitad del gap */
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* =======================================================
RESPONSIVE
======================================================= */
@media (max-width: 991px) {
  .infra-composition {
    grid-template-columns: 1fr 1fr;
    height: 420px;
  }
}

@media (max-width: 768px) {
  .infra-composition {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
    gap: 12px;
  }
  .infra-img-tall {
    grid-row: auto;
    grid-column: auto;
    height: 280px;
  }
  .infra-stack {
    grid-row: auto;
    grid-column: auto;
  }
  .infra-img-short {
    height: 220px;
  }
}


/* =======================================================
   FOOTER
   ======================================================= */
.modern-footer { background: #0f172a; color: #94a3b8; padding: 80px 0 30px; margin-top: 80px; border-top-left-radius: 40px; border-top-right-radius: 40px; }
.modern-footer h5 { color: white; font-weight: 700; font-size: 1.2rem; margin-bottom: 30px; }

/* =======================================================
   ACORDEÓN DE PREPARACIONES (DISEÑO OSCURO)
   ======================================================= */
.accordion-prep { 
    --bs-accordion-bg: rgba(255,255,255,0.05); 
    --bs-accordion-color: white; 
    --bs-accordion-border-color: rgba(255,255,255,0.1); 
    --bs-accordion-btn-color: white; 
    --bs-accordion-active-color: var(--primary); 
    --bs-accordion-active-bg: white; 
    --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); 
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231A426B'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); 
}
.accordion-prep .accordion-button { border: 1px solid rgba(255,255,255,0.1); font-weight: 700; padding: 18px 25px; transition: 0.3s; }
.accordion-prep .accordion-button:not(.collapsed) { border-color: transparent; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.accordion-prep .accordion-body { padding: 10px 0 10px 20px; border-left: 2px solid rgba(255,255,255,0.1); margin-left: 20px; }
.accordion-prep .accordion-body .nav-link { font-size: 0.95rem; padding: 12px 20px; }

/* =======================================================
   RESPONSIVE AJUSTES (CONTROL DE ERRORES)
   ======================================================= */
@media (max-width: 991px) {
    .navbar-floating { border-radius: 16px; margin: 10px; padding: 10px 20px; }
    .hero-split { padding: 120px 0 60px; text-align: center; }
    .hero-title { font-size: 3rem; }
    .hero-img-container { margin-top: 50px; height: 400px; }
    .hero-img-main { width: 90%; right: 5%; height: 320px; }
    .hero-img-sub { width: 60%; left: 5%; bottom: 10px; height: 220px; }
    .preparaciones-bg { padding: 30px 20px; }
    
    .nav-pills-custom { display: flex !important; flex-direction: column !important; white-space: normal !important; margin-bottom: 0; padding-bottom: 0; }
    .nav-pills-custom .nav-link { margin-right: 0 !important; margin-bottom: 8px !important; text-align: left; }
    
    .tab-pane-card { padding: 25px 20px; margin-top: 25px; position: relative; border-top: 2px solid rgba(255,255,255,0.2); }

    #v-pills-tabContent:not(:has(.tab-pane.show)) { display: none !important; }

    .tab-pane.show.active.tab-pane-card::before {
        content: ""; position: absolute; top: -17px; left: 50%; transform: translateX(-50%);
        border-width: 0 15px 15px 15px; border-style: solid;
        border-color: transparent transparent rgba(255,255,255,0.2) transparent;
    }

    .img-tall { height: 420px; }
    .img-short { height: 200px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .infra-grid { grid-template-columns: 1fr; gap: 15px; }
    .img-tall, .img-short { height: 280px; }
    .d-flex.pt-lg-5 { padding-top: 0 !important; }
    .btn-cta, .btn-light { width: 100% !important; min-width: auto !important; margin-bottom: 10px; }
}