/* --- VARIABLES Y DISEÑO DEL SISTEMA --- */
:root {
    --primary: #003366;
    /* Azul Corporativo Oscuro */
    --primary-alt: #002244;
    --secondary: #005b96;
    /* Azul Medio */
    --accent: #ffcc00;
    /* Dorado CM */
    --accent-hover: #ffdb4d;
    --text: #2c3e50;
    --text-muted: #546e7a;
    --light: #f8faff;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #003366 0%, #005b96 100%);
    --gradient-gold: linear-gradient(90deg, #ffcc00 0%, #ffaa00 100%);

    --header-height: 90px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-sm: 0 4px 10px rgba(0, 51, 102, 0.05);
    --shadow-md: 0 12px 30px rgba(0, 51, 102, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 51, 102, 0.15);

    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* --- RESET & GLOBALS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- REUSABLE COMPONENTS --- */
.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 91, 150, 0.1);
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.section-tag.center {
    display: block;
    width: fit-content;
    margin: 0 auto 16px;
}

.line {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 16px auto 0;
    border-radius: 10px;
}

.line-alt {
    width: 50px;
    height: 4px;
    background: var(--accent);
    margin: 12px 0 24px;
    border-radius: 10px;
}

/* --- HEADER --- */
header {
    height: var(--header-height);
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
}

nav {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 80px;
    transition: var(--transition);
    filter: brightness(0) invert(1);
}

header.scrolled .logo img {
    height: 70px;
    filter: none;
}

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

.nav-item {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--white);
    position: relative;
}

header.scrolled .nav-item {
    color: var(--primary);
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    left: 0;
    background: var(--accent);
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--accent);
}

.nav-item:hover::after {
    width: 100%;
}

.campus-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

header.scrolled .campus-link {
    background: rgba(0, 91, 150, 0.08);
    color: var(--secondary);
}

.campus-link:hover {
    background: var(--accent);
    color: var(--primary) !important;
}

