/* ==========================================
   QUẢN LÝ SỐ - Premium Modern Design
   FunEdu Digital Transformation Platform
   ========================================== */

/* ===== CSS VARIABLES (Design Tokens) ===== */
:root {
    /* Primary Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #0c1445 0%, #1a1f3a 50%, #2d1b4e 100%);

    /* Colors */
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #a3bffa;
    --secondary-color: #764ba2;
    --accent-color: #00f2fe;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Dark Mode Colors */
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-card: rgba(30, 41, 59, 0.8);
    --dark-border: rgba(255, 255, 255, 0.1);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);

    /* Typography */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --radius-full: 9999px;

    /* 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 -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.4);
    --shadow-glow-pink: 0 0 40px rgba(240, 147, 251, 0.4);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ===== RESET & BASE STYLES ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--white);
    background: var(--dark-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(79, 172, 254, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(240, 147, 251, 0.1) 0%, transparent 40%);
    z-index: -1;
    animation: backgroundPulse 15s ease-in-out infinite alternate;
}

@keyframes backgroundPulse {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

/* Floating Particles Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200px 200px;
    animation: particlesFloat 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes particlesFloat {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-200px);
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
}

input,
textarea {
    font-family: inherit;
    outline: none;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (max-width: 640px) {
    .container {
        padding: 0 var(--space-4);
    }
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    padding: var(--space-4) 0;
    transition: var(--transition-base);
    background: transparent;
}

.header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--dark-border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-3) 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 700;
    font-size: var(--font-size-xl);
    z-index: 1001;
}

.logo img {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: var(--shadow-glow);
    transition: var(--transition-base);
}

.logo:hover img {
    transform: rotate(-5deg) scale(1.05);
}

.logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation */
.navbar {
    display: flex;
    gap: var(--space-2);
}

.nav-link {
    position: relative;
    padding: var(--space-2) var(--space-4);
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--gray-300);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-base);
    border-radius: inherit;
    z-index: -1;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    padding: var(--space-2);
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--white);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-4);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-100%);
        transition: var(--transition-slow);
    }

    .navbar.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link {
        font-size: var(--font-size-xl);
        padding: var(--space-3) var(--space-6);
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-weight: 600;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    z-index: -2;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: var(--radius-full);
    z-index: -1;
    transition: var(--transition-base);
}

.btn-primary {
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--white);
    border: 2px solid transparent;
    background: transparent;
}

.btn-secondary::before {
    opacity: 0;
}

.btn-secondary::after {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover::after {
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    color: var(--primary-light);
    transform: translateY(-3px);
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-24) 0;
    position: relative;
    overflow: hidden;
}

/* Hero Animated Background Shapes */
.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: float 8s ease-in-out infinite;
}

.hero-section::before {
    width: 400px;
    height: 400px;
    background: var(--primary-gradient);
    opacity: 0.3;
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.hero-section::after {
    width: 350px;
    height: 350px;
    background: var(--secondary-gradient);
    opacity: 0.25;
    bottom: 10%;
    right: -5%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(var(--font-size-3xl), 8vw, var(--font-size-6xl));
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.hero-title span {
    display: block;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    animation: scaleIn 0.8s ease 0.5s forwards;
    transform-origin: center;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: translateX(-50%) scaleX(0);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) scaleX(1);
    }
}

.hero-subtitle {
    font-size: clamp(var(--font-size-base), 2.5vw, var(--font-size-lg));
    color: var(--gray-300);
    margin-bottom: var(--space-8);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

/* ===== SECTIONS COMMON STYLES ===== */
.section {
    padding: var(--space-24) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-title {
    font-size: clamp(var(--font-size-2xl), 5vw, var(--font-size-4xl));
    font-weight: 700;
    margin-bottom: var(--space-4);
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background: linear-gradient(180deg, transparent 0%, rgba(102, 126, 234, 0.05) 50%, transparent 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.about-text p {
    color: var(--gray-300);
    font-size: var(--font-size-base);
    line-height: 1.8;
}

.about-text strong {
    color: var(--primary-light);
}

.about-image {
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: var(--primary-gradient);
    border-radius: var(--radius-2xl);
    opacity: 0.2;
    filter: blur(30px);
    z-index: -1;
}

.about-image img {
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    transition: var(--transition-base);
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
}

.about-image:hover img {
    transform: scale(1.02);
}

@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .about-image {
        order: -1;
    }
}

/* ===== SERVICES SECTION ===== */
.services-section {
    background: linear-gradient(180deg, transparent 0%, rgba(118, 75, 162, 0.05) 50%, transparent 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: var(--shadow-glow);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-3xl);
    color: var(--white);
    box-shadow: var(--shadow-glow);
    transition: var(--transition-bounce);
}

.service-card:hover .card-icon {
    transform: scale(1.1) rotate(-5deg);
}

.service-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--white);
}

.service-card p {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
    line-height: 1.7;
}

/* ===== IMPACT / STATISTICS SECTION ===== */
.impact-section {
    background: var(--dark-gradient);
    position: relative;
    overflow: hidden;
}

.impact-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-16);
}

