/* ===================================================================
   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;
    gap: var(--space-sm);
    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: 0 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    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 {
    /* Red (hot) */
    background: linear-gradient(180deg, #fff1f1 0%, #ffd2d2 55%, #ffe8e8 100%);
    border-left: 4px solid #e50000;
}

.home-permit-section.work-type-cold {
    /* Yellow (cold) */
    background: linear-gradient(180deg, #fffdf0 0%, #fffacd 55%, #fff8c5 100%);
    border-left: 4px solid #e6a800;
}

.home-permit-section.work-type-electrical {
    /* Green (electrical) */
    background: linear-gradient(180deg, #f0fff4 0%, #d4ffd4 55%, #dcfce7 100%);
    border-left: 4px solid #15803d;
}

.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: #ffe566;
    color: #7a5200;
}

.home-permit-meta-item.work-type-electrical {
    background-color: #bbf7d0;
    color: #14532d;
}

/* ===== 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-header {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
    font-size: clamp(1rem, 0.35vw + 0.75rem, 1.25rem);
    font-weight: 700;
    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);
    min-width: clamp(140px, 12vw + 80px, 200px);
    min-height: clamp(48px, 5vh, 60px);
}

.home-video-view-btn-header: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-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-map-stage {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.home-map-image-wrap {
    position: relative;
    width: 100%;
}

.home-map-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

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

.home-map-markers {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-map-marker {
    position: absolute;
    width: clamp(14px, 1.2vw + 8px, 26px);
    height: clamp(14px, 1.2vw + 8px, 26px);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 35% 35%, #ffd2d2 0%, #ff4a4a 35%, #e50000 72%, #8f0000 100%);
    border: 2px solid rgba(255, 255, 255, 0.98);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.35),
        0 0 14px rgba(255, 0, 0, 0.85),
        0 0 28px rgba(255, 0, 0, 0.55);
    animation: homeRedBlinkCircle 0.68s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.home-map-marker::before,
.home-map-marker::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px solid rgba(255, 0, 0, 0.75);
    border-radius: 50%;
    opacity: 0;
}

.home-map-marker::before {
    animation: homeRedBlinkRing 1s ease-out infinite;
}

.home-map-marker::after {
    animation: homeRedBlinkRing 1s ease-out 0.28s infinite;
}

.home-map-marker:nth-child(3n) {
    animation-delay: 0.1s;
}

.home-map-marker:nth-child(3n)::before {
    animation-delay: 0.1s;
}

.home-map-marker:nth-child(3n)::after {
    animation-delay: 0.34s;
}

.home-map-marker:nth-child(3n + 1) {
    animation-delay: 0.2s;
}

.home-map-marker:nth-child(3n + 1)::before {
    animation-delay: 0.2s;
}

.home-map-marker:nth-child(3n + 1)::after {
    animation-delay: 0.46s;
}

@keyframes homeRedBlinkCircle {
    0%,
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: saturate(1.15) brightness(1.04);
    }
    45% {
        opacity: 0.75;
        transform: translate(-50%, -50%) scale(0.9);
        filter: saturate(1.35) brightness(1.08);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.12);
        filter: saturate(1.55) brightness(1.2);
    }
}

@keyframes homeRedBlinkRing {
    0% {
        opacity: 0.82;
        transform: scale(0.45);
    }
    100% {
        opacity: 0;
        transform: scale(1.85);
    }
}

/* Cold work type — yellow blinking dot */
.home-map-marker--cold {
    background: radial-gradient(circle at 35% 35%, #fffacd 0%, #ffd700 35%, #e6a800 72%, #8a6200 100%);
    border: 2px solid rgba(255, 255, 255, 0.98);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.35),
        0 0 14px rgba(255, 215, 0, 0.85),
        0 0 28px rgba(255, 215, 0, 0.55);
    animation: homeYellowBlinkCircle 0.68s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.home-map-marker--cold::before,
.home-map-marker--cold::after {
    border-color: rgba(255, 215, 0, 0.75);
    animation: homeYellowBlinkRing 1s ease-out infinite;
}

.home-map-marker--cold::after {
    animation-delay: 0.28s;
}

@keyframes homeYellowBlinkCircle {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: saturate(1.15) brightness(1.04);
    }
    45% {
        opacity: 0.75;
        transform: translate(-50%, -50%) scale(0.9);
        filter: saturate(1.35) brightness(1.08);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.12);
        filter: saturate(1.55) brightness(1.2);
    }
}

