/* =========================================
   Project Details Page - Pixel Perfect Styles
   ========================================= */

:root {
    /* Colors */
    --pd-black: #0b0b0b;
    --pd-white: #ffffff;
    --pd-red: #E60024;
    --pd-red-hover: #E60024;
    --pd-navy: #0b1324;
    --pd-text-primary: #000000;
    --pd-text-muted: #4B5563;
    /* Refined gray */
    --pd-text-light: #9CA3AF;
    --pd-border: #e5e7eb;

    /* Layout */
    --container-padding: clamp(20px, 5vw, 60px);
    --container-max-width: 1360px;

    /* Desktop Overrides (Enforce 120px Margins) */
    @media (min-width: 1025px) {
        --container-padding: clamp(40px, 8vw, 120px);
        --pad-left: clamp(40px, 8vw, 120px);
        --pad-right: clamp(40px, 8vw, 120px);
        --container-max-width: 100%;
    }

    @media (min-width: 1440px) {
        :root {
            --container-padding: 120px !important;
            --pad-left: 120px !important;
            --pad-right: 120px !important;
        }
    }

    /* Typography */
    --heading-font: 'Playfair Display',
    serif;
    --body-font: 'Inter',
    sans-serif;
}

/* Global Reset for this page specific elements */
body {
    background-color: var(--pd-white);
    color: var(--pd-text-primary);
    font-family: var(--body-font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.pd-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Typography Overrides */
h1,
h2,
h3,
h4 {
    font-family: var(--heading-font);
    color: var(--pd-text-primary);
    margin: 0;
    line-height: 1.2;
}

/* =========================================
   SECTION 0: HERO
   ========================================= */
.pd-hero {
    position: relative;
    width: 100%;
    height: 65vh;
    background: #000;
    overflow: hidden;
}

.pd-hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.pd-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

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

.pd-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.pd-hero-top-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

.pd-hero-bottom-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

.pd-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 0;
    z-index: 10;
}

.pd-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pd-logo img {
    height: 52px;
    width: auto;
}

.pd-nav-right {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Page Counter - Serif, White, Dimmed */
.pd-page-counter {
    color: var(--pd-white);
    font-family: var(--heading-font);
    font-size: 18px;
    opacity: 0.8;
}

/* --- THE BLACK + RED ARROW BUTTON PATTERN --- */
.btn-pd-black {
    display: inline-flex;
    align-items: center;
    background: var(--pd-black);
    color: var(--pd-white);
    text-decoration: none;
    transition: all 0.3s ease;
    height: 44px;
    border: none;
    cursor: pointer;
}

.btn-pd-text {
    padding: 0 24px;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.btn-pd-icon {
    background: var(--pd-red);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-pd-black:hover {
    background: #222;
}

.btn-pd-black:hover .btn-pd-icon {
    background: var(--pd-red-hover);
}

/* =========================================
   SECTION 1: PROJECT DESCRIPTION
   ========================================= */
.pd-section {
    padding: 100px 0;
}

.pd-main-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 400;
    margin-bottom: 60px;
}

.pd-desc-grid {
    display: grid;
    grid-template-columns: clamp(280px, 25vw, 350px) 1fr;
    gap: clamp(40px, 6vw, 100px);
}

.pd-project-name {
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.pd-project-sub {
    font-family: var(--body-font);
    font-size: 20px;
    color: var(--pd-text-muted);
    margin-bottom: 48px;
    font-weight: 400;
    line-height: 1.6;
}

.pd-meta-grid {
    display: grid;
    gap: 24px;
}

.pd-meta-label {
    display: block;
    font-family: var(--body-font);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--pd-text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.pd-meta-value {
    display: block;
    font-family: var(--body-font);
    font-size: 22px;
    font-weight: 700;
    color: var(--pd-black);
}

.pd-overview-heading {
    font-family: var(--body-font);
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--pd-black);
}

.pd-overview-content p {
    font-family: var(--body-font);
    font-size: 20px;
    font-weight: 400;
    color: var(--pd-text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.pd-desc-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}

.pd-side-nav {
    display: flex;
    gap: 12px;
}

.pd-nav-arrow {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pd-nav-arrow.pd-next {
    background: var(--pd-black);
    border-color: var(--pd-black);
}

.pd-nav-arrow:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Square Red Button System */
.pd-btn-black {
    display: inline-flex;
    align-items: center;
    background: var(--pd-black);
    color: var(--pd-white);
    height: 40px;
    padding: 0;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 28px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pd-btn-text {
    padding: 0 24px;
}

.pd-btn-icon-red {
    background: var(--pd-red);
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-btn-black:hover {
    background-color: #222;
    transform: translateY(-1px);
}

/* Side Nav Arrows */
.pd-side-nav {
    position: absolute;
    right: var(--pd-pad-x-desktop);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 12px;
}

.pd-nav-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--pd-border);
    background: transparent;
    transition: all 0.2s ease;
}

.pd-nav-arrow.pd-next {
    background: var(--pd-black);
    border-color: var(--pd-black);
}

.pd-nav-arrow:hover {
    transform: translateY(-2px);
}

/* =========================================
   SECTION 2: GALLERY
   ========================================= */
.pd-gallery-section {
    padding-bottom: var(--pd-space-lg);
}

.pd-gallery-section {
    padding-bottom: 120px;
}

.pd-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.pd-gallery-item {
    aspect-ratio: 0.75 / 1;
    /* Vertical */
    overflow: hidden;
}

.pd-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);

}

.pd-gallery-item:hover img {
    transform: scale(1.08);
}

.pd-gallery-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 60px;
}

.pd-gallery-progress-wrap {
    flex: 1;
    max-width: 400px;
}

.pd-gallery-progress-bar {
    height: 2px;
    background: #eee;
    width: 100%;
    position: relative;
}

.pd-gallery-progress-fill {
    position: absolute;
    left: 0;
    top: -1px;
    height: 4px;
    background: var(--pd-black);
    width: 33.33%;
    /* Progress example */
}

.pd-gallery-controls {
    display: flex;
    align-items: center;
    gap: 60px;
}

.pd-gallery-arrows {
    display: flex;
    gap: 12px;
}

.pd-g-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.2s;
}

.pd-g-arrow:hover {
    background: #eee;
}

.pd-gallery-meta {
    display: flex;
    align-items: center;
    gap: 24px;
}

.pd-next-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--pd-black);
}

