* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #f5f1e8;
    font-family: Arial, sans-serif;
    color: #1f2a22;
}


/* HEADER */

header {
    background-color: white;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 70px;
    border-bottom: 1px solid #ddd;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 260px;
}

.logo-image {
    height: 125px;
    width: auto;
    max-width: 350px;
    object-fit: contain;
    display: block;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 45px;
}

nav a {
    color: #111;
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 14px;
}

nav a:hover {
    color: #4caf3d;
}

.header-phone {
    color: #4caf3d;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 260px;
}


/* HERO */

.hero {
    --hero-height: 600px;
    height: var(--hero-height);
    position: relative;
    overflow: hidden;
    background-color: #111;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.slide.active-slide {
    opacity: 1;
}

/* Fit the photo height once; repeat at that size and crop only at banner edges. */
.slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--slide-photo);
    background-size: auto 100%;
    background-position: center;
    background-repeat: repeat-x;
}

.hero-dots .dot,
.gallery-dots .dot,
.about-dots .dot {
    padding: 0;
    border: 0;
    cursor: pointer;
}

.hero-dots .dot:focus-visible {
    outline: 2px solid white;
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .slide {
        transition: none;
    }
}

.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.hero-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.hero-logo {
    width: 330px;
    max-width: 80%;
    height: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.35));
}

.services-line {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.5;
    margin: 20px 0;
    text-shadow: 2px 2px 6px black;
}

.hero-button {
    background-color: #4caf3d;
    color: white;
    text-decoration: none;
    padding: 16px 34px;
    font-weight: 900;
    text-transform: uppercase;
    border-radius: 4px;
}

.hero-button:hover {
    background-color: #3c8f31;
}

.arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 70px;
    cursor: pointer;
}

.left-arrow {
    left: 45px;
}

.right-arrow {
    right: 45px;
}

.hero-dots,
.gallery-dots {
    margin-top: 25px;
}

.dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: #d0d0d0;
    border-radius: 50%;
    margin: 0 5px;
}

.active-dot {
    background-color: #4caf3d;
}


/* ABOUT */

.about {
    background-color: #f5f1e8;
    padding: 80px 90px;
}

.about-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 70px;
}

.about-text {
    flex: 1;
}

.about-text h2,
.contact h2,
.gallery h2 {
    font-size: 42px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.green-line {
    width: 55px;
    height: 4px;
    background-color: #4caf3d;
    margin-bottom: 25px;
}

.center-line {
    margin-left: auto;
    margin-right: auto;
}

.about-text p {
    font-size: 18px;
    line-height: 1.7;
}

.about-slideshow {
    position: relative;
    flex: 1.2;
    min-width: 0;
    border: 3px solid white;
    background: #f5f1e8;
}

.about-photo-frame {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.about-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease, visibility 1.2s;
}

.active-about-slide {
    opacity: 1;
    visibility: visible;
}

.about-slide > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Preserve the former hero4's 90-degree left rotation. */
.about-rotated > img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 75%;
    height: calc(100% * 4 / 3);
    transform: translate(-50%, -50%) rotate(-90deg);
}

/* Preserve the former hero7's crop, excluding its leftmost 440 pixels. */
.about-cropped-photo {
    position: absolute;
    top: 50%;
    width: 100%;
    aspect-ratio: 1608 / 1153;
    overflow: hidden;
    transform: translateY(-50%);
}

.about-cropped-photo img {
    position: absolute;
    right: 0;
    width: calc(100% * 2048 / 1608);
    max-width: none;
    height: 100%;
    display: block;
}

.about-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    text-align: center;
}

