/* ==========================================
   NEXUS ACADEMY - LANDING PAGE STYLES
   Modern CSS3 with Custom Properties
   ========================================== */

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --primary-color: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --secondary-color: #FACC15;
    --secondary-dark: #EAB308;
    --bg-color: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --border-color: #E2E8F0;
    --success-color: #22C55E;
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.15);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Header Height */
    --header-height: 80px;
}

/* ==================== RESET & BASE ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Focus States for Accessibility */
.btn:focus-visible,
.nav__link:focus-visible,
.idioma-card:focus-visible,
.social-icon:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

.btn--quiz:focus-visible {
    outline-color: white;
}

/* ==================== UTILITY CLASSES ==================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

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

.highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--secondary-color);
    opacity: 0.4;
    z-index: -1;
    border-radius: 4px;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.875rem 1.75rem;
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn--primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--secondary {
    background: var(--secondary-color);
    color: var(--text-main);
    box-shadow: var(--shadow-md);
}

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

.btn--ghost {
    color: var(--primary-color);
    font-weight: 500;
}

.btn--ghost:hover {
    color: var(--primary-dark);
    gap: var(--space-sm);
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn--quiz {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    backdrop-filter: blur(4px);
}

.btn--quiz:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    transform: translateY(-3px);
}

.btn--quiz.active {
    background: var(--secondary-color);
    color: var(--text-main);
    border-color: var(--secondary-color);
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.5);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(250, 204, 21, 0);
    }
}

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

.header.scrolled {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo__icon {
    color: var(--primary-color);
}

.logo--light {
    color: white;
}

.logo--light .logo__icon {
    color: white;
}

.nav__list {
    display: flex;
    gap: var(--space-lg);
}

.nav__link {
    font-weight: 500;
    color: var(--text-main);
    transition: color var(--transition-fast);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-base);
}

.nav__link:hover {
    color: var(--primary-color);
}

.nav__link:hover::after {
    width: 100%;
}

.header__cta {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.hamburger__line {
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.hamburger.active .hamburger__line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger__line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger__line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== HERO SECTION ==================== */
.hero {
    padding-top: calc(var(--header-height) + var(--space-2xl));
    padding-bottom: var(--space-3xl);
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-color) 100%);
    overflow: hidden;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.hero__badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
    margin-bottom: var(--space-md);
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: var(--space-lg);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.hero__social-proof {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.avatar-stack {
    display: flex;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid white;
    margin-left: -12px;
    object-fit: cover;
}

.avatar:first-child {
    margin-left: 0;
}

.hero__social-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero__visual {
    position: relative;
}

.hero__image-wrapper {
    position: relative;
}

.hero__image {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.floating-badge {
    position: absolute;
    background: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    gap: 6px;
}

.floating-badge__flag {
    width: 24px;
    height: auto;
    border-radius: 2px;
}

.floating-badge--top {
    top: -10px;
    left: 20px;
    animation-delay: 0s;
}

.floating-badge--right {
    top: 50%;
    right: -20px;
    animation-delay: 0.5s;
}

.floating-badge--bottom {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating-badge--bottom {
    animation: floatCenter 3s ease-in-out infinite 1s;
}

@keyframes floatCenter {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ==================== SECTION STYLES ==================== */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

.section-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-sm);
}

.section-tag--light {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--text-muted);
}

/* ==================== METODOLOGIA ==================== */
.metodologia {
    padding: var(--space-3xl) 0;
    background: var(--bg-white);
}

.metodologia__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.card {
    background: var(--bg-white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.card__icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.card__icon--blue {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.card__icon--yellow {
    background: rgba(250, 204, 21, 0.2);
    color: #B45309;
}

.card__icon--green {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.card__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.card__text {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.card__icon-img {
    width: 48px;
    height: 48px;
}

.card__icon--blue .card__icon-img {
    filter: invert(31%) sepia(98%) saturate(1439%) hue-rotate(210deg) brightness(95%) contrast(93%);
}

.card__icon--yellow .card__icon-img {
    filter: invert(45%) sepia(96%) saturate(1038%) hue-rotate(5deg) brightness(94%) contrast(89%);
}

.card__icon--green .card__icon-img {
    filter: invert(58%) sepia(68%) saturate(465%) hue-rotate(93deg) brightness(97%) contrast(91%);
}

/* ==================== IDIOMAS ==================== */
.idiomas {
    padding: var(--space-3xl) 0;
    background: var(--bg-color);
}

.idiomas__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.idioma-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    text-align: center;
    transition: all var(--transition-base);
    overflow: hidden;
}

.idioma-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.idioma-card:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.idioma-card:hover::before {
    opacity: 1;
}

.idioma-card:hover .idioma-card__flag,
.idioma-card:hover .idioma-card__title {
    color: white;
    position: relative;
    z-index: 1;
}

.idioma-card__flag {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    transition: transform var(--transition-base);
}

.idioma-card__flag-img {
    width: 64px;
    height: auto;
    border-radius: 4px;
    margin-bottom: var(--space-sm);
    transition: transform var(--transition-base);
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-sm);
}

.idioma-card:hover .idioma-card__flag-img {
    transform: scale(1.2);
}

.idioma-card:hover .idioma-card__flag {
    transform: scale(1.2);
}

.idioma-card__title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-main);
}

.idioma-card__cta {
    position: absolute;
    bottom: var(--space-md);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-base);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 1;
}

.idioma-card:hover .idioma-card__cta {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== NIVEL (QUIZ) ==================== */
.nivel {
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.nivel__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.nivel__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-sm);
}

.nivel__subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.0625rem;
}

