/* ========================================
   N'Zassa Ads Intelligence - Custom Styles
   ======================================== */

:root {
    --primary-dark: #1a2a5e;
    --primary-light: #2c3e7f;
    --accent-orange: #ff6b35;
    --accent-orange-dark: #e55a24;
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e1e8ed;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Global Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ========================================
   Navbar
   ======================================== */

.bg-dark-custom {
    background-color: var(--primary-dark) !important;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--accent-orange) !important;
    letter-spacing: 0.5px;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--accent-orange) !important;
    transform: translateY(-2px);
}

.btn-orange {
    background-color: var(--accent-orange);
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-orange:hover {
    background-color: var(--accent-orange-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background-color: rgba(255, 107, 53, 0.1);
    border-radius: 50%;
    bottom: -200px;
    right: -100px;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background-color: rgba(255, 107, 53, 0.05);
    border-radius: 50%;
    top: -100px;
    left: -50px;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: slideInUp 0.8s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero .subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-weight: 300;
}

.btn-primary-custom {
    background-color: var(--accent-orange);
    border: none;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary-custom:hover {
    background-color: var(--accent-orange-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

.btn-secondary-custom {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary-custom:hover {
    background-color: white;
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Features Section
   ======================================== */

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-orange), transparent);
    bottom: 0;
    left: 0;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 3rem;
    max-width: 700px;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    min-height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-orange);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--accent-orange);
    margin-bottom: 1.5rem;
}

.feature-card h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.feature-card p {
    color: #7f8c8d;
    line-height: 1.8;
}

/* ========================================
   Clients Section
   ======================================== */

.clients-section {
    background: white;
    padding: 80px 0;
}

.client-logo {
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    background: var(--bg-light);
    transition: all 0.3s ease;
}

.client-logo:hover {
    background: white;
    box-shadow: var(--shadow-md);
}

.client-logo img {
    max-width: 80%;
    height: auto;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.client-logo:hover img {
    filter: grayscale(0%);
}

/* ========================================
   Pricing Section
   ======================================== */

.pricing-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.pricing-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: var(--accent-orange);
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.2);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-orange);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.pricing-plan {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-orange);
    margin-bottom: 0.5rem;
}

.pricing-currency {
    font-size: 1.2rem;
    font-weight: 600;
}

.pricing-period {
    color: #7f8c8d;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.pricing-features {
    list-style: none;
    flex-grow: 1;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-features li {
    padding: 0.8rem 0;
    color: #555;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features i {
    color: var(--accent-orange);
    margin-right: 0.8rem;
    font-weight: 600;
}

.pricing-button {
    width: 100%;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* ========================================
   Forms
   ======================================== */

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

/* ========================================
   Login Page
   ======================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
}

.login-box h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.forgot-password {
    text-align: right;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.forgot-password a {
    color: var(--accent-orange);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--accent-orange-dark);
}

.remember-me {
    margin-bottom: 1.5rem;
}

.remember-me input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.remember-me label {
    cursor: pointer;
    user-select: none;
}

.signup-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #7f8c8d;
}

.signup-link a {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: var(--accent-orange-dark);
}

/* ========================================
   Dashboard
   ======================================== */

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-light);
}

.dashboard-sidebar {
    width: 250px;
    background: var(--primary-dark);
    color: white;
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
}

.dashboard-content {
    margin-left: 250px;
    flex: 1;
    padding: 2rem;
}

