/* Ensure full height and column layout */
html,
body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #000;
}

/* Make all text white */
body,
body * {
    color: #fff !important;
}

a {
    color: #fff !important;
}

/* Logo at the top */
.site-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 32px;
    padding-bottom: 16px;
    background: transparent;
    z-index: 2;
    position: relative;
    margin-top: 70px;
    /* adjust to match nav height */
}

.site-logo {
    max-width: 320px;
    width: 100%;
    height: auto;
    display: block;
}

/* Main content scrolls */
main.container {
    flex: 1 0 auto;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem 2rem;
    z-index: 1;
    position: relative;
    background: transparent;
    margin-top: 0;
}

/* This must come after the above rule */
body.home main.container {
    margin-top: 450px;
}


/* Add top padding to main content so it's not hidden behind the fixed nav */
main.container,
.container {
    padding-top: 100px;
    /* Adjust to match nav height */
}

/* Add space below the "Our Services" heading */
main.container>h2 {
    margin-bottom: 2rem;
}

/* --------------------------------------------------- NAVIGATION BAR ------------------------------------- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(148, 68, 227, 1);
    padding: 1rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    color: #fff;
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.8);
}

/* Ensure nav links are visible and styled */
nav a {
    position: relative;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    padding: 0 1rem;
    transition: color 0.2s;
    display: inline-block;
    /* Ensure width fits text only */
}

nav a::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    width: 100%;
    max-width: 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Use width: 100% and inline-block parent for text width underline */
    pointer-events: none;
}

nav a:hover::after,
nav a.active::after {
    transform: scaleX(1);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Page Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 7rem 1rem 2rem;
    /* top padding to clear fixed nav */
}

/* Home Page Background Watermark */
body.home {
    background-color: #000;
    background-image: url('images/Home/Logo1.png');
    background-repeat: no-repeat;
    background-position: center 140px;
    background-size: 600px;
    background-attachment: fixed;
    /* Remove shimmer from body */
}

@media (max-width: 768px) {
    body.home {
        background-image: url('images/Home/Logo1.png');
        background-position: center 100px;
        background-size: 400px;
        /* Adjust size for smaller screens */
        background-attachment: scroll;
    }
}

/* Centered title over the home logo image */
body.home::before {
    content: "LB Enhanced Detailing";
    position: fixed;
    top: 19.5rem;
    left: 0;
    width: 100vw;
    display: block;
    font-size: 4rem;
    font-weight: bold;
    text-align: center;
    color: transparent;
    pointer-events: none;
    z-index: 0;
    /* background-image: url('https://images.unsplash.com/photo-1464983953574-0892a716854b?auto=format&fit=crop&w=1200&q=80'); */
    background-image: linear-gradient(90deg, #ffffff 40%, #000000 45%, #8e05d7 55%, #ffffff 65%);
    background-size: 250%;
    background-position: 0 50%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: animate-background 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    /* Reflection effect */
    /*-webkit-box-reflect: below 0.05em linear-gradient(transparent, rgba(0, 0, 0, 0.2));*/
}

/* Title for logo mobile override */
@media (max-width: 700px) {
    body.home::before {
        position: relative;
        display: block;
        font-size: 2rem;
        top: 0;
        left: 0;
        width: 100vw;
        margin-top: 13.75rem;
        /* adjust as needed */
        margin-bottom: 1rem;
        /* optional, for spacing */
        text-align: center;
        z-index: 1;
    }
}

@keyframes animate-background {
    0% {
        background-position: 0 50%;
    }

    83.33% {
        /* 10s of 12s = 83.33% */
        background-position: 100% 50%;
    }

    100% {
        background-position: 100% 50%;
        /* Hold for last 2s */
    }
}

/* Push down content on Home page so logo is visible */
body.home .container {
    padding-top: 120px;
    /* adjust as needed for logo space */
}

/* Mobile override */
@media (max-width: 700px) {
    body.home .container {
        padding-top: 350px !important;
        margin-top: 0 !important;
    }
}

/* ----------------------------------------------- Services Grid -----------------------------------*/
/* Services container */
.services {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    padding: 0;
}

/* Service box */
.service {
    position: relative;
    width: 65vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    background: rgba(148, 68, 227, 0.98);
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px rgba(68, 69, 68, 0.15);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    box-sizing: border-box;
    transition: background 0.2s;
    border: 10px solid #30313cdb;
    /* Add a border */
    outline: 2px solid #e4dfe8;
    /* Add a white outer border */
    outline-offset: 3px;
}

/* Single service image */
.service>img {
    max-width: 300px;
    width: 100%;
    border: #fff 4px solid;
    border-radius: 1rem;
    margin-bottom: 1rem;
    display: block;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
    flex-shrink: 0;
}

/* Before/After images container */
.service-images {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
    width: 100%;
}

.before-after {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.before-after img {
    max-width: 300px;
    width: 100%;
    border: #fff 4px solid;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
    margin-bottom: 0.5rem;
}

.before-after-label {
    font-weight: bold;
    font-size: 0.95em;
    color: #d6bcfa;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

/* Service content */
.service-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 0;
    width: 100%;
    align-items: center;
    text-align: center;
}

.service-content h1,
.service-content h2,
.service-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.service-content p {
    margin: 0 0 0.5rem 0;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: #f3f3f3;
    text-align: center;
}

.service-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #d6bcfa;
    margin-top: 0.5rem;
}

/* Responsive: stack images vertically and shrink on small screens */
@media (max-width: 700px) {
    .service {
        width: 98vw;
        padding: 1.5rem 0.5rem;
        gap: 1rem;
    }

    .service>img,
    .before-after img {
        max-width: 100px;
    }

    .service-images {
        flex-direction: column;
        gap: 0.5rem;
    }

    .service-content {
        align-items: center;
        text-align: center;
    }
}

/* -------------------------------------------------- Gallery Page ------------------------------------------*/
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.grid img {
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
    border: 6px solid #4b0082;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.grid img:hover {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}



.close-btn {
    position: absolute;
    top: 60px;
    /* Increased from 24px to lower the button */
    right: 32px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    z-index: 2010;
}

.nav-btn {
    position: absolute;
    background: rgba(75, 0, 130, 0.7);
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2010;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    /* Set fixed width */
    height: 90px;
    /* Set fixed height */
    font-size: 1.8rem;
    /* Optionally reduce icon size */
    padding: 0;
    /* Remove extra padding */
}

#prevBtn {
    left: 32px;
}

#nextBtn {
    right: 32px;
}

