/* ==========================================================================
   MAYA GARDEN CORE
   LAYOUT PAGE STYLES
   Ultra-Pro Responsive Layout
   ========================================================================== */


/* ==========================================================================
   GLOBAL LAYOUT SAFETY
   ========================================================================== */

.dwu-layout-wrapper,
.dwu-layout-wrapper *,
.dwu-layout-wrapper *::before,
.dwu-layout-wrapper *::after {
    box-sizing: border-box;
}


/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */

.dwu-layout-hero {
    background-color: #0f172a;
    padding: clamp(6rem, 10vw, 8rem) 0 clamp(4rem, 8vw, 6rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dwu-layout-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(
        circle,
        rgba(37, 99, 235, 0.15) 0%,
        rgba(15, 23, 42, 0) 70%
    );
    z-index: 1;
}

.dwu-layout-hero .dwu-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.dwu-layout-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.dwu-layout-hero h1 span {
    color: #2563eb;
}

.dwu-layout-hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    line-height: 1.7;
    margin: 0 auto;
    font-weight: 400;
}


/* ==========================================================================
   2. MASTER PROJECT LAYOUT
   ========================================================================== */

.dwu-master-layout-section {
    padding: 6rem 0;
    background-color: #f8fafc;
}

.dwu-master-layout-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.1);
    max-width: 1000px;
    margin: 0 auto;
}

.dwu-master-layout-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.2);
}

.dwu-gallery-img {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dwu-gallery-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.dwu-master-layout-card:hover .dwu-gallery-img img {
    transform: scale(1.03);
}

.dwu-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.dwu-master-layout-card:hover .dwu-zoom-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}


/* ==========================================================================
   2.1 LIGHTBOX MODAL
   ========================================================================== */

.dwu-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    cursor: zoom-out;
    padding: 20px;
}

.dwu-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dwu-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.dwu-lightbox-close:hover {
    color: var(--primary-blue);
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


/* ==========================================================================
   3. AUTO-SLIDING LAYOUT SHOWCASE
   ========================================================================== */

.dwu-auto-slider-section {
    --dwu-slide-width: 300px;
    --dwu-slide-height: 200px;
    --dwu-slide-gap: 24px;
    --dwu-loop-distance: 2592px;

    width: 100%;
    padding: 3rem 0;
    background-color: #ffffff;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

.dwu-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.dwu-slider-track {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: max-content;
    gap: var(--dwu-slide-gap);
    padding: 1rem 0;
    margin: 0;
    animation: dwuAutoSlide 30s linear infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.dwu-slide {
    flex: 0 0 var(--dwu-slide-width);
    width: var(--dwu-slide-width);
    min-width: var(--dwu-slide-width);
    max-width: var(--dwu-slide-width);
    height: var(--dwu-slide-height);
    min-height: var(--dwu-slide-height);
    max-height: var(--dwu-slide-height);
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.10);
    flex-shrink: 0;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.dwu-slide:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.18);
    position: relative;
    z-index: 5;
}

.dwu-slider-track:hover {
    animation-play-state: paused;
}

@keyframes dwuAutoSlide {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(calc(var(--dwu-loop-distance) * -1), 0, 0); }
}


/* ==========================================================================
   4. INVENTORY & SIZES MATRIX
   ========================================================================== */

.dwu-sizes-section {
    padding: 6rem 0 8rem 0;
    background-color: #ffffff;
}

/* Main Section Header */
.dwu-section-header {
    text-align: center;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dwu-section-header h2 {
    font-family: var(--font-heading);
    font-size: var(--fs-h2);
    color: var(--dark-navy);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.dwu-section-header p {
    color: #334155;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Sub-Category Headers (Built-up & Plots) */
.dwu-category-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1.5rem;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.dwu-category-header h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
}

.dwu-builtup-title {
    color: var(--primary-blue);
}

.dwu-plots-title {
    color: #10b981;
}

.dwu-category-header p {
    color: #64748b;
    font-size: 1.05rem;
    margin: 0.5rem 0 0 0;
    font-weight: 500;
}

/* Grid System */
.dwu-sizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.dwu-margin-bottom {
    margin-bottom: 6rem;
}

/* Size Cards */
.dwu-size-card {
    background: #f8fafc;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dwu-size-card:hover {
    background: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(37, 99, 235, 0.3);
}

.dwu-size-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--dark-navy);
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.dwu-size-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

/* Grey SCO Badge inside cards */
.dwu-sco-badge {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    background: #e2e8f0;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    transition: background 0.3s ease;
}

/* Custom Approvals Card */
.dwu-size-custom {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.dwu-approved-text {
    font-size: 1.5rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #10b981 !important;
}

/* Hover Effects */
.dwu-size-card:hover .dwu-size-value,
.dwu-size-card:hover .dwu-size-label {
    color: #ffffff !important;
}

.dwu-size-card:hover .dwu-sco-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.dwu-size-custom:hover .dwu-size-value {
    color: #ffffff !important;
}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1024px) {
    .dwu-auto-slider-section {
        --dwu-slide-width: 280px;
        --dwu-slide-height: 190px;
        --dwu-slide-gap: 20px;
        --dwu-loop-distance: 2400px;
    }
    .dwu-slider-track {
        animation-duration: 27s;
    }
}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 767px) {
    .dwu-auto-slider-section {
        --dwu-slide-width: 240px;
        --dwu-slide-height: 165px;
        --dwu-slide-gap: 14px;
        --dwu-loop-distance: 2032px;
        padding: 2.25rem 0;
    }
    .dwu-slider-track {
        animation-duration: 23s;
    }
    .dwu-slider-container {
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    }
}


/* ==========================================================================
   SMALL MOBILE
   ========================================================================== */

@media (max-width: 480px) {
    .dwu-auto-slider-section {
        --dwu-slide-width: 220px;
        --dwu-slide-height: 150px;
        --dwu-slide-gap: 12px;
        --dwu-loop-distance: 1856px;
    }
    .dwu-slider-track {
        animation-duration: 21s;
    }
}


/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .dwu-slider-track {
        animation-play-state: paused;
        transform: translate3d(0, 0, 0);
    }
}