/* DHA Phase — luxury image gallery + fullscreen lightbox */
:root {
    --dha-gal-gold: #c89b3c;
    --dha-gal-dark: #0a0a0a;
    --dha-gal-panel: #111111;
}

.dha-phase-gallery {
    padding: clamp(40px, 5vw, 56px) clamp(20px, 4vw, 40px);
    background: #fff;
}
.dha-phase-gallery__inner {
    max-width: 1400px;
    margin: 0 auto;
}
.dha-phase-gallery__head {
    text-align: center;
    margin-bottom: clamp(28px, 4vw, 40px);
}
.dha-phase-gallery__title {
    margin: 0 0 8px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 600;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.dha-phase-gallery__subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #64748b;
}

.dha-phase-gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.dha-phase-gallery__item {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
}
.dha-phase-gallery__frame {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--dha-gal-panel);
    border: 1px solid rgba(200, 155, 60, 0.45);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.12);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.dha-phase-gallery__frame::before,
.dha-phase-gallery__frame::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    z-index: 2;
    pointer-events: none;
    border-color: var(--dha-gal-gold);
    border-style: solid;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.dha-phase-gallery__frame::before {
    top: 10px;
    left: 10px;
    border-width: 2px 0 0 2px;
}
.dha-phase-gallery__frame::after {
    bottom: 10px;
    right: 10px;
    border-width: 0 2px 2px 0;
}
.dha-phase-gallery__item:hover .dha-phase-gallery__frame {
    border-color: var(--dha-gal-gold);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(200, 155, 60, 0.25);
}
.dha-phase-gallery__item:hover .dha-phase-gallery__frame::before,
.dha-phase-gallery__item:hover .dha-phase-gallery__frame::after {
    opacity: 1;
}
.dha-phase-gallery__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.45s ease;
}
.dha-phase-gallery__item:hover .dha-phase-gallery__frame img {
    transform: scale(1.06);
}
.dha-phase-gallery__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.dha-phase-gallery__overlay svg {
    width: 32px;
    height: 32px;
    color: #fff;
    stroke: #fff;
}
.dha-phase-gallery__item:hover .dha-phase-gallery__overlay {
    opacity: 1;
}

/* Fullscreen lightbox */
.dha-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.dha-gallery-open .main-header {
    z-index: 1 !important;
}
body.dha-gallery-open .floating-contact-actions {
    z-index: 1 !important;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.dha-gallery-lightbox[hidden] {
    display: none !important;
}
.dha-gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}
.dha-gallery-lightbox__shell {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
    background: var(--dha-gal-dark);
}
.dha-gallery-lightbox__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(200, 155, 60, 0.5);
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.9);
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.dha-gallery-lightbox__close:hover {
    background: var(--dha-gal-gold);
    border-color: var(--dha-gal-gold);
    transform: scale(1.05);
}
.dha-gallery-lightbox__close svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}
.dha-gallery-lightbox__stage {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    margin: 48px 56px 12px;
    background: var(--dha-gal-panel);
    border: 1px solid rgba(200, 155, 60, 0.25);
    border-radius: 4px;
    overflow: hidden;
}
.dha-gallery-lightbox__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    background: var(--dha-gal-panel);
}
.dha-gallery-lightbox__counter {
    position: absolute;
    top: 12px;
    left: 16px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(200, 155, 60, 0.35);
    border-radius: 999px;
}
.dha-gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(200, 155, 60, 0.45);
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.85);
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.dha-gallery-lightbox__nav:hover {
    background: var(--dha-gal-gold);
    border-color: var(--dha-gal-gold);
    color: #1a1a1a;
    transform: translateY(-50%) scale(1.06);
}
.dha-gallery-lightbox__nav svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}
.dha-gallery-lightbox__nav--prev { left: 20px; }
.dha-gallery-lightbox__nav--next { right: 20px; }

.dha-gallery-lightbox__thumbs-wrap {
    flex-shrink: 0;
    padding: 12px 8px 4px;
    background: var(--dha-gal-dark);
    border-top: 1px solid rgba(200, 155, 60, 0.2);
}
.dha-gallery-lightbox__thumbs {
    display: flex;
    gap: 10px;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--dha-gal-gold) transparent;
}
.dha-gallery-lightbox__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 54px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    overflow: hidden;
    background: var(--dha-gal-panel);
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.dha-gallery-lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--dha-gal-panel);
}
.dha-gallery-lightbox__thumb:hover {
    opacity: 1;
    border-color: rgba(200, 155, 60, 0.5);
}
.dha-gallery-lightbox__thumb.is-active {
    opacity: 1;
    border-color: var(--dha-gal-gold);
    transform: scale(1.05);
}

body.dha-gallery-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .dha-phase-gallery__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .dha-phase-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .dha-gallery-lightbox__stage {
        margin: 44px 12px 8px;
    }
    .dha-gallery-lightbox__nav {
        width: 40px;
        height: 40px;
    }
    .dha-gallery-lightbox__nav--prev { left: 8px; }
    .dha-gallery-lightbox__nav--next { right: 8px; }
}

@media (max-width: 480px) {
    .dha-phase-gallery__grid {
        grid-template-columns: 1fr;
    }
}