.pd-arrow-thin {
    margin-left: 8px;
    font-weight: 400;
}

.pd-gallery-counter {
    font-family: var(--heading-font);
    font-size: 18px;
    font-style: italic;
    color: var(--pd-text-light);
}

/* =========================================
   SECTION 3: FORM
   ========================================= */
.pd-form-section {
    position: relative;
    padding: 120px 0;
    color: var(--pd-white);
    background: #000;
}

.pd-form-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.pd-form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1;
}

.pd-form-container {
    padding: 0 120px;
    position: relative;
    z-index: 2;
    text-align: center;
}

.pd-form-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 400;
    color: var(--pd-white);
    margin-bottom: 12px;
}

.pd-form-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.pd-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.pd-input-group input,
.pd-input-group select {
    width: 100%;
    height: 52px;
    background: var(--pd-white);
    border: none;
    padding: 0 20px;
    font-size: 14px;
    color: var(--pd-black);
    font-family: var(--body-font);
}

.pd-footer-actions {
    display: flex;
    justify-content: center;
}

/* --- THE RED + BLACK ARROW BUTTON PATTERN --- */
.btn-pd-red {
    display: inline-flex;
    align-items: center;
    background: var(--pd-red);
    color: var(--pd-white);
    text-decoration: none;
    transition: all 0.3s ease;
    height: 48px;
    border: none;
    cursor: pointer;
}

.btn-pd-icon-black {
    background: var(--pd-black);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-pd-red:hover {
    background: var(--pd-red-hover);
}

.pd-submit-btn {
    background: var(--pd-red);
    color: var(--pd-white);
    border: none;
    height: 44px;
    display: inline-flex;
    align-items: center;
    padding-left: 24px;
    padding-right: 4px;
    /* Space for arrow box */
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.pd-submit-btn:hover {
    background: var(--pd-red-hover);
}

.pd-submit-arrow {
    background: rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 16px;
}

/* =========================================
   SECTION 4: FAQ
   ========================================= */
.pd-faq-section {
    padding: var(--pd-space-lg) 0;
}

.pd-faq-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 400;
    margin-bottom: 8px;
}

.pd-faq-subtitle {
    font-size: 15px;
    color: var(--pd-text-muted);
    margin-bottom: 60px;
    border-bottom: 1px solid var(--pd-border);
    padding-bottom: 30px;
}

.pd-accordion {
    max-width: 100%;
}

.pd-accordion-item {
    border-bottom: 1px solid var(--pd-border);
    overflow: hidden;
}

.pd-accordion-header {
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: color 0.3s ease;
}

.pd-accordion-title {
    font-family: var(--heading-font);
    font-size: 20px;
    font-weight: 500;
}

.pd-accordion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--pd-text-muted);
}

