/* 
   SINGLE PROJECT V4 
   - New 6-Image Grid for 3D Designs
   - Swiper Slider for Construction
   - Custom Swiper Lightbox
*/

:root {
    --bg-dark: #0c1010;
    --accent-green: #31d256; /* Brand Green */
    --accent-hover: #2fb74f; /* Hover Green */
    --accent-text: #2fb74f;  /* Text Green */
    --text-dim: #bdbdbd;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius-lg: 0px;
    --radius-xl: 0px;
}

body.single-project-kgx {
    background-color: var(--bg-dark);
    color: #fff;
    overflow-x: hidden;
}

/* Fix: Show #main-content but make it full-width for projects */
.single-project-kgx #main-content {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide Default Sahifa Post Elements */
.single-project-kgx .post-title,
.single-project-kgx .post-meta,
.single-project-kgx .post-inner,
.single-project-kgx #sidebar,
.single-project-kgx .post-bottom-meta,
.single-project-kgx .post-navigation,
.single-project-kgx .page-head,
.single-project-kgx #comments {
    display: none !important;
}

.project-page-v2 {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.section {
    padding: 60px 0;
    background: #0f0f0f;
}

section:nth-of-type(odd) {
  background: #111;
}

.container--full {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
}

/* HERO SECTION — Mobile theme: always stacked layout */
.hero {
    position: relative;
    height: auto;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    background: #000;
    overflow: hidden;
}

.hero-video-bg, .hero-slider-bg, .hero-static-bg {
    position: relative;
    width: 100%;
    height: 56vw;
    min-height: 240px;
    max-height: 420px;
    object-fit: cover;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    opacity: 0.7;
}

div.hero-video-bg {
    position: relative;
    overflow: hidden;
}

.project-hero-youtube-bg {
    position: absolute !important;
    top: 50%;
    left: 50%;
    width: auto !important;
    height: auto !important;
    min-width: 100%;
    min-height: 100%;
    padding: 0 !important;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.project-hero-youtube-bg--16-9 {
    aspect-ratio: 16 / 9;
}

.project-hero-youtube-bg iframe,
.hero-video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.hero-video {
    object-fit: cover;
}

.hero-inner {
    position: relative;
    z-index: 10;
    margin: 0 auto;
    padding: 24px 20px 28px;
    display: flex;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
}

.hero-left {
    padding-top: 0;
}

.hero-title {
    margin: 0;
    max-width: 900px;
    font-size: clamp(24px, 6vw, 36px);
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-title span {
    color: var(--accent-text);
}

.hero-info-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    background: rgba(26, 26, 26, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 16px;
    margin-top: 20px;
    border-radius: 0px;
    transition: 0.3s ease;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    white-space: normal;
}

.info-item:hover {
    border-color: var(--accent-hover);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.02);
}

.info-item i {
    font-size: 20px;
    color: var(--accent-green);
    transition: 0.3s ease;
}

.info-item:hover i {
    color: var(--accent-hover);
    transform: scale(1.1);
}

.info-item p {
    margin: 0;
    font-size: 10px;
    text-transform: uppercase;
    color: #bdbdbd;
    letter-spacing: 1px;
}

.info-item strong {
    font-size: 15px;
    color: #fff;
    font-weight: 700;
    line-height: 1.4;
}

.hero-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-actions .btn {
    min-height: 48px;
    padding: 0 20px;
    font-size: 12px;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 10px;
    letter-spacing: 3px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

.scroll-mouse {
    color: var(--accent-text);
    animation: bounce 2s infinite;
    font-size: 16px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-8px);}
    60% {transform: translateY(-4px);}
}

/* Hero Preview */
.preview-shell {
    position: relative;
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 0px;
}

.preview-card {
    background: #151a1a;
    border-radius: 0px;
    overflow: hidden;
    position: relative;
}

.preview-meta {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.preview-tag { color: var(--accent-green); font-weight: 600; }

.preview-visual img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.preview-visual:hover img { transform: scale(1.05); }

/* OVERVIEW SECTION */
.overview {
    padding: 48px 0;
    background: #0f0f0f;
    scroll-margin-top: 64px;
}

.overview-grid {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    gap: 20px;
    flex-direction: column;
}

.overview-sticky {
    position: relative;
}

.eyebrow {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: block;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.line-accent {
    width: 60px;
    height: 4px;
    background: var(--accent-green);
    margin-bottom: 32px;
}

.overview-content {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.overview-content h1,
.overview-content h2,
.overview-content h3,
.overview-content h4,
.overview-content h5 {
    font-weight: 600;
}

.overview-content h2 {
    font-size: 24px;
    line-height: 1.4;
    margin-top: 48px;
    margin-bottom: 16px;
}

.overview-content h3 {
    font-size: 20px;
    line-height: 1.4;
    margin-top: 36px;
    margin-bottom: 12px;
}

.overview-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
}

/* WordPress Block Gallery inside overview */
.overview-content .wp-block-gallery {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    gap: 8px;
}

.overview-content .wp-block-gallery .wp-block-image {
    margin: 0;
}

.overview-content .wp-block-gallery .wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 0;
    border-radius: 4px;
}

.overview-content figure.wp-block-gallery {
    max-width: 100% !important;
}

/* IMAGE GRID (ẢNH THIẾT KẾ) — Mobile: 2 columns */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    gap: 12px;
    margin-top: 30px;
}

.gallery-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #1a1f1f;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
    display: block;
}

