/* =========================================================
   Rochester Contractor - Main Stylesheet
   Cleaned and organized for v11
   Pages using this file: index, about, service, contact, reviews
   ========================================================= */

/* ------------------- Base ------------------- */
html,
body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    font-family: Arial, sans-serif;
    color: white;
}

* {
    box-sizing: border-box;
}

body {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

/* ------------------- Shared Layout ------------------- */
.top-contact-bar {
    width: 100%;
    padding: 25px 20px;
    background-color: black;
    color: white;
    text-align: center;
    font-size: 0.9rem;
}

.top-contact-bar p {
    margin: 0;
}

header {
    background-color: transparent;
    color: white;
    padding: 4px;
}

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

.logo {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.logo-img {
    height: 60px;
    width: auto;
    flex-shrink: 0;
}

.logo-text h1 {
    margin: 0;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.logo-text .tagline {
    margin-top: 5px;
    font-size: 1.05rem;
    font-style: italic;
    color: #f0f0f0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-wrapper,
.index-overlay {
    flex-grow: 1;
}

footer {
    margin-top: auto;
    padding: 20px;
    background-color: black;
    color: #ccc;
    text-align: center;
    font-size: 0.9rem;
}

footer p {
    margin: 0;
}

/* ------------------- Desktop Navigation ------------------- */
.nav-list,
nav ul {
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list li,
nav ul li {
    position: relative;
    margin: 0;
}

.nav-list li a,
nav ul li a {
    position: relative;
    display: inline-block;
    padding: 5px 0;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-list li a::after,
nav ul li a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #ffcc00;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-list li a:hover::after,
nav ul li a:hover::after {
    width: 100%;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 210px;
    padding: 10px 0;
    background-color: #111;
    border-radius: 8px;
    list-style: none;
}

.dropdown:hover > .dropdown-menu,
.dropdown.open > .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: white;
    font-size: 1rem;
    font-weight: 400;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.dropdown-menu li a:hover {
    background-color: #333;
}

.arrow {
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.dropdown.open .arrow {
    transform: rotate(180deg);
}

.nav-close,
.nav-overlay {
    display: none;
}

/* ------------------- Home Page Hero ------------------- */
.index-page-wrapper {
    position: relative;
    background-size: cover;
    background-position: center;
}

.index-overlay {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
}

.index-main {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    text-align: center;
    color: white;
}

.main-page {
    position: absolute;
    top: 72%;
    left: 50%;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    text-align: center;
    transform: translate(-50%, -50%);
}

/* ------------------- Slideshow ------------------- */
.slider {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slider-btn {
    position: absolute;
    top: 50%;
    z-index: 10;
    padding: 10px;
    border: none;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.3s ease;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

/* ------------------- Home Page Service Cards ------------------- */
.index-second-page {
    min-height: 80vh;
    background-image: url('../images/services-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    text-align: center;
}

.index-second-section-page {
    text-align: center;
}

.indexPage-gallery {
    padding: 60px 20px;
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    text-align: center;
}

.indexPage-gallery-title {
    margin: 0 auto 40px;
    padding: 20px;
    max-width: 900px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    font-size: 2.4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 26px;
    max-width: 1200px;
    margin: 0 auto;
}

.indexPage-gallery-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    outline: none;
}

.indexPage-gallery-pictureFrame {
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.indexPage-gallery-pictureFrame:hover,
.indexPage-gallery-link:focus-visible .indexPage-gallery-pictureFrame {
    transform: translateY(-8px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

.indexPage-gallery-pictureFrame img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.indexPage-gallery-pictureFrame:hover img,
.indexPage-gallery-link:focus-visible .indexPage-gallery-pictureFrame img {
    transform: scale(1.05);
    filter: brightness(0.75);
}

.indexPage-gallery-pictureFrame::after {
    content: "View Service →";
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.78);
    color: white;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.indexPage-gallery-pictureFrame:hover::after,
.indexPage-gallery-link:focus-visible .indexPage-gallery-pictureFrame::after {
    opacity: 1;
    transform: translateY(0);
}

.gallery-text {
    padding: 18px 20px 22px;
    text-align: left;
}

.gallery-text h3 {
    margin: 0 0 8px;
    color: #222;
    font-size: 1.2rem;
    font-weight: 700;
}

.gallery-text h3::after {
    content: " →";
    color: #d59b00;
    font-weight: 800;
}

.gallery-text p {
    margin: 0;
    color: #555;
    font-size: 0.96rem;
    line-height: 1.55;
}

/* ------------------- Service Page ------------------- */
.service-page-wrapper {
    position: relative;
    min-height: 100vh;
    background-image: url('../images/builder.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
}

.services-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 1px;
    color: white;
}

.services-intro h2 {
    margin-bottom: 0.3em;
    font-size: 2.8rem;
    text-transform: uppercase;
}

.services-intro h3 {
    margin-bottom: 1em;
    color: #f0c040;
    font-weight: 600;
}

.services-intro p {
    margin-bottom: 1em;
    font-size: 1.1rem;
    line-height: 1.6;
}

.services-list {
    padding-left: 1.2em;
    list-style-type: disc;
    font-size: 1.1rem;
}

.services-list li {
    margin-bottom: 0.6em;
}

.services-box {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 60px auto;
    padding: 30px 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.services-title {
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
    color: white;
    font-size: 2.5rem;
}

.service-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.flip-card {
    width: 280px;
    height: 260px;
    background-color: transparent;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    backface-visibility: hidden;
}

.flip-card-front {
    background-color: #f1f1f1;
    color: #222;
}

.flip-card-back {
    background-color: white;
    color: #333;
    transform: rotateY(180deg);
}

/* ------------------- About Page ------------------- */
.about-page-wrapper {
    min-height: 100vh;
    background-image: url('../images/about.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.about-main {
    padding: 80px 20px;
    color: white;
}

.about-hero {
    margin-bottom: 60px;
    background: none;
    text-align: center;
}

.about-hero h2 {
    margin-bottom: 10px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.about-hero p {
    color: #ddd;
    font-size: 1.2rem;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.about-text h3 {
    margin-bottom: 10px;
    font-size: 1.6rem;
}

.about-text p,
.about-text ul {
    color: #f0f0f0;
    font-size: 1rem;
    line-height: 1.7;
}

.about-text ul {
    padding-left: 20px;
}

.about-text li {
    margin-bottom: 10px;
}

/* ------------------- Contact Page ------------------- */
.contact-page-wrapper {
    min-height: 100vh;
    background-image: url('../images/contact.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    color: white;
}

.contact-info,
.contact-form {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin-bottom: 20px;
    padding: 10px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    float: right;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    background-color: white;
    color: black;
    font-weight: bold;
    cursor: pointer;
}

/* ------------------- Reviews ------------------- */
.flooring-bg {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: url('../images/services-bg.jpg') no-repeat center center;
    background-size: cover;
}

.reviews-page {
    min-height: 70vh;
    padding: 50px 20px;
}

.reviews-hero {
    max-width: 900px;
    margin: 0 auto 35px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 14px;
    text-align: center;
}

.reviews-widget {
    max-width: 1000px;
    margin: 0 auto;
}

/* ------------------- Shared Content Blocks ------------------- */
main section {
    max-width: 800px;
    margin: auto;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.estimate-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    border: 2px solid white;
    border-radius: 4px;
    background-color: transparent;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.estimate-button:hover {
    background-color: white;
    color: #111;
}

.floating-call-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    padding: 12px 18px;
    background-color: #e63946;
    color: white;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    animation: pulse 2s infinite;
    transition: background-color 0.3s ease;
}

.floating-call-button:hover {
    background-color: #d62828;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(230, 57, 70, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0);
    }
}

/* ------------------- Mobile Navigation ------------------- */
.hamburger {
    display: none;
    border: none;
    background: none;
    color: white;
    cursor: pointer;
}

@media (max-width: 768px) {
    .slider-btn {
        display: none;
    }

    header {
        padding-left: 0;
        padding-right: 0;
    }

    .header-container {
        justify-content: flex-start;
        align-items: center;
        flex-wrap: nowrap;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .logo {
        justify-content: flex-start;
        align-items: center;
        width: auto;
        max-width: 100%;
        margin-left: 0;
        padding-left: 0;
        padding-right: 8px;
        gap: 12px;
        text-align: left;
    }

    .logo-img {
        margin-left: 0;
    }

    .logo-text,
    .logo-text h1,
    .logo-text .tagline {
        margin-left: 0;
        padding-left: 0;
        text-align: left;
    }

    .hamburger {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 10000;
        width: 44px;
        height: 44px;
        padding: 0;
        margin: 0;
        background: rgba(0, 0, 0, 0.72);
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 6px;
        color: white;
        font-size: 2rem;
        line-height: 40px;
        text-align: center;
    }

    body.nav-open .hamburger {
        display: none;
    }

    #mainNav {
        position: fixed;
        top: 0;
        left: -290px;
        z-index: 9000;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        padding-top: 58px;
        padding-bottom: 35px;
        overflow-y: auto;
        overflow-x: hidden;
        background: #080808;
        box-shadow: 4px 0 18px rgba(0, 0, 0, 0.35);
        transition: left 0.3s ease;
    }

    #mainNav.open {
        left: 0;
    }

    #mainNav::before {
        content: none;
        display: none;
    }

    #mainNav .nav-close {
        display: block;
        position: absolute;
        top: 10px;
        right: 14px;
        z-index: 9500;
        width: 40px;
        height: 40px;
        padding: 0;
        margin: 0;
        background: transparent;
        border: 0;
        color: white;
        font-size: 1.8rem;
        line-height: 40px;
        text-align: center;
        cursor: pointer;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: min(280px, 85vw);
        z-index: 8000;
        width: calc(100vw - min(280px, 85vw));
        height: 100vh;
        height: 100dvh;
        background: transparent;
        pointer-events: none;
    }

    .nav-overlay.open {
        display: block;
        pointer-events: auto;
    }

    #mainNav .nav-list,
    #mainNav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    #mainNav .nav-list li,
    #mainNav ul li {
        width: 100%;
        margin: 0;
    }

    #mainNav .nav-list li a,
    #mainNav ul li a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 16px 22px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        color: white;
        font-size: 1rem;
        font-weight: 600;
        letter-spacing: 0;
        text-decoration: none;
    }

    #mainNav .nav-list li a::after,
    #mainNav ul li a::after {
        display: none;
    }

    #mainNav .dropdown-menu,
    #mainNav .dropdown:hover > .dropdown-menu {
        display: none;
        position: static;
        width: 100%;
        min-width: 0;
        padding: 0;
        margin: 0;
        background: #151515;
        border-radius: 0;
        box-shadow: none;
    }

    #mainNav .dropdown.open > .dropdown-menu {
        display: block;
    }

    #mainNav .dropdown-menu li a {
        display: block;
        padding: 12px 22px 12px 40px;
        color: #d7d7d7;
        font-size: 0.92rem;
        font-weight: 400;
        white-space: normal;
    }

    #mainNav .dropdown-menu li a:hover,
    #mainNav .nav-list li a:hover,
    #mainNav ul li a:hover {
        background: rgba(255, 255, 255, 0.08);
        color: white;
    }

    #mainNav .arrow {
        margin-left: 12px;
        transform: rotate(0deg);
    }

    #mainNav .dropdown.open .arrow {
        transform: rotate(180deg);
    }
}

@media (min-width: 769px) {
    .nav-overlay,
    #mainNav .nav-close {
        display: none !important;
    }
}

/* ------------------- Responsive Layout ------------------- */
@media (max-width: 768px) {
    .main-page {
        top: 68%;
        width: calc(100% - 24px);
        padding: 16px;
    }

    .index-main {
        padding: 40px 16px;
    }

    .indexPage-gallery {
        padding: 45px 14px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .indexPage-gallery-pictureFrame {
        border-radius: 18px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }

    .indexPage-gallery-pictureFrame::after {
        top: 14px;
        right: 14px;
        padding: 8px 12px;
        font-size: 0.8rem;
        opacity: 1;
        transform: none;
    }

    .about-main {
        padding: 40px 15px;
    }

    .about-hero h2 {
        font-size: 1.8rem;
    }

    .about-hero p {
        font-size: 1rem;
    }

    .about-content {
        gap: 30px;
        padding: 20px;
    }

    .about-text h3 {
        font-size: 1.3rem;
    }

    .about-text p,
    .about-text ul {
        font-size: 0.95rem;
    }

    .contact-container {
        flex-direction: column;
        padding: 20px;
    }

    .contact-info,
    .contact-form {
        max-width: 100%;
    }

    .floating-call-button {
        right: 15px;
        bottom: 15px;
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    #reviews div {
        padding: 15px;
        font-size: 0.95rem;
    }

    #reviews h4 {
        text-align: right;
    }
}

@media (max-width: 480px) {
    .indexPage-gallery-pictureFrame h3 {
        font-size: 1rem;
    }

    .gallery-caption {
        font-size: 0.8rem;
    }
}