.stat-item {
    text-align: center;
    padding: var(--space-8);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    transition: var(--transition-base);
}

.stat-item:hover {
    transform: scale(1.05);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: var(--shadow-glow);
}

.stat-counter {
    font-size: clamp(var(--font-size-4xl), 8vw, var(--font-size-5xl));
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-2);
}

.stat-item p {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* Partners Logos */
.partners-logos {
    text-align: center;
}

.partners-logos>p {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-6);
}

.logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
}

.logos span {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    color: var(--gray-300);
    transition: var(--transition-base);
}

.logos span:hover {
    background: var(--primary-gradient);
    color: var(--white);
    border-color: transparent;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    background: linear-gradient(180deg, transparent 0%, rgba(79, 172, 254, 0.05) 50%, transparent 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: start;
}

.contact-info {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
}

.contact-info h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-6);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-info p {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    color: var(--gray-300);
    margin-bottom: var(--space-4);
    font-size: var(--font-size-sm);
}

.contact-info p i {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    margin-top: 2px;
}

.social-links {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300);
    font-size: var(--font-size-lg);
    transition: var(--transition-base);
}

.social-links a:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    color: var(--white);
    font-size: var(--font-size-base);
    transition: var(--transition-base);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--gray-500);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .btn {
    align-self: flex-start;
    padding: var(--space-4) var(--space-8);
}

@media (max-width: 900px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .contact-form .btn {
        width: 100%;
    }
}

/* ===== FOOTER ===== */
.footer {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--dark-border);
    padding: var(--space-8) 0;
    text-align: center;
}

.footer p {
    color: var(--gray-500);
    font-size: var(--font-size-sm);
}

/* ===== SCROLL REVEAL ANIMATION ===== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: var(--font-size-xl);
    box-shadow: var(--shadow-glow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-base);
    z-index: var(--z-fixed);
    cursor: pointer;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.6);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 640px) {
    .section {
        padding: var(--space-16) 0;
    }

    .section-header {
        margin-bottom: var(--space-10);
    }

    .hero-section {
        padding: var(--space-20) 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item {
        padding: var(--space-6);
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .logo span {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

/* ===== NEWS SECTION ===== */
.news-section {
    background: linear-gradient(180deg, transparent 0%, rgba(102, 126, 234, 0.03) 50%, transparent 100%);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.news-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-16);
    color: var(--gray-400);
}

.news-loading i {
    font-size: 2rem;
    margin-bottom: var(--space-4);
    color: var(--primary-color);
}

.news-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
}

.news-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--dark-surface);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.news-card:hover .news-card-image img {
    transform: scale(1.1);
}

.news-card-image .news-category {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    padding: var(--space-1) var(--space-3);
    background: var(--primary-gradient);
    color: var(--white);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-content {
    padding: var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    margin-bottom: var(--space-3);
}

.news-card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-3);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title a {
    transition: var(--transition-base);
}

.news-card-title a:hover {
    color: var(--primary-light);
}

.news-card-excerpt {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
    line-height: 1.7;
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    border-top: 1px solid var(--dark-border);
}

.news-card-author {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-xs);
    color: var(--gray-400);
}

.news-card-author i {
    color: var(--primary-color);
}

.news-read-more {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--primary-light);
    transition: var(--transition-base);
}

.news-read-more:hover {
    color: var(--white);
    gap: var(--space-3);
}

.news-more {
    text-align: center;
    margin-top: var(--space-12);
}

/* Featured News Card (First Item) */
.news-card.featured {
    grid-column: span 2;
    grid-row: span 2;
}

.news-card.featured .news-card-image {
    height: 300px;
}

.news-card.featured .news-card-title {
    font-size: var(--font-size-2xl);
    -webkit-line-clamp: 3;
}

.news-card.featured .news-card-excerpt {
    -webkit-line-clamp: 4;
}

/* Empty State */
.news-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-16);
    background: var(--glass-bg);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--glass-border);
}

.news-empty i {
    font-size: 4rem;
    color: var(--gray-600);
    margin-bottom: var(--space-4);
}

.news-empty h3 {
    color: var(--gray-400);
    margin-bottom: var(--space-2);
}

.news-empty p {
    color: var(--gray-500);
    font-size: var(--font-size-sm);
}

/* News Page Specific */
.news-page-header {
    padding: var(--space-24) 0 var(--space-12);
    text-align: center;
}

.news-filters {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-10);
    flex-wrap: wrap;
}

.news-filter-btn {
    padding: var(--space-2) var(--space-5);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--gray-300);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.news-filter-btn:hover,
.news-filter-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: var(--white);
}

/* News Responsive */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-card.featured {
        grid-column: span 2;
        grid-row: span 1;
    }

    .news-card.featured .news-card-image {
        height: 250px;
    }
}

@media (max-width: 640px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card.featured {
        grid-column: span 1;
    }

    .news-card-image {
        height: 180px;
    }

    .news-card.featured .news-card-image {
        height: 200px;
    }
}