/* No spanning on mobile — all cards equal */
.gallery-card:nth-child(1) {
    grid-column: auto;
    grid-row: auto;
}

/* Hide after 6th image */
.gallery-card-item:nth-child(n+7) {
    display: none;
}

.gallery-info {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 30px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-info { opacity: 1; }

.zoom-chip {
    padding: 8px 12px;
    background: var(--accent-green);
    border-radius: 0px;
}

/* CONSTRUCTION SWIPER SLIDER */
.construction-section {
    padding: 48px 0;
    overflow: hidden; /* Prevent horizontal scroll on body */
}

.construction-slider {
    padding: 20px 0 50px;
    width: 100%;
}

/* Offset the first slide to align with the container's 1440px edge */
@media (min-width: 1520px) {
    .construction-slider {
        padding-left: calc((100% - 1440px) / 2 + 40px);
    }
}
@media (max-width: 1519px) and (min-width: 769px) {
    .construction-slider {
        padding-left: 40px;
    }
}
@media (max-width: 768px) {
    .construction-slider {
        padding-left: 20px;
    }
}

.construction-slide {
    width: 450px !important; /* Force 450px */
    border-radius: 0px;
    overflow: hidden;
    background: #111;
    cursor: pointer;
}

.const-img-box {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #151515;
}

.const-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.const-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 26px 24px;
    background: linear-gradient(180deg, rgba(12, 16, 16, 0) 0%, rgba(12, 16, 16, 0.82) 42%, rgba(12, 16, 16, 0.96) 100%);
    pointer-events: none;
}

.const-meta h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.const-meta p {
    font-size: 13px;
    color: var(--text-dim);
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.slider-nav {
    display: flex;
    gap: 12px;
    margin-top: 0px; /* Aligned in flex header now */
}

.slider-btn {
    width: 50px;
    height: 50px;
    border: 1px solid var(--glass-border);
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.slider-btn:hover {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

/* CUSTOM LIGHTBOX MODAL (SWIPER) */
.swiper-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.95);
    display: none;
    align-items: center;
    justify-content: center;
}

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

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

.lightbox-container {
    width: 100%;
    height: 80vh;
}

.swiper-slide.lightbox-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* PRODUCT SECTION & CTA (Previous versions but polished) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 50px;
}

.product-card {
    background: var(--glass-bg);
    border-radius: 0px;
    padding: 16px;
    text-align: center;
    transition: transform 0.3s;
}

.product-card:hover { transform: translateY(-5px); }

.product-image { height: 200px; border-radius: 0px; overflow: hidden; margin-bottom: 16px; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }

.cta {
    position: relative;
    overflow: hidden;
    padding: 48px 20px;
    background: linear-gradient(180deg, #0d1111 0%, #0f1a14 50%, #0d1111 100%) !important;
    text-align: left;
}

.cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: -20%;
    width: 140%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 0%, rgba(47, 155, 72, 0.12) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.cta-box {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    backdrop-filter: none;
    box-shadow: none;
}

.cta-box .eyebrow {
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
    display: block;
}

.cta-box h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
}

.cta-box h2 span { color: var(--accent-green); }

.cta-box p,
.cta-box .cta-description {
    margin: 14px 0 0;
    color: #a0a8a2;
    font-size: 14px;
    line-height: 1.6;
}

.cta-box .cta-description p {
    margin: 0;
}

.cta-actions {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cta-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    font-size: 13px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 32px;
    border-radius: 0px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.25s ease;
}

.btn-primary {
    background: var(--accent-green);
    color: #fff;
    box-shadow: 0 0 32px rgba(36, 241, 83, 0.22);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(47, 155, 72, 0.35);
}

.btn-outline { 
    border: 1px solid rgba(255, 255, 255, 0.28); 
    color: #fff; 
}

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

/* RESPONSIVE */
@media (max-width: 1024px) {
    .overview-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .overview {
        padding: 60px 0;
    }

    .section-title {
        font-size: 24px;
    }
    /* Already 2-col in base CSS, no change needed */
    
    .view-all-btn {
        display: block;
        width: 100%;
        margin-top: 30px;
        text-align: center;
        padding: 16px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 0px;
    }

    .cta-box {
        padding: 48px 20px;
    }

    .construction-slide {
        width: 82vw !important;
        max-width: 450px;
    }

    .const-img-box {
        height: 420px;
    }

    .const-meta {
        padding: 20px 20px 18px;
    }

    .const-meta h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
