/* VIXEL Tartan-Inspired Color Palette - Preserving Original Backgrounds */
:root {
    /* Primary Colors - Inspired by the Tartan Logo */
    --vixel-primary: #1a4c3e; /* Deep Forest Green from logo */
    --vixel-primary-light: #2d7a5f; /* Lighter Forest Green */
    --vixel-primary-dark: #0f3027; /* Darker Forest Green */
    --vixel-primary-rgb: 26, 76, 62;
    
    /* Secondary Colors - Sophisticated Burgundy */
    --vixel-secondary: #8b2635; /* Rich Burgundy from logo */
    --vixel-secondary-light: #b33a4a; /* Lighter Burgundy */
    --vixel-secondary-dark: #6b1d2a; /* Darker Burgundy */
    --vixel-secondary-rgb: 139, 38, 53;
    
    /* Accent Colors - Luxury Gold */
    --vixel-accent: #d4af37; /* Refined Gold from tartan */
    --vixel-accent-light: #e6c757; /* Light Gold */
    --vixel-accent-dark: #b8941f; /* Deep Gold */
    --vixel-accent-rgb: 212, 175, 55;
    
    /* Neutral Colors - Warm Sophisticated Grays */
    --vixel-gray-50: #faf9f7; /* Warm off-white */
    --vixel-gray-100: #f5f3f0; /* Light warm gray */
    --vixel-gray-200: #e8e4df; /* Medium warm gray */
    --vixel-gray-300: #d3cdc4; /* Mid warm gray */
    --vixel-gray-400: #a8a196; /* Neutral warm */
    --vixel-gray-500: #7a7066; /* Medium warm brown */
    --vixel-gray-600: #5d5449; /* Dark warm brown */
    --vixel-gray-700: #453e35; /* Deep warm brown */
    --vixel-gray-800: #2d2821; /* Very dark warm */
    --vixel-gray-900: #1a1614; /* Almost black warm */
    
    /* Success & Status Colors - Tartan Harmony */
    --vixel-success: var(--vixel-primary); /* Forest Green */
    --vixel-warning: var(--vixel-accent); /* Gold */
    --vixel-danger: var(--vixel-secondary); /* Burgundy */
    --vixel-info: #2c5f5d; /* Teal complement */
    
    /* Text Colors - Sophisticated Hierarchy */
    --vixel-text-primary: var(--vixel-gray-900);
    --vixel-text-secondary: var(--vixel-gray-600);
    --vixel-text-light: var(--vixel-gray-400);
    --vixel-text-white: #ffffff;
    --vixel-text-cream: #faf9f7;
}

/* Override Bootstrap Variables with VIXEL Palette */
:root {
    --bs-primary: var(--vixel-primary);
    --bs-primary-rgb: var(--vixel-primary-rgb);
    --bs-secondary: var(--vixel-secondary);
    --bs-secondary-rgb: var(--vixel-secondary-rgb);
    
    --bs-body-color: var(--vixel-text-primary);
    --bs-link-color: var(--vixel-primary);
    --bs-link-hover-color: var(--vixel-primary-dark);
    
    --bs-gray-100: var(--vixel-gray-100);
    --bs-gray-200: var(--vixel-gray-200);
    --bs-gray-300: var(--vixel-gray-300);
    --bs-gray-400: var(--vixel-gray-400);
    --bs-gray-500: var(--vixel-gray-500);
    --bs-gray-600: var(--vixel-gray-600);
    --bs-gray-700: var(--vixel-gray-700);
    --bs-gray-800: var(--vixel-gray-800);
    --bs-gray-900: var(--vixel-gray-900);
}

/* Enhanced Header - Conserving Original Background */
.masthead {
    background: url('../assets/img/bg-masthead.jpg') center/cover;
    color: var(--vixel-text-white);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background-attachment: fixed;
}

