/* Custom Colors */
:root {
    --primary-light: #6aa8d8; /* Light Blueish Title Color */
    --black-body: #212529;    
    --white: #ffffff; 
    --bright-white: #f0f0f0; 
    --dark-bg: #1c2125;       
    
    /* Slightly lighter background for alternating sections */
    --dark-alternate-faint: #282d32; 
    --dark-lightened-faint: #31363b; 

    --dark-lighter-custom: #343a40; 
}

/* Font Definitions */
.raleway-font {
    font-family: 'Raleway', sans-serif !important;
    font-weight: 700 !important; /* Bold */
}
.merriweather-font {
    font-family: 'Merriweather', serif !important;
}
body {
    font-family: 'Merriweather', serif;
    color: var(--white); /* Default text color is white */
}

/* Background Utility Classes for alternating backgrounds */
.bg-dark-alternate-faint {
    background-color: var(--dark-alternate-faint) !important;
}
.bg-dark-lightened-faint {
    background-color: var(--dark-lightened-faint) !important;
}

/* Section Styling */
.page-section {
    padding: 8rem 0;
}

.section-heading {
    font-size: 3.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-light); 
}
.subsection-title {
    color: var(--primary-light) !important;
}

/* Navigation Bar - Logo and Primary Text Color */
.navbar {
    background-color: var(--dark-bg) !important;
    border-bottom: 3px solid var(--primary-light);
}
.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-light) !important; 
    padding-top: 0;
    padding-bottom: 0;
}
.navbar-logo {
    height: 30px; 
    width: auto;
}
.navbar-nav .nav-link {
    color: var(--white) !important;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
}
.navbar-nav .nav-link:hover {
    color: var(--primary-light) !important;
}

/* Hero Section */
.hero-head {
    height: 100vh;
    min-height: 500px;
    background-image: url('hero-bg.jpg');
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center center;
    background-size: cover;
    position: relative;
    color: var(--white) !important; /* Ensures all inherited text is white */
}

.hero-head h1 {
    font-size: 4rem;
    text-shadow: 2px 2px 4px #000000;
}

/* Explicitly target text elements in the hero to force white color */
.hero-head h1, 
.hero-head p.lead {
    color: var(--white) !important;
}

/* Links within the hero section - COLORS SWAPPED */
.hero-link {
    /* Default link color is now crisp white */
    color: #ffffff !important; 
    text-decoration: underline;
    transition: color 0.2s;
}
.hero-link:hover {
    /* Hover color is now light blue */
    color: var(--primary-light) !important; 
    text-decoration: none;
}

/* Information Box (All boxes on dark backgrounds) */
.info-box-alt {
    background-color: var(--dark-lighter-custom) !important; 
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--primary-light);
    height: 100%;
    color: var(--white); 
}
.info-box-alt:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.4);
}
.info-box-alt ul li:hover {
    color: var(--primary-light); 
}
.info-box-alt a {
    color: var(--white); 
}
.info-box-alt a:hover {
    color: var(--primary-light);
}

/* Product Logos */
.brand-logo-color {
    max-height: 50px; 
    width: auto;
    margin: 15px 25px;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.brand-logo-color:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Contact Form Specifics */
#contactForm .form-control {
    background-color: var(--dark-lighter-custom); 
    border: 1px solid var(--primary-light);
    color: var(--white);
}
#contactForm .form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.25rem rgba(106, 168, 216, 0.25);
}
#contactForm .form-control::placeholder {
    color: #ced4da;
    opacity: 0.8;
}

/* Button Styling */
.btn-primary {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--dark-bg); 
    font-weight: 700;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.btn-primary:hover {
    background-color: #4a8cd1; 
    border-color: #4a8cd1;
}
.btn-xl {
    padding: 1rem 2rem;
    font-size: 1.25rem;
}

/* Footer Styling */
.footer {
    background-color: var(--dark-bg) !important;
    color: var(--white);
    border-top: 1px solid var(--primary-light);
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg); /* Use your site's background color */
    z-index: 9999; /* Ensure it stays on top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease; /* Smooth fade-out effect */
}
#preloader .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-light) !important;
}
.loaded {
    visibility: hidden;
    opacity: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-head h1 {
        font-size: 2.5rem;
    }
    .hero-head p {
        font-size: 1rem !important;
    }
    .page-section {
        padding: 5rem 0;
    }
    .section-heading {
        font-size: 2.5rem;
    }
}