/*
    File: style1.css
    Purpose: Main styling for JK BIZ World pages, including layout sections,
    responsive polish, reveal animations, and all photo/image presentation.
*/

/* --- FONT IMPORTS --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800;900&family=Poppins:wght@400;600&display=swap');

/* --- DESIGN TOKENS --- */
:root {
    --primary: #FE7F2D;
    --accent: #FFB66E;
    --accent-soft: #FFF0DF;
    --navy: #233D4D;
    --teal: #215E61;
    --text: #2F3B4C;
    --muted: #6A7482;
    --surface: #FFFFFF;
    --bg: #F7F8FB;
    --border: #E6E9F0;
    --white: #ffffff;
    --transition-speed: 0.4s;
    --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- GLOBAL RESET AND BASE PAGE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

html {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
}

body h1,
body h2,
body h3,
body h4,
body p {
    text-shadow: none;
}

body p {
    letter-spacing: 0;
    text-transform: none;
    opacity: 1;
}

/* --- HEADER AND DESKTOP NAVIGATION --- */
header {
    background: var(--white);
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 900;
    font-size: 1.65rem;
    line-height: 1;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: 1px;
    white-space: nowrap;
    width: auto;
}

.logo-mark {
    display: block;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 7px;
    object-fit: cover;
}

.divider {
    width: 1px;
    height: 35px;
    background: #e0e0e0;
    margin: 0 22px;
}

.desktop-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    font-family: Arial, Helvetica, sans-serif;
    text-decoration: none;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1;
    text-transform: uppercase;
    margin: 0 18px;
    position: relative;
    transition: color var(--transition-speed) var(--transition-curve);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: width var(--transition-speed) var(--transition-curve);
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--primary);
}

.desktop-nav a:hover::after {
    width: 100%;
}

.desktop-nav a.active::after {
    width: 100%;
    transition: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.8px;
}

.lang-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    padding: 0;
    transition: color var(--transition-speed) var(--transition-curve);
}

.lang-button:hover,
.lang-button.active {
    color: var(--primary);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid var(--navy);
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        transform var(--transition-speed) var(--transition-curve),
        background var(--transition-speed) var(--transition-curve),
        border-color var(--transition-speed) var(--transition-curve),
        color var(--transition-speed) var(--transition-curve),
        box-shadow var(--transition-speed) var(--transition-curve);
}

.btn-back:hover {
    transform: translateY(-3px);
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

/* --- MOBILE MENU TOGGLE --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--navy);
    border-radius: 2px;
    transition: var(--transition-speed) var(--transition-curve);
}

.menu-toggle.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- MOBILE NAVIGATION PANEL --- */
.mobile-nav {
    position: absolute;
    top: 95px;
    left: 0;
    width: 100%;
    background: white;
    display: grid;
    grid-template-rows: 0fr;
    /* The magic for smooth height */
    transition: grid-template-rows var(--transition-speed) var(--transition-curve),
        opacity var(--transition-speed) var(--transition-curve);
    opacity: 0;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.mobile-nav-inner {
    min-height: 0;
    /* Required for grid transition */
    display: flex;
    flex-direction: column;
    padding: 0 25px 26px;
}

.mobile-nav.active {
    grid-template-rows: 1fr;
    opacity: 1;
}

.mobile-nav a {
    font-family: Arial, Helvetica, sans-serif;
    text-decoration: none;
    color: var(--navy);
    font-weight: 600;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s var(--transition-curve),
        transform 0.3s var(--transition-curve),
        color var(--transition-speed) var(--transition-curve);
    display: block;
}

.mobile-nav a:hover {
    color: var(--primary) !important;
}

.mobile-back-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 160px;
    height: 44px;
    min-height: 44px;
    margin: 18px 0 0;
    padding: 0 22px !important;
    border: 1px solid var(--navy);
    border-bottom: 1px solid var(--navy) !important;
    border-radius: 999px;
    color: var(--primary) !important;
    line-height: 1;
    overflow: visible;
    transition:
        background var(--transition-speed) var(--transition-curve),
        border-color var(--transition-speed) var(--transition-curve),
        color var(--transition-speed) var(--transition-curve);
}

.mobile-back-link:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white) !important;
}

.mobile-nav.active a {
    opacity: 1;
    transform: translateY(0);
    /* Staggered entrance for links */
    transition-delay: 0.1s;
}

/* --- TABLET HEADER RESPONSIVENESS --- */
@media (max-width: 1024px) {
    /* 1. Hide desktop elements and show hamburger */
    .divider,
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    /* 2. Adjust Logo size so JK BIZ WORLD fits on one line */
    .logo {
        font-size: 1.45rem;
        letter-spacing: 1.2px;
        width: auto;
        text-transform: uppercase;
        gap: 9px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
    }

    /* Adjust the Back to Menu button for smaller screens */
    .btn-back {
        font-size: 0.65rem;
        padding: 8px 14px;
        min-width: 138px;
    }

    .header-right > .btn-back {
        display: none;
    }

    .header-right > .language-switcher {
        gap: 7px;
        font-size: 0.76rem;
    }
}

/* --- ABOUT SECTION --- */
.about-section {
    background: var(--bg);
    padding: 40px 5% 30px;
}

.about-section .content-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 48px;
    align-items: start;
}

/* --- SHARED REVEAL ANIMATIONS --- */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.85s var(--transition-curve), transform 0.85s var(--transition-curve);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-content.reveal {
    opacity: 0;
    transform: translateX(-80px);
    transition: opacity 0.9s var(--transition-curve), transform 0.9s var(--transition-curve);
}

.hero-image.reveal {
    opacity: 0;
    transform: translateX(80px);
    transition: opacity 0.9s var(--transition-curve), transform 0.9s var(--transition-curve);
}