.masthead::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(26, 76, 62, 0.15) 0%, 
        rgba(139, 38, 53, 0.1) 50%, 
        rgba(212, 175, 55, 0.1) 100%);
    z-index: 1;
}

.masthead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--vixel-accent) 20%, 
        var(--vixel-secondary) 40%, 
        var(--vixel-primary) 60%, 
        var(--vixel-accent) 80%, 
        transparent 100%);
    z-index: 3;
}

.masthead > .container {
    position: relative;
    z-index: 2;
}

/* VIXEL Logo Enhancement - Separate styles for main and menu logos */
.masthead h1 img {
    transition: all 0.3s ease;
    max-width: 350px;
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    margin: 0 auto;
}

#menu-logo {
    transition: all 0.3s ease;
    max-width: 100%;
    max-height: 60px;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Ensure img-fluid doesn't override our specific sizing */
.sidebar-nav .sidebar-brand img.img-fluid {
    max-width: 100% !important;
    max-height: 60px !important;
    height: auto !important;
    width: auto !important;
}

.sidebar-nav .sidebar-brand a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 !important;
    line-height: 1 !important;
    text-decoration: none;
    color: white !important;
}

/* Override base sidebar-brand styles */
.sidebar-nav > .sidebar-brand {
    height: auto !important;
    line-height: 1 !important;
    padding: 1rem !important;
    font-size: inherit !important;
    background: linear-gradient(135deg, 
        var(--vixel-primary), 
        var(--vixel-secondary-dark)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.masthead h1 img:hover,
#menu-logo:hover {
    transform: scale(1.05);
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    #menu-logo {
        max-height: 50px;
    }
    
    .sidebar-nav .sidebar-brand {
        min-height: 70px;
        padding: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    #menu-logo {
        max-height: 40px;
    }
    
    .sidebar-nav .sidebar-brand {
        min-height: 60px;
        padding: 0.6rem !important;
    }
    
    .masthead h1 img {
        max-width: 200px;
    }
}

/* Enhanced contrast for text over original backgrounds */
.masthead h1, 
.masthead p,
.masthead .lead {
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.9);
    font-weight: 600;
}

.masthead h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    line-height: 1;
}

.masthead .lead {
    font-size: 1.4rem;
    line-height: 1.6;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 2rem;
    border-radius: 0;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Navigation Enhancement - Tartan Luxury */
#sidebar-wrapper {
    background: linear-gradient(180deg, 
        rgba(26, 76, 62, 0.95) 0%, 
        rgba(29, 40, 33, 0.95) 100%);
    backdrop-filter: blur(15px);
    border-right: 3px solid var(--vixel-accent);
    z-index: 1050 !important;
}

.sidebar-nav .sidebar-brand {
    background: linear-gradient(135deg, 
        var(--vixel-primary), 
        var(--vixel-secondary-dark));
    padding: 1rem;
    border-radius: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 80px;
    height: auto;
}



