/* --- Variables --- */
:root {
    --primary-color: #007bff;
    /* Clean blue */
    --text-color: #212529;
    /* Dark gray */
    --body-bg: #F8F9FA;
    /* Very light gray */
    --header-bg: #FFFFFF;
    /* White */
    --footer-bg: #343A40;
    /* Dark gray */
    --footer-text: #F8F9FA;
    /* Light text for footer */
    --border-color: #DEE2E6;
    /* Light border */
}

/* --- Base Layout & Structure --- */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--body-bg);
}

header {
    background-color: var(--header-bg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    height: 80px;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

main {
    background-color: var(--body-bg);
    color: var(--text-color);
    width: 100%;
    box-sizing: border-box;
    padding: 100px 2rem 2rem 2rem;
    /* 80px header + 20px space */
    flex: 1 0 auto;
}

.homeSection,
#aboutSection,
.contactCard {
    background-color: var(--header-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

#aboutContainer {
    display: flex;
    flex-direction: row;
}

#aboutContainer img {
    width: 30vw;
    height: 30vw;
    float: left; 
    
    /* Crucial: gives the text some breathing room so it doesn't press against the image */
    margin-right: 20px; 
    margin-bottom: 15px; 
    
    /* Optional: Optional styling to fit nicely with your site's structure */
    /* max-width: 300px;  */
    height: auto;
}

#aboutContainer::after {
    content: "";
    display: table;
    clear: both;
}

#aboutSection h2 {
    color: var(--primary-color);
    text-align: center;
}

/* #contactImg {
    width: 80vw;
    height: 40vw;
}

#contactMain {
    display: flex;
    justify-content: space-around;
}

#contactContainer {
    width: 100%;
}

.contactCard {
    width: 50%;
    display: flex;
    flex-direction: column;
}

.contactCard a {
    text-decoration: none;
    color: black;
    padding: .25vw;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    gap: 0;
    width: 100%;
}

.contactCard p {
    margin: 0 0 1.75vw 0;
    font-size: 1.15vw;
    font-style: italic;
}

.contactCard h2 {
    margin: 0;
}

.contactIcons {
    display: flex;
    flex-direction: column;
    gap: .75vw;
}

.contactCard:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contactCard a:hover {
    background-color: var(--body-bg);
    color: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
} */

.homeSection h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.75rem;
}

footer {
    width: 100%;
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-sizing: border-box;
}

/* --- Navigation & Links --- */
.headerNav ul,
footer ul {
    padding: 0;
    margin: 0;
    list-style-type: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.headerNav,
.footerNav {
    display: flex;
    align-self: center;
    justify-content: center;
}

header div {
    margin: 0;
}

header img {
    width: 10rem;
    height: 5rem;
    align-self: bottom;
}

header div a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: bold;
}

header div a:hover {
    cursor: pointer;
    color: var(--primary-color);
}

.headerNav a {
    color: var(--text-color);
    padding: 0.5rem 1rem;
    display: inline-block;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, background-color 0.2s;
}

.headerNav ul a:hover {
    text-decoration: none;
    background-color: var(--body-bg);
    color: var(--primary-color);
    cursor: pointer;
}

footer a {
    color: var(--footer-text);
    padding: 0.5rem 1rem;
    display: inline-block;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer li {
    list-style-type: none;
}

/* --- Service List Section --- */
#homeServices ul {
    list-style-type: none;
    padding-left: 0;
}

#homeServices li {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border: 1px solid var(--border-color);
    width: 60%;
    position: relative;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

/* #homeServices li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    width: 100%;
    height: 100%;
} */
#homeServices li::after {
    content: none;
}

#homeServices li:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

#homeServices li:hover a {
    color: var(--primary-color);
}

#homeImg {
    width: 25vw;
    height: 25vw;
    margin: 0 4vw 0 0;
}

#servicesContainer {
    display: flex;
}

#servicesContainer ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#servicesContainer ul li {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 75%;
    height: 7vh;
    font-size: 1.25rem;
}

#servicesContainer ul li span {
    margin-left: auto;
}

#missionContainer {
    display: flex;
    justify-content: space-around;
}

#missionContainer {
    font-size: 1.2rem;
    text-align: center;
}

#missionSection h3 {
    font-size: 1.75rem;
}

#servicesContainer ul {
    width: 100%;
}

#missionSection img {
    width: 30vw;
    height: 20vw;
}

#missionSection h3 {
    text-align: center;
}

/* NAV BAR DROPDOWN */

.headerNav ul {
    overflow: visible;
}