.hero-content.reveal.visible,
.hero-image.reveal.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-section.reveal,
.goals-section.reveal,
.values-section.reveal,
.services-section.reveal,
.service-cta-section.reveal,
.projects-section.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

/* --- SECTION ENTRANCE STAGGERING --- */
.about-section .section-tag,
.about-section h2,
.about-section .about-text > p,
.highlight-card,
.stat-card,
.goals-section .section-heading,
.values-section .section-heading,
.services-section .section-heading,
.projects-section .section-heading,
.goal-card,
.value-card,
.service-item,
.service-cta-box,
.project-case,
.project-card {
    opacity: 1;
    transform: translateY(28px) scale(0.985);
    transition:
        transform 0.8s var(--transition-curve),
        box-shadow var(--transition-speed) var(--transition-curve),
        border-color var(--transition-speed) var(--transition-curve);
}

.about-section.visible .section-tag,
.about-section.visible h2,
.about-section.visible .about-text > p,
.goals-section.visible .section-heading,
.values-section.visible .section-heading,
.services-section.visible .section-heading,
.projects-section.visible .section-heading,
.highlight-card.visible,
.stat-card.visible,
.goal-card.visible,
.value-card.visible,
.service-item.visible,
.service-cta-box.visible,
.project-case.visible,
.project-card.visible {
    transform: translateY(0) scale(1);
}

.about-section.visible h2 {
    transition-delay: 0.06s;
}

.about-section.visible .about-text > p:nth-of-type(1) {
    transition-delay: 0.12s;
}

.about-section.visible .about-text > p:nth-of-type(2) {
    transition-delay: 0.18s;
}

/* --- REDUCED MOTION ACCESSIBILITY --- */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .hero-content.reveal,
    .hero-image.reveal,
    .hero-banner:not(.about-hero):not(.projects-hero) .hero-image.reveal .image-wrapper,
    .about-section .section-tag,
    .about-section h2,
    .about-section .about-text > p,
    .highlight-card,
    .stat-card,
    .goals-section .section-heading,
    .values-section .section-heading,
    .services-section .section-heading,
    .projects-section .section-heading,
    .goal-card,
    .value-card,
    .service-item,
    .service-cta-box,
    .projects-hero .hero-project-photo,
    .project-case,
    .project-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- SHARED SECTION LABEL --- */
.section-tag {
    display: inline-flex;
    padding: 10px 16px;
    background: var(--accent-soft);
    color: var(--primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-weight: 700;
    border-radius: 999px;
    margin-bottom: 18px;
}

/* --- ABOUT TEXT AND SUMMARY CARDS --- */
.about-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    color: var(--navy);
    line-height: 1.05;
    margin-bottom: 24px;
}

.about-section p {
    color: var(--text);
    line-height: 1.8;
    max-width: 620px;
    margin-bottom: 28px;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 18px;
}

.highlight-card {
    background: var(--surface);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(35, 61, 77, 0.05);
    transition:
        transform 0.8s var(--transition-curve),
        box-shadow var(--transition-speed) var(--transition-curve);
}

.highlight-card:hover {
    transition-delay: 0s;
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(35, 61, 77, 0.09);
}

.highlight-card strong {
    display: block;
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 8px;
}

.highlight-card span {
    color: var(--muted);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 22px;
}

.stat-card {
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 28px;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid rgba(35, 61, 77, 0.08);
    box-shadow: 0 16px 35px rgba(35, 61, 77, 0.05);
}

.stat-card h3 {
    font-size: 2.4rem;
    color: var(--primary);
    margin-bottom: 0;
}

.stat-list {
    list-style: none;
    color: var(--text);
    line-height: 1.8;
    padding-left: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.stat-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    font-size: 1rem;
    padding-left: 0;
}

.stat-list li::before {
    content: '';
    flex-shrink: 0;
    margin-top: 0.65em;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--primary);
}

.stat-card p {
    color: var(--navy);
    line-height: 1.6;
}

/* --- GOALS SECTION --- */
.goals-section,
.values-section {
    padding: 20px 5% 90px;
}

/* --- VALUES SECTION --- */
.values-section {
    background: linear-gradient(180deg, #fff6eb 0%, #fffaf3 52%, #f7f8fb 100%);
    border-top: 1px solid rgba(254, 127, 45, 0.14);
    padding-bottom: 42px;
}

.footer-section {
    padding: 22px 5% 50px;
    border-top: 4px solid rgba(254, 127, 45, 0.78);
}

/* --- GOALS AND VALUES HEADINGS --- */
.goals-section .section-heading,
.values-section .section-heading {
    max-width: 740px;
    margin: 0 auto 45px;
    text-align: center;
}

.goals-section .section-heading h2,
.values-section .section-heading h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    color: var(--navy);
    margin-bottom: 16px;
}

.goals-section .section-heading p,
.values-section .section-heading p {
    max-width: 620px;
    margin: 0 auto;
    color: #5c6671;
    line-height: 1.8;
}

/* --- GOALS AND VALUES CARD GRIDS --- */
.goals-grid,
.values-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.values-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* --- GOAL AND VALUE CARDS --- */
.goal-card,
.value-card {
    position: relative;
    background: var(--surface);
    padding: 36px 30px 28px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(35, 61, 77, 0.08);
    transition:
        transform 0.8s var(--transition-curve),
        box-shadow var(--transition-speed) var(--transition-curve),
        border-color var(--transition-speed) var(--transition-curve);
}

.goal-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 22px;
    overflow: hidden;
}

.goal-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 24px;
    bottom: 24px;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--primary);
    opacity: 0.9;
}

.goal-card:hover,
.value-card:hover {
    transition-delay: 0s;
    transform: translateY(-8px);
    box-shadow: 0 24px 55px rgba(35, 61, 77, 0.1);
    border-color: rgba(254, 127, 45, 0.3);
}

