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

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

:root {
    --brand-primary: #1e3a8a;
    --brand-accent: #3b82f6;
    --muted: #64748b;
    --surface: #ffffff;
    --bg: #f8fafc;
    --max-width: 1200px;
    --radius: 0.5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004999;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-primary);
    text-decoration: none;
}

.nav-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
}

.brand-text {
    display: inline-block;
    font-size: 1rem;
    color: var(--brand-primary);
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-toggle {
    display: none;
}

.nav-links a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1e3a8a;
    background-color: #f1f5f9;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border-top: 1px solid #e2e8f0;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        padding: 1rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .navbar .container {
        position: relative;
    }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #475569;
        cursor: pointer;
        padding: 0.5rem;
    }
}

/* ===================================
   Layout Utilities
   =================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.hero-tagline {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    background-color: #fff;
    color: #1e3a8a;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background-color: #f0f9ff;
}

/* ===================================
   Page Header (Sub-pages)
   =================================== */
.page-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.page-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page-header p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 0; }


/* ===================================
   Services Section
   =================================== */
.services {
    padding: 3rem 0;
    background-color: #f8fafc;
}

.services h2 {
    text-align: center;
    color: #1e3a8a;
    margin-bottom: 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.service-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-card h3 {
    color: #1e3a8a;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: #475569;
    margin-bottom: 0;
}

/* ===================================
   Contractor Rewards Section
   =================================== */
.contractor-rewards {
    background-color: #1e3a8a;
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.contractor-rewards h2 {
    color: #fff;
}

.contractor-rewards p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ===================================
   Updates Section
   =================================== */
.updates {
    padding: 3rem 0;
    background-color: #fff;
}

.updates h2 {
    text-align: center;
    color: #1e3a8a;
    margin-bottom: 2rem;
}

.updates-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.update-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-left: 4px solid #3b82f6;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
}

.update-card:hover {
    background-color: #e0f2fe;
}

.update-card time {
    display: block;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.update-card h3 {
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.update-card p {
    color: #475569;
    margin-bottom: 0;
}

/* ===================================
   Locations Section
   =================================== */
.locations {
    padding: 3rem 0;
    background-color: #f8fafc;
}

.locations h2 {
    text-align: center;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.locations-intro {
    text-align: center;
    color: #475569;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.locations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.location-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.location-card h3 {
    color: #1e3a8a;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.location-card address {
    font-style: normal;
    color: #475569;
    margin-bottom: 0.75rem;
}

.location-card address p {
    margin-bottom: 0.25rem;
}

.location-card .phone {
    margin-bottom: 1rem;
}

.location-card .phone a {
    color: #3b82f6;
    font-weight: 600;
    font-size: 1.125rem;
}

.location-card .hours {
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.location-card .hours strong {
    display: block;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.location-card .hours p {
    color: #64748b;
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background-color: var(--brand-primary);
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer p:last-child {
    margin-bottom: 0;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ===================================
   Responsive Design - Tablet
   =================================== */
@media (min-width: 640px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .updates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .locations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   Responsive Design - Desktop
   =================================== */
@media (min-width: 1024px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
    
    .hero-tagline {
        font-size: 1.125rem;
    }
    
    .services {
        padding: 4rem 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .updates {
        padding: 4rem 0;
    }
    
    .updates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .locations {
        padding: 4rem 0;
    }
    
    .locations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    h2 {
        font-size: 2.25rem;
    }
}

/* ===================================
   Performance Optimizations
   =================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print styles for better printing */
@media print {
    .hero {
        background: #1e3a8a;
        color: #000;
    }
    
    .cta-button {
        border: 2px solid #1e3a8a;
    }
    
    .service-card,
    .location-card,
    .update-card {
        break-inside: avoid;
    }
}

/* Brands Section (Hardware page) */
.brands-section {
    padding: 3rem 0 4rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    margin: 2rem 0;
    border-radius: 12px;
}
.brands-header {
    text-align: center;
    margin-bottom: 2rem;
}
.brands-section h2 {
    color: var(--brand-primary);
    margin-bottom: 0.75rem;
    font-size: 2rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brands-intro {
    text-align: center;
    color: #475569;
    margin-bottom: 2rem;
    font-size: 1.05rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}
.brands-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}
.brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.12), 0 2px 6px rgba(0,0,0,0.04);
    color: #1f2937;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(59, 130, 246, 0.1);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    min-height: 160px;
    position: relative;
    overflow: hidden;
}

.brand-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.brand-card:hover::before {
    left: 100%;
}

.brand-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 48px rgba(59, 130, 246, 0.25), 0 4px 12px rgba(0,0,0,0.08);
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
}

.brand-name { 
    font-size: 1.35rem; 
    color: var(--brand-primary);
    font-weight: 900;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.brand-desc { 
    color: #64748b; 
    font-weight: 500; 
    font-size: 0.875rem; 
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.2px;
}

@media (min-width: 640px) {
    .brands-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

@media (min-width: 1024px) {
    .brands-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
    .brands-section { padding: 4rem 2rem; }
    .brands-section h2 { font-size: 2.25rem; }
}