.nav-btn:hover {
    background: #4b0082;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    /* or flex, when active */
    justify-content: center;
    align-items: center;
}

/* Limit the size of the content inside the overlay */
#overlay .overlay-content {
    max-width: 90vw;
    max-height: 80vh;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Make images and videos responsive inside the overlay */
#overlay img,
#overlay video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

/* -------------------------------------------------------------About Page --------------------------------------*/
.owners {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.owner {
    max-width: 200px;
    text-align: center;
}



.owner img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #8b5cf6;
    margin-bottom: 0.5rem;
}

/* Footer always at the bottom, full width */
footer.contact-footer,
footer.copyright-footer {
    width: 100%;
    background: rgba(148, 68, 227, 0.98);
    /* Main theme purple */
    color: #fff;
    padding: 1.5rem 0 1rem 0;
    text-align: center;
    z-index: 2;
    position: relative;
}

footer.copyright-footer {
    background: #2d014d;
    /* Slightly darker purple for copyright */
    font-size: 0.95rem;
    padding: 0.5rem 0;
    border-top: 1px solid #8b5cf6;
}

/* Contact Footer */
.contact-footer {
    background: #2d014d;
    color: #d6bcfa;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.contact-footer a {
    color: #8b5cf6;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s, text-decoration-color 0.3s;
    text-decoration-color: #8b5cf6;
}

.contact-footer a:hover {
    color: #7c19cc;
    text-decoration-color: #ffffff;
}

.contact-footer .social-links {
    margin-top: 1rem;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    /* Add this for spacing */
}

/* Social links hover effect for main theme */
.social-links a:hover svg,
.social-links a:focus svg {
    color: #9724e3;
    /* Light purple accent */
    fill: #000000;
    transition: color 0.2s, fill 0.2s;
}

[hidden] {
    display: none !important;
}

/* Mobile override */
@media (max-width: 700px) {
    .nav-btn {
        top: auto;
        bottom: 32px;
        transform: none;
        position: fixed;
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        padding: 0;
    }

    #prevBtn {
        left: 18vw;
        right: auto;
    }

    #nextBtn {
        right: 18vw;
        left: auto;
    }
}

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

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #000;
    /* Remove justify-content/align-items */
}

/* ------------------------------------------------------Bubble Styles -----------------------------------------*/

/* Add global transparency to all bubbles */
.bubble {
    opacity: 1;
    /* Adjust between 0 (fully transparent) and 1 (fully opaque) */
}

.bubble {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: absolute;
    box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.25),
        0 0 10px rgba(255, 255, 255, 0.5);
    z-index: 0;
}

/* Bubble 1: gentle up/down and left/right */
.bubble:nth-of-type(1) {
    animation: move1 12s ease-in-out infinite;
    left: 10vw;
    top: 60vh;
}

/* Bubble 2: different path and speed */
.bubble:nth-of-type(2) {
    animation: move2 16s ease-in-out infinite;
    width: 120px;
    height: 120px;
    left: 40vw;
    top: 65vh;
}

/* Bubble 3: another unique path and speed */
.bubble:nth-of-type(3) {
    animation: move3 20s ease-in-out infinite;
    width: 80px;
    height: 80px;
    left: 70vw;
    top: 70vh;
}

/* Bubble 4: new bubble with unique path and speed */
.bubble:nth-of-type(4) {
    animation: move2 18s ease-in-out infinite;
    width: 100px;
    height: 100px;
    left: 20vw;
    top: 80vh;
}