.dropdownMenu {
    display: none !important;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

@media(hover: hover) {
    .dropdown:hover .dropdownMenu {
        display: block !important;
    }

}


.dropdownMenu li {
    display: block;
    width: 100%;
}

.dropdownMenu li a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

/* WHY OP MOUNTS GRID */
/* Core Grid Layout */
.comparison-grid {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 1.5fr;
    /* Widened the first column for descriptions */
    gap: 1px;
    background-color: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    max-width: 650px;
    /* Slightly widened total max-width */
    margin: 20px auto;
    font-family: sans-serif;
}

/* Base Cell Styling */
.comparison-grid>div {
    background-color: #ffffff;
    padding: 15px;
    display: flex;
    align-items: center;
}

/* Header Specifics */
.grid-header {
    font-weight: bold;
    font-size: 1.1rem;
    justify-content: center;
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #ccc;
}

.brand-op {
    color: #2e7d32;
}

.brand-others {
    color: #c62828;
}

/* Label Column (Left) with Stacked Text */
.grid-label {
    align-items: center;
    /* Vertically centers the text group in the row */
}

.grid-label-group {
    display: flex;
    flex-direction: column;
    /* Stacks title above description */
    gap: 4px;
    /* Space between title and description */
}

.grid-label-group strong {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.grid-label-group small {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.2;
}

/* Status Columns (Center & Right) */
.grid-status {
    justify-content: center;
    font-size: 1.4rem;
    /* Made emojis slightly bigger to match new row height */
}

/* Column tint shading */
.comparison-grid>div:nth-child(3n+2) {
    background-color: #f9fbf9;
}

.comparison-grid>div:nth-child(3n) {
    background-color: #fdf9f9;
}

#servicesContainer ul li span {
    font-size: 1rem
}

@media (max-width: 650px) {

    /* 1. Force the body to behave */
    html,
    body {
        overflow-x: hidden;
        /* Prevents the "wobble" */
        width: 100%;
    }

    header {
        position: static;
        /* Fixed headers are often the cause of mobile zoom issues */
        width: 100%;
        height: auto;
        flex-direction: column;
        padding: 1rem 0;
    }

    header div {
        margin-bottom: .5rem;
    }

    header div a {
        font-size: 1.2rem;
    }

    main {
        width: 100%;
        padding: 2rem 1rem 0 1rem;
        /* Reduced side padding for more room */
        box-sizing: border-box;
    }

    /* 2. Stack the containers */
    #servicesContainer,
    #missionContainer,
    #aboutContainer,
    #contactMain {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    #missionContainer p{
        align-self: center;
    }

    .homeSection h3 {
        font-size: 1rem;
        text-align: center;
    }

    .homeSection p {
        font-size: .75rem;
    }

    /* 3. Fix the image sizes */
    #homeImg,
    #missionSection img,
    #aboutSection img {
        width: 90%;
        height: auto;
        margin: 1rem 0;
        /* Remove the negative margins from desktop */
    }

    /* 4. Fix the Home Services List */
    #homeServices ul {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: .75rem;
    }

    #homeServices li {
        width: 85%;
        /* Much better than a fixed rem width */
        max-width: none;
        box-sizing: border-box;
        background-color: rgb(245, 243, 243);
        height: 2rem;
        padding: .42rem;
        text-align: center;
    }

    #homeServices img {
        display: none;
    }

    #missionSection img {
        width: 8rem;
        margin: 0;
    }

    #missionSection h3 {
        font-size: 1rem;
    }

    #missionSection p {
        text-align: left;
    }

    /* 5. Navigation Cleanup */
    .headerNav ul {
        /* flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: \0.5rem;
        padding: 1rem 0; */

        font-size: 0.65rem;
        gap: .25rem;
        margin-right: .45rem;
    }

    .headerNav ul a {
        padding: .35rem .5rem;
        background-color: rgb(245, 243, 243);
    }

    header a img {
        margin-bottom: .5rem;
    }

    /* Hide the dropdown on mobile if it's breaking the layout, 
       or make it relative so it doesn't float off-screen */
    .dropdownMenu {
        position: relative;
        box-shadow: none;
        min-width: auto;
        width: 100%;
    }

    footer {
        flex-direction: row;
        gap: .1rem;
        text-align: center;
        width: 100%;
        font-size: .55rem;
        padding: 1rem;
    }

    footer ul {
        gap: 0;
    }

    footer a {
        padding: 0;
    }

    .footerNav ul {
        gap: 1rem;
    }

    #aboutSection p {
        font-size: .75rem;
    }

    #aboutSection h2 {
        font-size: 1rem;
        margin-bottom: 0;
    }

    #aboutSection img {
        width: 6rem;
        margin: 0;
    }

    .slide a.scheduleLink {
        font-size: .5rem;
    }

    .comparison-grid {
        grid-template-columns: 1fr .75fr .75fr;
        font-size: 0.9rem;
    }

    .comparison-grid>div {
        padding: 12px 8px;
    }

    .grid-label strong {
        font-size: 0.75rem;
    }

    .grid-label-group small {
        font-size: 0.55rem;
        /* Keeps description text readable but small on mobile */
    }

    .grid-status.check,
    .grid-status.cross {
        font-size: 1rem;
    }

    #servicesContainer ul li {
        justify-content: center;
        font-size: .65rem;
    }

    #servicesContainer ul li span {
        display: none;
    }

    .grid-header.brand-op,
    .grid-header.brand-others {
        font-size: .75rem;
    }
}