@keyframes homeYellowBlinkRing {
    0% {
        opacity: 0.82;
        transform: scale(0.45);
    }
    100% {
        opacity: 0;
        transform: scale(1.85);
    }
}

/* Electrical work type — green blinking dot */
.home-map-marker--electrical {
    background: radial-gradient(circle at 35% 35%, #d4ffd4 0%, #22c55e 35%, #15803d 72%, #064e1a 100%);
    border: 2px solid rgba(255, 255, 255, 0.98);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.35),
        0 0 14px rgba(34, 197, 94, 0.85),
        0 0 28px rgba(34, 197, 94, 0.55);
    animation: homeGreenBlinkCircle 0.68s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}


.home-map-marker--electrical::before,
.home-map-marker--electrical::after {
    border-color: rgba(34, 197, 94, 0.75);
    animation: homeGreenBlinkRing 1s ease-out infinite;
}

.home-map-marker--electrical::after {
    animation-delay: 0.28s;
}

@keyframes homeGreenBlinkCircle {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: saturate(1.15) brightness(1.04);
    }
    45% {
        opacity: 0.75;
        transform: translate(-50%, -50%) scale(0.9);
        filter: saturate(1.35) brightness(1.08);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.12);
        filter: saturate(1.55) brightness(1.2);
    }
}

@keyframes homeGreenBlinkRing {
    0% {
        opacity: 0.82;
        transform: scale(0.45);
    }
    100% {
        opacity: 0;
        transform: scale(1.85);
    }
}

.home-map-zone-label {
    position: absolute;
    left: var(--space-sm);
    bottom: var(--space-sm);
    z-index: 2;
    background: rgba(0, 51, 102, 0.9);
    color: #fff;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: clamp(0.75rem, 0.3vw + 0.6rem, 0.95rem);
    font-weight: 600;
    line-height: 1.3;
    max-width: calc(100% - (2 * var(--space-sm)));
}

.home-map-empty {
    width: 100%;
    height: 100%;
    min-height: clamp(260px, 35vh, 500px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    color: #475569;
    text-align: center;
    padding: var(--space-md);
}

/* ===== 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: 1 1 auto;
        flex-direction: row;
        min-height: 0;
        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 {
        min-height: 100vh;
        height: auto;
    }
    
    .home-header {
        padding: var(--space-sm) var(--space-md);
    }
    
    .home-logo {
        height: clamp(3rem, 8vh, 8rem);
    }
    
    /* Keep phone layout single-column so footer stays at the natural bottom. */
    .home-layout {
        flex-direction: column;
    }
}

/* ===== SAFETY MESSAGES FOOTER (continuous ticker, shield icon between messages) ===== */
.home-safety-footer {
    --safety-marquee-duration: 96s;
    --safety-font: clamp(0.8125rem, 0.55vw + 0.58rem, 1.125rem);
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    border-top: clamp(3px, 0.35vh, 5px) solid #FFD700;
    background: linear-gradient(180deg, #003366 0%, #002244 52%, #001a33 100%);
    box-shadow: 0 -4px 18px rgba(0, 51, 102, 0.38);
    position: relative;
    z-index: 3;
    margin-top: 0;
}

.home-safety-footer-inner {
    width: 100%;
    padding: clamp(0.45rem, 1vh + 0.2rem, 1.1rem) clamp(0.5rem, 2vw + 0.25rem, 2rem);
}

.home-safety-marquee {
    width: 100%;
    min-width: 0;
    min-height: clamp(2.5rem, 5vh + 0.5rem, 4.5rem);
    display: flex;
    align-items: center;
}

.home-safety-marquee-viewport {
    overflow: hidden;
    width: 100%;
    position: relative;
    direction: ltr;
}

/* Flows right-to-left (continuous strip; duplicate loop at -50%) */
.home-safety-marquee-ribbon {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: max-content;
    will-change: transform;
    animation: homeSafetyMarqueeMove var(--safety-marquee-duration) linear infinite;
}

@keyframes homeSafetyMarqueeMove {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(-50%, 0, 0);
    }
}

.home-safety-marquee-track {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 0;
    gap: 0;
    padding-right: clamp(2rem, 5vw, 4rem);
}

