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

:root {
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --accent: #10b981;
    --bg: #0f172a;
    --bg2: #1e293b;
    --text: #e2e8f0;
    --text2: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.8);
    --glass: rgba(255, 255, 255, 0.05);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --transition: 0.3s ease;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.light-mode {
    --primary: #2563eb;
    --secondary: #7c3aed;
    --accent: #059669;
    --bg: #f8fafc;
    --bg2: #ffffff;
    --text: #0f172a;
    --text2: #475569;
    --card-bg: rgba(255, 255, 255, 0.9);
    --glass: rgba(0, 0, 0, 0.05);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--secondary);
}

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

/* ===== Header & Navigation ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition);
}

header.sticky {
    background: var(--bg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.light-mode header.sticky {
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text2);
    transition: all var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--glass);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-actions button:hover {
    background: var(--glass);
}

.menu-toggle {
    display: none;
}

/* Search bar */
.search-bar {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: var(--bg2);
    border-bottom: 1px solid var(--glass);
    position: relative;
}

.search-bar.active {
    max-height: 80px;
}

.search-bar input {
    width: 100%;
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text2);
}

.search-submit {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background var(--transition);
}

.search-submit:hover {
    background: var(--secondary);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-text .highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 16px;
    color: var(--text2);
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.btn-primary, .btn-secondary {
    padding: 12px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--glass);
}

.btn-secondary:hover {
    background: var(--card-bg);
    border-color: var(--primary);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-visual svg {
    width: 100%;
    max-width: 500px;
}

/* ===== Sections ===== */
.section {
    padding: 100px 24px;
    position: relative;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-desc {
    font-size: 16px;
    color: var(--text2);
    max-width: 640px;
    margin: 0 auto;
}

/* ===== Brand Section ===== */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.brand-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass);
    transition: all var(--transition);
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.brand-card svg {
    margin-bottom: 16px;
}

.brand-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.brand-card p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
}

/* ===== Products Section ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass);
    transition: all var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--secondary);
}

.product-card svg {
    margin: 0 auto 20px;
}

.product-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.product-card p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
}

/* ===== Services Section ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.service-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass);
    transition: all var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.service-card svg {
    margin-bottom: 12px;
}

.service-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.service-card p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.6;
}

/* ===== FAQ ===== */
.faq-preview h3 {
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 8px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--glass);
    overflow: hidden;
    transition: border-color var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color var(--transition);
}

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

.faq-icon {
    font-size: 20px;
    font-weight: 300;
    color: var(--primary);
    transition: transform var(--transition);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 24px;
}

.faq-answer.open {
    max-height: 500px;
    padding: 0 24px 16px;
}

.faq-answer p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
}

/* ===== News Section ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.news-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--glass);
    transition: all var(--transition);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.news-card svg {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-content {
    padding: 24px;
}

.news-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-meta {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 12px;
}

.news-content p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
    margin-bottom: 16px;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    transition: color var(--transition);
}

.read-more:hover {
    color: var(--secondary);
}

.news-more {
    text-align: center;
    margin-top: 40px;
}

/* ===== Cases Section ===== */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.case-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--glass);
    transition: all var(--transition);
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--secondary);
}

.case-card svg {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.case-content {
    padding: 24px;
}

.case-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.case-content p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
}

/* ===== Contact Section ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--glass);
}

.info-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.info-item h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.info-item p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.6;
}

.contact-form {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--glass);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text2);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--glass);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    transition: border-color var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn-primary {
    width: 100%;
}

/* ===== Footer ===== */
footer {
    background: var(--bg2);
    border-top: 1px solid var(--glass);
    padding: 60px 24px 30px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.footer-col p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

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

.footer-col ul li a {
    font-size: 14px;
    color: var(--text2);
    transition: color var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-social svg {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: opacity var(--transition);
    opacity: 0.6;
}

.footer-social svg:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid var(--glass);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 4px;
}

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

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

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

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

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

    .hero-text h1 {
        font-size: 42px;
    }

    .hero-desc {
        margin: 0 auto 32px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        background: var(--bg);
        flex-direction: column;
        padding: 16px 24px;
        gap: 4px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        z-index: 999;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .brand-grid,
    .products-grid,
    .services-grid,
    .news-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 16px 60px;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .section {
        padding: 60px 16px;
    }

    .section-header {
        margin-bottom: 40px;
    }
}