/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary-color: #0f172a;  /* Azul noche profundo */
    --accent-color: #2563eb;   /* Azul vibrante */
    --accent-hover: #1d4ed8;
    --text-dark: #334155;
    --text-light: #64748b;
    --white: #ffffff;
    --bg-light: #f8fafc;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--white);
    padding-top: 80px; /* IMPORTANTE: Espacio para que el menú fijo no tape nada */
}

/* Excepción: En la Home el slider debe tocar el borde superior */
body.home { padding-top: 0; }

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* =========================================
   2. HEADER & NAVEGACIÓN (CON DROPDOWN)
   ========================================= */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px);
    padding: 0.5rem 0; box-shadow: var(--shadow-sm); transition: var(--transition);
}
.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 45px; width: auto; display: block; }

nav ul { display: flex; gap: 30px; align-items: center; }
nav ul li { position: relative; }

nav ul li a {
    font-weight: 600; font-size: 0.95rem; color: var(--primary-color);
    position: relative; padding: 10px 0; display: inline-block;
}
nav ul li a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0;
    background-color: var(--accent-color); transition: var(--transition);
}
nav ul li a:hover::after, nav ul li a.active::after { width: 100%; }

/* --- Estilos del Menú Desplegable --- */
.dropdown-toggle i { font-size: 0.7rem; margin-left: 5px; transition: 0.3s; }
.dropdown:hover .dropdown-toggle i { transform: rotate(180deg); }

.dropdown-menu {
    position: absolute; top: 100%; left: -20px;
    background: var(--white); width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-radius: 8px;
    opacity: 0; visibility: hidden; transform: translateY(15px);
    transition: var(--transition); padding: 10px 0; display: block;
    border-top: 3px solid var(--accent-color); flex-direction: column;
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu li { display: block; width: 100%; margin: 0; }
.dropdown-menu li a { display: block; padding: 10px 25px; font-size: 0.9rem; color: var(--text-dark); }
.dropdown-menu li a:hover { background-color: var(--bg-light); color: var(--accent-color); }
.dropdown-menu li a::after { display: none; } /* Sin subrayado en submenú */

/* Botón Contacto destacado */
.btn-contact {
    background-color: var(--primary-color); color: var(--white) !important;
    padding: 10px 24px !important; border-radius: 50px;
}
.btn-contact:hover { background-color: var(--accent-color); }
.btn-contact::after { display: none; }

.hamburger-menu { display: none; background: none; border: none; font-size: 1.5rem; color: var(--primary-color); cursor: pointer; }

/* =========================================
   3. HERO & BANNERS
   ========================================= */
.hero-section {
    position: relative; height: 100vh; min-height: 600px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: var(--white);
}
.slider-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.slider-item {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; opacity: 0;
    transform: scale(1.1); transition: opacity 1.5s ease, transform 6s ease;
}
.slider-item.active { opacity: 1; transform: scale(1); }
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(15,23,42,0.4), rgba(15,23,42,0.8)); }
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-content h1 { font-size: 3.5rem; color: var(--white); margin-bottom: 1.5rem; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.hero-content p { font-size: 1.25rem; margin-bottom: 2.5rem; opacity: 0.95; }

.page-header {
    position: relative; height: 40vh; min-height: 300px;
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: var(--white);
    margin-top: -80px; padding-top: 80px; /* Compensa padding del body */
}
.page-header h1 { color: var(--white); font-size: 3rem; position: relative; z-index: 2; }
.page-header p { position: relative; z-index: 2; opacity: 0.9; font-size: 1.2rem; }

/* =========================================
   4. COMPONENTES GLOBALES
   ========================================= */
.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }

/* Botones */
.btn { display: inline-block; padding: 12px 30px; border-radius: 50px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-primary { background-color: var(--accent-color); color: var(--white); border: 2px solid var(--accent-color); }
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--white); color: var(--white); background: transparent; }
.btn-outline:hover { background: var(--white); color: var(--primary-color); }

/* Animaciones */
.fade-in-up { opacity: 0; transform: translateY(30px); animation: fadeInUp 0.8s forwards; }
.delay-1 { animation-delay: 0.2s; } .delay-2 { animation-delay: 0.4s; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   5. ESTILOS DE SERVICIOS (ACTUALIZADO PARA 6 ITEMS)
   ========================================= */
/* Grid principal de servicios */
.detailed-services-grid {
    display: grid;
    /* Crea 2 columnas iguales que se ajustan automáticamente */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); 
    gap: 30px;
}

/* Tarjeta individual de servicio */
.service-feature {
    display: flex;
    flex-direction: column; /* Icono arriba, texto abajo */
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f1f1;
    transition: var(--transition);
    text-align: center; /* Texto centrado se ve mejor en grids */
    align-items: center;
    height: 100%; /* Para que todas tengan la misma altura */
}

.service-feature:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.feature-icon {
    width: 90px;
    height: 90px;
    background: #eff6ff;
    color: var(--accent-color);
    border-radius: 50%; /* Círculo perfecto */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 25px;
    transition: var(--transition);
}

.service-feature:hover .feature-icon {
    background: var(--accent-color);
    color: var(--white);
}