.value-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 24px 22px 22px;
}

.value-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(254, 127, 45, 0.1), transparent 42%),
        linear-gradient(315deg, rgba(33, 94, 97, 0.08), transparent 45%);
    opacity: 0;
    transition: opacity var(--transition-speed) var(--transition-curve);
}

.value-card:hover::before {
    opacity: 1;
}

.goal-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(254, 127, 45, 0.16), rgba(33, 94, 97, 0.08));
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(254, 127, 45, 0.18);
    transition: transform var(--transition-speed) var(--transition-curve), background var(--transition-speed) var(--transition-curve);
}

.goal-card:hover .goal-card-icon {
    transform: scale(1.08);
    background: linear-gradient(135deg, rgba(254, 127, 45, 0.22), rgba(33, 94, 97, 0.12));
}

.goal-card-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.goal-card h3,
.value-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.65rem;
    color: var(--navy);
    margin-bottom: 14px;
}

.value-card-top,
.value-card-body {
    position: relative;
    z-index: 1;
}

.value-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.value-card-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 1.8px;
    color: var(--primary);
    padding-top: 7px;
}

.value-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--navy);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 30px rgba(35, 61, 77, 0.16);
    transition: transform var(--transition-speed) var(--transition-curve), background var(--transition-speed) var(--transition-curve);
}

.value-card:hover .value-card-icon {
    transform: rotate(-4deg) scale(1.06);
    background: var(--primary);
}

.value-card-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.goal-card p,
.value-card p {
    color: var(--muted);
    line-height: 1.8;
}

/* --- SERVICES SECTION --- */
.services-section {
    background: var(--bg);
    padding: 70px 5%;
}

.services-section .section-heading {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.services-section .section-heading h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    color: var(--navy);
    line-height: 1;
    margin-bottom: 16px;
}

.services-section .section-heading p {
    color: var(--muted);
    line-height: 1.8;
}

.services-list {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 22px;
}

/* --- SERVICE LIST ITEMS --- */
.service-item {
    display: grid;
    grid-template-columns: 0.38fr 0.62fr;
    min-height: 230px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(35, 61, 77, 0.07);
    transition: transform var(--transition-speed) var(--transition-curve), box-shadow var(--transition-speed) var(--transition-curve);
}

.service-item:nth-child(even) {
    grid-template-columns: 0.62fr 0.38fr;
}

.service-item:nth-child(even) .service-photo {
    order: 2;
}

.service-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(35, 61, 77, 0.1);
}

.service-detail-card {
    cursor: pointer;
}

.service-detail-card:focus-visible {
    outline: 3px solid rgba(254, 127, 45, 0.42);
    outline-offset: 4px;
}

/* --- SERVICE PHOTO FRAMES --- */
.service-photo {
    min-height: 230px;
    background-size: cover;
    background-position: center;
}

/* Service photo for the residential renovation card. */
.service-photo-renovation {
    background-image: linear-gradient(rgba(15, 23, 32, 0.12), rgba(15, 23, 32, 0.12)), url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/residential_renovation_images/ResidentReno.png');
}

/* Service photo for the interior remodeling card. */
.service-photo-interior {
    background-image: linear-gradient(rgba(15, 23, 32, 0.12), rgba(15, 23, 32, 0.12)), url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/Interior_Remodeling/InterriorRemo.png');
}

/* Service photo for the maintenance card. */
.service-photo-maintenance {
    background-image: linear-gradient(rgba(15, 23, 32, 0.12), rgba(15, 23, 32, 0.12)), url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/Maintenance_Repair/Maintenance.png');
}

/* Service photo for the commercial renovation card. */
.service-photo-commercial {
    background-image: linear-gradient(rgba(15, 23, 32, 0.12), rgba(15, 23, 32, 0.12)), url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/commercial_renovation_images/CommercialReno.png');
}

/* Service photo for the building construction card. */
.service-photo-building {
    background-image: linear-gradient(rgba(15, 23, 32, 0.12), rgba(15, 23, 32, 0.12)), url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/building_construction_images/BuildingCons.png');
}

/* Service photo for the structural works card. */
.service-photo-structural {
    background-image: linear-gradient(rgba(15, 23, 32, 0.12), rgba(15, 23, 32, 0.12)), url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/Structural_Works/StructuralWorks.png');
}

/* --- SERVICE TEXT CONTENT --- */
.service-content {
    display: grid;
    align-content: center;
    padding: 34px 38px;
}

.service-content span {
    color: var(--primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.service-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.55rem, 2.4vw, 2.35rem);
    color: var(--navy);
    margin-bottom: 14px;
}

.service-content p {
    color: var(--muted);
    line-height: 1.8;
    max-width: 620px;
}

/* --- SERVICE DETAIL MODAL --- */
.service-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 28px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-speed) var(--transition-curve), visibility var(--transition-speed) var(--transition-curve);
}

.service-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.service-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 32, 0.72);
    backdrop-filter: blur(8px);
}

.service-modal-panel {
    position: relative;
    width: min(1120px, 100%);
    max-height: min(86vh, 820px);
    overflow: auto;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.service-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 32, 0.82);
    color: var(--white);
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
}

.service-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
    gap: 0;
}

.service-gallery {
    min-width: 0;
    padding: 20px;
    background: #101820;
}

.service-gallery-main {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #0b1118;
}

.service-gallery-main img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 1;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--navy);
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-50%);
    transition: background var(--transition-speed) var(--transition-curve), transform var(--transition-speed) var(--transition-curve);
}

.gallery-nav:hover {
    background: var(--accent);
    transform: translateY(-50%) scale(1.04);
}

.gallery-prev,
.commercial-gallery-prev,
.building-gallery-prev,
.interior-gallery-prev,
.structural-gallery-prev,
.maintenance-gallery-prev {
    left: 14px;
}

