/* ============================================
   GIFOM SOFOM ENR - Estilos Principales
   Multi-página con banners de imagen
   ============================================ */

/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1e5a8e;
    --secondary-blue: #4a9fd8;
    --light-blue: #87ceeb;
    --dark-blue: #0d3b66;
    --white: #ffffff;
    --light-gray: #f5f8fa;
    --medium-gray: #e0e6ed;
    --text-dark: #2c3e50;
    --text-light: #666;
    --warning-yellow: #ffc107;
    --warning-red: #dc3545;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* ============================================
   BANNER DE PÁGINA
   ============================================ */
.page-banner {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--secondary-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.page-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 90, 142, 0.7) 0%, rgba(74, 159, 216, 0.7) 100%);
    z-index: 2;
}

.page-banner-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 20px;
    max-width: 800px;
}

.page-banner-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-banner-content p {
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Banner pequeño para páginas internas */
.page-banner.small {
    height: 250px;
}

.page-banner.small .page-banner-content h1 {
    font-size: 36px;
}

.page-banner.small .page-banner-content p {
    font-size: 18px;
}

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */
header {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Hide mobile menu toggle on desktop by default; shown via media query on small screens */
.mobile-menu-toggle {
    display: none;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section img {
    height: 50px;
    width: auto;
}

.logo-section h1 {
    font-size: 32px;
    font-weight: bold;
}

.logo-section p {
    font-size: 14px;
    opacity: 0.9;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 5px;
}

nav a:hover,
nav a.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--light-blue);
}

/* ============================================
   CONTAINER Y SECCIONES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

section h2 {
    color: var(--primary-blue);
    font-size: 36px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--secondary-blue);
    border-radius: 2px;
}

section h3 {
    color: var(--primary-blue);
    font-size: 24px;
    margin: 30px 0 15px;
}

section p {
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 17px;
    color: var(--text-dark);
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    background: var(--light-gray);
    padding: 15px 0;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb ul {
    list-style: none;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--secondary-blue);
}

.breadcrumb span {
    color: var(--text-light);
}

/* ============================================
   MODAL DE AVISO DE SEGURIDAD
   ============================================ */
.modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header i {
    font-size: 60px;
    color: var(--warning-red);
    margin-bottom: 15px;
}

.modal-header h2 {
    color: var(--primary-blue);
    font-size: 28px;
    margin-bottom: 10px;
}

.modal-body {
    text-align: left;
}

.modal-body h3 {
    color: var(--primary-blue);
    font-size: 18px;
    margin: 25px 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body p {
    margin-bottom: 15px;
    line-height: 1.8;
    font-size: 16px;
}

.une-box {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 5px solid var(--primary-blue);
}

.une-box h4 {
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.une-box p {
    font-size: 14px;
    margin-bottom: 8px;
}

.modal-close {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: block;
    margin: 30px auto 0;
    transition: background 0.3s;
}

.modal-close:hover {
    background: var(--dark-blue);
}

/* ============================================
   NOTA NORMATIVA
   ============================================ */
.nota-normativa {
    background: var(--light-gray);
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    border-left: 5px solid var(--primary-blue);
    font-size: 15px;
    line-height: 1.8;
}

/* ============================================
   FILOSOFÍA CARDS
   ============================================ */
.filosofia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.filosofia-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
    border-top: 4px solid var(--secondary-blue);
}

.filosofia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.filosofia-card h4 {
    color: var(--primary-blue);
    font-size: 22px;
    margin-bottom: 15px;
}

.filosofia-card ul {
    list-style: none;
    padding-left: 0;
}

.filosofia-card li {
    padding: 10px 0;
    border-bottom: 1px solid var(--medium-gray);
}

.filosofia-card li:last-child {
    border-bottom: none;
}

.filosofia-card li strong {
    color: var(--primary-blue);
}

/* ============================================
   ADVERTENCIAS
   ============================================ */
.advertencias-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    padding: 35px;
    border-radius: 15px;
    border: 3px solid var(--warning-yellow);
    margin: 40px 0;
    box-shadow: 0 5px 25px rgba(255, 193, 7, 0.2);
}

.advertencias-box h3 {
    color: #856404;
    font-size: 26px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.advertencias-box p {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #856404;
    border-left: 5px solid var(--warning-yellow);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ============================================
   PRODUCTOS
   ============================================ */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.producto-card {
    background: linear-gradient(135deg, white 0%, var(--light-gray) 100%);
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.producto-card:hover {
    border-color: var(--secondary-blue);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.producto-card h3 {
    color: var(--primary-blue);
    font-size: 24px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.producto-card i {
    color: var(--secondary-blue);
    font-size: 28px;
}

.producto-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.producto-link {
    background: var(--primary-blue);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.producto-link:hover {
    background: var(--dark-blue);
}

/* ============================================
   FAQ
   ============================================ */
.faq-container {
    max-width: 900px;
    margin: 40px auto;
}

.faq-item {
    background: white;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.faq-question {
    background: var(--light-gray);
    padding: 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
    font-weight: 600;
    font-size: 18px;
    color: var(--primary-blue);
}

.faq-question:hover {
    background: var(--medium-gray);
}

.faq-question i {
    transition: transform 0.3s;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-answer.active {
    padding: 25px;
    max-height: 1000px;
}

/* ============================================
   ENLACES AUTORIDADES
   ============================================ */
.enlaces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.enlace-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-dark);
    border: 2px solid transparent;
}

.enlace-card:hover {
    border-color: var(--secondary-blue);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.enlace-card i {
    font-size: 40px;
    color: var(--secondary-blue);
    margin-bottom: 15px;
}

.enlace-card h4 {
    color: var(--primary-blue);
    font-size: 16px;
}

/* ============================================
   UNE SECTION
   ============================================ */
.une-section {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--secondary-blue) 100%);
    padding: 50px;
    border-radius: 15px;
    color: white;
    margin: 40px 0;
}

.une-content {
    max-width: 900px;
    margin: 0 auto;
}

.une-section h3 {
    color: var(--primary-blue);
    font-size: 28px;
    margin-bottom: 25px;
}

.une-details {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    margin-top: 20px;
}

.une-details p {
    margin-bottom: 12px;
    font-size: 16px;
}

.une-details strong {
    color: var(--primary-blue);
}

.flujo-box {
    background: white;
    color: var(--text-dark);
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
}

.flujo-box h4 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 22px;
}

.flujo-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.flujo-step {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid var(--secondary-blue);
}

.flujo-step h5 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 18px;
}

/* ============================================
   CONTACTO
   ============================================ */
.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contacto-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.contacto-card i {
    font-size: 50px;
    color: var(--secondary-blue);
    margin-bottom: 20px;
}

.contacto-card h4 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 20px;
}

.contacto-card p {
    font-size: 16px;
}

.contacto-card a {
    color: var(--secondary-blue);
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 50px 20px 30px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--light-blue);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--light-blue);
}

.footer-logos {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.footer-logos a {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.footer-logos a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.footer-warning {
    background: rgba(255, 193, 7, 0.2);
    padding: 25px;
    border-radius: 10px;
    margin-top: 40px;
    border: 2px solid var(--warning-yellow);
    text-align: center;
}

.footer-warning p {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 40px;
    font-size: 14px;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--secondary-blue);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 999;
}

.scroll-top:hover {
    background: var(--primary-blue);
    transform: translateY(-5px);
}

.scroll-top.visible {
    display: flex;
}

/* ============================================
   CTA BUTTON
   ============================================ */
.cta-button {
    background: var(--primary-blue);
    color: white;
    padding: 18px 45px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.cta-button:hover {
    background: var(--dark-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
    }

    /* Mobile hamburger button */
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        color: white;
        border: none;
        font-size: 22px;
        cursor: pointer;
        padding: 8px 10px;
        border-radius: 6px;
    }

    .mobile-menu-toggle:focus {
        outline: 2px solid rgba(255,255,255,0.2);
    }

    nav {
        width: 100%;
    }

    /* Hide nav by default on small screens - toggled with JS */
    nav ul {
        display: none;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* When JS adds .mobile-active to nav, show the list */
    nav.mobile-active ul {
        display: flex;
        width: 100%;
        padding: 10px 0;
        background: transparent;
        flex-direction: column;
        gap: 8px;
    }

    .page-banner {
        height: 300px;
    }

    .page-banner-content h1 {
        font-size: 32px;
    }

    .page-banner-content p {
        font-size: 16px;
    }

    .page-banner.small {
        height: 200px;
    }

    .page-banner.small .page-banner-content h1 {
        font-size: 24px;
    }

    section h2 {
        font-size: 28px;
    }

    .productos-grid,
    .filosofia-grid,
    .contacto-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 25px;
    }

    .modal-header h2 {
        font-size: 22px;
    }

    .une-section {
        padding: 30px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .section-content {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .page-banner-content h1 {
        font-size: 24px;
    }

    .page-banner-content p {
        font-size: 14px;
    }

    .cta-button {
        padding: 15px 30px;
        font-size: 16px;
    }

    .producto-links {
        flex-direction: column;
    }

    .scroll-top {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}