.service-feature h3 { font-size: 1.5rem; margin-bottom: 15px; }
.service-feature p { color: var(--text-light); font-size: 0.95rem; }

/* =========================================
   6. OTROS ESTILOS DE PÁGINAS (About, Career, News, etc)
   ========================================= */
/* About */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.value-card { background: var(--white); padding: 35px; border-radius: 15px; box-shadow: var(--shadow-sm); border-bottom: 4px solid transparent; transition: var(--transition); }
.value-card:hover { transform: translateY(-5px); border-bottom-color: var(--accent-color); }
.value-card .icon-wrap { font-size: 2rem; color: var(--accent-color); margin-bottom: 20px; }

/* Career */
.job-item { background: var(--white); padding: 25px; border-radius: 10px; border: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; transition: var(--transition); }
.job-item:hover { box-shadow: var(--shadow-sm); border-color: var(--accent-color); }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.news-card { background: var(--white); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; border: 1px solid #eee; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.news-header-visual { height: 180px; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--white); position: relative; }
.category-tag { position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.25); padding: 5px 12px; font-size: 0.75rem; border-radius: 20px; text-transform: uppercase; font-weight: bold; }
.sustainability { background: linear-gradient(135deg, #10b981, #059669); }
.strategy { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.community { background: linear-gradient(135deg, #f59e0b, #d97706); }
.news-body { padding: 25px; flex: 1; display: flex; flex-direction: column; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; }
.styled-form input, .styled-form textarea { width: 100%; padding: 12px; margin-bottom: 20px; border: 1px solid #ddd; border-radius: 8px; background: #fafafa; }
.branch-card { background: var(--white); padding: 30px; border-radius: 15px; border-left: 5px solid var(--accent-color); box-shadow: var(--shadow-sm); margin-bottom: 20px; }

/* Links */
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 30px; }
.link-card { background: var(--white); padding: 30px; border-radius: 12px; box-shadow: var(--shadow-sm); display: flex; align-items: flex-start; gap: 20px; border: 1px solid #eee; transition: var(--transition); }
.link-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent-color); }
.link-icon { width: 60px; height: 60px; background: #f1f5f9; color: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.link-card:hover .link-icon { background: var(--primary-color); color: var(--white); transition: 0.3s; }

/* Catalog */
.pdf-wrapper { height: 80vh; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid #ddd; }
.pdf-wrapper iframe { width: 100%; height: 100%; border: none; }

/* Thank You & 404 */
.thank-you-section { min-height: 70vh; display: flex; align-items: center; justify-content: center; }
.success-icon { font-size: 5rem; color: #10b981; margin-bottom: 20px; }

/* =========================================
   7. FOOTER
   ========================================= */
footer { background-color: var(--primary-color); color: #94a3b8; padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-logo { height: 40px; margin-bottom: 20px; filter: brightness(0) invert(1); }
.footer-col h4 { color: var(--white); margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-bottom { text-align: center; padding: 20px 0; }

/* =========================================
   8. RESPONSIVE MOBILE
   ========================================= */
@media (max-width: 900px) {
    .hamburger-menu { display: block; }
    
    /* Menú Móvil */
    nav ul {
        position: fixed; top: 70px; right: -100%; width: 100%; height: calc(100vh - 70px);
        background: var(--white); flex-direction: column; padding: 40px; align-items: flex-start;
        transition: 0.3s; box-shadow: -5px 0 15px rgba(0,0,0,0.1); overflow-y: auto;
    }
    nav ul.nav-active { right: 0; }
    nav ul li { width: 100%; }
    nav ul li a { display: block; padding: 15px 0; border-bottom: 1px solid #eee; }
    
    /* Dropdown Móvil */
    .dropdown-menu {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; width: 100%; background: #f9f9f9; display: none; padding-left: 20px;
    }
    .dropdown.active .dropdown-menu { display: block; } /* Se activa con JS */

    /* Grid General Móvil */
    .detailed-services-grid { grid-template-columns: 1fr; }
    .news-grid, .contact-grid, .footer-grid, .links-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.5rem; }
    .link-card { flex-direction: column; text-align: center; align-items: center; }
}
/* =========================================
   ESTILOS NUEVOS PARA CATÁLOGOS MULTIPLES
   ========================================= */

.catalog-grid {
    display: grid;
    /* Crea 2 columnas que se ajustan */
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); 
    gap: 40px;
    margin-top: 20px;
}

.catalog-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.catalog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

/* Icono decorativo grande */
.catalog-icon {
    width: 80px;
    height: 80px;
    background-color: #fff1f2; /* Color suave (rojo pdf) */
    color: #e11d48;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.catalog-card h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.catalog-card p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Contenedor de botones */
.catalog-actions {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.btn-view {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    flex: 1; /* Ocupa espacio igual */
    border: 2px solid var(--primary-color);
}

.btn-view:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-download {
    background-color: transparent;
    color: var(--text-dark);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    flex: 1;
    border: 2px solid #ddd;
}

.btn-download:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Responsive para celular */
@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: 1fr; /* Una sola columna */
    }
    .catalog-actions {
        flex-direction: column; /* Botones uno arriba de otro en cel */
    }
}