.pd-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pd-accordion-content p {
    padding-bottom: 32px;
    font-size: 15px;
    color: var(--pd-text-muted);
    line-height: 1.7;
    max-width: 800px;
}

/* Active State */
.pd-accordion-item.active .pd-accordion-title {
    color: var(--pd-red);
}

.pd-accordion-item.active .pd-accordion-icon {
    transform: rotate(180deg);
    color: var(--pd-red);
}

.pd-accordion-item.active .pd-accordion-content {
    max-height: 200px;
    /* Approximate max height */
}

/* =========================================
   SECTION 5: CTA STRIP
   ========================================= */
.pd-cta-strip {
    background: linear-gradient(90deg, #512DA8 0%, #303F9F 100%);
    padding: 100px 0;
    color: var(--pd-white);
    text-align: center;
}

.pd-cta-heading {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 400;
    color: var(--pd-white);
    margin-bottom: 12px;
}

.pd-cta-sub {
    font-size: 15px;
    margin-bottom: 48px;
    opacity: 0.8;
}

.pd-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pd-cta-btn {
    background: var(--pd-black);
    color: var(--pd-white);
    height: 48px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pd-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* =========================================
   SECTION 6: FOOTER
   ========================================= */
.pd-footer {
    background: var(--pd-navy);
    color: var(--pd-white);
    padding: 80px 0 20px;
}

.pd-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: clamp(40px, 5vw, 80px);
    margin-bottom: 80px;
}

.pd-footer-logo {
    height: 44px;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
    /* Make it white */
}

.pd-footer-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 300px;
}

.pd-socials {
    display: flex;
    gap: 16px;
}

