/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

a {
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0d47a1;
}

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

ul, ol {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== CSS Variables ===== */
:root {
    --primary: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #4fc3f7;
    --accent: #ff6f00;
    --accent-light: #ffb300;
    --bg-light: #f5f7fa;
    --bg-dark: #121212;
    --text-light: #333;
    --text-dark: #e0e0e0;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-bg-dark: rgba(30, 30, 30, 0.8);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    --transition: 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #1a73e8 0%, #4fc3f7 100%);
    --gradient-accent: linear-gradient(135deg, #ff6f00 0%, #ffb300 100%);
    --gradient-dark: linear-gradient(135deg, #0d47a1 0%, #1a73e8 100%);
    --font-size-h1: clamp(2rem, 5vw, 3rem);
    --font-size-h2: clamp(1.5rem, 4vw, 2.25rem);
    --font-size-h3: clamp(1.125rem, 2.5vw, 1.375rem);
    --font-size-body: clamp(0.875rem, 1.5vw, 1rem);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .navbar {
    background: rgba(18, 18, 18, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    user-select: none;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-light);
    transition: color 0.3s ease;
    position: relative;
    padding: 4px 0;
}

body.dark-mode .nav-links a {
    color: var(--text-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
    border: none;
    background: transparent;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

body.dark-mode .menu-toggle span {
    background: var(--text-dark);
}

/* ===== Hero Section ===== */
.hero {
    padding: 140px 0 80px;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: heroGlow 8s infinite alternate;
    pointer-events: none;
}

@keyframes heroGlow {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(30px, 30px);
    }
}

.hero h1 {
    font-size: var(--font-size-h1);
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.hero .btn {
    display: inline-block;
    padding: 14px 40px;
    background: white;
    color: var(--primary);
    font-weight: 700;
    border-radius: 50px;
    font-size: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    border: none;
    cursor: pointer;
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.hero .btn:active {
    transform: translateY(-1px);
}

.hero-banner {
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.hero-banner img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.carousel {
    display: flex;
    overflow: hidden;
    gap: 20px;
    justify-content: center;
    padding: 10px 0;
}

.carousel-item {
    min-width: 300px;
    transition: transform 0.5s ease;
    flex-shrink: 0;
}

.carousel-item svg {
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    padding: 10px 0;
    font-size: 14px;
    color: #999;
    background: transparent;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb span {
    margin: 0 5px;
}

/* ===== Section General ===== */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: var(--font-size-h2);
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    font-size: var(--font-size-body);
}

body.dark-mode .section-title p {
    color: #aaa;
}

/* ===== Card Grid ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

body.dark-mode .card {
    background: var(--card-bg-dark);
    border-color: rgba(255, 255, 255, 0.05);
}

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

.card-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.card h3 {
    font-size: var(--font-size-h3);
    margin-bottom: 10px;
    font-weight: 600;
}

.card p {
    color: #666;
    font-size: var(--font-size-body);
}

body.dark-mode .card p {
    color: #aaa;
}

/* ===== Glass Effect ===== */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .glass {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 30px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .stat-item {
    background: var(--card-bg-dark);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 16px;
    color: #666;
    margin-top: 8px;
}

body.dark-mode .stat-label {
    color: #aaa;
}

/* ===== FAQ ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

body.dark-mode .faq-item {
    border-color: #333;
}

.faq-question {
    font-weight: 600;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-item.active .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding-top: 0;
    color: #666;
    font-size: var(--font-size-body);
}

body.dark-mode .faq-answer {
    color: #aaa;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-top: 10px;
}

/* ===== Footer ===== */
footer {
    background: var(--primary-dark);
    color: white;
    padding: 60px 0 20px;
}

body.dark-mode footer {
    background: #0a0a0a;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
}

.footer-col h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background: var(--primary-light);
    margin-top: 5px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    opacity: 0.8;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== Dark Mode Toggle ===== */
.dark-toggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== Search Box ===== */
.search-box {
    display: flex;
    max-width: 400px;
    margin: 20px auto;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 50px 0 0 50px;
    outline: none;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
    color: #333;
}

body.dark-mode .search-box input {
    background: #333;
    border-color: #555;
    color: white;
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box button {
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* ===== Fade In Animation ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Lazy Load ===== */
.lazy {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy.loaded {
    opacity: 1;
}

/* ===== Responsive Design ===== */

/* Tablet & Small Desktop */
@media (max-width: 1024px) {
    .hero {
        padding: 120px 0 60px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .navbar .container {
        height: 60px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    body.dark-mode .nav-links {
        background: rgba(18, 18, 18, 0.98);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero {
        padding: 100px 0 50px;
    }
    
    .hero h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    .hero p {
        font-size: clamp(0.875rem, 3vw, 1rem);
    }
    
    .hero .btn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .carousel-item {
        min-width: 250px;
    }
    
    section {
        padding: 50px 0;
    }
    
    .section-title {
        margin-bottom: 30px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-item {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .dark-toggle {
        bottom: 75px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .search-box {
        max-width: 100%;
        margin: 15px auto;
    }
    
    .breadcrumb {
        font-size: 12px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    .card h3 {
        font-size: 1.125rem;
    }
    
    .faq-question {
        font-size: 16px;
    }
}

/* ===== Additional Utility Classes ===== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===== Scrollbar Styling (Optional) ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #2d2d2d;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .back-to-top,
    .dark-toggle,
    .search-box {
        display: none !important;
    }
    
    .hero {
        padding: 20px 0;
        background: white !important;
        color: black !important;
    }
    
    .hero::before {
        display: none;
    }
    
    .card,
    .stat-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}