.nivel__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.nivel__result {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    min-height: 60px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.nivel__result.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== DEPOIMENTOS ==================== */
.depoimentos {
    padding: var(--space-3xl) 0;
    background: var(--bg-white);
}

.depoimentos__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.depoimento-card {
    background: var(--bg-color);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

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

.depoimento-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.depoimento-card__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.depoimento-card__name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
}

.depoimento-card__role {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.depoimento-card__quote {
    font-size: 0.9375rem;
    color: var(--text-main);
    line-height: 1.7;
    font-style: italic;
}

/* ==================== CTA FINAL ==================== */
.cta-final {
    padding: var(--space-3xl) 0;
    background: var(--bg-color);
    text-align: center;
}

.cta-final__container {
    max-width: 600px;
}

.cta-final__title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.cta-final__text {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--text-main);
    color: white;
    padding-top: var(--space-2xl);
}

.footer__container {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr;
    gap: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__tagline {
    color: var(--text-light);
    margin-top: var(--space-sm);
    font-size: 0.875rem;
}

.footer__nav {
    display: flex;
    gap: var(--space-2xl);
}

.footer__heading {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
    color: white;
}

.footer__list li {
    margin-bottom: var(--space-xs);
}

.footer__list a {
    color: var(--text-light);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer__list a:hover {
    color: white;
}

.footer__social {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    align-self: start;
}

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

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer__bottom {
    padding: var(--space-md) 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ==================== REVEAL ANIMATIONS ==================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal--delay {
    transition-delay: 0.15s;
}

.reveal--delay-2 {
    transition-delay: 0.3s;
}

/* ==================== MOBILE MENU ==================== */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-white);
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav__list {
        flex-direction: column;
        gap: var(--space-md);
    }

    .header__cta {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__social-proof {
        justify-content: center;
    }

    .hero__visual {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }

    .metodologia__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .idiomas__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nivel__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nivel__buttons {
        justify-content: center;
    }

    .depoimentos__grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xl);
    }

    .footer__nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer__social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }

    .idiomas__grid {
        grid-template-columns: 1fr;
        max-width: 280px;
        margin: 0 auto;
    }

    .nivel__buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn--quiz {
        width: 100%;
    }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}