.sidebar-nav a {
    color: var(--vixel-gray-100);
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-nav a {
    color: var(--vixel-gray-100);
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-nav a:hover {
    color: var(--vixel-accent);
    background: linear-gradient(90deg, 
        transparent, 
        rgba(212, 175, 55, 0.1), 
        transparent);
}

/* Menu Toggle Button Z-Index Fix */
.menu-toggle {
    z-index: 1051 !important;
}

/* Button Enhancements - High Visibility */
.btn-primary {
    background: linear-gradient(135deg, 
        var(--vixel-primary), 
        var(--vixel-primary-light));
    border: 3px solid var(--vixel-accent);
    box-shadow: 0 6px 20px rgba(26, 76, 62, 0.4);
    transition: all 0.3s ease;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--vixel-text-white);
    font-size: 1.1rem;
    padding: 15px 35px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-primary:hover {
    background: linear-gradient(135deg, 
        var(--vixel-accent), 
        var(--vixel-accent-light));
    border-color: var(--vixel-secondary);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.6);
    color: var(--vixel-gray-900);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-xl {
    padding: 20px 45px;
    font-size: 1.2rem;
    font-weight: 800;
}

.btn-secondary {
    background: linear-gradient(135deg, 
        var(--vixel-secondary), 
        var(--vixel-secondary-light));
    border: 2px solid var(--vixel-accent);
    color: var(--vixel-text-white);
    font-weight: 600;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, 
        var(--vixel-accent), 
        var(--vixel-accent-light));
    color: var(--vixel-gray-900);
}

.btn-outline-primary {
    border-color: var(--vixel-primary);
    color: var(--vixel-primary);
}

.btn-outline-primary:hover {
    background: var(--vixel-primary);
    border-color: var(--vixel-primary);
    color: white;
}

/* Services Section Enhancement - Maintaining VIXEL Colors */
.content-section.bg-primary {
    background: linear-gradient(135deg, 
        var(--vixel-primary) 0%, 
        var(--vixel-secondary-dark) 50%, 
        var(--vixel-primary-dark) 100%);
    position: relative;
}

.content-section.bg-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(45deg,
            transparent,
            transparent 30px,
            rgba(212, 175, 55, 0.03) 30px,
            rgba(212, 175, 55, 0.03) 32px);
    pointer-events: none;
}

.service-icon {
    background: linear-gradient(135deg, 
        var(--vixel-accent), 
        var(--vixel-accent-light));
    color: var(--vixel-gray-900);
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 3px solid var(--vixel-secondary);
    border-radius: 0;
    box-shadow: 0 8px 25px rgba(139, 38, 53, 0.3);
    font-weight: bold;
    font-size: 1.8rem;
}

