/* --- Core Styling & Variables --- */
:root {
    --accent: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --card-bg: rgba(20, 20, 20, 0.8);
    --radius: 12px; /* The "Pretty Corners" */

    color-scheme: dark; /* Informs browsers to use dark mode defaults for form controls, scrollbars, etc. */
    --basecolor1: #051923;
    --basecolor2: #003554;
    --basecolor3: #006494;
    --basecolor4: #0582ca;
    --basecolor5: #00a6fb;
    /*
    --basecolor1: #181F1C;
    --basecolor2: #274029;
    --basecolor3: #315C2B;
    --basecolor4: #60712F;
    --basecolor5: #9EA93F;
    */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: white;
    background-color: var(--basecolor1);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    height: 100%;
    /* This stops the "rubber-band" effect when hitting page limits */
    overscroll-behavior: none; 
}

/* --- Background Video & Overlay --- */
#background-video {
    position: fixed;

    top: -1%;
    left: -1%;
    width: 102%;
    height: 102%;
    
    z-index: -2;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    

    will-change: transform;
    transform: translateZ(0); 
}

#background-div {
    position: fixed;
    top: -1%;
    left: -1%;
    width: 102%;
    height: 102%;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(19, 19, 19, 0.712));
    z-index: -1;
    pointer-events: none;
}

/* --- Navigation (Sticky & Responsive) --- */
.main-header {
    position: fixed;
    top: 10px;
    left: 5%;
    width: 90%; /* Use 100% instead of 100vw to prevent horizontal scrolling */
    z-index: 1000;
    border-radius: var(--radius);
    box-shadow: 0 0px 15px var(--basecolor5);

    
    /* Modern Glassmorphism effect */
    background: rgba(43, 43, 43, 0.75); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Flexbox container for links */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: center; /* Centers items on desktop */
    align-items: center;
    gap: 25px;
    flex-wrap: wrap; /* Allows links to neatly wrap to a second line on small phones */
}

/* Base link styling */
.nav-link {
    color: rgba(255, 255, 255, 0.904);
    text-decoration: none;
    font-family: sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Sleek hover state */
.nav-link:hover {
    color: var(--basecolor5);
}

/* Optional: Make the final "Contact" link look like a modern button */
.btn-contact {
    background: var(--basecolor5);
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
}

.btn-contact:hover {
    background: rgba(255, 255, 255, 0.85);
    color: #000;
    transform: translateY(-1px); /* Subtle lift effect */
}

/* Mobile specific refinement */
@media (max-width: 600px) {
    .nav-container {
        gap: 15px;
        padding: 12px 10px;
    }
    .nav-link {
        font-size: 0.85rem; /* Shrinks text slightly on tiny screens */
    }
}

/* --- Hero Section --- */
#welcome {
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

h1 {
    font-size: clamp(2.5rem, 10vw, 5rem);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.spacer{
    height: 10vh;
}

/* --- Typewriter Animation --- */
.typewriter {
    overflow: hidden;
    border-right: .15em solid white;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: .15em;
    animation: 
        typing 3.5s steps(80, end),
        blink-caret .75s step-end infinite;
}

@keyframes typing { from { max-width: 0% } to { max-width: 100% } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: white; } }

/* --- Content Sections --- */
.section {
    padding: 80px 10%;
    width: 100%;
}

.blackout {
    background-color: var(--basecolor1);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sub-heading {
    font-size: 2rem;
    margin-bottom: 30px;
    border-left: 4px solid #fff;
    padding-left: 15px;
}

.quote {
    font-style: italic;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    max-width: 800px;
    text-align: center;
}
.quote-author {
    margin-top: 15px;
    font-size: 1rem;
    color: var(--basecolor5);
}

/* --- Services (Pretty Corners & Hover) --- */
.medium-buttons-div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
}

.medium-button-a {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 30px;
    text-decoration: none;
    color: white;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0px 12px rgba(0, 0, 0, 0);
}

.medium-button-a:hover {
    transform: translateY(-10px);
    background: rgba(40, 40, 40, 0.9);
    border-color: var(--basecolor5);
    box-shadow: 0 0px 12px var(--basecolor5);
}

.medium-button-img {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1); /* Keeps icons white/clean */
}

