/* CRITICAL: Prevent any spacing above navbar */
* {
    margin-top: 0;
    padding-top: 0;
}

html {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    position: relative !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    position: relative !important;
    top: 0 !important;
}

/* Carousel styles moved to carousel_fix.css */

/* Image loading styles moved to carousel_fix.css */

/* Unique Enterprises - Dark Theme for Lighting Company */
/* Sophisticated dark color scheme for professional lighting business */

:root {
    /* Primary colors - Updated for dark theme */
    --primary-blue: #3b82f6;
    --primary-light-blue: #60a5fa;
    --secondary-blue: #38bdf8;
    --accent-orange: #f59e0b;
    --accent-yellow: #fbbf24;
    
    /* Dark theme colors */
    --charcoal: #1f2937;
    --dark-charcoal: #111827;
    --mid-gray: #374151;
    --light-charcoal: #4b5563;
    --border-gray: #6b7280;
    
    /* Background colors */
    --bg-primary: #111827;      /* Dark charcoal */
    --bg-secondary: #1f2937;    /* Charcoal */
    --bg-tertiary: #374151;     /* Mid gray */
    --bg-card: #1f2937;         /* Card backgrounds */
    --bg-hover: #374151;        /* Hover states */
    
    /* Text colors for dark theme */
    --text-primary: #f9fafb;    /* Light text */
    --text-secondary: #d1d5db;  /* Secondary text */
    --text-muted: #9ca3af;      /* Muted text */
    --text-accent: #60a5fa;     /* Accent text */
    
    /* Border and divider colors */
    --border-color: #4b5563;
    --divider-color: #374151;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global reset to prevent navbar spacing issues */
html {
    margin: 0 !important;
    padding: 0 !important;
    scroll-padding-top: 0 !important;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    padding-top: 0 !important; /* Force no padding */
    margin-top: 0 !important; /* Force no margin */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Reset any Bootstrap or framework top spacing */
.container-fluid:first-child,
.container:first-child,
section:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
}

/* Carousel section needs special handling for navbar - removed from above rule */

/* Ensure main content doesn't have top spacing */
main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure no container adds top spacing */
.container, .container-fluid {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure first section doesn't have top spacing */
section:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Navigation styles - Dark theme */
.navbar {
    background-color: var(--bg-secondary) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0; /* Reduced from 0.75rem to accommodate larger logo */
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1030 !important;
    margin: 0 !important; /* Ensure no margin */
    transform: translateY(0) !important; /* Force position */
    border-top: none !important;
    min-height: 70px; /* Set minimum height to ensure consistency */
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0; /* Remove default padding */
}

.navbar-brand img {
    width: auto;
    height: 55px; /* Increased from 40px to 55px */
    max-height: 55px;
    transition: all 0.3s ease;
    object-fit: contain; /* Ensure proper scaling */
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--text-accent) !important;
    background-color: var(--bg-hover);
}

.navbar-toggler {
    border-color: var(--border-color);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28249, 250, 251, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown menus */
.dropdown-menu {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-accent);
}

/* Hero section - Enhanced for dark theme */
.hero-section {
    background: linear-gradient(135deg, var(--dark-charcoal) 0%, var(--charcoal) 50%, var(--mid-gray) 100%);
    color: var(--text-primary);
    padding: 6rem 0 5rem;
    text-align: center;
    margin-top: -120px;
    padding-top: 200px;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(96,165,250,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    color: var(--text-secondary);
}

/* Card styles - Dark theme */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

.card-header {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.card-body {
    background-color: var(--bg-card);
}

/* Button styles - Updated for dark theme */
.btn-primary {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    color: var(--dark-charcoal);
}

.btn-primary:hover {
    background-color: #ea580c;
    border-color: #ea580c;
    transform: translateY(-2px);
    color: var(--dark-charcoal);
}

.btn-outline-primary {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--text-primary);
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

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

/* Form controls - Dark theme */
.form-control {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.form-control:focus {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-blue);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.form-select:focus {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-blue);
    color: var(--text-primary);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Services section - Dark theme */
.services-section {
    padding: 5rem 0;
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-blue);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-orange);
    margin-bottom: 1.5rem;
}

.service-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.service-description {
    color: var(--text-secondary);
}

/* Stats section */
.stats-section {
    padding: 4rem 0;
    background-color: var(--bg-primary);
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Process section */
.process-section {
    padding: 5rem 0;
    background-color: var(--bg-secondary); /* Changed from primary-blue to charcoal */
    color: var(--text-primary);
}

.process-step {
    text-align: center;
    padding: 2rem 1rem;
}

.process-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--accent-orange);
    color: var(--dark-charcoal);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.process-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.process-description {
    color: var(--text-primary); /* Changed to primary text for better contrast on blue */
}

/* Contact section */
.contact-section {
    background-color: var(--bg-secondary); /* Charcoal background */
    padding: 5rem 0; /* Added padding to match other sections */
}

/* Tables - Dark theme */
.table {
    color: var(--text-primary);
}

.table-dark {
    --bs-table-bg: var(--bg-card);
    --bs-table-border-color: var(--border-color);
}

/* Badges - Dark theme updates */
.badge {
    font-weight: 500;
}

.badge.bg-success {
    background-color: #059669 !important;
}

.badge.bg-warning {
    background-color: var(--accent-yellow) !important;
    color: var(--dark-charcoal) !important;
}

.badge.bg-danger {
    background-color: #dc2626 !important;
}

.badge.bg-info {
    background-color: var(--secondary-blue) !important;
}

/* Alerts - Dark theme */
.alert {
    border: 1px solid var(--border-color);
}

.alert-info {
    background-color: rgba(56, 189, 248, 0.1);
    border-color: var(--secondary-blue);
    color: var(--text-primary);
}

/* Light background alerts need dark text - Override for readability */
.alert-info.bg-light,
.alert-warning.bg-light,
.alert[style*="background-color: #d1ecf1"],
.alert[style*="background-color: #fff3cd"] {
    color: #212529 !important;
}

.alert[style*="background-color: #d1ecf1"] *,
.alert[style*="background-color: #fff3cd"] * {
    color: inherit !important;
}

.alert-warning {
    background-color: rgba(251, 191, 36, 0.1);
    border-color: var(--accent-yellow);
    color: var(--text-primary);
}

/* Specific fixes for light alert backgrounds */
.alert[style*="#d1ecf1"] {
    color: #0c5460 !important;
}

.alert[style*="#fff3cd"] {
    color: #856404 !important;
}

.alert-success {
    background-color: rgba(5, 150, 105, 0.1);
    border-color: #059669;
    color: var(--text-primary);
}

.alert-danger {
    background-color: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
    color: var(--text-primary);
}

/* Breadcrumb - Dark theme */
.breadcrumb {
    background-color: var(--bg-tertiary);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.breadcrumb-item a {
    color: var(--text-accent);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

/* Pagination - Dark theme */
.pagination .page-link {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.pagination .page-link:hover {
    background-color: var(--bg-hover);
    border-color: var(--primary-blue);
    color: var(--text-accent);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--text-primary);
}

/* List groups - Dark theme */
.list-group-item {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.list-group-item:hover {
    background-color: var(--bg-hover);
}

.list-group-item-action:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* FAQ specific styles */
.accordion-item {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

.accordion-button {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
}

.accordion-button:not(.collapsed) {
    background-color: var(--bg-hover);
    color: var(--text-accent);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fbbf24'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fbbf24'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transform: rotate(-180deg);
}

.accordion-body {
    background-color: var(--bg-card);
    color: var(--text-secondary);
}

/* Product image gallery styles */
.thumbnail-image {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-image:hover {
    border-color: var(--primary-blue);
    transform: scale(1.05);
}

.thumbnail-image.active {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.main-image-container {
    overflow: hidden;
    border-radius: 0.5rem 0.5rem 0 0;
}

.product-detail-image {
    transition: transform 0.3s ease;
}

.product-detail-image:hover {
    transform: scale(1.02);
}

/* Image modal styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.image-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    border-radius: 0.5rem;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Product comparison table styles */
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: var(--bg-tertiary) !important;
    border-right: 2px solid var(--border-color);
    min-width: 200px;
    font-weight: 600;
}

.table-responsive {
    max-height: 70vh;
    overflow-y: auto;
}

.comparison-product-header {
    min-width: 200px;
    max-width: 250px;
}

/* Product cards - Enhanced for dark theme */
.product-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-blue);
}

/* Text color overrides */
.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary-blue) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

/* Footer - Enhanced dark theme */
.footer {
    background: linear-gradient(135deg, var(--dark-charcoal) 0%, var(--charcoal) 100%);
    color: var(--text-primary);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer p {
    color: var(--text-muted) !important;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--text-accent);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
    text-align: center;
    color: var(--text-muted);
}

/* Content spacing for pages with navbar */
.content-wrapper {
    min-height: calc(100vh - 100px);
}

/* All carousel styles moved to carousel_fix.css for better organization */



/* Input groups - Dark theme */
.input-group .form-control {
    border-right: none;
}

.input-group .btn {
    border-left: none;
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Mobile navbar improvements */
    .navbar {
        padding: 0.4rem 0; /* Slightly reduced for mobile */
        min-height: 65px; /* Slightly smaller on mobile */
    }
    
    .navbar-brand img {
        height: 48px; /* Slightly smaller on mobile */
        max-height: 48px;
    }
    
    .navbar-nav .nav-link {
        margin: 0;
        padding: 0.75rem 1rem !important;
    }
    
    /* Mobile product cards */
    .product-card {
        margin-bottom: 1rem;
    }
    
    /* Mobile buttons */
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.5rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 2rem;
    }
    
    /* Mobile form improvements */
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Mobile spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile cards */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Mobile text sizing */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Mobile tables */
    .table-responsive {
        border: none;
    }
    
    /* Mobile stats and metrics */
    .stat-number {
        font-size: 2rem;
    }
    
    /* Mobile footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer .row > div {
        margin-bottom: 1.5rem;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .navbar-brand img {
        height: 42px; /* Even smaller for very small screens */
        max-height: 42px;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    /* Mobile product detail improvements */
    .product-detail-image {
        height: 250px !important;
    }
    
    /* Mobile review section */
    .review-item {
        padding: 0.75rem !important;
    }
    
    /* Mobile directory cards */
    .reseller-card {
        margin-bottom: 0.75rem;
    }
}

/* Dark theme utilities */
.bg-dark-custom {
    background-color: var(--bg-secondary) !important;
}

.border-dark-custom {
    border-color: var(--border-color) !important;
}

.text-light-custom {
    color: var(--text-secondary) !important;
}