.gallery-next,
.commercial-gallery-next,
.building-gallery-next,
.interior-gallery-next,
.structural-gallery-next,
.maintenance-gallery-next {
    right: 14px;
}

.service-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.gallery-thumb {
    min-height: 72px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.gallery-thumb.active {
    border-color: var(--accent);
}

.gallery-thumb img {
    display: block;
    width: 100%;
    height: 72px;
    object-fit: cover;
}

.service-modal-copy {
    display: grid;
    align-content: center;
    padding: 48px 46px;
}

.modal-kicker {
    width: fit-content;
    margin-bottom: 18px;
    padding: 9px 15px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.service-modal-copy h2 {
    color: var(--navy);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.85rem, 3vw, 3.1rem);
    line-height: 1.05;
    margin-bottom: 18px;
}

.service-modal-copy p {
    color: var(--muted);
    line-height: 1.75;
}

.service-modal-copy ul {
    display: grid;
    gap: 12px;
    margin: 24px 0 28px;
    padding: 0;
    list-style: none;
}

.service-modal-copy li {
    position: relative;
    padding-left: 22px;
    color: var(--text);
    line-height: 1.65;
}

.service-modal-copy li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.modal-quote-link {
    width: fit-content;
}

@media (max-width: 900px) {
    .service-modal {
        padding: 18px;
    }

    .service-modal-grid {
        grid-template-columns: 1fr;
    }

    .service-modal-copy {
        padding: 34px 28px;
    }

    .service-gallery-main img {
        aspect-ratio: 16 / 11;
    }
}

@media (max-width: 560px) {
    .service-modal {
        padding: 10px;
    }

    .service-modal-panel {
        max-height: 92vh;
        border-radius: 18px;
    }

    .service-gallery {
        padding: 12px;
    }

    .service-gallery-main img {
        aspect-ratio: 4 / 3;
    }

    .service-gallery-thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-thumb,
    .gallery-thumb img {
        height: 64px;
        min-height: 64px;
    }

    .gallery-nav {
        width: 36px;
        height: 36px;
    }

    .service-modal-copy {
        padding: 28px 22px;
    }
}

/* --- SERVICE CTA SECTION --- */
.service-cta-section {
    background: var(--bg);
    padding: 0 5% 72px;
}

.service-cta-box {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    background: var(--navy);
    color: var(--white);
    border-radius: 20px;
    padding: 32px 36px;
}

.service-cta-box h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    margin-bottom: 10px;
}

.service-cta-box p {
    color: #c7d3df;
    line-height: 1.7;
}

/* --- PROJECTS SECTION --- */
.projects-section {
    position: relative;
    background: var(--bg);
    padding: 70px 5%;
    overflow: hidden;
}

.projects-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: -110px;
    width: 420px;
    height: 190px;
    background: var(--navy);
    transform: skewY(28deg);
    transform-origin: top right;
}

.projects-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 60px;
    width: 360px;
    height: 16px;
    background: var(--primary);
    transform: rotate(28deg);
    transform-origin: right center;
    border-radius: 999px;
}

/* --- PROJECTS SECTION HEADING --- */
.projects-section .section-heading {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto 42px;
    text-align: center;
}

.projects-section .section-heading h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.6rem, 6vw, 5rem);
    color: #07164a;
    line-height: 0.95;
}

.projects-section .section-heading p {
    color: var(--muted);
    line-height: 1.8;
    max-width: 700px;
    margin: 12px auto 0;
}

/* --- PROJECT CARDS --- */
.project-list {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Loading state shown only when no cached Google Sheet projects are available yet. */
.project-loading {
    grid-column: 1 / -1;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--muted);
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

/* Orange spinner used while the project list downloads from Apps Script. */
.project-loading-spinner {
    width: 34px;
    height: 34px;
    border: 4px solid rgba(254, 127, 45, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: project-spin 0.85s linear infinite;
}

@keyframes project-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Individual project card shell shared by fallback HTML and Sheet-rendered cards. */
.project-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 18px 44px rgba(35, 61, 77, 0.07);
    transition:
        transform var(--transition-speed) var(--transition-curve),
        box-shadow var(--transition-speed) var(--transition-curve),
        border-color var(--transition-speed) var(--transition-curve);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(254, 127, 45, 0.34);
    box-shadow: 0 26px 62px rgba(35, 61, 77, 0.11);
}

.project-card-copy {
    position: relative;
    min-height: 178px;
    background: var(--white);
    color: var(--text);
    padding: 24px 24px 10px;
}

.project-card-copy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: var(--primary);
}

.project-card-copy span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 1.6px;
}

.project-card-copy h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 10px;
    line-height: 1.2;
    min-height: 2.9em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-copy p {
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.95rem;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- PROJECT PHOTO GALLERY ---
   Main cards show only one before and one after photo. Additional Sheet photos
   stay available inside the lightbox thumbnail rail. */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 8px 12px 12px;
}

.project-shot {
    min-height: 210px;
    border: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition:
        transform var(--transition-speed) var(--transition-curve),
        filter var(--transition-speed) var(--transition-curve);
}

.project-shot:first-child {
    border-radius: 14px 0 0 14px;
}

.project-shot:last-child {
    border-radius: 0 14px 14px 0;
}

.project-shot:hover {
    filter: brightness(1.06);
    transform: scale(1.025);
}

/* Missing Sheet photos render as black tiles so empty project rows are obvious. */
.project-shot-missing {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 42%),
        #05080c;
}

.project-shot-missing:hover {
    filter: none;
}

/* Photo labels shown on each before/after project tile. */
.project-shot span {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 32, 0.78);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-shot:last-child span,
.project-shot[data-shot-type="after"] span {
    background: rgba(254, 127, 45, 0.9);
}