/* --- Footer (Flexbox Fix) --- */
footer {
    background: var(--basecolor1);
    color: #fff; /* Ensures text is visible on black background */
    padding: 40px 5%;
    display: flex;
    flex-wrap: wrap-reverse; /* Reverses order on mobile so map goes below text, or use 'wrap' */
    gap: 40px;
    border-top: 1px solid #333;
    justify-content: space-between;
    align-items: center;
}

.footer-info, .footer-map {
    flex: 1 1 300px; /* Grows, shrinks, and breaks to a new line if screen is under 300px */
    width: 100%;
}

/* Map Responsive Handling */
.footer-map iframe {
    width: 100%;
    height: 350px;
    border: 0;
    border-radius: 8px; /* Optional: just looks nice */
}

/* Clean text alignment without floats */
.info-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.info-row b {
    min-width: 70px; /* Keeps labels aligned nicely */
}

.info-row p {
    margin: 0;
}
/* Gallery Styles */
#gallery-div {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

/* The Grid System */
.gallery-grid {
    display: grid;
    /* Adjust '300px' to make images larger or smaller */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Individual Item Styling */
.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the area without stretching */
    display: block;
    aspect-ratio: 4 / 3; /* Keeps gallery uniform even if original images vary */
}

/* Product Cards (matches gallery/aesthetic, mobile friendly) */
.products-grid {
    display: grid;
    /* keep cards a reasonable max size so they don't stretch to fill wide containers
       when there are only a few items. center the grid within its container. */
    grid-template-columns: repeat(auto-fit, minmax(220px, 300px));
    gap: 20px;
    align-items: start;
    justify-content: center; /* keep items centered when there's extra space */
    padding: 20px 60px;
    margin: 0 auto;
    max-width: none; /* optional cap so grid doesn't become too wide on large screens */
}

.product-card {
    background: var(--card-bg, #fff);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.product-image {
    width: 100%;
    max-height: 500px;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, rgba(0,0,0,0.05), rgba(0,0,0,0.02));
    background-size: cover;
    background-position: center;
}

/* ensure the img inside fills its container so layout doesn't collapse */
.product-image .product-img-tag {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-name {
    margin: 14px 16px 6px;
    font-size: 1.05rem;
    color: var(--text-color, #e7e7e7);
}

.product-description {
    margin: 0 16px 12px;
    font-size: 0.95rem;
    color: var(--muted-color, #a3a3a3);
    flex-grow: 1;
}

.product-price {
    margin: 0 16px 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--basecolor5, #9EA93F);
}

.contact-btn {
    margin: 0 16px 16px;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: var(--basecolor5, #9EA93F);
    color: #292929;
    cursor: pointer;
    font-weight: 600;
    align-self: stretch;
    transition: background 0.18s ease, transform 0.12s ease;
}
.contact-btn:hover { background: color-mix(in srgb, var(--accent, #d47100) 85%, black 15%); transform: translateY(-2px); }

.placeholder {
    background: rgba(20,20,20,0.514);
    animation: placeholder-pulse 1.5s infinite;
}
@keyframes placeholder-pulse {
    0% { background: rgba(20,20,20,0.514); }
    50% { background: rgba(90, 90, 90, 0.514); }
    100% { background: rgba(20,20,20,0.514); }
}

.placeholder-btn {
    background: rgb(75, 75, 75);
    color: rgb(75, 75, 75);
    cursor: not-allowed;
}





footer iframe {
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
    filter: grayscale(0.1);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .section { padding: 50px 5%; }
    
    footer {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .footer-info div {
        float: none !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .typewriter {
        white-space: normal; /* Wrap text on small phones */
        border-right: none;
        animation: none;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
        gap: 15px;
    }
}