/* Bubble 5: new bubble with unique path and speed */
.bubble:nth-of-type(5) {
    animation: move3 22s ease-in-out infinite;
    width: 150px;
    height: 150px;
    left: 60vw;
    top: 60vh;
}

/* Bubble 6: (90x90) - move to bottom right-ish */
.bubble:nth-of-type(6) {
    animation: move2 19s ease-in-out infinite;
    width: 90px;
    height: 90px;
    left: 68vw;
    top: 85vh;
}

/* Bubble 7: (110x110) - move to bottom right-ish */
.bubble:nth-of-type(7) {
    animation: move3 21s ease-in-out infinite;
    width: 110px;
    height: 110px;
    left: 82vw;
    top: 88vh;
}

/* Keyframes for each bubble */
@keyframes move1 {
    0% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(30px, -10px);
    }

    40% {
        transform: translate(50px, 20px);
    }

    60% {
        transform: translate(20px, 40px);
    }

    80% {
        transform: translate(-10px, 10px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes move2 {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-20px, 30px);
    }

    50% {
        transform: translate(-40px, 60px);
    }

    75% {
        transform: translate(-10px, 30px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes move3 {
    0% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(40px, 10px);
    }

    40% {
        transform: translate(60px, 30px);
    }

    60% {
        transform: translate(30px, 60px);
    }

    80% {
        transform: translate(10px, 30px);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* Default (large bubble) */
.bubble::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 45px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    z-index: 10;
    filter: blur(2px);
}

.bubble::after {
    content: '';
    position: absolute;
    top: 80px;
    left: 80px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    z-index: 10;
    filter: blur(2px);
}

/* Medium bubble (120x120) */
.bubble:nth-of-type(2)::before {
    top: 28px;
    left: 27px;
    width: 18px;
    height: 18px;
}

.bubble:nth-of-type(2)::after {
    top: 48px;
    left: 48px;
    width: 12px;
    height: 12px;
}

/* Small bubble (80x80) */
.bubble:nth-of-type(3)::before {
    top: 15px;
    left: 13px;
    width: 10px;
    height: 10px;
}

.bubble:nth-of-type(3)::after {
    top: 32px;
    left: 32px;
    width: 7px;
    height: 7px;
}

/* Bubble 4: (100x100) */
.bubble:nth-of-type(4)::before {
    top: 22px;
    left: 22px;
    width: 14px;
    height: 14px;
}

.bubble:nth-of-type(4)::after {
    top: 38px;
    left: 38px;
    width: 9px;
    height: 9px;
}

/* Bubble 5: (150x150) */
.bubble:nth-of-type(5)::before {
    top: 36px;
    left: 34px;
    width: 22px;
    height: 22px;
}

.bubble:nth-of-type(5)::after {
    top: 60px;
    left: 60px;
    width: 14px;
    height: 14px;
}

/* Bubble 6: (90x90) - move to bottom right-ish */
.bubble:nth-of-type(6)::before {
    top: 18px;
    left: 16px;
    width: 11px;
    height: 11px;
}

.bubble:nth-of-type(6)::after {
    top: 34px;
    left: 34px;
    width: 6px;
    height: 6px;
}

/* Bubble 7: (110x110) - move to bottom right-ish */
.bubble:nth-of-type(7)::before {
    top: 24px;
    left: 22px;
    width: 13px;
    height: 13px;
}

.bubble:nth-of-type(7)::after {
    top: 44px;
    left: 44px;
    width: 8px;
    height: 8px;
}

.bubble span {
    position: absolute;
    border-radius: 50%;
}

.bubble span:nth-child(1) {
    inset: 10px;
    border-left: 15px solid #fdfefe;
    /* light blue */
    filter: blur(10px);
    opacity: 0.7;
}

.bubble span:nth-child(2) {
    inset: 10px;
    border-right: 15px solid #f7aef7;
    /* light pink/purple */
    filter: blur(10px);
    opacity: 0.7;
}

.bubble span:nth-child(3) {
    inset: 15px;
    border-top: 15px solid #ffffff;
    /* pearly white/yellow */
    filter: blur(6px);
    opacity: 0.12;
}

.bubble span:nth-child(4) {
    inset: 30px;
    border-left: 15px solid #7d5ac3;
    /* light blue */
    filter: blur(14px);
    opacity: 0.6;
}

.bubble span:nth-child(5) {
    inset: 10px;
    border-bottom: 10px solid #fff;
    filter: blur(8px);
    transform: rotate(330deg);
}

.container,
main,
footer {
    position: relative;
    z-index: 1;
}

.bubble-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* Hide all bubbles by default on small screens */
@media (max-width: 600px) {

    /* Show only bubbles 2, 3, and 4 on mobile */
    .bubble:not(:nth-of-type(2)):not(:nth-of-type(3)):not(:nth-of-type(4)) {
        display: none !important;
    }

    .bubble:nth-of-type(2),
    .bubble:nth-of-type(3),
    .bubble:nth-of-type(4) {
        display: block !important;
    }
}