/* =========================================
   THEME VARIABLES
   ========================================= */
:root {
    --primary-navy: #1a252f;
    --secondary-navy: #2c3e50;
    --accent-red: #c0392b;
    --accent-red-hover: #a93226;
    --text-dark: #333333;
    --text-light: #ecf0f1;
    --bg-light: #f8f9fa;
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    /* Accessibility: Improved contrast colors */
    --footer-text: #d5d8dc;
    --footer-link: #e8eaed;
}

/* =========================================
   GLOBAL SETUP
   ========================================= */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    padding-top: 76px;
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    overflow-x: hidden;
    min-height: 100vh;
    box-sizing: border-box;
}

* {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-navy);
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Accessibility: Focus states for keyboard navigation */
a:focus,
button:focus,
.nav-link:focus,
.dropdown-toggle:focus,
.btn:focus {
    outline: 3px solid var(--accent-red);
    outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-navy);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    font-weight: 600;
    width: auto;
}

.skip-to-main:focus {
    top: 0;
    outline: 3px solid var(--accent-red);
    outline-offset: 2px;
    position: fixed;
}

/* =========================================
   HEADER & NAV
   ========================================= */
.navbar {
    background-color: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 100%;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-navy);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand:focus {
    outline: 3px solid var(--accent-red);
    outline-offset: 2px;
}

.navbar-brand small {
    font-size: 0.6em;
}

.navbar-brand img {
    height: 2.5rem;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 2rem;
        max-width: 100px;
    }
    .navbar-brand {
        gap: 0.5rem;
        font-size: 1.2rem;
    }
}

@media (min-width: 1200px) {
    .navbar-brand img {
        height: 3rem;
        max-width: 140px;
    }
}

/* Accessibility: Navbar toggler button */
.navbar-toggler {
    border: 2px solid transparent;
}

.navbar-toggler:focus {
    outline: 3px solid var(--accent-red);
    outline-offset: 2px;
    border-color: var(--accent-red);
}

.nav-link {
    color: var(--primary-navy);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-red);
}

.btn-nav-phone {
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
    font-weight: 700;
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
}

.btn-nav-phone:hover,
.btn-nav-phone:focus {
    background-color: var(--accent-red);
    color: white;
    outline: 3px solid var(--accent-red);
    outline-offset: 2px;
}

/* =========================================
   COMPONENTS
   ========================================= */
section { 
    padding: 80px 0;
    width: 100%;
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 100%;
}

.page-header {
    background: var(--primary-navy);
    color: white;
    padding: 60px 0;
    text-align: center;
}

/* About Section Image */
.about-image {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    width: 100%;
}

/* Responsive adjustments for about image */
@media (max-width: 992px) {
    .about-image {
        max-height: 400px;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .about-image {
        max-height: 350px;
    }
}

@media (max-width: 576px) {
    .about-image {
        max-height: 300px;
    }
}

/* Hero Section (Home) - Reduced height */
.hero-section {
    position: relative;
    background-color: var(--primary-navy);
    color: white;
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
    min-height: 450px;
    height: 450px;
}

/* Hero Background Overlay - Replaces image with gradient design */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    /* Rich gradient background replacing image */
    background: linear-gradient(
        135deg,
        var(--primary-navy) 0%,
        var(--secondary-navy) 50%,
        var(--primary-navy) 100%
    );
    /* Add subtle pattern/texture */
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(192, 57, 43, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(192, 57, 43, 0.08) 0%, transparent 50%),
        linear-gradient(
            135deg,
            var(--primary-navy) 0%,
            var(--secondary-navy) 50%,
            var(--primary-navy) 100%
        );
    background-size: 100% 100%, 100% 100%, 100% 100%;
    background-position: center;
    min-height: 100%;
}

/* Content positioned above overlay */
.hero-content {
    position: relative;
    z-index: 3;
}

/* Enhanced text readability in hero section */
.hero-content h1,
.hero-content .display-4 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #ffffff !important;
}

.hero-content p,
.hero-content .lead,
.hero-content .text-white {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    color: #ffffff !important;
}

/* Hide carousel controls and indicators for hero section */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next,
.hero-carousel .carousel-indicators {
    display: none;
}

/* No parallax needed - overlay is static background */

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        min-height: 400px;
        height: 400px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 50px 0;
        min-height: 350px;
        height: 350px;
    }
}

/* Service Cards */
.service-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    height: 100%;
    background: white;
}
.service-card:hover { transform: translateY(-5px); }
.service-card:focus-within {
    outline: 3px solid var(--accent-red);
    outline-offset: 4px;
}
.service-card img {
    height: 220px;
    object-fit: cover;
    object-position: center;
    background-color: #ddd;
    width: 100%;
}

/* Accessibility: Ensure buttons have visible focus states */
.btn:focus {
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.5);
}

/* Accessibility: Dropdown menu focus states */
.dropdown-item:focus {
    background-color: var(--accent-red);
    color: white;
    outline: 2px solid var(--accent-red);
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background-color: #121a21;
    color: var(--footer-text);
    padding: 60px 0 20px;
    font-size: 0.95rem;
}
footer h5 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--accent-red);
    display: inline-block;
    padding-bottom: 10px;
}
footer a { 
    color: var(--footer-link);
}
footer a:hover,
footer a:focus { 
    color: var(--accent-red); 
    padding-left: 5px;
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}
footer .social-icon { 
    font-size: 1.5rem;
    color: var(--footer-link);
}
footer .social-icon:hover,
footer .social-icon:focus {
    color: var(--accent-red);
}
footer .social-icon:focus {
    outline: 3px solid var(--accent-red);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Accessibility: Ensure text-muted in footer has sufficient contrast */
footer .text-muted,
footer p.text-muted,
footer .small.text-muted,
footer p.small.text-muted,
footer div.small.text-muted {
    color: var(--footer-text) !important;
}

/* Ensure all text in footer has good contrast */
footer p:not(.text-white):not(h5):not(h4) {
    color: var(--footer-text);
}

footer .small {
    color: var(--footer-text);
}

/* Web Designer Credit */
.footer-copyright-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--footer-text);
}

.web-designer-credit {
    font-size: 0.75rem;
    opacity: 0.8;
}

.web-designer-credit a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--footer-link);
    text-decoration: none;
    transition: all 0.3s ease;
}

.web-designer-credit a:hover,
.web-designer-credit a:focus {
    color: var(--accent-red);
    opacity: 1;
    transform: translateY(-1px);
}

.web-designer-credit img,
.web-designer-credit svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    opacity: 0.9;
}

.web-designer-credit a:hover img,
.web-designer-credit a:hover svg,
.web-designer-credit a:focus img,
.web-designer-credit a:focus svg {
    opacity: 1;
}

/* Separator between copyright and credit */
.footer-copyright-row .separator {
    color: var(--footer-text);
    opacity: 0.5;
}

/* Override Bootstrap's text-muted in footer for better contrast */
footer * {
    color: inherit;
}
footer h5,
footer h4,
footer h3 {
    color: white;
}