.pd-social-link img {
    height: 20px;
    width: 20px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.pd-social-link:hover img {
    opacity: 1;
}

.pd-footer-heading {
    font-family: var(--font-serif);
    font-size: 20px;
    margin-bottom: 24px;
}

.pd-footer-links {
    list-style: none;
    padding: 0;
}

.pd-footer-links li {
    margin-bottom: 12px;
}

.pd-footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.pd-footer-links a:hover {
    color: var(--pd-white);
}

.pd-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* =========================================
   RESPONSIVE BREAKPOINTS
   ========================================= */

/* Tablet (768px - 1199px) */
@media (max-width: 1024px) {
    .pd-desc-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .pd-side-nav {
        display: none;
    }

    .pd-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .pd-header {
        padding: 20px var(--container-padding);
    }

    .pd-logo img {
        height: 36px;
    }

    .pd-back-text {
        display: none;
    }

    .pd-main-title {
        font-size: clamp(32px, 10vw, 48px);
        margin-bottom: 40px;
    }

    .pd-gallery-grid {
        grid-template-columns: 1fr;
    }

    .pd-form-grid {
        grid-template-columns: 1fr;
    }

    .pd-footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .pd-cta-buttons {
        flex-direction: column;
    }

    .pd-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   NAVBAR — Mobile overrides & Back-to-Home arrow
   ========================================= */

/* Container padding fix: project-details.min.css sets 80px globally,
   override to normal mobile values */
@media (max-width: 768px) {
    :root {
        --container-padding: 16px !important;
        --pad-left: 16px !important;
        --pad-right: 16px !important;
    }

    .pd-container {
        padding: 0 16px !important;
    }

    .pd-form-container {
        padding: 0 16px !important;
    }
}

@media (max-width: 1024px) {
    :root {
        --container-padding: 32px !important;
        --pad-left: 32px !important;
        --pad-right: 32px !important;
    }

    .pd-container {
        padding: 0 32px !important;
    }
}

/* Mobile navbar: arrow+counter on right, logo centered */
@media (max-width: 992px) {
    .pd-hero {
        height: 56vw !important;
        /* R4: Natural landscape aspect ratio — no black bars, content follows below */
        min-height: 220px !important;
    }

    .pd-hero .navbar {
        height: 80px !important;
        padding: 0 !important;
        align-items: center !important;
    }

    .pd-hero .nav-container {
        justify-content: flex-start !important;
        position: relative !important;
        padding: 0 25px !important;
        height: 100% !important;
    }

    .pd-hero .nav-wrapper {
        position: absolute !important;
        right: 25px !important;
        /* R4: Moved to RIGHT side */
        left: auto !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        order: auto !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        background: transparent !important;
        flex-direction: row !important;
        padding: 0 !important;
        box-shadow: none !important;
        z-index: 10 !important;
        overflow: visible !important;
        display: flex !important;
    }

    .pd-hero .nav-cta {
        gap: 8px !important;
    }

    .pd-hero .mobile-menu-btn {
        display: none !important;
    }

    .pd-hero .btn-nav-estimate {
        padding: 0 !important;
        border: none !important;
        min-width: 0 !important;
        background: transparent !important;
    }

    .pd-hero .btn-nav-estimate .btn-text {
        display: none !important;
    }

    .pd-hero .btn-nav-estimate .btn-icon {
        width: auto !important;
        height: auto !important;
        border-radius: 0 !important;
        background: transparent !important;
        /* R4: Fully transparent — no glassmorphism / no circle */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .pd-hero .btn-nav-estimate .btn-icon svg {
        width: 22px !important;
        height: 22px !important;
        stroke: #ffffff !important;
    }

    .pd-page-counter {
        font-size: 0.85rem !important;
        margin-left: 5px;
        color: #fff !important;
    }

    .pd-hero .logo {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
    }

    .pd-hero .logo-img {
        height: 60px !important;
    }

    /* Images fill the slideshow area cleanly — no black bars */
    .pd-hero-img {
        object-fit: cover !important;
        object-position: center !important;
    }
}

.btn-nav-estimate .btn-icon svg {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.btn-nav-estimate:hover .btn-icon svg {
    transform: rotate(0deg);
}

/* Page counter */
.pd-page-counter {
    font-family: 'Inter', sans-serif;
    font-size: 1.23rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.04em;
}

/* =========================================
   PROJECT DESCRIPTION — Layout & Typography
   ========================================= */

/* Giant serif display title */
.pd-main-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(52px, 7vw, 82px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #111;
    margin-bottom: 48px;
}

/* Project name */
.pd-project-name {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #111;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Strict 50/50 two-column layout */
.pd-desc-halves {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 80px !important;
    align-items: start;
}

.pd-desc-halves .pd-desc-right {
    padding-top: 0;
}

/* Mobile description layout */
@media (max-width: 768px) {
    .pd-desc-halves {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    .pd-main-title {
        font-size: 7vw !important;
        white-space: nowrap !important;
        letter-spacing: -0.03em;
        margin-bottom: 24px;
    }

    .pd-project-name {
        white-space: normal !important;
        font-size: 18px !important;
        margin-bottom: 8px;
    }

    .pd-meta-block {
        margin-bottom: 18px;
    }

    .pd-meta-label {
        font-size: 16px !important;
    }

    .pd-meta-value {
        font-size: 18px !important;
    }

    .pd-overview-heading {
        font-size: 22px !important;
        margin-bottom: 14px;
    }

    .pd-overview-content p {
        font-size: 16px !important;
    }

    .btn-pd-black {
        width: 100%;
        margin-bottom: -120px !important;
        /* R4: Reduce gap between button and gallery on mobile */
    }

    .btn-pd-text {
        flex: 1;
        justify-content: center;
        padding: 0 1.2rem !important;
        font-weight: 300 !important;
        /* R4: Reduce font weight on mobile */
    }

    .btn-pd-icon {
        flex-shrink: 0;
        width: 44px !important;
        height: 44px !important;
    }
}

/* =========================================
   REQUEST ESTIMATE BUTTON — Gap-close animation
   ========================================= */
.btn-pd-black {
    display: inline-flex;
    align-items: stretch;
    gap: 8px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-pd-text {
    display: flex;
    align-items: center;
    padding: 0 1.4rem;
    min-height: 44px;
    background: #000000;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 300;
    white-space: nowrap;
    border-radius: 0;
    transition: background 0.3s ease;
}

.btn-pd-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--primary-red);
    border-radius: 0;
    transition: background 0.3s ease;
}

.btn-pd-icon svg {
    transform: rotate(-45deg);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: block;
}

.btn-pd-black:hover {
    gap: 0;
}

.btn-pd-black:hover .btn-pd-text {
    background: var(--primary-red);
}

.btn-pd-black:hover .btn-pd-icon svg {
    transform: rotate(0deg) translateX(2px);
}

/* ==========================================
   PROJECT GALLERY SECTION (REFINED)
   ========================================== */
.pd-gallery-section {
    background-color: #ffffff;
    /* White bg as per image */
    color: #111;
    overflow: hidden;
    padding: 80px 0;
}

.pd-gallery-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.pd-gallery-slider {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 0 20px 40px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.pd-gallery-slider::-webkit-scrollbar {
    display: none;
}

.pd-gallery-item {
    flex: 0 0 calc(33.333% - 14px);
    aspect-ratio: 1 / 1.1;
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
}

.pd-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pd-gallery-item:hover img {
    transform: scale(1.05);
}

.pd-gallery-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0 20px;
    margin-top: 20px;
}

.pd-gallery-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.gallery-nav-btn {
    background: none;
    border: 1.8px solid #9d9d9d;
    color: #111;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.gallery-nav-btn:hover {
    border-color: #9d9d9d;
    background: #ffffff;
}

.next-projects-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1.8px solid #9d9d9d;
    color: #111;
    padding: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
}

.next-projects-btn:hover {
    border-color: #9d9d9d;
    background: #ffffff;
}

.gallery-counter {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    color: #666;
    letter-spacing: 1px;
    min-width: 60px;
    text-align: left;
    margin-bottom: 15px;
}

/* ==========================================
   LIGHTBOX MODAL (RESTORED & REFINED)
   ========================================== */
.pd-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 19, 36, 0.98);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pd-lightbox.is-open {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 48px;
    cursor: pointer;
    z-index: 10001;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lightbox-nav.prev {
    left: 40px;
}

.lightbox-nav.next {
    right: 40px;
}

.lightbox-counter {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 2px;
    font-size: 18px;
}

@media (max-width: 1024px) {
    .pd-gallery-item {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .pd-gallery-item {
        flex: 0 0 85%;
    }

    .pd-gallery-footer {
        justify-content: center;
    }

    .lightbox-nav {
        width: 48px;
        height: 48px;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }
}

/* =========================================
   MOBILE UNIFORM 30px SECTION SPACING
   (project-details.html only, ≤992px)
   ========================================= */
@media (max-width: 992px) {

    /* 1. Gap: Hero image → Project Description (top) */
    .pd-description-section {
        padding-top: 30px !important;
        padding-bottom: 0 !important;
        /* Suppress .pd-section's 100px bottom padding */
        margin-top: 0 !important;
    }

    /* Trim title bottom margin */
    .pd-description-section .pd-main-title {
        margin-bottom: 18px !important;
    }

    /* 2. Gap: Description text → Request Estimate button */
    .pd-desc-actions {
        margin-top: 30px !important;
    }

    /* Remove all margin hacks on the button */
    .pd-desc-actions .btn-pd-black,
    .btn-pd-black {
        margin-bottom: 0 !important;
    }

    /* 3. Gap: Request Estimate button → Gallery images */
    .pd-gallery-section {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
        /* 4b. Gap below arrows */
    }

    /* 4a. Gap: Gallery images → Arrows (above nav buttons) */
    .pd-gallery-footer {
        margin-top: 30px !important;
    }
}

/* =========================================
   DESKTOP 1440px REFINEMENTS (project-details.html)
   ========================================= */
@media (min-width: 1025px) {

    /* Navbar: Hide hamburger and show desktop menu */
    .pd-hero .mobile-menu-btn {
        display: none !important;
    }

    .pd-hero .nav-wrapper {
        display: flex !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .pd-hero .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        gap: clamp(12px, 2vw, 30px) !important;
        margin-bottom: 0 !important;
    }

    /* Desktop Button Transparency & Icon Restoration */
    .pd-hero .btn-nav-estimate .btn-icon {
        background: var(--primary-red) !important;
        background-color: var(--primary-red) !important;
        border: none !important;
        box-shadow: 0 4px 15px rgba(230, 0, 36, 0.2) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .pd-hero .btn-nav-estimate:hover .btn-icon {
        background: var(--primary-red-hover) !important;
        background-color: var(--primary-red-hover) !important;
        box-shadow: 0 8px 25px rgba(230, 0, 36, 0.4) !important;
    }
}

/* ── Success Stories Parity (Synced from styles.css) ── */
@media (min-width: 769px) {
    .success-stories {
        overflow-x: clip;
        background-color: #F4F4F4 !important;
        position: relative;
        z-index: 20;
    }

    .stories-header {
        display: flex;
        align-items: flex-end;
        margin-bottom: 48px;
        gap: 60px;
        justify-content: space-between;
    }

    .stories-header-left {
        flex: 0 0 auto;
        min-width: 320px;
    }

    .stories-header-left .display-title {
        margin-bottom: 1.5rem;
    }

    .stories-header-center {
        flex: 1 1 auto;
        max-width: 800px !important;
    }

    .stories-header-right {
        flex: 0 0 auto;
        display: flex;
        align-items: flex-end;
    }

    .stories-nav {
        display: flex;
        gap: 10px;
    }

    .nav-btn {
        width: 52px;
        height: 52px;
        border: 1px solid #a9a7a7f5;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-bottom: 22px;
    }

    .nav-btn:hover {
        border-color: var(--dark);
        background: var(--dark);
        color: #fff;
    }

    .story-card {
        background: #fff;
        padding: 0;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        flex: 0 0 calc((100vw - var(--pad-left) - var(--pad-right) - 60px) / 3);
        width: calc((100vw - var(--pad-left) - var(--pad-right) - 60px) / 3);
        height: auto;
        min-height: 65vh;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        --story-cut: 96px;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--story-cut)), calc(100% - var(--story-cut)) 100%, 0 100%);
    }

    .story-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    }

    .story-img-wrapper {
        height: auto !important;
        aspect-ratio: 16 / 10;
        /* Enforced for project-details desktop proportions */
        width: 100%;
        overflow: hidden;
    }

    .story-img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .story-card:hover .story-img-wrapper img {
        transform: scale(1.05);
    }

    .story-content {
        padding: clamp(20px, 3vw, 40px);
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .story-title {
        font-family: var(--subheading-font);
        font-size: clamp(1.6rem, 2.2vw, 2.3rem);
        font-weight: 500;
        color: #0a0a0a;
        margin-bottom: 14px;
        line-height: 1.3;
    }

    .meta-row {
        display: flex;
        font-size: clamp(1rem, 1.2vw, 1.34rem);
        margin-bottom: 10px;
        color: #1a1a1a;
        align-items: baseline;
    }

    .meta-label {
        width: 120px;
        font-weight: 700;
        color: #111;
        flex-shrink: 0;
    }

    .meta-sep {
        margin-right: 15px;
        font-weight: 700;
    }

    .meta-val {
        color: #374151;
        font-weight: 400;
    }

    .story-impact {
        font-size: 1.2rem;
        line-height: 1.4rem;
        color: #374151;
        margin-bottom: 30px;
        flex: 1;
    }

    .story-actions {
        display: inline-flex;
        align-items: stretch;
        gap: 8px;
        transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
    }

    .story-actions:hover {
        gap: 0;
    }

    .story-btn-text,
    .story-btn-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        height: 55px;
    }

    .story-btn-text {
        background: #000;
        color: #fff;
        padding: 0 24px;
        font-size: 1.1rem;
        font-weight: 500;
    }

    .story-btn-icon {
        background: #FF0000;
        width: 55px;
    }

    .story-actions:hover .story-btn-text,
    .story-actions:hover .story-btn-icon {
        background: #FF0000 !important;
        color: #fff !important;
    }

    .story-actions:hover .story-btn-icon svg {
        transform: rotate(45deg) translateX(2px);
    }
}

/* MacBook 13/14 Inch Optimizations */
@media (min-width: 1250px) and (max-width: 1440px) {
    .section-desc-small {
        font-size: 0.85rem !important;
    }

    .story-title {
        font-size: 1.5rem !important;
    }

    .meta-row {
        font-size: 0.9rem !important;
    }

    .story-impact {
        font-size: 0.95rem !important;
    }

    .story-btn-text {
        font-size: 0.9rem !important;
    }

    .story-img-wrapper img {
        object-fit: cover !important;
        background-color: #f4f4f4;
    }
}

/* Success Stories Mobile Specific */
@media (max-width: 768px) {
    .stories-header-center {
        max-width: 650px !important;
    }

    .story-img-wrapper {
        height: 240px !important;
    }

    .story-img-wrapper img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
    }
}