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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

body.dark {
    background: #0f0f1a;
    color: #e0e0e0;
}

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

ul {
    list-style: none;
}

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

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

/* ===== Glassmorphism ===== */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dark .glass {
    background: rgba(20, 20, 40, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ===== Cards ===== */
.card {
    border-radius: 16px;
    padding: 24px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.dark .card {
    background: #1a1a30;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark .card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: scale(0.98);
}

/* ===== Sections ===== */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.3;
}

.section-sub {
    text-align: center;
    color: #666;
    margin-bottom: 48px;
    font-size: 1.1rem;
}

.dark .section-sub {
    color: #aaa;
}

/* ===== Grid System ===== */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== Flex Utilities ===== */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== Header ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.dark header {
    background: rgba(15, 15, 26, 0.9);
    border-color: rgba(255, 255, 255, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* ===== Navigation ===== */
.nav-links {
    display: flex;
    gap: 24px;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

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

.nav-links a:hover {
    color: #667eea;
}

.dark .nav-links a:hover {
    color: #8b9eff;
}

/* ===== Mobile Toggle ===== */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.mobile-toggle span {
    width: 28px;
    height: 3px;
    background: #1a1a2e;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.dark .mobile-toggle span {
    background: #e0e0e0;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(102, 126, 234, 0.15), transparent 60%);
    animation: heroGlow 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroGlow {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(10%, 10%);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .btn {
    font-size: 1.1rem;
    padding: 16px 40px;
}

/* ===== Banner Slider ===== */
.banner-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 40px;
    border-radius: 16px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.banner-slide {
    display: none;
    width: 100%;
    padding: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-align: center;
    transition: opacity 0.5s ease;
}

.banner-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.banner-slide h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.banner-slide p {
    color: rgba(255, 255, 255, 0.7);
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.banner-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.banner-dots span.active {
    background: #667eea;
    transform: scale(1.2);
}

.banner-dots span:hover {
    background: rgba(102, 126, 234, 0.6);
}

/* ===== Statistics ===== */
.stat-item {
    text-align: center;
    padding: 24px;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* ===== Team Members ===== */
.team-member {
    text-align: center;
    padding: 24px;
}

.team-member svg {
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 8px;
    transition: transform 0.3s ease;
}

.team-member:hover svg {
    transform: scale(1.1);
}

.team-member h4 {
    margin-bottom: 4px;
}

.team-member p {
    color: #666;
    font-size: 0.9rem;
}

.dark .team-member p {
    color: #aaa;
}

/* ===== Testimonials ===== */
.testimonial-card {
    padding: 32px;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: 8px;
    left: 20px;
    color: rgba(102, 126, 234, 0.2);
    font-family: serif;
    line-height: 1;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.testimonial-card .author {
    font-weight: 600;
    color: #667eea;
}

/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 16px 0;
    transition: border-color 0.3s ease;
}

.dark .faq-item {
    border-color: rgba(255, 255, 255, 0.1);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 8px 0;
    user-select: none;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: #667eea;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    line-height: 1;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    color: #666;
    line-height: 1.7;
}

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

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-top: 12px;
}

/* ===== HowTo Steps ===== */
.howto-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease;
}

.dark .howto-step {
    border-color: rgba(255, 255, 255, 0.05);
}

.howto-step .step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.howto-step:hover .step-num {
    transform: scale(1.1);
}

.howto-step strong {
    display: block;
    margin-bottom: 4px;
}

/* ===== Contact Info ===== */
.contact-info p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info svg {
    flex-shrink: 0;
}

/* ===== Footer ===== */
.footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 48px 20px 24px;
}

.footer a {
    color: #aaa;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #fff;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.9rem;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    z-index: 999;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    opacity: 0;
}

.back-to-top.show {
    display: flex;
    opacity: 1;
}

.back-to-top:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.back-to-top:active {
    transform: scale(0.95);
}

/* ===== Dark Mode Toggle ===== */
.dark-mode-toggle {
    background: none;
    border: 2px solid #667eea;
    color: #667eea;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.dark-mode-toggle:hover {
    background: #667eea;
    color: #fff;
    transform: scale(1.1);
}

.dark-mode-toggle:active {
    transform: scale(0.95);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #667eea;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.breadcrumb span {
    color: #999;
}

/* ===== Search Entry ===== */
.search-entry {
    display: flex;
    gap: 8px;
    max-width: 400px;
    margin: 20px auto;
}

.search-entry input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    outline: none;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-entry input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.dark .search-entry input {
    background: rgba(20, 20, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

.dark .search-entry input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.search-entry button {
    padding: 12px 24px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-entry button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-entry button:active {
    transform: scale(0.98);
}

/* ===== News Cards ===== */
.news-card .date {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.news-card h4 {
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.news-card:hover h4 {
    color: #667eea;
}

/* ===== Related Articles ===== */
.related-articles {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.related-articles a {
    padding: 12px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.08);
    transition: background 0.3s ease, transform 0.3s ease;
    display: block;
}

.related-articles a:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

/* ===== Prev / Next Navigation ===== */
.prev-next {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease;
}

.dark .prev-next {
    border-color: rgba(255, 255, 255, 0.1);
}

.prev-next a {
    color: #667eea;
    font-weight: 500;
    transition: color 0.3s ease;
}

.prev-next a:hover {
    color: #764ba2;
}

/* ===== Scroll Animation ===== */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SVG Lazy Load ===== */
svg[loading="lazy"] {
    transition: opacity 0.5s ease;
}

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

/* Tablet & Small Desktop */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .dark .nav-links {
        background: rgba(15, 15, 26, 0.98);
        border-color: rgba(255, 255, 255, 0.05);
    }
    
    .nav-links.open {
        display: flex;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .banner-slide {
        padding: 30px 20px;
    }
    
    .banner-slide h3 {
        font-size: 1.4rem;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero {
        padding: 100px 16px 60px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero .btn {
        padding: 14px 32px;
        font-size: 1rem;
    }
    
    .section {
        padding: 48px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-sub {
        font-size: 1rem;
        margin-bottom: 32px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .header-inner {
        padding: 10px 16px;
    }
    
    .card {
        padding: 20px;
    }
    
    .banner-slide {
        padding: 24px 16px;
    }
    
    .banner-slide h3 {
        font-size: 1.2rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .testimonial-card {
        padding: 24px;
    }
    
    .testimonial-card::before {
        font-size: 3rem;
        top: 4px;
        left: 12px;
    }
    
    .faq-question {
        font-size: 1rem;
    }
    
    .search-entry {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-entry input,
    .search-entry button {
        width: 100%;
    }
    
    .prev-next {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Dark Mode Scrollbar */
.dark ::-webkit-scrollbar {
    width: 8px;
}

.dark ::-webkit-scrollbar-track {
    background: #0f0f1a;
}

.dark ::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Print Styles */
@media print {
    header,
    .back-to-top,
    .banner-slider,
    .search-entry {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 40px 20px;
        background: #fff !important;
        color: #1a1a2e !important;
    }
    
    .hero::before {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .section {
        padding: 40px 0;
        page-break-inside: avoid;
    }
    
    .scroll-animate {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scroll-animate {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .hero::before {
        animation: none;
    }
}