.btn-nav {
    padding: 12px 28px;
    background: var(--accent);
    color: var(--primary);
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.5);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- HERO --- */
.hero {
    min-height: 100vh;
    padding-top: var(--header-height);
    background: linear-gradient(rgba(0, 51, 102, 0.8), rgba(0, 34, 68, 0.9)), url('../images/hero_bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 5;
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.hero-tag {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 24px;
    display: block;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--white);
}

.hero p {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.8;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 64px;
}

.btn-hero {
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-hero {
    background: var(--accent);
    color: var(--primary);
}

.btn-hero.outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-hero:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: rgba(0, 91, 150, 0.2);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: rgba(255, 204, 0, 0.1);
    bottom: -50px;
    left: -50px;
}

/* --- NOSOTROS --- */
section {
    padding: 120px 0;
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 8px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.accreditation-card {
    margin-top: 32px;
    padding: 24px;
    background: var(--light);
    border-radius: var(--radius-md);
    display: flex;
    gap: 20px;
    align-items: center;
    border-left: 6px solid var(--accent);
}

.acc-icon {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.acc-info h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.acc-info p {
    margin: 0;
    font-size: 0.9rem;
}

.about-image-container {
    position: relative;
}

.about-main-img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 2;
    position: relative;
}

.img-accent-border {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100%;
    height: 100%;
    border: 10px solid var(--light);
    border-radius: var(--radius-lg);
    z-index: 1;
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    left: -40px;
    background: var(--primary);
    color: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    z-index: 5;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.experience-badge span {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.experience-badge p {
    font-size: 0.8rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- SERVICIOS --- */
.services {
    background: var(--light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--white);
    padding: 48px 40px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-glass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--primary);
    z-index: 0;
    transition: var(--transition);
    opacity: 0.02;
}

.service-card:hover .card-glass {
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.icon-box {
    width: 80px;
    height: 80px;
    background: rgba(0, 91, 150, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 32px;
    transition: var(--transition);
    position: relative;
}

.service-card:hover .icon-box {
    background: var(--primary);
    color: var(--white);
    transform: rotate(10deg);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    position: relative;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-grow: 1;
    position: relative;
}

.card-link {
    font-weight: 700;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    position: relative;
}

.card-link i {
    transition: var(--transition);
}

.service-card:hover .card-link i {
    transform: translateX(5px);
}

/* --- CAPACITACION --- */
.training {
    background: var(--white);
}

.training-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.training-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.training-text h3 {
    font-size: 3rem;
    margin-bottom: 24px;
    line-height: 1.2;
}

.training-features {
    margin: 40px 0;
}

.training-features li {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.feat-icon {
    width: 32px;
    height: 32px;
    background: rgba(0, 91, 150, 0.1);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.img-card-stack {
    position: relative;
    padding: 20px;
}

.cert-img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: rotate(-3deg);
    transition: var(--transition);
}

.cert-img:hover {
    transform: rotate(0);
}

.float-card {
    position: absolute;
    bottom: -30px;
    right: -20px;
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10;
}

.float-card i {
    font-size: 2rem;
    color: var(--accent);
}

.float-card strong {
    display: block;
    font-size: 1.25rem;
    color: var(--primary);
}

.float-card p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- CONTACTO --- */
.contact {
    background: var(--light);
}

.contact-card-main {
    background: var(--white);
    border-radius: var(--radius-xl);
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.contact-info-panel {
    background: var(--primary);
    color: var(--white);
    padding: 64px;
    display: flex;
    flex-direction: column;
}

.info-header h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.info-header p {
    opacity: 0.7;
    margin-bottom: 48px;
}

.info-list {
    flex-grow: 1;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.info-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent);
}

.info-item strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.info-item p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.social-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-5px);
}

.contact-form-panel {
    padding: 64px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 16px;
    border: 2px solid #edf2f7;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: #fdfdfd;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--secondary);
    background: var(--white);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 91, 150, 0.1);
}

.btn-submit {
    margin-top: 32px;
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 20px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* --- FOOTER --- */
footer {
    background: #0a101f;
    color: var(--white);
    padding: 100px 0 40px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    padding-bottom: 64px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand p {
    max-width: 400px;
    margin-top: 24px;
    opacity: 0.6;
}

.footer-logo {
    height: 70px;
    filter: brightness(0) invert(1);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.link-group h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.link-group ul li {
    margin-bottom: 12px;
}

.link-group ul li a {
    opacity: 0.6;
}

.link-group ul li a:hover {
    opacity: 1;
    color: var(--accent);
    padding-left: 8px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding-top: 40px;
    font-size: 0.9rem;
    opacity: 0.4;
    text-align: center;
}

.dev-credits span {
    font-weight: 700;
    opacity: 1;
}

/* --- WHATSAPP BUTTON --- */
.whatsapp-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #25d366;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    font-weight: 700;
    transition: var(--transition);
}

.whatsapp-btn i {
    font-size: 1.8rem;
}

.whatsapp-btn:hover {
    transform: scale(1.05) translateY(-5px);
    background: #128c7e;
}

/* --- DROPDOWN MENU --- */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--white);
    min-width: 220px;
    padding: 15px 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(10px);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background: var(--light);
    color: var(--primary);
    padding-left: 30px;
}

.nav-item i {
    font-size: 0.7rem;
    margin-left: 4px;
    transition: var(--transition);
}

.nav-dropdown:hover .nav-item i {
    transform: rotate(180deg);
}

/* --- DISTRIBUIDORES SECTION --- */
.distributors {
    padding: 100px 0;
    background: var(--primary-alt);
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 91, 150, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 204, 0, 0.05) 0%, transparent 40%);
}

.dist-wrapper {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.dist-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 60px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.dist-content h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.dist-content p {
    color: var(--white);
    opacity: 0.8;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.dist-benefits {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.dist-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 500;
}

.dist-benefits li i {
    color: var(--accent);
}

/* --- CARDS UPDATES --- */
.card-footer-btns {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 10px;
    padding-top: 20px;
}

.dist-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    background: rgba(255, 204, 0, 0.1);
    color: var(--accent);
    border-radius: 50px;
    border: 1px solid rgba(255, 204, 0, 0.2);
    text-transform: uppercase;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 10px 0 10px 20px;
        display: none;
    }

    .nav-dropdown.active .dropdown-menu {
        display: block;
    }

    .dist-content {
        padding: 40px 20px;
    }

    .dist-benefits {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3.25rem;
    }

    .about-wrapper,
    .training-grid,
    .contact-card-main {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-image-container {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        color: var(--white);
    }

    header.scrolled .menu-toggle {
        color: var(--primary);
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 40px;
        gap: 20px;
        box-shadow: var(--shadow-lg);
        display: none;
    }

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

    .nav-item {
        color: var(--primary) !important;
    }

    .campus-link {
        color: var(--secondary) !important;
        background: rgba(0, 91, 150, 0.05);
    }

    .hero {
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .training-text h3 {
        font-size: 2.25rem;
    }

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

    .form-group.full-width {
        grid-column: auto;
    }
}

/* --- LEGAL PAGES --- */
.legal-page {
    padding-top: 150px;
    background: var(--light);
    min-height: 100vh;
}

.legal-card {
    background: var(--white);
    padding: 60px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: 0 auto 100px;
}

.legal-card h1 {
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.legal-card h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--secondary);
}

.legal-card p {
    margin-bottom: 20px;
    color: var(--text-muted);
    line-height: 1.8;
}

.legal-card ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.legal-card li {
    margin-bottom: 10px;
    color: var(--text-muted);
    list-style: disc;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-weight: 600;
    color: var(--primary);
}

.text-center {
    text-align: center;
}