/* Single-line messages only (no wrapping); width grows with content for horizontal scroll ticker */
.home-safety-marquee-item {
    flex-shrink: 0;
    align-self: center;
    max-width: none;
    color: #f8fafc;
    font-size: var(--safety-font);
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    word-wrap: normal;
    overflow-wrap: normal;
    hyphens: manual;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

/* Safety symbol between messages (2ch ≈ two spaces each side of icon) */
.home-safety-marquee-sep {
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding-left: 2ch;
    padding-right: 2ch;
    box-sizing: content-box;
    color: #FFE44D;
    font-size: 0.88em;
    line-height: 1;
    opacity: 0.95;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.home-safety-marquee-sep i {
    display: block;
    animation: homeSafetyShieldBlink 2.4s ease-in-out infinite;
}

@keyframes homeSafetyShieldBlink {
    0%,
    100% {
        opacity: 1;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
    }
    50% {
        opacity: 0.42;
        filter: drop-shadow(0 0 5px rgba(255, 228, 77, 0.55));
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-safety-marquee-sep i {
        animation: none !important;
    }
}

@media (min-width: 480px) {
    .home-safety-footer {
        --safety-font: clamp(0.85rem, 0.5vw + 0.65rem, 1.2rem);
    }
}

@media (min-width: 769px) {
    .home-safety-footer {
        --safety-marquee-duration: 112s;
        --safety-font: clamp(1rem, 0.85vw + 0.75rem, 1.65rem);
    }

    .home-safety-marquee-viewport {
        mask-image: linear-gradient(
            90deg,
            transparent,
            #000 min(20px, 2.5vw),
            #000 calc(100% - min(20px, 2.5vw)),
            transparent
        );
        mask-size: 100% 100%;
        -webkit-mask-image: linear-gradient(
            90deg,
            transparent,
            #000 min(20px, 2.5vw),
            #000 calc(100% - min(20px, 2.5vw)),
            transparent
        );
    }
}

/* Large screens: bigger tab gap, slower scroll, generous row height */
@media (min-width: 900px) {
    .home-safety-marquee {
        min-height: clamp(2.65rem, 5vh, 4rem);
    }

    .home-safety-marquee-viewport {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }

    .home-safety-footer-inner {
        padding-left: 0;
        padding-right: 0;
        padding-top: clamp(0.55rem, 1.1vh, 1.15rem);
        padding-bottom: clamp(0.55rem, 1.1vh, 1.15rem);
    }
}

/* Large / LED / 4K — slow scroll, keep readable caps */
@media (min-width: 1440px) {
    .home-safety-footer {
        --safety-marquee-duration: 144s;
        --safety-font: clamp(1.75rem, 0.75vw + 1.35rem, 3rem);
    }
}

@media (min-width: 1920px) {
    .home-safety-footer {
        --safety-marquee-duration: 152s;
        --safety-font: clamp(2rem, 0.65vw + 1.5rem, 3.5rem);
    }
}

@media (min-width: 2560px) {
    .home-safety-footer {
        --safety-marquee-duration: 168s;
        --safety-font: clamp(2.1rem, 0.55vw + 1.6rem, 4rem);
    }
}

@media (min-width: 3840px) {
    .home-safety-footer {
        --safety-marquee-duration: 176s;
        --safety-font: clamp(2.25rem, 0.45vw + 1.75rem, 4.75rem);
    }
}

@media (min-width: 5120px) {
    .home-safety-footer {
        --safety-marquee-duration: 184s;
        --safety-font: clamp(2.5rem, 0.38vw + 1.85rem, 5.25rem);
    }
}

@media (max-width: 374px) {
    .home-safety-footer {
        --safety-marquee-duration: 112s;
        --safety-font: clamp(0.78rem, 2.8vw + 0.35rem, 0.95rem);
    }
}

/* ===== 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;
    }

    /* Footer ticker: static wrapped text instead of motion (overrides global rule above) */
    .home-safety-marquee-ribbon {
        animation: none !important;
        flex-wrap: wrap;
        width: 100% !important;
        max-width: 100%;
        justify-content: center;
        transform: none !important;
        row-gap: 0.35rem;
    }

    .home-safety-marquee-track--duplicate {
        display: none !important;
    }

    .home-safety-marquee-track {
        flex-wrap: wrap;
        justify-content: center;
        white-space: normal;
        padding-right: 0;
        text-align: center;
        gap: 0.35rem 0.75rem;
    }

    .home-safety-marquee-item {
        white-space: nowrap !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding-left: clamp(0.5rem, 2vw, 1rem) !important;
        padding-right: clamp(0.5rem, 2vw, 1rem) !important;
    }

    .home-safety-marquee-viewport {
        overflow-x: auto;
        mask-image: none;
        -webkit-mask-image: none;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !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;
    }
}