/* Reset y base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Variables CSS para consistencia */
:root {
    --primary-color: #0f3b66; /* Azul institucional oscuro */
    --primary-dark: #0b2a49;
    --secondary-color: #ff6600;
    --danger-color: #e43f5a; /* Botón PDF rojo */
    --accent-color: #00cc66;
    --text-color: #333;
    --bg-color: #ffffff;
    --section-padding: 2rem;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Tipografía */
h1, h2, h3 {
    font-family: 'Anton', sans-serif;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: #e55a00;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #c33249;
}

/* Header */
.header {
    background: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-transparent {
    background: transparent;
    box-shadow: none;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-actions .btn {
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: .6rem 1.1rem;
    border-radius: 999px;
    font-size: .9rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 50px;
    width: auto;
}

/* Navegación móvil */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.nav {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary-color);
}

/* Main content */
.main {
    margin-top: 80px;
}

/* Hero section */
.hero {
    background: linear-gradient(180deg, rgba(6, 22, 37, 0.65) 0%, rgba(6, 22, 37, 0.65) 100%), url('../images/banner-inicio.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 4rem 0 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-inner { display: flex; align-items: center; justify-content: flex-start; min-height: 60vh; }
.hero-copy { text-align: left; }
.hero h1 { font-size: 3.25rem; letter-spacing: 1px; }
.hero h1 .accent-1 { color: #ffffff; text-shadow: 0 4px 14px rgba(0,0,0,.35); }

.shape-divider { position: relative; width: 100%; height: 80px; margin-top: 2rem; }
.shape-divider svg { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; display: block; }
.shape-divider .shape-fill { fill: #173b5b; }

/* Secciones */
.section {
    padding: var(--section-padding) 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Video */
.video-section { background: #173b5b; }
.video-embed { position: relative; width: 100%; max-width: 800px; margin: 0 auto; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.video-embed::before { content: ''; display: block; padding-top: 56.25%; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Grid de servicios/tabs */
.programs-section { background: #173b5b; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card { background: #0f2f4b; border-radius: 14px; padding: 0 0 1.25rem; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: var(--transition); position: relative; }
.service-card .title-strip { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); height: 42px; width: auto; filter: drop-shadow(0 6px 12px rgba(0,0,0,.3)); }
.service-card .image-wrap { padding-top: 2.25rem; }
.service-card .image-wrap img { width: 100%; height: auto; display: block; border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
}

.row-divider { grid-column: 1 / -1; height: 2px; background: rgba(255,255,255,.15); margin: .25rem 0 0; }

/* Ocultar textos de tarjetas en este diseño */
.service-card h3, .service-card p, .service-card .btn { display: none; }

/* Redes sociales */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.social-links a {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.social-links a:hover {
    transform: scale(1.1);
}

/* Footer */
.footer {
    background: #0c243d;
    color: white;
    padding: 2rem 0;
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: center; }
.footer-col { display: flex; align-items: center; }
.footer-col.right, .social-links.right { justify-content: flex-end; }
.footer a.footer-link { color: #cfe2ff; text-decoration: none; }
.footer a.footer-link:hover { text-decoration: underline; }

/* Utilidades */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Responsive Design - Mobile First */

/* Tablets */
@media (min-width: 768px) {
    :root {
        --section-padding: 4rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .services-grid { grid-template-columns: repeat(3, 1fr); }

    .nav-toggle {
        display: none;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .hero h1 {
        font-size: 4rem;
    }

    .services-grid { grid-template-columns: repeat(3, 1fr); }

    .container {
        padding: 0 2rem;
    }
}

/* Mobile specific */
@media (max-width: 767px) {
    .nav-toggle {
        display: block;
    }

    .nav { display: none; }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .services-grid { grid-template-columns: 1fr; gap: 1.25rem; }

    .service-card {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    :root {
        --section-padding: 2rem;
    }
}

/* Touch optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    .service-card {
        padding: 2rem 1rem;
    }

    .nav a {
        padding: 1rem;
        display: block;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}