/* ===================================
   EDITORIAL SABER - GLOBAL STYLES
   Modern, Professional & Tech-Forward Design
   =================================== */

/* CSS Variables - Color Palette from Logo */
:root {
    /* Brand Colors from Logo */
    --primary-purple: #7B2D8E;
    --primary-blue: #4A5FC1;
    --accent-red: #8B2942;

    /* Extended Palette */
    --dark-purple: #5A1F6B;
    --light-purple: #9B4DAC;
    --dark-blue: #3A4FA1;
    --light-blue: #6A7FE1;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-blue) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-red) 0%, var(--primary-purple) 100%);
    --gradient-hero: linear-gradient(135deg, #7B2D8E 0%, #4A5FC1 50%, #6A7FE1 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(123, 45, 142, 0.95) 0%, rgba(74, 95, 193, 0.95) 100%);

    /* Neutral Colors */
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --gray: #E9ECEF;
    --dark-gray: #495057;
    --black: #212529;

    /* Semantic Colors */
    --success: #28A745;
    --warning: #FFC107;
    --error: #DC3545;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Outfit', var(--font-primary);

    /* Spacing */
    --section-padding: 100px;
    --container-max: 1200px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--black);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--black);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.25rem;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    margin-bottom: 0.875rem;
}

p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding) 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1rem auto;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    z-index: -1;
}

.btn:hover::before {
    transform: translateX(0);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
}

.btn-secondary:hover {
    background: var(--primary-purple);
    color: var(--white);
}

.btn-accent {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   NAVIGATION
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--black);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--light-gray);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    min-width: 130px;
    justify-content: space-between;
}

.lang-current:hover {
    background: var(--gray);
}

.lang-current-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-current-flag {
    font-size: 1.25rem;
}

.lang-current-text {
    font-weight: 500;
    font-size: 0.9rem;
}

.lang-arrow {
    font-size: 0.75rem;
    transition: transform var(--transition-base);
}

.lang-switcher:hover .lang-arrow {
    transform: translateY(2px);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    min-width: 130px;
    z-index: 100;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--gray);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: var(--light-gray);
}

.lang-option.active {
    background: var(--gradient-primary);
    color: var(--white);
}

.lang-option-flag {
    font-size: 1.25rem;
}

.lang-option-text {
    font-weight: 500;
    font-size: 0.9rem;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 0.375rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-purple);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* ===================================
   LANGUAGE BANNER
   =================================== */

.lang-banner {
    position: fixed;
    top: 80px;
    right: 2rem;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.5s ease;
    max-width: 350px;
}

.lang-banner.hidden {
    display: none;
}

.lang-banner-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition-fast);
}

.lang-banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero);
    padding-top: 80px;
}

/* Animated Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.geometric-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation: float-1 20s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    animation: float-2 15s ease-in-out infinite;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 15%;
    animation: float-3 18s ease-in-out infinite;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 20%;
    animation: float-1 12s ease-in-out infinite;
    border-radius: 20%;
}

.shape-5 {
    width: 250px;
    height: 250px;
    bottom: 10%;
    right: 5%;
    animation: float-2 22s ease-in-out infinite;
}

.shape-6 {
    width: 180px;
    height: 180px;
    top: 50%;
    left: 50%;
    animation: float-3 16s ease-in-out infinite;
}

@keyframes float-1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

@keyframes float-2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(-30px, 30px) rotate(-120deg);
    }
    66% {
        transform: translate(20px, -20px) rotate(-240deg);
    }
}

@keyframes float-3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -40px) scale(1.1);
    }
}

/* Hero Content */
.hero-content-new {
    position: relative;
    z-index: 2;
    color: var(--white);
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.hero-text-main {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-text-main h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.hero-text-main p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.2s both;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Feature Cards */
.hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all var(--transition-base);
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.25);
}

.feature-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--white);
}

.feature-content h3 {
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.feature-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
}

.feature-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature-card:hover .feature-glow {
    opacity: 1;
}

/* Old hero styles for other pages */
.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-visual {
    position: relative;
    animation: fadeInRight 1s ease;
}

.hero-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.floating-element {
    position: absolute;
    animation: floating 3s ease-in-out infinite;
}

/* ===================================
   CARDS & COMPONENTS
   =================================== */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--gray);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 1.75rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary-purple);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* ===================================
   LEVEL CARDS (Courses)
   =================================== */

.level-card {
    position: relative;
    overflow: hidden;
}

.level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.level-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ===================================
   WHATSAPP BUTTON
   =================================== */

.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 999;
    transition: all var(--transition-base);
    animation: pulse 2s ease-in-out infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.whatsapp-btn svg {
    width: 32px;
    height: 32px;
    fill: var(--white);
}

/* ===================================
   FOOTER
   =================================== */

footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.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-fast);
}

.social-links a:hover {
    background: var(--primary-purple);
    transform: translateY(-3px);
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 8px 48px rgba(37, 211, 102, 0.6);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease;
}

.scale-in {
    animation: scaleIn 0.5s ease;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .geometric-shape {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .navbar .container {
        padding: 1rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform var(--transition-base);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    .feature-content h3 {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .lang-banner {
        right: 1rem;
        left: 1rem;
        max-width: calc(100% - 2rem);
    }

    .geometric-shape {
        opacity: 0.3;
    }

    .shape-1 {
        width: 200px;
        height: 200px;
    }

    .shape-2 {
        width: 150px;
        height: 150px;
    }

    .shape-3,
    .shape-4,
    .shape-5,
    .shape-6 {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    .whatsapp-btn {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
}

/* ===================================
   LOADING ANIMATION
   =================================== */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray);
    border-top-color: var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