.sidebar-brand {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.sidebar-brand h5 {
    color: var(--accent-orange);
    font-weight: 800;
    font-size: 1.2rem;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(255, 107, 53, 0.2);
    color: var(--accent-orange);
    border-left: 4px solid var(--accent-orange);
    padding-left: calc(1.5rem - 4px);
}

.sidebar-menu i {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.topbar {
    background: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.search-box {
    flex: 1;
    margin-right: 2rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.95rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-orange), #ff8c42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent-orange);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #fff;
    font-weight: 500;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--accent-orange);
    float: right;
    opacity: 0.1;
}

.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

/* ========================================
   Gallery
   ======================================== */

.gallery-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text-dark);
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--accent-orange);
    background: var(--accent-orange);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.gallery-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-brand {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.gallery-meta {
    font-size: 0.9rem;
    color: #7f8c8d;
    display: flex;
    justify-content: space-between;
}

/* ========================================
   Detail Page
   ======================================== */

.detail-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.detail-content {
    background: white;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.detail-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.detail-info {
    margin-bottom: 2rem;
}

.detail-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-info-item:last-child {
    border-bottom: none;
}

.detail-info-label {
    font-weight: 700;
    color: var(--primary-dark);
    min-width: 150px;
    display: flex;
    align-items: center;
}

.detail-info-label i {
    margin-right: 0.8rem;
    color: var(--accent-orange);
    font-size: 1.2rem;
}

.detail-info-value {
    color: #555;
    flex: 1;
}

/* ========================================
   Map Page
   ======================================== */

.map-container {
    height: 600px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    background: #e0e0e0;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.map-info-panel {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    max-height: 500px;
    overflow-y: auto;
}

.map-location-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-location-item:hover {
    border-color: var(--accent-orange);
    background: rgba(255, 107, 53, 0.05);
    transform: translateX(5px);
}

/* ========================================
   Animations
   ======================================== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .dashboard-sidebar {
        width: 200px;
    }

    .dashboard-content {
        margin-left: 200px;
        padding: 1rem;
    }

    .topbar {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .search-box {
        margin-right: 0;
        width: 100%;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 50px 0;
        min-height: 400px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section {
        padding: 40px 0;
    }

    .dashboard-wrapper {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem 0;
    }

    .dashboard-content {
        margin-left: 0;
        padding: 1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: scale(1);
    }
}

/* ========================================
   Metric badges & progress (terrain metrics)
   ======================================== */
.metric-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .5rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(16,24,40,0.06);
    color: var(--text-dark);
    font-weight: 700;
    font-size: .78rem;
    box-shadow: var(--shadow-sm);
}
.metric-badge i { font-size: .9rem; opacity: .95; }

.metric-traffic { background: linear-gradient(90deg,#f3e8ff,#e9d5ff); color:#5b21b6; border-color: rgba(124,58,237,0.12); }
.metric-route   { background: linear-gradient(90deg,#e0f2fe,#bae6fd); color:#0369a1; border-color: rgba(14,165,233,0.12); }
.metric-empl    { background: linear-gradient(90deg,#eef2ff,#e0e7ff); color:#3730a3; border-color: rgba(99,102,241,0.12); }
.metric-dens-low { background:#f3f4f6; color:#6b7280; border-color: rgba(107,114,128,0.06); }
.metric-dens-mid { background: linear-gradient(90deg,#fff7ed,#fff1d6); color:#92400e; border-color: rgba(245,158,11,0.08); }
.metric-dens-high{ background: linear-gradient(90deg,#ecfdf5,#d1fae5); color:#065f46; border-color: rgba(16,185,129,0.08); }
.metric-dwell { background:#ffffff; color:#374151; border-color: rgba(16,24,40,0.06); }

.metric-inline { display:inline-flex; align-items:center; gap:.5rem; }
.metric-progress { height:8px; width:88px; background:#eef2f7; border-radius:999px; overflow:hidden; display:inline-block; vertical-align:middle; }
.metric-progress .bar { height:100%; width:0%; background:linear-gradient(90deg,#10b981,#34d399); transition:width .45s ease; }
.metric-progress .bar.mid { background:linear-gradient(90deg,#f59e0b,#fbbf24); }
.metric-progress .bar.bad { background:linear-gradient(90deg,#ef4444,#f97316); }
.metric-num { font-size:.75rem; color:#6b7280; }

/* larger progress for detail page */
.metric-progress.detail { width:180px; height:10px; }
.metric-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }

