/* ===================================================================
   BPCL LPG PLANT - IMPROVED MOBILE-FIRST RESPONSIVE CSS
   Fixed: Proper scaling for ALL screen sizes including 4K, 8K, and large LED displays
   Maximum sizes capped for readability on 100-300 inch screens
   =================================================================== */

/* ===== RESPONSIVE FOUNDATION ===== */
:root {
    /* Fluid typography - with maximum caps for large screens */
    --base-font-size: clamp(0.875rem, 0.3vw + 0.7rem, 1.125rem);
    
    /* Spacing system - controlled scaling with caps */
    --space-xs: clamp(0.375rem, 0.25vw + 0.25rem, 0.75rem);
    --space-sm: clamp(0.625rem, 0.35vw + 0.4rem, 1rem);
    --space-md: clamp(1rem, 0.5vw + 0.7rem, 1.5rem);
    --space-lg: clamp(1.25rem, 0.6vw + 0.9rem, 2rem);
    --space-xl: clamp(1.75rem, 0.8vw + 1.2rem, 2.5rem);
    
    /* Border radius - controlled scaling */
    --radius-sm: clamp(0.375rem, 0.2vw + 0.25rem, 0.625rem);
    --radius-md: clamp(0.625rem, 0.25vw + 0.4rem, 0.875rem);
    --radius-lg: clamp(1rem, 0.35vw + 0.7rem, 1.5rem);
    
    /* Shadow system */
    --shadow-sm: 0 2px 4px rgba(0, 51, 102, 0.12);
    --shadow-md: 0 4px 12px rgba(0, 51, 102, 0.16);
    --shadow-lg: 0 8px 24px rgba(0, 51, 102, 0.22);
    --shadow-button: 0 3px 8px rgba(0, 51, 102, 0.3);
}

/* ===== PREVENT HORIZONTAL SCROLL ===== */
html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* ===== BODY BASE ===== */
.home-body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    color: #1e293b;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    font-size: var(--base-font-size);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* ===== HEADER - MOBILE OPTIMIZED ===== */
.home-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: linear-gradient(180deg, #FFD700 0%, #FFE44D 45%, #FFEE7A 100%);
    width: 100%;
    max-width: 100%;
    border-bottom: clamp(2px, 0.3vh, 4px) solid #003366;
    box-shadow: 0 3px 12px rgba(0, 51, 102, 0.25);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Header Logo Section */
.home-header-left {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    order: 1;
}

/* Header Text Section */
.home-header-center {
    text-align: center;
    width: 100%;
    max-width: 100%;
    order: 2;
    padding: 0;
}

/* Header Button Section */
.home-header-right {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    order: 3;
}

/* Logo scaling - Capped for large screens */
.home-logo {
    height: clamp(4rem, 6vh, 7rem);
    width: auto;
    max-width: clamp(6rem, 50vw, 13rem);
    object-fit: contain;
    display: block;
}

.home-logo-left {
    max-width: clamp(8rem, 60vw, 15rem);
}

.home-logo-circle {
    width: clamp(4rem, 6vh, 7rem);
    height: clamp(4rem, 6vh, 7rem);
    border-radius: 50%;
    object-fit: cover;
}

/* Header text - Capped maximum sizes */
.home-heading {
    font-size: clamp(1.5rem, 1.2vw + 1rem, 2.25rem);
    font-weight: 700;
    margin: 0 0 0.2em 0;
    letter-spacing: 0.02em;
    color: #003366;
    text-transform: uppercase;
    line-height: 1.15;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.home-subheading {
    font-size: clamp(0.875rem, 0.6vw + 0.5rem, 1.25rem);
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.03em;
    color: #003366;
    text-transform: uppercase;
    line-height: 1.3;
    opacity: 0.92;
}

/* ===== LOGIN/DASHBOARD BUTTON - CAPPED SCALING ===== */
.home-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 0.35vw + 0.75rem, 1.25rem);
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: clamp(0.7em, 0.5vw + 0.5em, 1em) clamp(1.75em, 1vw + 1.25em, 2.5em);
    border-radius: 999px;
    border: clamp(2px, 0.1vw + 1.5px, 3px) solid #003366;
    background: linear-gradient(180deg, #003366 0%, #002244 100%);
    box-shadow: var(--shadow-button);
    transition: all 0.25s ease;
    white-space: nowrap;
    min-width: clamp(140px, 12vw + 80px, 200px);
    min-height: clamp(48px, 5vh, 60px);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Button shine effect */
.home-header-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.home-header-btn:hover::before {
    left: 100%;
}

.home-header-btn:hover {
    background: linear-gradient(180deg, #0052a3 0%, #003366 100%);
    box-shadow: 0 4px 14px rgba(0, 51, 102, 0.4);
    transform: translateY(-2px) scale(1.02);
    border-color: #0052a3;
}

.home-header-btn:active {
    transform: translateY(0) scale(0.98);
}

/* ===== LAYOUT - MOBILE FIRST ===== */
.home-layout {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    padding: var(--space-sm);
    gap: var(--space-sm);
}

/* ===== LEFT COLUMN - PERMIT CARDS ===== */
.home-main {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    min-height: clamp(350px, 45vh, 600px);
    position: relative;
    overflow: visible;
}

.home-permit-section {
    display: none;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: clamp(350px, 45vh, 600px);
    animation: homeFadeIn 0.4s ease;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 51, 102, 0.15);
}

.home-permit-section.active {
    display: flex;
}

@keyframes homeFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Work type colors */
.home-permit-section.work-type-hot {
    background: linear-gradient(180deg, #fff5f2 0%, #ffede8 100%);
}

.home-permit-section.work-type-cold {
    background: linear-gradient(180deg, #f0f9ff 0%, #e8f4fc 100%);
}

.home-permit-section.work-type-electrical {
    background: linear-gradient(180deg, #fffbeb 0%, #FFFDE7 100%);
}

.home-permit-section.work-type-none,
.home-no-permits {
    background: linear-gradient(180deg, #fffbeb 0%, #FFFDE7 100%);
}

/* ===== PERMIT INFO - CAPPED SIZES ===== */
.home-permit-info {
    flex-shrink: 0;
    padding: var(--space-md);
    width: 100%;
    max-width: 100%;
    border-bottom: 1px solid rgba(0, 51, 102, 0.1);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.home-permit-info-left {
    flex: 1 1 auto;
    min-width: 0;
}

.home-permit-number {
    font-size: clamp(1.5rem, 0.9vw + 1rem, 2.125rem);
    font-weight: 700;
    color: #003366;
    margin-bottom: 0.3em;
    letter-spacing: 0.01em;
    line-height: 1.2;
    word-break: break-word;
}

.home-permit-desc {
    font-size: clamp(1rem, 0.5vw + 0.75rem, 1.375rem);
    color: #1e293b;
    margin: 0 0 0.75em 0;
    line-height: 1.5;
}

.home-permit-meta {
    display: flex;
    flex-direction: column;
    gap: clamp(0.625rem, 0.4vw + 0.4rem, 1rem);
    align-items: flex-start;
}

.home-permit-meta-item {
    font-size: clamp(0.875rem, 0.4vw + 0.65rem, 1.125rem);
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.home-permit-meta-item i {
    color: #003366;
    font-size: 1.15em;
    flex-shrink: 0;
}

.home-permit-meta-item.work-type-badge {
    padding: 0.4em 0.9em;
    border-radius: var(--radius-sm);
    font-size: clamp(0.8rem, 0.4vw + 0.6rem, 1.05rem);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.home-permit-meta-item.work-type-hot {
    background-color: #ffc4b2;
    color: #c2410c;
}

.home-permit-meta-item.work-type-cold {
    background-color: #b3d9f2;
    color: #003366;
}

.home-permit-meta-item.work-type-electrical {
    background-color: #FFE44D;
    color: #8B6914;
}

/* ===== CAROUSEL NAVIGATION BUTTONS - CAPPED SCALING ===== */
.home-permit-carousel-nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 0.7vw + 0.6rem, 1.5rem);
    width: 100%;
    max-width: 100%;
}

.home-permit-carousel-nav-hidden {
    display: none !important;
}

/* Navigation buttons with capped maximum sizes */
.home-permit-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(50px, 2vw + 35px, 65px);
    height: clamp(50px, 2vw + 35px, 65px);
    min-width: 50px;
    min-height: 50px;
    padding: 0;
    border: clamp(2px, 0.15vw + 1.5px, 3px) solid #003366;
    border-radius: 50%;
    background: #ffffff;
    color: #003366;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: clamp(1.25rem, 0.6vw + 0.9rem, 1.625rem);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: visible;
}

.home-permit-nav-btn i {
    font-size: inherit;
    line-height: 1;
    display: block;
    font-weight: 900;
    position: relative;
    z-index: 1;
}

.home-permit-nav-btn::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    padding: 3px;
    background: transparent;
}

.home-permit-nav-btn:hover:not(:disabled) {
    background: #003366;
    color: #ffffff;
    border-color: #003366;
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
}

.home-permit-nav-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.home-permit-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== PHOTO CAROUSEL - CAPPED SIZES ===== */
.home-photo-carousel-wrap {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    padding: 0 var(--space-md) var(--space-md);
    display: flex;
    flex-direction: column;
}

.home-photo-carousel-label {
    font-size: clamp(0.75rem, 0.4vw + 0.55rem, 1rem);
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.6em 0;
}

.home-photo-carousel {
    width: 100%;
    max-width: 100%;
    flex: 1;
    min-height: clamp(200px, 35vh, 500px);
    overflow: hidden;
    background: #003366;
    border-radius: var(--radius-md);
    border: 2px solid rgba(0, 51, 102, 0.25);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
}

.home-carousel-track {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
}

.home-carousel-slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: #003366;
    padding: clamp(8px, 0.6vw + 5px, 14px);
}

.home-carousel-slide.active {
    display: flex;
    z-index: 1;
    animation: homeFadeIn 0.5s ease;
}

.home-carousel-slide img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: clamp(4px, 0.3vw + 2px, 8px);
}

.home-carousel-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(1rem, 0.5vw + 0.75rem, 1.375rem);
    padding: var(--space-lg);
    text-align: center;
    line-height: 1.5;
}

.home-carousel-dots,
.home-permit-dots {
    display: none !important;
}

/* ===== RIGHT COLUMN - MAP PANEL ===== */
.home-bottom-image-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    min-height: clamp(400px, 50vh, 700px);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 51, 102, 0.15);
}

.home-map-panel-label {
    position: relative;
    top: 0;
    left: 0;
    z-index: 1;
    font-size: clamp(0.75rem, 0.4vw + 0.55rem, 1rem);
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.95);
    padding: clamp(0.5rem, 0.5vw + 0.35rem, 0.875rem);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-sm);
    display: inline-block;
    align-self: flex-start;
}

.home-video-view-btn {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    padding: clamp(0.7em, 0.6vw + 0.5em, 1em) clamp(1.2em, 1vw + 0.8em, 1.8em);
    font-size: clamp(0.875rem, 0.4vw + 0.65rem, 1.125rem);
    font-weight: 600;
    color: #fff;
    background: linear-gradient(180deg, #003366 0%, #002244 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.home-video-view-btn:hover {
    background: linear-gradient(180deg, #004080 0%, #003366 100%);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.home-video-view-btn i {
    font-size: 1.1em;
}

.home-bottom-image {
    width: 100%;
    max-width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius-sm);
    padding: var(--space-md);
}

.home-bottom-image img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ===== VIDEO MODAL - CAPPED SIZES ===== */
.home-video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
    background: rgba(0, 51, 102, 0.7);
}

.home-video-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.home-video-modal.is-open .home-video-modal-content {
    transform: scale(1);
}

.home-video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
    cursor: pointer;
}

.home-video-modal-content {
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.home-video-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: #fff;
}

.home-video-modal-title {
    margin: 0;
    font-size: clamp(1.5rem, 0.9vw + 1rem, 2rem);
    font-weight: 700;
    color: #1e293b;
}

.home-video-modal-close {
    width: clamp(44px, 3vw + 30px, 56px);
    height: clamp(44px, 3vw + 30px, 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-size: clamp(1.5rem, 0.7vw + 1rem, 1.75rem);
}

.home-video-modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.home-video-modal-body {
    padding: var(--space-md);
    overflow: auto;
    min-height: 0;
    flex: 1;
}

.home-video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.home-video-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.home-video-card:hover {
    box-shadow: var(--shadow-md);
}

.home-video-card-thumb-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 10;
    background: #003366;
    overflow: hidden;
}

.home-video-card-video {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.home-video-card-video.is-poster,
.home-video-card-video.is-playing {
    display: block;
}

.home-video-card-video.is-playing {
    object-fit: contain;
}

.home-video-card-thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #002244;
}

.home-video-card-loading-text {
    font-size: clamp(0.875rem, 0.4vw + 0.65rem, 1.0625rem);
    color: #94a3b8;
}

.home-video-card-thumb-placeholder.is-hidden {
    display: none;
}

.home-video-card-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(60px, 5vw + 40px, 75px);
    height: clamp(60px, 5vw + 40px, 75px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: #1e293b;
    font-size: clamp(1.75rem, 0.9vw + 1.2rem, 2.125rem);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.home-video-card-play-overlay:hover {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.home-video-card-play-overlay.is-hidden {
    display: none;
}

.home-video-card-play-overlay i {
    margin-left: 0.15em;
}

.home-video-card-controls {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: #003366;
    min-height: clamp(50px, 5vh + 20px, 65px);
}

.home-video-card-btn-play,
.home-video-card-btn-fullscreen {
    width: clamp(40px, 2.5vw + 25px, 50px);
    height: clamp(40px, 2.5vw + 25px, 50px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    font-size: clamp(1.125rem, 0.6vw + 0.8rem, 1.375rem);
}

.home-video-card-btn-play:hover,
.home-video-card-btn-fullscreen:hover {
    background: rgba(255, 255, 255, 0.15);
}

.home-video-card-time {
    flex: 1;
    min-width: 0;
    font-size: clamp(0.875rem, 0.4vw + 0.65rem, 1.0625rem);
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.home-video-card-filename {
    margin: var(--space-sm) var(--space-md) 0;
    font-size: clamp(1rem, 0.45vw + 0.75rem, 1.25rem);
    color: #1e293b;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.home-video-card-filesize {
    margin: clamp(4px, 0.3vw + 2px, 7px) var(--space-md) var(--space-md);
    font-size: clamp(0.8rem, 0.4vw + 0.6rem, 1rem);
    color: #64748b;
}

.home-video-empty {
    margin: 0;
    padding: var(--space-xl);
    text-align: center;
    font-size: clamp(1rem, 0.5vw + 0.75rem, 1.375rem);
    color: #64748b;
}

/* ===== TABLET PORTRAIT (600px+) ===== */
@media (min-width: 600px) {
    .home-header {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    
    .home-header-left {
        width: auto;
        order: 1;
    }
    
    .home-header-center {
        flex: 1;
        order: 2;
        min-width: 0;
    }
    
    .home-header-right {
        width: auto;
        order: 3;
    }
    
    .home-permit-info {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
    
    .home-permit-meta {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .home-permit-carousel-nav {
        width: auto;
    }
    
    .home-video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== TABLET LANDSCAPE (768px+) ===== */
@media (min-width: 768px) {
    .home-header {
        flex-wrap: nowrap;
    }
    
    .home-main {
        min-height: clamp(400px, 50vh, 700px);
    }
    
    .home-permit-section {
        min-height: clamp(400px, 50vh, 700px);
    }
    
    .home-photo-carousel {
        min-height: clamp(250px, 40vh, 550px);
    }
    
    .home-bottom-image-wrap {
        min-height: clamp(350px, 45vh, 700px);
    }
}

/* ===== DESKTOP (1024px+) - TWO COLUMN LAYOUT ===== */
@media (min-width: 1024px) {
    .home-layout {
        flex-direction: row;
        gap: var(--space-lg);
    }
    
    .home-main,
    .home-bottom-image-wrap {
        flex: 1 1 50%;
        max-width: 50%;
        min-height: 0;
        height: 100%;
    }
    
    .home-permit-section {
        height: 100%;
        min-height: 0;
    }
    
    .home-video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .home-map-panel-label {
        position: absolute;
        top: var(--space-md);
        left: var(--space-md);
    }
    
    .home-bottom-image {
        padding: 0;
    }
}

/* ===== LARGE SCREENS (1920px+) - DOUBLED TEXT SIZES ===== */
@media (min-width: 1920px) {
    /* Cap all spacing for large screens - keep original proportions */
    :root {
        --base-font-size: 1.125rem;
        --space-xs: 0.75rem;
        --space-sm: 1rem;
        --space-md: 1.5rem;
        --space-lg: 2rem;
        --space-xl: 2.5rem;
        --radius-sm: 0.625rem;
        --radius-md: 0.875rem;
        --radius-lg: 1.5rem;
    }
    
    /* Fixed maximum sizes for header elements */
    .home-logo {
        height: 7rem;
        max-width: 13rem;
    }
    
    .home-logo-left {
        max-width: 15rem;
    }
    
    .home-logo-circle {
        width: 7rem;
        height: 7rem;
    }
    
    /* DOUBLED header text sizes */
    .home-heading {
        font-size: 4.5rem; /* Doubled from 2.25rem */
    }
    
    .home-subheading {
        font-size: 2.5rem; /* Doubled from 1.25rem */
    }
    
    /* DOUBLED button text */
    .home-header-btn {
        font-size: 2.5rem; /* Doubled from 1.25rem */
        padding: 1em 2.5em;
        min-width: 200px;
        min-height: 60px;
    }
    
    /* Keep original layout structure - don't force equal heights */
    .home-permit-info {
        padding: var(--space-md);
        gap: var(--space-md);
    }
    
    /* DOUBLED permit text sizes */
    .home-permit-number {
        font-size: 4.25rem; /* Doubled from 2.125rem base */
    }
    
    .home-permit-desc {
        font-size: 2.75rem; /* Doubled from 1.375rem base */
    }
    
    .home-permit-meta-item {
        font-size: 2.25rem; /* Doubled from 1.125rem base */
    }
    
    .home-permit-meta-item.work-type-badge {
        font-size: 2.1rem; /* Doubled from 1.05rem base */
    }
    
    /* Navigation buttons with doubled icon size */
    .home-permit-nav-btn {
        width: 65px;
        height: 65px;
        font-size: 3.25rem; /* Doubled from 1.625rem */
    }
    
    /* DOUBLED label text */
    .home-photo-carousel-label,
    .home-map-panel-label {
        font-size: 2rem; /* Doubled from 1rem */
        padding: 0.875rem;
    }
    
    /* DOUBLED video button text */
    .home-video-view-btn {
        font-size: 2.25rem; /* Doubled from 1.125rem */
        padding: 1em 1.8em;
    }
    
    /* DOUBLED modal text */
    .home-video-modal-title {
        font-size: 4rem; /* Doubled from 2rem */
    }
    
    .home-video-modal-close {
        width: 56px;
        height: 56px;
        font-size: 3.5rem; /* Doubled from 1.75rem */
    }
    
    /* DOUBLED video card text and controls */
    .home-video-card-play-overlay {
        width: 75px;
        height: 75px;
        font-size: 4.25rem; /* Doubled from 2.125rem */
    }
    
    .home-video-card-btn-play,
    .home-video-card-btn-fullscreen {
        width: 50px;
        height: 50px;
        font-size: 2.75rem; /* Doubled from 1.375rem */
    }
    
    .home-video-card-controls {
        min-height: 65px;
    }
    
    .home-video-card-time {
        font-size: 2.125rem; /* Doubled from 1.0625rem */
    }
    
    .home-video-card-filename {
        font-size: 2.5rem; /* Doubled from 1.25rem */
    }
    
    .home-video-card-filesize {
        font-size: 2rem; /* Doubled from 1rem */
    }
    
    .home-carousel-empty,
    .home-video-empty {
        font-size: 2.75rem; /* Doubled from 1.375rem */
    }
    
    .home-video-card-loading-text {
        font-size: 2.125rem; /* Doubled */
    }
}

/* ===== 4K AND LARGER (2560px+) - MAINTAIN LAPTOP-LIKE PROPORTIONS ===== */
@media (min-width: 2560px) {
    /* All sizes remain the same as 1920px to maintain readable proportions */
    /* This ensures 4K, 8K, and large LED displays look like scaled-up laptop screens */
    
    /* Optional: Add slightly more padding for ultra-wide screens */
    .home-layout {
        padding: 2rem;
        gap: 2.5rem;
    }
    
    .home-header {
        padding: 1.75rem 2rem;
    }
}

/* ===== LANDSCAPE MOBILE SPECIFIC ===== */
@media (max-width: 767px) and (orientation: landscape) {
    .home-body {
        height: 100vh;
    }
    
    .home-header {
        padding: var(--space-sm) var(--space-md);
    }
    
    .home-logo {
        height: clamp(3rem, 8vh, 8rem);
    }
    
    .home-layout {
        flex-direction: row;
    }
    
    .home-main,
    .home-bottom-image-wrap {
        flex: 1 1 50%;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .home-header-btn,
    .home-permit-carousel-nav,
    .home-video-view-btn {
        display: none !important;
    }
    
    .home-layout {
        display: block;
    }
    
    .home-permit-section {
        page-break-inside: avoid;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-contrast: high) {
    .home-header {
        border-bottom-width: 4px;
    }
    
    .home-permit-section {
        border-width: 2px;
    }
    
    .home-permit-nav-btn {
        border-width: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATION ===== */
@media (hover: none) and (pointer: coarse) {
    .home-header-btn,
    .home-permit-nav-btn,
    .home-video-view-btn,
    .home-video-card-play-overlay {
        min-width: 48px;
        min-height: 48px;
    }
}

/* ===== VERY SMALL SCREENS (< 375px) ===== */
@media (max-width: 374px) {
    .home-heading {
        font-size: 1.25rem;
    }
    
    .home-subheading {
        font-size: 0.8rem;
    }
    
    .home-permit-number {
        font-size: 1.35rem;
    }
    
    .home-permit-meta {
        font-size: 0.8rem;
    }
}