.service-icon:hover {
    transform: scale(1.15) rotate(-5deg);
    background: linear-gradient(135deg, 
        var(--vixel-secondary), 
        var(--vixel-secondary-light));
    color: var(--vixel-text-white);
    border-color: var(--vixel-accent);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

/* Enhanced Section Backgrounds - Preserving Original Images */
.content-section.bg-light {
    background: var(--vixel-gray-50);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

/* Better text contrast for About section */
.content-section.bg-light h2 {
    color: var(--vixel-primary-dark);
    font-weight: 800;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content-section.bg-light .lead {
    color: var(--vixel-text-primary);
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.7;
}

.content-section.bg-light p {
    color: var(--vixel-text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.8;
}

.callout {
    background: url('../assets/img/bg-callout.jpg') center/cover;
    color: var(--vixel-text-white);
    position: relative;
    background-attachment: fixed;
}

.callout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(26, 76, 62, 0.6), 
        rgba(139, 38, 53, 0.4));
    pointer-events: none;
    z-index: 1;
}

.callout > .container {
    position: relative;
    z-index: 2;
}

.callout h2,
.callout h3 {
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.callout h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.callout h3 {
    font-size: 1.5rem;
}

/* Product Catalog Enhancements - Better Visibility */
.content-section#portfolio h2 {
    color: var(--vixel-primary-dark);
    font-weight: 800;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content-section#portfolio h3 {
    color: var(--vixel-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.content-section#portfolio p {
    color: var(--vixel-text-primary);
    font-size: 1.1rem;
    font-weight: 500;
}

.category-filter {
    border: 3px solid var(--vixel-accent);
    color: var(--vixel-primary-dark);
    background: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 24px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-filter.active,
.category-filter:hover {
    background: linear-gradient(135deg, 
        var(--vixel-accent), 
        var(--vixel-accent-light));
    border-color: var(--vixel-secondary);
    color: var(--vixel-gray-900);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
    transform: translateY(-3px);
}

.product-badge {
    background: linear-gradient(135deg, 
        var(--vixel-secondary), 
        var(--vixel-secondary-light));
    color: var(--vixel-text-white);
    border: 2px solid var(--vixel-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    font-size: 0.85rem;
}

.product-category {
    color: var(--vixel-accent);
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Enhanced product overlay text */
.product-info h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--vixel-text-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Better product grid spacing and text */
.content-section#portfolio .lead {
    color: var(--vixel-text-primary);
    font-weight: 600;
    font-size: 1.2rem;
}

/* Footer Enhancement - Better Text Visibility */
.footer {
    background: linear-gradient(135deg, 
        var(--vixel-gray-900) 0%, 
        var(--vixel-gray-800) 100%);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--vixel-accent) 0%, 
        var(--vixel-secondary) 25%, 
        var(--vixel-primary) 50%, 
        var(--vixel-secondary) 75%, 
        var(--vixel-accent) 100%);
}

.footer h2 {
    color: var(--vixel-text-white);
    font-weight: 800;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 1.5rem;
}

.footer h4 {
    color: var(--vixel-accent);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.footer .lead {
    color: var(--vixel-gray-200);
    font-weight: 500;
    font-size: 1.2rem;
    line-height: 1.7;
}

.footer p {
    color: var(--vixel-gray-300);
    font-weight: 500;
}

.contact-item i {
    color: var(--vixel-accent);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
    font-size: 2.5rem;
}

.btn-outline-light {
    border-color: var(--vixel-accent);
    color: var(--vixel-accent);
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-outline-light:hover {
    background: linear-gradient(135deg, 
        var(--vixel-accent), 
        var(--vixel-accent-light));
    border-color: var(--vixel-secondary);
    color: var(--vixel-gray-900);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

/* Typography Enhancements - High Contrast & Readability */
body {
    font-family: 'Source Sans Pro', Arial, sans-serif;
    line-height: 1.7;
    font-weight: 500;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--vixel-text-primary);
    font-weight: 800;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.3;
}

/* Global text improvements */
p {
    font-size: 1.1rem;
    line-height: 1.8;
    font-weight: 500;
    color: var(--vixel-text-primary);
}

.lead {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.7;
    color: var(--vixel-text-primary);
}

/* Better contrast for all sections */
.container h2 {
    margin-bottom: 2rem;
}

.container h3 {
    margin-bottom: 1.5rem;
}

/* Ensure good contrast everywhere */
.content-section {
    padding: 4rem 0;
}

.masthead h1, 
.masthead h2, 
.masthead p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.text-secondary {
    color: var(--vixel-accent) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lead {
    color: var(--vixel-text-secondary);
    font-size: 1.2rem;
    line-height: 1.7;
    font-weight: 400;
}

/* Special Typography for Services */
.content-section.bg-primary h2,
.content-section.bg-primary h3,
.content-section.bg-primary h4 {
    color: var(--vixel-text-white);
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    font-weight: 700;
}

.content-section.bg-primary h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.content-section.bg-primary h3 {
    font-size: 1.2rem;
}

.content-section.bg-primary h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.content-section.bg-primary .text-secondary {
    color: var(--vixel-accent-light) !important;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.content-section.bg-primary p {
    color: var(--vixel-text-white);
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.7;
}

/* Enhanced Accessibility - VIXEL Theme */
.btn:focus,
.category-filter:focus {
    outline: 3px solid var(--vixel-accent);
    outline-offset: 3px;
}

/* Scroll to Top Button Enhancement */
.scroll-to-top {
    background: linear-gradient(135deg, 
        var(--vixel-accent), 
        var(--vixel-accent-light));
    border: 2px solid var(--vixel-secondary);
    color: var(--vixel-gray-900);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, 
        var(--vixel-secondary), 
        var(--vixel-secondary-light));
    color: var(--vixel-text-white);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(139, 38, 53, 0.4);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .masthead h1 img {
        max-width: 250px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    .masthead,
    .callout {
        background-attachment: scroll;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --bs-body-bg: var(--vixel-gray-900);
        --bs-body-color: var(--vixel-gray-100);
    }
    
    .content-section.bg-light {
        background: var(--vixel-gray-800);
        color: var(--vixel-gray-100);
    }
}