.about-dots .dot {
    width: 8px;
    height: 8px;
    margin: 0 4px;
    background-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.about-dots .active-dot {
    background-color: rgba(255, 255, 255, 0.8);
}

.about-dots .dot:focus-visible {
    outline: 2px solid #00351f;
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .about-slide {
        transition: none;
    }
}


/* GALLERY */

.gallery {
    background-color: white;
    padding: 80px 80px;
    text-align: center;
}

.gallery-viewer {
    max-width: 1100px;
    margin: 40px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.gallery-project {
    display: none;
    width: 100%;
}

.active-gallery-project {
    display: block;
}


/* BASE BEFORE / AFTER FRAME */

.before-after {
    position: relative;
    border: 4px solid white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    cursor: ew-resize;
    --slider-position: 50%;
}


/*
PROJECT 1 - PATIO

Your patio pictures are portrait shaped.

This project therefore gets its own portrait frame.
*/

.patio-project {
    width: 570px;
    height: 760px;
    max-width: 100%;
    margin: 0 auto;
}


/*
PROJECT 2 - RED ROCK

This project has its own independent frame size.

If the Red Rock pictures have a different shape,
we can change ONLY these numbers later.
*/

.redrock-project {
    width: 800px;
    height: 600px;
    max-width: 100%;
    margin: 0 auto;
}


/* PROJECT 3 - MINI GOLF: preserve this pair's portrait proportions. */
.minigolf-project {
    box-sizing: content-box;
    width: 430px;
    max-width: calc(100% - 8px);
    aspect-ratio: 1153 / 2048;
    margin: 0 auto;
}


/* IMAGE LAYERS */

.after-image,
.before-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/*
The BEFORE image stays full size.

Instead of changing its width,
we simply reveal or hide parts of it.

This keeps the photo from moving or zooming
when the slider moves.
*/

.before-image {
    z-index: 2;

    clip-path: inset(
        0
        calc(100% - var(--slider-position))
        0
        0
    );
}

.after-image {
    z-index: 1;
}


/* PROJECT 1 PHOTOS */

.project-one-before {
    background-image: url("images/patiobefore.webp");
}

.project-one-after {
    background-image: url("images/Patioafter.webp");
}


/* PROJECT 2 PHOTOS */

.project-two-before {
    background-image: url("images/redrockbefore.webp");
}

.project-two-after {
    background-image: url("images/redrockafter.webp");
}


/* PROJECT 3 PHOTOS */
.project-three-before {
    background-image: url("images/minigolfprojectbefore.webp");
}

.project-three-after {
    background-image: url("images/minigolfprojectafter.webp");
}


/* BEFORE / AFTER LABELS */

.photo-label {
    position: absolute;
    bottom: 15px;
    padding: 10px 18px;
    background-color: #00351f;
    color: white;
    font-weight: 900;
    text-transform: uppercase;
}

.before-label {
    left: 15px;
}

.after-label {
    right: 15px;
}


/* SLIDER */

.slider-line {
    position: absolute;
    left: var(--slider-position);
    top: 0;
    width: 4px;
    height: 100%;
    background-color: white;
    transform: translateX(-50%);
    z-index: 3;
}

.slider-circle {
    position: absolute;
    left: var(--slider-position);
    top: 50%;
    width: 58px;
    height: 58px;
    transform: translate(-50%, -50%);
    background-color: white;
    color: #1f2a22;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    z-index: 4;
    user-select: none;
}


/* GALLERY ARROWS */

.gallery-arrow {
    background: none;
    border: none;
    color: #1f2a22;
    font-size: 70px;
    cursor: pointer;
}

.gallery-arrow:hover {
    color: #4caf3d;
}

.project-caption {
    margin-top: 18px;
    font-weight: 900;
    text-transform: uppercase;
    color: #1f2a22;
}


/* CONTACT */

.contact {
    background-color: #f5f1e8;
    padding: 80px 90px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact-info p {
    font-size: 17px;
    line-height: 1.5;
}

.contact h3 {
    text-transform: uppercase;
    margin-top: 0;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input,
textarea {
    padding: 14px;
    border: 1px solid #ccc;
    font-size: 16px;
}

textarea {
    height: 120px;
}

form button {
    background-color: #4caf3d;
    color: white;
    border: none;
    padding: 15px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

form button:hover {
    background-color: #3c8f31;
}

.contact-map {
    min-width: 0;
    height: 280px;
    background-color: #d9e2d2;
    border: 2px solid white;
    overflow: hidden;
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}


/* FOOTER */

footer {
    background-color: #00351f;
    color: white;
    padding: 35px 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo-image {
    height: 70px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
    /* Enlarge the logo visually without increasing the footer's layout height. */
    transform: scale(1.9);
    transform-origin: left center;
}

.footer-license {
    text-align: center;
}

.footer-social {
    /* Keep space for future social links without showing the placeholder icons. */
    visibility: hidden;
    display: flex;
    gap: 18px;
    font-size: 34px;
    font-weight: bold;
}

.copyright {
    background-color: #002716;
    color: white;
    text-align: center;
    padding: 14px;
    font-size: 13px;
}

/* Contact submission feedback. */
#contact-form button:disabled {
    opacity: 0.65;
    cursor: wait;
}

#contact-status {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

#contact-status:empty {
    display: none;
}

#contact-status[data-state="error"] {
    color: #922c20;
}

#contact-status[data-state="success"] {
    color: #00351f;
}

/* Responsive layouts retain the desktop colors and project-specific frames. */
.contact-column,
.gallery-project {
    min-width: 0;
}

.contact-info p {
    overflow-wrap: anywhere;
}

#contact-form input,
#contact-form textarea {
    min-width: 0;
    width: 100%;
}

.before-after {
    touch-action: pan-y pinch-zoom;
}

.before-after:focus-visible {
    outline: 3px solid #00351f;
    outline-offset: 4px;
}

@media (max-width: 1100px) {
    header {
        padding: 0 28px;
    }
    .header-logo,
    .header-phone {
        width: auto;
    }
    nav {
        gap: 24px;
    }
    .about,
    .gallery,
    .contact {
        padding: 56px 32px;
    }
    .about-wrapper {
        gap: 32px;
    }
    .contact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }
    .contact-map {
        grid-column: 1 / -1;
    }
    .patio-project {
        height: auto;
        aspect-ratio: 3 / 4;
    }
    .redrock-project {
        height: auto;
        aspect-ratio: 4 / 3;
    }
    footer {
        padding-right: 32px;
        padding-left: 32px;
    }
}

