:root {
    --primary-color: #E30613; /* Delaware Red-ish */
    --secondary-color: #2D2D2D; /* Dark Grey */
    --light-bg: #F8F9FA;
    --text-color: #555;
    --font-heading: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Open Sans', 'Segoe UI', sans-serif;
    --gradient-primary: linear-gradient(135deg, #E30613 0%, #B00000 100%);
    --gradient-dark: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: #b00000;
    text-decoration: none;
}

/* Header Overrides */
.navbar-light .navbar-nav .nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    padding-left: 1rem;
    padding-right: 1rem;
    position: relative;
}

.navbar-light .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .active .nav-link::after {
    width: 80%;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .active .nav-link {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    background: url('../img/background/bg3.png') center center/cover no-repeat;
    background-image: -webkit-image-set(
        url('../img/background/bg3.webp') type('image/webp'),
        url('../img/background/bg3.png') type('image/png')
    );
    background-image: image-set(
        url('../img/background/bg3.webp') type('image/webp'),
        url('../img/background/bg3.png') type('image/png')
    );
    height: 700px;
    display: flex;
    align-items: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary-custom {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 12px 35px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(227, 6, 19, 0.4);
}

.btn-primary-custom:hover {
    background: #c90511;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 6, 19, 0.6);
    color: white;
}

.btn-outline-white {
    border: 2px solid white;
    color: white;
    padding: 10px 33px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    margin-left: 15px;
}

.btn-outline-white:hover {
    background: white;
    color: var(--primary-color);
}

/* Stats Section */
.stats-section {
    background: white;
    padding: 60px 0;
    position: relative;
    margin-top: -80px;
    z-index: 2;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 5px;
}

.stat-item p {
    color: #777;
    font-size: 1rem;
    font-weight: 500;
}

/* Service Cards */
.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-bottom-color: var(--primary-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: rgba(227, 6, 19, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--primary-color);
    color: white;
}

/* Feature Section */
.feature-section {
    position: relative;
    overflow: hidden;
}

.feature-list-item {
    display: flex;
    margin-bottom: 25px;
}

.feature-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.2rem;
}

.feature-content h5 {
    margin-bottom: 10px;
}

/* Section Spacing */
.section-padding {
    padding: 100px 0;
}

.bg-light-custom {
    background-color: var(--light-bg);
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 15px auto 0;
}

/* Footer */
.footer-area {
    font-size: 0.95rem;
    background: #1a1a1a;
}

.footer-area h5 {
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.social-icons a {
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: background 0.3s;
}

.social-icons a:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(360deg);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 991px) {
    .hero-section {
        min-height: 560px;
        height: auto;
        padding: 120px 0 80px;
    }

    .stats-section {
        margin-top: -40px;
        padding: 35px 0;
    }

    .section-padding {
        padding: 72px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* UX and performance refinements */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(227, 6, 19, 0.7);
    outline-offset: 2px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.4vw, 1.4rem);
}

section,
.footer-area {
    content-visibility: auto;
    contain-intrinsic-size: 1px 900px;
}

img {
    max-width: 100%;
    height: auto;
}
