/* ===========================
   GHR - General Home Repairs
   Color Palette from Logo:
   Navy:    #1a2744
   Dark:    #0f1a2e
   Accent:  #2a4a7f
   White:   #ffffff
   Light:   #f0f4f8
   =========================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #1a2744;
    --navy-dark: #0f1a2e;
    --navy-light: #243556;
    --accent: #2a4a7f;
    --accent-light: #3a6bb5;
    --white: #ffffff;
    --off-white: #f0f4f8;
    --light-grey: #e2e8f0;
    --mid-grey: #94a3b8;
    --text: #1e293b;
    --text-light: #64748b;
    --gold: #d4a843;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy-dark);
    border-color: var(--gold);
}

.btn-primary:hover {
    background: #c49a35;
    border-color: #c49a35;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 67, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--navy);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: all var(--transition);
    padding: 16px 0;
}

.navbar.scrolled {
    background: var(--navy-dark);
    padding: 8px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img {
    height: 50px;
    width: auto;
    transition: height var(--transition);
}

.navbar.scrolled .nav-logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-cta {
    background: var(--gold) !important;
    color: var(--navy-dark) !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    border-radius: var(--radius) !important;
    animation: pulse-glow 2s infinite;
}

.nav-cta:hover {
    background: #c49a35 !important;
    transform: scale(1.05);
}

.nav-instagram {
    font-size: 1.4rem !important;
    padding: 8px 10px !important;
    display: flex !important;
    align-items: center;
    transition: all var(--transition);
}

.nav-instagram:hover {
    color: var(--gold) !important;
    transform: scale(1.2);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 67, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(212, 168, 67, 0); }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--transition);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 40%, var(--accent) 100%);
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 80px 24px 40px;
}

.hero-logo {
    width: 250px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-weight: 500;
    color: var(--gold);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.hero-text {
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 28px;
    color: rgba(255, 255, 255, 0.85);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Hero Floating Image Columns --- */
.hero-float-col {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 230px;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    display: flex;
    justify-content: center;
}

.hero-float-left {
    left: 40px;
}

.hero-float-right {
    right: 40px;
}

.hero-float-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

/* Track position is driven entirely by JS for seamless looping */

.hero-float-card {
    width: 200px;
    height: 160px;
    margin-bottom: 28px;
    border-radius: var(--radius-lg);
    overflow: visible;
    flex-shrink: 0;
}

/* Gentle side-to-side floating bob on the card box */
.hero-float-card {
    animation: cardFloat 5s ease-in-out infinite;
}

.hero-float-card:nth-child(3n+1) { animation-delay: 0s; }
.hero-float-card:nth-child(3n+2) { animation-delay: -1.6s; }
.hero-float-card:nth-child(3n+3) { animation-delay: -3.3s; }

@keyframes cardFloat {
    0%, 100% { padding-left: 8px; padding-right: 8px; }
    25% { padding-left: 16px; padding-right: 0px; }
    50% { padding-left: 2px; padding-right: 14px; }
    75% { padding-left: 14px; padding-right: 2px; }
}

.hero-float-img {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    color: var(--white);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-float-img i {
    font-size: 2.4rem;
    opacity: 0.7;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.hero-float-img span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.6;
}

.hero-float-img-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
    filter: brightness(0.85);
}

/* Hover effect on individual images */
.hero-float-card:hover .hero-float-img-photo {
    transform: scale(1.08);
    border-color: var(--gold);
    box-shadow:
        0 12px 40px rgba(212, 168, 67, 0.35),
        0 0 20px rgba(212, 168, 67, 0.2);
    filter: brightness(1.1);
}

/* Grab cursor for draggable columns */
.hero-float-col {
    cursor: grab;
}

.hero-float-col:active {
    cursor: grabbing;
}

/* Scale + opacity are driven by JS based on viewport center distance */

/* Hide floating columns on smaller screens where they'd overlap content */
@media (max-width: 1300px) {
    .hero-float-col {
        width: 170px;
    }
    .hero-float-card {
        width: 150px !important;
        height: 120px !important;
    }
    .hero-float-left {
        left: 16px;
    }
    .hero-float-right {
        right: 16px;
    }
}

@media (max-width: 1050px) {
    .hero-float-col {
        display: none;
    }
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--navy);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.section-header-light h2 {
    color: var(--white);
}

.section-header-light p {
    color: rgba(255, 255, 255, 0.8);
}

/* --- Services --- */
.services {
    padding: 100px 0;
    background: var(--off-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border-bottom: 4px solid transparent;
}

a.service-card {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    position: relative;
}

/* "Learn more" indicator at the bottom of each card */
a.service-card::after {
    content: 'Learn more \2192';
    display: block;
    margin-top: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gold);
    opacity: 0.7;
    transition: all var(--transition);
}

a.service-card:hover::after {
    opacity: 1;
    letter-spacing: 1px;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--gold);
}

.service-card:hover .service-icon {
    background: var(--gold);
    color: var(--navy-dark);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: all var(--transition);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--navy);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* --- Why Choose Us --- */
.why-us {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature {
    text-align: center;
    padding: 20px;
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--gold);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
}

.feature h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.feature p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- About --- */
.about {
    padding: 100px 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 24px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-text .btn {
    margin-top: 16px;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat {
    background: var(--off-white);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    border-left: 4px solid var(--gold);
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--navy);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 4px;
    font-weight: 500;
}

/* --- Gallery --- */
.gallery {
    padding: 100px 0;
    background: var(--off-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(0.9);
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

.gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    background: linear-gradient(to top, rgba(15, 26, 46, 0.85) 0%, transparent 100%);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all var(--transition);
}

.gallery-item:hover .gallery-label {
    padding-bottom: 18px;
    color: var(--gold);
}

/* --- Contact / Quote --- */
.contact {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: var(--white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.contact-info > p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 32px;
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition);
}

a.contact-method:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold);
    transform: translateX(4px);
}

.contact-method-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-method strong {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.contact-method span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

/* --- Quote Form --- */
.quote-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--navy);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--light-grey);
    border-radius: var(--radius);
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: var(--text);
    transition: border-color var(--transition);
    background: var(--off-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-note {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* --- Footer --- */
.footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    width: 100px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

.footer h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer ul li i {
    color: var(--gold);
    margin-right: 8px;
    width: 16px;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Floating CTA --- */
.floating-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--gold);
    color: var(--navy-dark);
    padding: 16px 24px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 30px rgba(212, 168, 67, 0.4);
    z-index: 999;
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition);
}

.floating-cta.visible {
    transform: translateY(0);
    opacity: 1;
}

.floating-cta:hover {
    background: #c49a35;
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(212, 168, 67, 0.5);
}

.floating-cta.visible:hover {
    transform: translateY(-3px);
}

/* --- Form Success --- */
.form-success {
    text-align: center;
    padding: 60px 20px;
}

.form-success i {
    font-size: 4rem;
    color: #22c55e;
    margin-bottom: 20px;
}

.form-success h3 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 12px;
}

.form-success p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--navy-dark);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 4px;
        transition: right var(--transition);
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.3);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        display: block;
        padding: 14px 16px;
        font-size: 1.05rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .hero-logo {
        width: 180px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 16px;
    }

    .quote-form {
        padding: 28px 20px;
    }

    .floating-cta span {
        display: none;
    }

    .floating-cta {
        padding: 16px;
        border-radius: 50%;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .section-header h2,
    .section-header-light h2 {
        font-size: 1.6rem;
    }
}