@media (max-width: 700px) {
    header {
        height: auto;
        flex-wrap: wrap;
        gap: 8px 12px;
        padding: 8px 16px 12px;
    }
    .logo-image {
        height: 90px;
        max-width: 100%;
    }
    .header-phone {
        font-size: 18px;
        white-space: nowrap;
    }
    nav {
        order: 3;
        width: 100%;
        gap: 24px;
        flex-wrap: wrap;
    }
    nav a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        font-size: 13px;
    }
    .hero {
        --hero-height: 540px;
    }
    .hero-overlay {
        padding: 24px 36px;
    }
    .hero-logo {
        width: 240px;
        max-width: 100%;
        margin-bottom: 8px;
    }
    .services-line {
        font-size: 16px;
        line-height: 1.6;
        margin: 14px 0 22px;
    }
    .hero-button {
        padding: 15px 18px;
        font-size: 14px;
    }
    .arrow {
        width: 44px;
        min-height: 48px;
        padding: 0;
        font-size: 48px;
    }
    .left-arrow { left: 0; }
    .right-arrow { right: 0; }
    .hero-dots .dot,
    .gallery-dots .dot,
    .about-dots .dot {
        position: relative;
        margin-right: 12px;
        margin-left: 12px;
    }
    .hero-dots .dot::after,
    .gallery-dots .dot::after,
    .about-dots .dot::after {
        content: "";
        position: absolute;
        width: 32px;
        height: 44px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    .about-dots { bottom: 22px; }
    .about,
    .gallery,
    .contact {
        padding: 40px 20px;
    }
    .about-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }
    .about-slideshow { flex: none; width: 100%; }
    .about-text h2,
    .contact h2,
    .gallery h2 {
        font-size: 32px;
        margin-top: 0;
    }
    .about-text p { font-size: 16px; }
    .gallery-viewer {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 8px;
        margin-top: 28px;
    }
    .gallery-project {
        grid-column: 1 / -1;
        grid-row: 1;
    }
    .gallery-arrow {
        grid-row: 2;
        min-height: 44px;
        padding: 0;
        font-size: 44px;
        line-height: 1;
    }
    .gallery-left { grid-column: 1; }
    .gallery-right { grid-column: 3; }
    .gallery-dots { margin-top: 8px; }
    .photo-label {
        bottom: 10px;
        padding: 8px 10px;
        font-size: 12px;
    }
    .before-label { left: 10px; }
    .after-label { right: 10px; }
    .slider-circle { width: 44px; height: 44px; }
    .contact { grid-template-columns: minmax(0, 1fr); }
    #contact-form input,
    #contact-form textarea {
        font-size: 16px;
    }
    #contact-form textarea { resize: vertical; }
    footer {
        flex-direction: column;
        gap: 16px;
        padding: 24px 20px;
    }
    .footer-logo-image {
        height: 133px;
        max-width: 100%;
        transform: none;
    }
    .footer-social { display: none; }
    .copyright { line-height: 1.5; }
}

.gallery-dots .dot:focus-visible {
    outline: 2px solid #00351f;
    outline-offset: 4px;
}

@media (max-width: 700px) {
    .slide::before {
        background-image: var(--slide-photo-mobile, var(--slide-photo));
    }
}
