/* 
 * MStore Landing Page - Light & Mobile First
 * Optimized for WebView & Performance
 * No Bootstrap Dependency
 */

:root {
    --btn-primary: #081d68;   
    --primary: #071032;
    --primary-dark: #072068;
    --secondary: #858796;
    --accent: #36b9cc;
    --bg-body: #f8f9fc;
    --bg-card: #ffffff;
    --text-main: #3a3b45;
    --text-light: #f8f9fc;
    --border-radius: 1rem;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --container-padding: 1rem;
    --max-width: 1200px;
}

[data-theme="dark"] {
    --bg-body: #1a202c;
    --bg-card: #2d3748;
    --text-main: #f7fafc;
    --secondary: #cbd5e0;
     --primary: #e4e7ef;
     --primary-dark:#142a6f;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.18);
    --border-color: #4a5568;
}

[data-theme="dark"] .navbar {
    background: rgba(26, 32, 44, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

[data-theme="dark"] .nav-menu {
    background: rgba(26, 32, 44, 0.95);
  
}

[data-theme="dark"] .nav-toggle {
    color: var(--text-main);
}

[data-theme="dark"] .card,
[data-theme="dark"] .stat-card {
    border-color: var(--border-color);
}

[data-theme="dark"] .product-img {
    background: #4a5568;
    color: var(--secondary);
}

[data-theme="dark"] #atk-promo {
    background-color: #171923 !important;
}

[data-theme="dark"] #monitoring {
    background-color: var(--bg-body);
}

[data-theme="dark"] #coverageMap {
    background: #4a5568;
    border: 1px solid var(--border-color);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

/* Utilities */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.text-center { text-align: center; }
.text-white { color: white; }
.text-muted { color: var(--secondary); }
.fw-bold { font-weight: 700; }
.d-none { display: none; }
.d-block { display: block; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-auto { margin-top: auto; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    font-size: 1rem;
}

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

.btn-primary {
    background-color: var(--btn-primary);
    color: white;
    box-shadow: 0 4px 6px rgba(78, 115, 223, 0.25);
}

.btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.8);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-full-mobile {
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 0.8rem 0;
}

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

.nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: none; /* Hidden on mobile by default */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex-direction: column;
    gap: 1rem;
}

.nav-menu.active {
    display: flex;
}

.nav-link {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.nav-link:active {
    background: var(--bg-body);
}

.nav-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding-top: 5rem; /* Navbar height + spacing */
    padding-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-bottom-left-radius: 2rem;
    border-bottom-right-radius: 2rem;
    text-align: center;
    overflow: hidden;
}

.hero-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-desc {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 300px;
    margin: 0 auto;
}

.hero-img {
    display: none; /* Hidden on mobile */
    margin-top: 2rem;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: -2rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
    overflow-x: auto; /* Allow scroll if too tight */
    padding-bottom: 1rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    min-width: 100px;
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Common */
.section {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* Horizontal Scroll Container (Mobile Friendly) */
.scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.scroll-item {
    flex: 0 0 85%;
    max-width: 350px;
    scroll-snap-align: center;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Pricing Card */
.pricing-header {
    background: linear-gradient(135deg, var(--btn-primary), var(--primary-dark));
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.speed { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.unit { font-size: 1rem; opacity: 0.9; }

.pricing-body {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.features {
    text-align: left;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--secondary);
    flex-grow: 1;
}

.features li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features i { color: #1cc88a; }

/* Product Card */
.product-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #eee;
}

.product-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-cat {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.25rem 0;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.product-desc {
    font-size: 0.875rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Monitoring Section */
.monitoring {
    padding: 3rem 0;
}
#coverageMap {
    width: 100%;
    height: 300px;
    border-radius: var(--border-radius);
    background: #eee;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Footer */
footer {
    background: #1a1c23;
    color: #a0aec0;
    padding: 3rem 0;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
}

.footer-brand {
    color: white;
    font-size: 1.25rem;
    font-weight: 800;
    display: block;
    margin-bottom: 1rem;
}

.footer-links a {
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.25rem;
}

/* Desktop Overrides (Tablet & Up) */
@media (min-width: 768px) {
    /* Navbar */
    .nav-toggle { display: none; }
    .nav-menu {
        display: flex;
        position: static;
        flex-direction: row;
        width: auto;
        padding: 0;
        box-shadow: none;
        background: transparent;
    }
    .btn-full-mobile { width: auto; }

    /* Hero */
    .hero {
        text-align: left;
        padding: 8rem 0 5rem;
    }
    .hero-container {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
    .hero-content { flex: 1; }
    .hero-img {
        display: block;
        flex: 1;
        margin-top: 0;
    }
    .hero-actions {
        flex-direction: row;
        margin: 0;
        max-width: none;
    }
    .hero-title { font-size: 3rem; }
    .hero-desc { margin-left: 0; }

    /* Grids */
    .scroll-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        overflow: visible;
        padding: 0;
    }
    .scroll-item {
        max-width: none;
        flex: none;
    }

    /* Monitoring */
    .monitoring-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center;
    }
    #coverageMap { margin-bottom: 0; height: 400px; }

    /* Footer */
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}