/* Fallback before photos: darker overlay keeps labels readable on construction images. */
.project-before-a,
.project-before-d,
.project-before-f,
.project-before-h {
    background-image: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.25)), url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/construction.png');
}

.project-before-b,
.project-before-e,
.project-before-g,
.project-before-i {
    background-image: linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.28)), url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/construction-Main.png');
    background-position: 24% center;
}

.project-before-c {
    background-image: linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.18)), url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/construction.png');
    background-position: 65% center;
}

/* Fallback after photos: clean image presentation without the dark overlay. */
.project-after-a,
.project-after-d,
.project-after-f,
.project-after-h {
    background-image: url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/construction-Main.png');
}

.project-after-b,
.project-after-e,
.project-after-g,
.project-after-i {
    background-image: url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/construction.png');
    background-position: right center;
}

.project-after-c {
    background-image: url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/construction-Main.png');
    background-position: 70% center;
}

/* --- PROJECT PHOTO LIGHTBOX ---
   Shared full-screen gallery for project photos from hardcoded fallback cards
   and Google Sheet rows. */
.project-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(5, 10, 16, 0.88);
    backdrop-filter: blur(10px);
}

.project-lightbox.active {
    display: flex;
}

.lightbox-panel {
    position: relative;
    width: min(1080px, 100%);
    background: linear-gradient(180deg, #13212d 0%, #0d1721 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.45);
}

.lightbox-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Fixed photo stage so mixed portrait/landscape images keep a consistent gallery size. */
.lightbox-media {
    position: relative;
    display: grid;
    place-items: center;
    padding: 18px;
    background:
        radial-gradient(circle at 20% 0%, rgba(254, 127, 45, 0.14), transparent 32%),
        linear-gradient(135deg, #071018 0%, #101b26 58%, #071018 100%);
}

/* Main gallery image. object-fit keeps the full photo visible inside the fixed frame. */
.lightbox-media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 68vh;
    object-fit: contain;
    border-radius: 18px;
    background: #05080c;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
}

.lightbox-media img:not([src]),
.lightbox-media img[src=""] {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 42%),
        #05080c;
}

/* Lightbox footer holds the highlighted title and thumbnail selector. */
.lightbox-footer {
    display: grid;
    gap: 16px;
    padding: 18px 22px 20px;
    background: rgba(13, 23, 33, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-footer p {
    color: var(--white);
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.02rem;
    font-weight: 800;
    text-align: center;
}

.lightbox-description {
    max-width: 760px;
    margin: -4px auto 0 !important;
    color: #c7d3df !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    line-height: 1.65;
}

/* Before/After label in the lightbox title. */
.lightbox-title-highlight {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fe7f2d 0%, #ff9f4a 100%);
    box-shadow: 0 10px 24px rgba(254, 127, 45, 0.25);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    vertical-align: middle;
}

/* Orange previous/next gallery controls. */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #fe7f2d 0%, #ff9f4a 100%);
    backdrop-filter: blur(8px);
    color: var(--white);
    font-size: 2.65rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: 0 16px 34px rgba(254, 127, 45, 0.3);
    transition: box-shadow var(--transition-speed) var(--transition-curve), transform var(--transition-speed) var(--transition-curve), filter var(--transition-speed) var(--transition-curve);
}

.lightbox-arrow:hover {
    filter: brightness(1.08);
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 20px 44px rgba(254, 127, 45, 0.42);
}

.lightbox-arrow-left {
    left: 16px;
}

.lightbox-arrow-right {
    right: 16px;
}

/* Lightbox thumbnail strip for quick photo selection. */
.lightbox-thumbs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-thumb {
    width: 116px;
    height: 74px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    opacity: 0.58;
    filter: saturate(0.86);
    transition:
        border-color var(--transition-speed) var(--transition-curve),
        opacity var(--transition-speed) var(--transition-curve),
        filter var(--transition-speed) var(--transition-curve),
        transform var(--transition-speed) var(--transition-curve);
}

.lightbox-thumb:not([style*="background-image"]) {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 45%),
        #05080c;
}

.lightbox-thumb.active,
.lightbox-thumb:hover {
    border-color: var(--primary);
    opacity: 1;
    filter: saturate(1.06);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(254, 127, 45, 0.2);
}

.lightbox-close {
    position: fixed;
    top: 22px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #fe7f2d 0%, #ff9f4a 100%);
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(254, 127, 45, 0.3);
}

@media (max-width: 640px) {
    .goal-card {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .goal-card-icon {
        width: 54px;
        height: 54px;
        border-radius: 16px;
    }

    .value-card {
        min-height: auto;
    }
}

/* --- FOOTER SECTION --- */
.footer-section {
    background: #0f1720;
    color: #dbe7f1;
}

/* --- FOOTER TOP CONTENT --- */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 28px;
    padding: 0 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.78fr 0.95fr 0.72fr;
    gap: 32px;
}

.footer-brand h3 {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.75rem;
    letter-spacing: 0.4px;
    margin-bottom: 18px;
    color: #ffffff;
}

.footer-logo-mark {
    width: 46px;
    height: 46px;
}

.footer-brand p {
    color: #a8b7c8;
    line-height: 1.8;
    max-width: 420px;
    margin-bottom: 24px;
}

.footer-links h4,
.footer-contact-info h4,
.footer-qr h4,
.footer-box-left h4 {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 18px;
}

.footer-links ul,
.footer-contact-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.footer-links a,
.footer-contact-info li,
.footer-qr p {
    color: #a8b7c8;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ffffff;
}

.qr-frame {
    display: inline-flex;
    width: 168px;
    max-width: 100%;
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid rgba(255, 182, 110, 0.35);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed) var(--transition-curve), border-color var(--transition-speed) var(--transition-curve);
}

