/* --- 1. Variables y Globales --- */
:root {
    --primary-color: #005A9C; /* Azul Profesional (Confianza, SEP) */
    --secondary-color: #FFC107; /* Amarillo/Dorado (Sinergia, Valor) */
    --dark-color: #222;
    --text-color: #444;
    --light-color: #f7f9fc;
    --white-color: #ffffff;
    --shadow: 0 4px 12px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white-color);
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 40px; }
h3 { font-size: 1.5rem; }

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

section {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}
.btn-primary:hover {
    background-color: #004a80;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 90, 156, 0.2);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}
.btn-secondary:hover {
    background-color: #e6af00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

/* --- Animación de Scroll --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 2. Header y Navegación --- */
header {
    position: sticky;
    top: 0;
    background-color: var(--white-color);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    transition: padding 0.3s ease;
}

.navbar .logo {
    display: flex;
    align-items: center;
}
.navbar .logo img {
    height: 100px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 50px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-links a:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: rgba(0, 90, 156, 0.05);
}

.nav-links a.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-nav {
    border: 2px solid var(--dark-color);
}

.btn-nav:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* --- 3. Hero Section --- */
#hero {
    background: linear-gradient(rgba(0, 90, 156, 0.8), rgba(0, 90, 156, 0.7)), url('https://images.unsplash.com/photo-1543269865-cbf427effbad?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80');
    background-size: cover;
    background-position: center;
    height: 90vh;
    display: flex;
    align-items: center;
    color: var(--white-color);
    padding: 0;
}

#hero .container {
    max-width: 800px;
}

#hero h1 {
    color: var(--white-color);
    font-size: 3.5rem;
    margin-bottom: 20px;
}

#hero .subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

#hero .cta-group a {
    margin: 5px;
}

/* --- 4. Segmentos Section --- */
#segmentos {
    background-color: var(--light-color);
}

.segmentos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.segmento-card {
    background-color: var(--white-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.segmento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.segmento-card .icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.segmento-card h3 {
    margin-bottom: 15px;
}

/* --- 5. Certificaciones Section --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.cert-card {
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}
.cert-card:hover {
    transform: translateY(-5px);
}

.cert-card-header {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 25px 30px;
    text-align: center;
}
.cert-card-header h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 5px;
}
.cert-card-header p {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--white-color);
    opacity: 0.9;
}

.cert-card-body {
    padding: 30px;
    flex-grow: 1;
}

.cert-card-body p {
    margin-bottom: 20px;
}

.cert-card-footer {
    padding: 0 30px 30px;
    text-align: center;
}

/* --- 6. Proceso Section --- */
#proceso {
    background-color: var(--light-color);
}

.proceso-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* La línea central */
.proceso-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    z-index: 1;
}

.proceso-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    z-index: 2;
}

/* Círculo en la línea */
.proceso-item::after {
    content: '\f00c'; /* Icono de check de Font Awesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    width: 40px;
    height: 40px;
    right: -20px;
    background-color: var(--primary-color);
    border: 4px solid var(--secondary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 3;
    color: var(--white-color);
    text-align: center;
    line-height: 34px;
    font-size: 1.2rem;
}

.proceso-item.left {
    left: 0;
    text-align: right;
}

.proceso-item.right {
    left: 50%;
    text-align: left;
}

.proceso-item.right::after {
    left: -20px;
}

.proceso-content {
    padding: 20px 30px;
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.proceso-content h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
}

/* --- 7. Footer --- */
footer {
    background-color: var(--dark-color);
    color: #ccc;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 40px;
}

footer .logo {
    display: inline-block;
    margin-bottom: 15px;
}
footer .logo img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

footer h4 {
    color: var(--white-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
}
.footer-links a {
    color: #ccc;
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: var(--white-color);
}

.social-links {
    margin-top: 20px;
}
.social-links a {
    color: var(--white-color);
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}
.social-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
}

/* --- 8. Responsividad (Mobile-First) --- */

/* Tablet */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }

    #hero h1 { font-size: 3rem; }

    .cert-grid {
        grid-template-columns: 1fr 1fr;
    }

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

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 85px; /* Altura del navbar */
        left: 0;
        width: 100%;
        background-color: var(--white-color);
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        padding: 20px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
        text-align: center;
    }

    .btn-nav {
        margin: 15px 0 0 0;
    }

    .hamburger {
        display: block;
    }

    #hero {
        height: 70vh;
        text-align: center;
    }
    #hero h1 { font-size: 2.5rem; }
    #hero .subtitle { font-size: 1.1rem; }

    .segmentos-grid {
        grid-template-columns: 1fr;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    /* Ajuste de Timeline para mobile */
    .proceso-timeline::after {
        left: 30px;
        margin-left: 0;
    }
    .proceso-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 15px;
    }
    .proceso-item.left, .proceso-item.right {
        left: 0;
        text-align: left;
    }
    .proceso-item.left::after, .proceso-item.right::after {
        left: 10px; /* (30px de línea - 20px de radio) */
        right: auto;
    }

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