/* ============================================= */
/* I. GLOBAL WEBSITE DESIGN SYSTEM */
/* ============================================= */

/* 1. Color Palette & Typography as CSS Variables */
:root {
    --primary-navy: #0A2240;
    --patriot-red: #B31942;
    --action-white: #FFFFFF;
    --clean-off-white: #F8F9FA;
    --trustworthy-gray: #6c757d;

    --font-headline: 'Oswald', sans-serif;
    --font-body: 'Roboto', sans-serif;

    --container-width: 1140px;
    --container-padding: 1rem;
}

/* Basic Reset & Body Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Offset for sticky header */
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--primary-navy);
    background-color: var(--action-white);
}

/* Universal Image Rule for Responsiveness */
img {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-headline);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    text-transform: uppercase;
    color: var(--action-white);
}

h2 {
    font-size: 2.8rem;
    text-transform: uppercase;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--patriot-red);
    text-decoration: none;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Section Base Styles */
section {
    padding: 80px 0;
    overflow: hidden;
    /* Prevents accidental horizontal scroll */
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px auto;
    color: var(--trustworthy-gray);
}

/* 3. Buttons & CTAs */
.btn {
    display: inline-block;
    padding: 16px 32px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--patriot-red);
    color: var(--action-white);
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-navy);
    border-color: var(--primary-navy);
}

.btn-secondary:hover {
    background-color: var(--primary-navy);
    color: var(--action-white);
}

/* ============================================= */
/* II. DETAILED SECTION STYLES */
/* ============================================= */

/* 1. Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(10, 34, 64, 0.85);
    /* Primary Navy with 85% opacity */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    transition: padding 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.main-nav a {
    color: var(--action-white);
    font-weight: 400;
    margin: 0 15px;
    padding-bottom: 5px;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--patriot-red);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

.header-cta i {
    margin-right: 8px;
}

/* 2. Hero Section */
.hero-section {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 34, 64, 0.6);
    /* Dark overlay */
}

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

.hero-content h2 {
    color: var(--action-white);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.5rem;
    max-width: 800px;
    margin: 1rem auto 2rem auto;
    text-transform: none;
}

.hero-sub-cta {
    margin-top: 1rem;
    color: var(--action-white);
}

.hero-sub-cta a {
    color: var(--action-white);
    text-decoration: underline;
}

/* 3. Trust Bar */
.trust-bar-section {
    background-color: var(--clean-off-white);
    padding: 25px 0;
}

.trust-bar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-headline);
    font-weight: 600;
    color: var(--primary-navy);
}

.trust-item i {
    color: var(--patriot-red);
    font-size: 1.5rem;
}

/* 4. Problem & 6. Pledge Section (Two-Column Layout) */
.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.two-col-layout .image-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 5. Services Section */
.services-section {
    background-color: var(--clean-off-white);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--action-white);
    padding: 30px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.service-card i {
    font-size: 3rem;
    color: var(--patriot-red);
    margin-bottom: 1rem;
}

.service-card h4 {
    color: var(--primary-navy);
}

.service-card p {
    color: var(--trustworthy-gray);
    font-size: 16px;
    margin-bottom: 0;
}

/* 6. Pledge Section */
.pledge-section {
    background-color: var(--primary-navy);
    color: var(--action-white);
}

.pledge-section h2,
.pledge-section h3 {
    color: var(--action-white);
}

.pledge-list {
    list-style: none;
    padding: 0;
}

.pledge-list li {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.pledge-list i {
    font-size: 2rem;
    color: var(--patriot-red);
    margin-top: 5px;
}

/* 7. Testimonials Section */
.testimonials-section {
    background-color: var(--clean-off-white);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background-color: var(--action-white);
    padding: 30px;
    border-left: 5px solid var(--patriot-red);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.testimonial-card .stars {
    color: #f1c40f;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-card .quote {
    font-style: italic;
    color: var(--trustworthy-gray);
    margin-bottom: 1rem;
}

.testimonial-card .author {
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 0;
}

/* 8. Process Section */
.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.process-step .step-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px auto;
    background-color: var(--clean-off-white);
    border: 2px solid var(--patriot-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-step i {
    font-size: 3rem;
    color: var(--primary-navy);
}

.process-step p {
    color: var(--trustworthy-gray);
}

/* 9. Guarantee Section */
.guarantee-section {
    position: relative;
    text-align: center;
    color: var(--action-white);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.guarantee-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 34, 64, 0.8);
    /* Darker overlay */
}

.guarantee-content {
    position: relative;
    z-index: 2;
}

.guarantee-badge {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 20px;
    background-color: var(--action-white);
    padding: 10px;
}

.guarantee-content h2 {
    color: var(--action-white);
}

.guarantee-content p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* 10. Contact Section */
.contact-section {
    background-color: var(--clean-off-white);
}

.contact-form-wrapper form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form-wrapper input,
.contact-form-wrapper textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 16px;
}

.contact-form-wrapper input:focus,
.contact-form-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 2px rgba(10, 34, 64, 0.25);
}

.contact-details-wrapper h4 {
    margin-top: 30px;
    margin-bottom: 10px;
}

.contact-details-wrapper h4:first-child {
    margin-top: 0;
}

.contact-details-wrapper p,
.contact-details-wrapper li {
    color: var(--trustworthy-gray);
    font-size: 1.1rem;
}

.contact-details-wrapper a {
    color: var(--primary-navy);
    font-weight: 400;
}

.contact-details-wrapper i {
    color: var(--patriot-red);
    margin-right: 10px;
}

.hours-list {
    list-style: none;
    padding: 0;
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    font-size: 2rem;
    color: var(--primary-navy);
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--patriot-red);
}

/* 11. Footer */
.site-footer {
    background-color: var(--primary-navy);
    color: var(--action-white);
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 40px;
}

.footer-col a {
    color: var(--action-white);
    font-weight: 400;
    display: block;
    margin-bottom: 10px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-col a:hover {
    opacity: 1;
}

.footer-col h4 {
    color: var(--action-white);
    margin-bottom: 20px;
}

.footer-col .social-icons a {
    color: var(--action-white);
}

.footer-bottom-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom-bar p {
    margin: 0;
    font-size: 14px;
    color: var(--trustworthy-gray);
}

/* ============================================= */
/* III. RESPONSIVENESS (MEDIA QUERIES) */
/* ============================================= */

/* For Tablets and smaller devices */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .two-col-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .pledge-section .two-col-layout .image-content {
        order: -1;
        /* Puts image on top */
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* For Mobile devices */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 80px;
    }

    section {
        padding: 60px 0;
    }

    .header-container {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 15px;
    }

    .main-nav {
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: 0;
    }

    .main-nav a {
        margin: 0 10px;
    }

    .header-cta {
        display: none;
    }

    .hero-section {
        height: 70vh;
    }

    h1 {
        font-size: 2.2rem;
    }

    .hero-content h2 {
        font-size: 1.2rem;
    }

    .trust-bar-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 20px;
    }

    .trust-item {
        justify-content: flex-start;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col .social-icons {
        justify-content: center;
    }
}