.qr-frame:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.qr-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-qr p {
    max-width: 190px;
    margin: 12px 0 0;
    line-height: 1.55;
}

/* --- FOOTER CONTACT BOX AND FORM --- */
.footer-box {
    display: grid;
    grid-template-columns: 0.38fr 0.62fr;
    gap: 56px;
    align-items: start;
    background: #17212b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.16);
}

.footer-box-left p {
    color: #a8b7c8;
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 360px;
}

.footer-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-form {
    display: grid;
    gap: 20px;
}

.footer-form label {
    display: grid;
    gap: 8px;
    color: #dce6f3;
    font-size: 0.95rem;
}

.footer-form input,
.footer-form textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #f5fbff;
    padding: 16px 20px;
    border-radius: 26px;
    outline: none;
}

.footer-form textarea {
    min-height: 94px;
    resize: vertical;
}

.footer-form input::placeholder,
.footer-form textarea::placeholder {
    color: #7c8c9e;
}

.footer-form button {
    width: 275px;
    max-width: 100%;
    border-radius: 26px;
}

/* --- FOOTER BOTTOM BAR --- */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 22px 0 18px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-bottom-content p {
    color: #7c8c9e;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 18px;
}

.footer-bottom-links a {
    color: #7c8c9e;
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-curve);
}

.footer-bottom-links a:hover {
    color: #ffffff;
}

/* --- SCROLL TO TOP BUTTON --- */
.scroll-top-button {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 900;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(35, 61, 77, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity var(--transition-speed) var(--transition-curve),
        visibility var(--transition-speed) var(--transition-curve),
        transform var(--transition-speed) var(--transition-curve),
        background var(--transition-speed) var(--transition-curve);
}

.scroll-top-button.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-button:hover {
    background: var(--navy);
    transform: translateY(-3px);
}

.scroll-top-button svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- FOOTER RESPONSIVE POLISH --- */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-box {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer-section {
        padding: 22px 5% 46px;
    }

    .footer-content {
        gap: 28px;
    }
}

@media (max-width: 480px) {
    .footer-bottom-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .scroll-top-button {
        right: 18px;
        bottom: 18px;
        width: 46px;
        height: 46px;
    }
}

/* --- EXTRA SMALL PHONE HEADER FIX --- */
@media (max-width: 480px) {
    header {
        padding: 0 15px; /* Tighter padding to save space */
    }

    .logo {
        font-size: 1.15rem;
        gap: 8px;
    }

    .logo-mark {
        width: 32px;
        height: 32px;
    }
}


/* --- HERO BANNER SECTION --- */
.hero-banner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    min-height: 420px;
    padding: 4.5% 6%;
    background: linear-gradient(135deg, rgba(33, 94, 97, 0.08) 0%, rgba(255, 127, 45, 0.06) 100%);
    position: relative;
    overflow: hidden;
}


.hero-banner::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: rgba(254, 127, 45, 0.18);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

/* --- HERO COPY CONTENT --- */
.hero-content {
    position: relative;
    max-width: 600px;
}

.hero-image {
    position: relative;
}

.hero-subtitle {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--primary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}

.hero-banner h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.3rem;
    font-weight: 900;
    color: var(--navy);
    line-height: 1.05;
    margin-bottom: 20px;
}

.hero-banner p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* --- PRIMARY ACTION BUTTON --- */
.btn-primary {
    background-color: var(--primary);
    color: var(--white) !important;
    padding: 14px 32px;
    border-radius: 26px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    text-transform: uppercase;
    border: none;
    transition: transform var(--transition-speed) var(--transition-curve), background-color var(--transition-speed);
}

.btn-primary:hover {
    background-color: var(--navy);
    transform: translateY(-3px);
}

/* --- SECONDARY ACTION BUTTON --- */
.btn-secondary {
    background-color: transparent;
    color: var(--navy) !important;
    padding: 14px 32px;
    border-radius: 26px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    text-transform: uppercase;
    border: 1px solid var(--navy);
    transition: all var(--transition-speed) var(--transition-curve);
}

.btn-secondary:hover {
    background-color: var(--navy);
    color: var(--white) !important;
    transform: translateY(-3px);
}

/* --- HERO PHOTO CONTAINER --- */
.hero-image {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Main hero photo panel used by the standard services hero. */
.image-wrapper {
    width: calc(100% + 40px);
    height: 100%;
    min-height: 380px;
    background-image: url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/service-main.png');
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(35, 61, 77, 0.14);
    margin-right: -40px;
    transition: transform var(--transition-speed) var(--transition-curve);
}

.image-wrapper:hover {
    transform: translateY(-5px);
}

/* --- ABOUT HERO LAYOUT --- */
.about-hero {
    grid-template-columns: 0.92fr 1.28fr;
    gap: 32px;
    min-height: 560px;
    padding: 0 0 0 6%;
    align-items: stretch;
}

.about-hero::before {
    right: 43%;
    top: 50%;
    width: 340px;
    height: 620px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247, 248, 251, 0.98) 0%, rgba(247, 248, 251, 0.76) 42%, rgba(247, 248, 251, 0) 72%);
    filter: blur(18px);
    transform: translateY(-50%);
    z-index: 1;
}

.about-hero .hero-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px 0;
}

.about-hero .hero-image {
    min-width: 0;
    align-self: stretch;
    justify-content: stretch;
    z-index: 2;
    position: relative;
}

.about-hero .hero-image::before {
    content: none;
}

/* Full-height about hero photo with a soft left-side mask on desktop. */
.about-hero-photo {
    width: 100%;
    height: 100%;
    min-height: 100%;
    background-image: url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/construction-Main.png');
    background-size: cover;
    background-position: center;
    border-radius: 0;
    box-shadow: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 7%, rgba(0, 0, 0, 0.5) 20%, #000 38%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 7%, rgba(0, 0, 0, 0.5) 20%, #000 38%);
}

