/* =========== CSS VARIABLES =========== */
:root {
    --primary: #0ea5e9;
    /* Light blue / sky */
    --primary-dark: #0284c7;
    --secondary: #10b981;
    /* Green / nature */
    --accent: #f59e0b;
    /* Orange / sun / alert */

    --bg-color: #0f172a;
    /* Tech/dark blue-black */
    --bg-light: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

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

.section {
    padding: 100px 0;
}

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

.highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

/* =========== AJUSTES MULTIPÁGINA =========== */
/* Esta clase evita que el menú fijo tape el contenido en las páginas secundarias */
.page-content {
    padding-top: 120px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Quitar margen doble superior (seccion + main) en páginas secundarias */
.page-content .section {
    padding-top: 20px;
}

/* =========== COMPONENTS =========== */
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

/* =========== NAVBAR =========== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    padding: 15px 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

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

.nav-links a {
    font-weight: 600;
    position: relative;
    transition: var(--transition);
}

.nav-links a:not(.btn-primary):hover {
    color: var(--primary);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: var(--transition);
}

/* =========== HERO =========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 5%;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9)), url('images/hero.png') center/cover;
    z-index: -1;
    transform: scale(1.05);
    transition: transform 0.5s ease-out;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 20px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* =========== ABOUT =========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

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

.features {
    margin-top: 30px;
}

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

.check {
    color: var(--secondary);
    font-weight: bold;
}

.about-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.about-image:hover::before {
    opacity: 1;
}

/* =========== COURSES =========== */
.dark-bg {
    background-color: var(--bg-light);
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 60px;
    font-size: 1.2rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(14, 165, 233, 0.3);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .card-image img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
}

.badge.advanced {
    background: var(--accent);
}

.card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 30px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

/* =========== CTA & FOOTER =========== */
.cta {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(2, 132, 199, 0.2));
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.5;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.contact-form {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 500px;
    margin-inline: auto;
    width: 100%;
}

.contact-form input {
    flex-grow: 1;
    padding: 15px 25px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.5);
    color: white;
    outline: none;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.3);
}

footer {
    background: #0b1121;
    padding: 60px 0 20px;
    margin-top: auto;
    /* Empuja el footer hacia abajo si hay poco contenido */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
    margin-bottom: 20px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-logo p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 10px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

/* =========== ANIMATIONS =========== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUpAnim 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeUpAnim {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.left {
    transform: translateX(-40px);
}

.scroll-reveal.right {
    transform: translateX(40px);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* =========== MEDIA MENTIONS =========== */
.media-mention {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.media-mention:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.media-mention-icon {
    font-size: 2rem;
}

.media-mention-content {
    flex-grow: 1;
}

.media-mention-source {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 5px;
    display: block;
}

.media-mention-content h4 {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.4;
    transition: var(--transition);
}

.media-mention-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.media-mention:hover .media-mention-arrow {
    color: var(--primary);
    transform: translateX(5px);
}

/* =========== RESPONSIVE =========== */
@media (max-width: 768px) {
    .page-content {
        padding-top: 90px;
        justify-content: flex-start;
        min-height: auto;
    }

    .page-content .section {
        padding-top: 10px;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

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

    .hero-buttons {
        flex-direction: column;
    }

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

    .contact-form {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}