/* --- PROJECTS HERO LAYOUT --- */
.projects-hero {
    grid-template-columns: 0.95fr 1.05fr;
    min-height: 520px;
    background: linear-gradient(135deg, rgba(33, 94, 97, 0.08) 0%, rgba(255, 127, 45, 0.06) 100%);
    padding: 5% 6%;
}

.projects-hero::before {
    top: -70px;
    right: -90px;
    left: auto;
    bottom: auto;
    width: 260px;
    height: 260px;
    background: rgba(254, 127, 45, 0.18);
    filter: blur(40px);
}

.projects-before-after-hero {
    position: relative;
    width: min(620px, 100%);
    min-height: 390px;
    margin-left: auto;
}

/* Floating project hero photo cards for before/after comparison. */
.hero-project-photo {
    position: absolute;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 8px solid var(--white);
    border-radius: 22px;
    box-shadow: 0 22px 58px rgba(35, 61, 77, 0.16);
}

.hero-project-photo span {
    position: absolute;
    left: 18px;
    top: 18px;
    z-index: 1;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Before hero photo, placed slightly higher and rotated left. */
.hero-before {
    left: 0;
    top: 16px;
    width: 72%;
    height: 76%;
    background-image: linear-gradient(rgba(15, 23, 32, 0.12), rgba(15, 23, 32, 0.12)), url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/before-main.png');
    transform: rotate(-2deg);
}

/* After hero photo, placed lower and rotated right. */
.hero-after {
    right: 0;
    bottom: 8px;
    width: 64%;
    height: 68%;
    background-image: url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/after-main.png');
    transform: rotate(3deg);
}

.hero-after span {
    background: var(--navy);
}

/* --- PROJECT HERO PHOTO REVEAL ANIMATION --- */
.projects-hero .hero-image.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.projects-hero .hero-image.reveal .hero-project-photo {
    opacity: 0;
    transform: translateY(-110px) rotate(-2deg);
    transition: opacity 0.75s var(--transition-curve), transform 0.75s var(--transition-curve);
}

.projects-hero .hero-image.reveal .hero-after {
    transform: translateY(-130px) rotate(3deg);
    transition-delay: 0.16s;
}

.projects-hero .hero-image.reveal.visible .hero-before {
    opacity: 1;
    transform: translateY(0) rotate(-2deg);
}

.projects-hero .hero-image.reveal.visible .hero-after {
    opacity: 1;
    transform: translateY(0) rotate(3deg);
}

/* --- STANDARD HERO PHOTO REVEAL ANIMATION --- */
.hero-banner:not(.about-hero):not(.projects-hero) .hero-image.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.hero-banner:not(.about-hero):not(.projects-hero) .hero-image.reveal .image-wrapper {
    opacity: 0;
    transform: translateY(18px) rotate(4deg) scale(0.97);
    transform-origin: center;
    transition: opacity 0.85s var(--transition-curve), transform 0.85s var(--transition-curve);
}

.hero-banner:not(.about-hero):not(.projects-hero) .hero-image.reveal.visible .image-wrapper {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
    animation: serviceHeroTilt 0.9s 0.15s var(--transition-curve);
}

/* --- HERO PHOTO KEYFRAME --- */
@keyframes serviceHeroTilt {
    0% {
        transform: translateY(18px) rotate(4deg) scale(0.97);
    }
    45% {
        transform: translateY(0) rotate(-2.2deg) scale(1);
    }
    72% {
        transform: translateY(0) rotate(1.1deg) scale(1);
    }
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

/* --- GENERAL ANIMATION KEYFRAMES --- */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-80px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(80px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- HERO RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 992px) {
    .hero-banner {
        grid-template-columns: 1fr;
        gap: 45px;
        min-height: auto;
        padding: 60px 5%;
    }

    .hero-banner h1 {
        font-size: 2.6rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .image-wrapper {
        width: 100%;
        height: 260px;
        margin-left: 0;
    }

    .about-hero {
        grid-template-columns: 1fr;
        padding: 60px 5%;
        min-height: auto;
    }

    .about-hero::before {
        display: none;
    }

    .about-hero .hero-image::before {
        display: none;
    }

    /* Mobile about photo removes the desktop mask so the full image is visible. */
    .about-hero-photo {
        min-height: 360px;
        border-radius: 24px;
        box-shadow: 0 24px 60px rgba(35, 61, 77, 0.14);
        background-image: url('https://res.cloudinary.com/dx6dhuqw2/image/upload/f_auto,q_auto/JKWORLD/construction-Main.png');
        -webkit-mask-image: none;
        mask-image: none;
    }

    .projects-hero {
        grid-template-columns: 1fr;
        background: linear-gradient(135deg, rgba(33, 94, 97, 0.08) 0%, rgba(255, 127, 45, 0.06) 100%);
    }

    .projects-before-after-hero {
        margin: 0;
        width: 100%;
        min-height: 360px;
    }
}

/* --- PAGE RESPONSIVE POLISH --- */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.hero-banner h1 {
    font-size: clamp(2.25rem, 4.5vw, 3.3rem);
}

/* --- RESPONSIVE HEADING SCALES --- */
.about-section h2 {
    font-size: clamp(2rem, 4.2vw, 3rem);
}

.goals-section .section-heading h2,
.values-section .section-heading h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

/* --- RESPONSIVE: MEDIUM DESKTOP --- */
@media (max-width: 1200px) {
    .about-section .content-grid {
        gap: 34px;
    }

    .stat-card h3 {
        font-size: 2rem;
    }

    .goal-card h3,
    .value-card h3 {
        font-size: 1.45rem;
    }

    .values-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --- RESPONSIVE: TABLET LAYOUTS --- */
@media (max-width: 992px) {
    header {
        height: 82px;
    }

    .mobile-nav {
        top: 82px;
    }

    .about-section {
        padding: 56px 5% 42px;
    }

    .about-section .content-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .about-section p {
        max-width: 760px;
    }

    .about-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .goals-section,
    .values-section {
        padding: 56px 5%;
    }

    .goals-grid,
    .values-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .goal-card,
    .value-card {
        padding: 28px 24px 24px;
    }

    .image-wrapper {
        min-height: 320px;
        margin-right: 0;
    }

    /* Service and project photos become full-width rows on tablets. */
    .services-section {
        padding: 58px 5%;
    }

    .about-hero .hero-content {
        padding: 0;
    }

    .service-item,
    .service-item:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .service-item:nth-child(even) .service-photo {
        order: 0;
    }

    .service-photo {
        min-height: 260px;
    }

    .service-cta-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .projects-section {
        padding: 58px 5%;
    }

    .projects-section::before,
    .projects-section::after {
        opacity: 0.28;
    }

    .project-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --- RESPONSIVE: SMALL TABLETS --- */
@media (max-width: 768px) {
    header {
        padding: 0 22px;
    }

    .hero-banner {
        padding: 46px 5% 54px;
        gap: 32px;
    }

    .hero-subtitle {
        margin-bottom: 18px;
    }

    .hero-banner p {
        margin-bottom: 28px;
    }

    .about-highlights,
    .about-stats,
    .goals-grid,
    .values-grid {
        grid-template-columns: 1fr;
    }

    .goals-section .section-heading,
    .values-section .section-heading {
        margin-bottom: 30px;
    }

    .goal-card {
        grid-template-columns: auto 1fr;
        gap: 18px;
    }

    .value-card {
        min-height: auto;
    }

    .footer-box,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .service-content {
        padding: 28px;
    }

}

/* --- RESPONSIVE: MOBILE PHONES --- */
@media (max-width: 560px) {
    header {
        height: 74px;
        padding: 0 16px;
    }

    .mobile-nav {
        top: 74px;
    }

    .btn-back {
        display: none;
    }

    .logo {
        font-size: 1.08rem;
        letter-spacing: 0.8px;
        gap: 8px;
    }

    .hero-banner {
        padding: 38px 18px 46px;
    }

    .hero-buttons {
        width: 100%;
    }

    .image-wrapper {
        height: 230px;
        min-height: 230px;
        border-radius: 18px;
    }

    .about-section,
    .goals-section,
    .values-section,
    .services-section,
    .service-cta-section,
    .projects-section,
    .footer-section {
        padding-left: 18px;
        padding-right: 18px;
    }

    .section-tag {
        font-size: 0.68rem;
        letter-spacing: 1.3px;
    }

    .highlight-card,
    .stat-card,
    .goal-card,
    .value-card,
    .footer-box {
        border-radius: 18px;
        padding: 22px;
    }

    .highlight-card strong {
        font-size: 1.55rem;
    }

    .stat-card h3 {
        font-size: 1.75rem;
    }

    .stat-list li,
    .goal-card p,
    .value-card p {
        font-size: 0.95rem;
    }

    .goal-card {
        grid-template-columns: 1fr;
    }

    .goal-card::before {
        top: 18px;
        bottom: 18px;
    }

    .goal-card-icon,
    .value-card-icon {
        width: 50px;
        height: 50px;
        border-radius: 15px;
    }

    .footer-form button {
        max-width: none;
        width: 100%;
    }

    .services-section {
        padding-top: 46px;
        padding-bottom: 46px;
    }

    .service-photo {
        min-height: 190px;
    }

    .service-content {
        padding: 22px;
    }

    .service-cta-section {
        padding-bottom: 52px;
    }

    .service-cta-box {
        padding: 24px 22px;
    }

    .projects-section {
        padding-top: 46px;
        padding-bottom: 46px;
    }

    .projects-section::before,
    .projects-section::after {
        display: none;
    }

    .project-list {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-card {
        border-radius: 18px;
    }

    .project-card-copy {
        min-height: auto;
        padding: 20px;
    }

    .project-card-copy h3,
    .project-card-copy p {
        min-height: 0;
        -webkit-line-clamp: unset;
    }

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

    /* Project photos stack vertically so before/after images stay readable. */
    .project-shot,
    .project-shot:first-child,
    .project-shot:last-child {
        min-height: 220px;
        border-radius: 14px;
    }

    .project-lightbox {
        padding: 14px;
    }

    .lightbox-panel {
        border-radius: 18px;
    }

    .lightbox-media {
        padding: 10px;
    }

    .lightbox-media img {
        border-radius: 12px;
        aspect-ratio: 4 / 3;
        max-height: 58vh;
    }

    .lightbox-close {
        top: 14px;
        right: 14px;
    }

    .lightbox-footer {
        padding: 14px;
        gap: 12px;
    }

    .lightbox-title-highlight {
        margin-left: 6px;
        padding: 5px 9px;
    }

    .lightbox-arrow {
        width: 42px;
        height: 42px;
        font-size: 2rem;
    }

    .lightbox-arrow-left {
        left: 8px;
    }

    .lightbox-arrow-right {
        right: 8px;
    }

    .lightbox-thumb {
        width: 92px;
        height: 60px;
    }

    /* Hero photos are shortened and de-masked for narrow screens. */
    .about-hero-photo {
        min-height: 250px;
        border-radius: 20px;
    }

    .projects-hero {
        padding: 42px 18px 48px;
    }

    .projects-before-after-hero {
        min-height: 300px;
    }

    .hero-project-photo {
        border-width: 5px;
    }

    .hero-before {
        width: 78%;
        height: 68%;
        top: 0;
    }

    .hero-after {
        width: 72%;
        height: 62%;
        right: 0;
        bottom: 0;
    }
}
