/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-dark: #0a1628;
    --primary-blue: #1e3a5f;
    --accent-blue: #4a90e2;
    --text-light: #ffffff;
    --text-gray: #b0b8c4;
    --card-blue: #2196F3;
    --card-green: #4CAF50;
    --card-red: #F44336;
    --card-gold: #9C8B4E;
    --card-purple: #9C27B0;
    --card-cyan: #00BCD4;
}

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary-dark);
    color: var(--text-light);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    line-height: 1.5;
}

/* Header Styles */
.header {
    flex-shrink: 0;
    min-height: clamp(60px, 5.5vh, 85px);
    background: linear-gradient(180deg, #1e3a5f 0%, #0a1628 100%);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(10px, 1.2vw, 16px);
    padding: clamp(8px, 1vh, 12px) clamp(16px, 2vw, 28px);
    border-bottom: 3px solid #2a4a6f;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.5vw, 18px);
    flex-shrink: 0;
}

.logo {
    width: clamp(45px, 4.5vw, 70px);
    height: clamp(45px, 4.5vw, 70px);
    object-fit: contain;
}

.header-title h1 {
    font-size: clamp(18px, 2vw, 28px);
    font-weight: 700;
    letter-spacing: clamp(1.5px, 0.2vw, 2.5px);
    line-height: 1.2;
}

.header-title p {
    font-size: clamp(9px, 1vw, 13px);
    font-weight: 500;
    color: var(--text-gray);
    letter-spacing: clamp(0.3px, 0.08vw, 1px);
    margin-top: 2px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.time-display {
    text-align: center;
}

.time {
    font-size: clamp(32px, 4vw, 60px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: clamp(-1px, -0.05vw, 0px);
}

.date {
    font-size: clamp(9px, 1vw, 13px);
    font-weight: 500;
    color: var(--text-gray);
    margin-top: clamp(3px, 0.5vh, 6px);
    letter-spacing: clamp(0.3px, 0.08vw, 0.8px);
}

.header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 200px;
}

.weather {
    text-align: right;
    min-width: clamp(120px, 15vw, 180px);
}

.weather-location {
    font-size: clamp(9px, 0.9vw, 12px);
    font-weight: 600;
    color: var(--text-gray);
    letter-spacing: clamp(0.3px, 0.08vw, 0.8px);
}

.weather-info {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 10px);
    justify-content: flex-end;
    margin: clamp(4px, 0.6vh, 7px) 0;
    white-space: nowrap;
}

.weather-icon {
    font-size: clamp(24px, 2.5vw, 38px);
}

.weather-temp {
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 700;
    letter-spacing: clamp(-0.8px, -0.05vw, -0.3px);
}

.weather-desc {
    font-size: clamp(9px, 1vw, 12px);
    color: var(--text-gray);
    white-space: nowrap;
}

.weather-loading {
    color: var(--text-gray);
    font-size: clamp(9px, 1vw, 12px);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: clamp(8px, 1vw, 15px) clamp(12px, 1.5vw, 22px);
    overflow: visible;
}

/* Grid Container */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: clamp(8px, 1vw, 14px);
    flex: 1;
    min-height: clamp(400px, 50vh, 650px);
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: clamp(10px, 2vw, 20px);
    }
    
    .grid-item.blue,
    .grid-item.green,
    .grid-item.red,
    .grid-item.gold,
    .grid-item.purple,
    .grid-item.cyan {
        grid-column: 1 !important;
        grid-row: auto !important;
        min-height: 150px;
    }
    
    .popup-section {
        grid-column: 1 !important;
        grid-row: auto !important;
        min-height: 300px;
    }
    
    .news-slider {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}

.grid-item {
    border-radius: clamp(10px, 1.2vw, 16px);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: clamp(70px, 8vh, 120px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    color: inherit;
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.grid-item:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.grid-item.blue {
    background: linear-gradient(135deg, #0078D4 0%, #005A9E 100%);
    grid-column: 1;
    grid-row: 1;
}

.grid-item.blue:hover {
    background: linear-gradient(135deg, #42A5F5 0%, #1E88E5 100%);
}

.grid-item.green {
    background: linear-gradient(135deg, #00A300 0%, #008A00 100%);
    grid-column: 3;
    grid-row: 1;
}

.grid-item.green:hover {
    background: linear-gradient(135deg, #66BB6A 0%, #43A047 100%);
}

.grid-item.red {
    background: linear-gradient(135deg, #E81123 0%, #C50F1F 100%);
    grid-column: 1;
    grid-row: 2;
}

.grid-item.red:hover {
    background: linear-gradient(135deg, #EF5350 0%, #E53935 100%);
}

.grid-item.gold {
    background: linear-gradient(135deg, #FF8C00 0%, #E07B00 100%);
    grid-column: 3;
    grid-row: 2;
}

.grid-item.gold:hover {
    background: linear-gradient(135deg, #E5C158 0%, #C9A932 100%);
}

.grid-item.purple {
    background: linear-gradient(135deg, #8B008B 0%, #6B006B 100%);
    grid-column: 1;
    grid-row: 3;
}

.grid-item.purple:hover {
    background: linear-gradient(135deg, #AB47BC 0%, #8E24AA 100%);
}

.grid-item.cyan {
    background: linear-gradient(135deg, #00C8FF 0%, #00A8E0 100%);
    grid-column: 3;
    grid-row: 3;
}

.grid-item.cyan:hover {
    background: linear-gradient(135deg, #26C6DA 0%, #00ACC1 100%);
}

/* Sensor Box */
.sensor-grid-box {
    cursor: default;
}

.sensor-box-icon {
    font-size: clamp(50px, 6vw, 80px);
    margin-bottom: clamp(8px, 1vh, 14px);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

.sensor-grid-box:hover .sensor-box-icon {
    transform: scale(1.12);
}

.sensor-box-label {
    font-size: clamp(16px, 2vw, 26px);
    font-weight: 700;
    letter-spacing: clamp(0.5px, 0.08vw, 1.5px);
    text-shadow: 0 2px 6px rgba(0,0,0,0.2);
    line-height: 1.1;
    margin-bottom: clamp(2px, 0.3vh, 5px);
}

.sensor-box-value {
    font-size: clamp(13px, 1.5vw, 20px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: clamp(5px, 0.6vh, 9px);
    opacity: 0.95;
}

.sensor-box-dots {
    display: flex;
    gap: clamp(3px, 0.35vw, 5px);
    justify-content: center;
    flex-wrap: wrap;
}

.sensor-dot {
    width: clamp(5px, 0.55vw, 7px);
    height: clamp(5px, 0.55vw, 7px);
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transition: background 0.4s ease;
}

.sensor-dot.active {
    background: rgba(255,255,255,0.95);
}

.grid-content {
    text-align: center;
    padding: clamp(10px, 1.5vw, 20px);
    position: relative;
    z-index: 1;
}

.grid-icon {
    width: clamp(45px, 5vw, 70px);
    height: clamp(45px, 5vw, 70px);
    margin-bottom: clamp(8px, 1vh, 12px);
    filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.grid-item:hover .grid-icon {
    transform: scale(1.1);
}

.grid-icon-360,
.grid-icon-contact,
.grid-icon-news,
.grid-icon-bus,
.grid-icon-wifi {
    width: clamp(50px, 6vw, 80px);
    height: clamp(50px, 6vw, 80px);
    margin-bottom: clamp(8px, 1vh, 14px);
    filter: drop-shadow(0 clamp(2px, 0.3vw, 4px) clamp(6px, 0.8vw, 12px) rgba(0, 0, 0, 0.25));
    transition: transform 0.3s ease, filter 0.3s ease;
    stroke-width: 1.5;
}

.grid-item:hover .grid-icon-360,
.grid-item:hover .grid-icon-contact,
.grid-item:hover .grid-icon-news,
.grid-item:hover .grid-icon-bus,
.grid-item:hover .grid-icon-wifi {
    transform: scale(1.12);
    filter: drop-shadow(0 clamp(4px, 0.5vw, 6px) clamp(10px, 1.2vw, 16px) rgba(0, 0, 0, 0.35));
}

.grid-item h2 {
    font-size: clamp(16px, 2vw, 26px);
    font-weight: 700;
    letter-spacing: clamp(0.5px, 0.08vw, 1.5px);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    line-height: 1.25;
}

.grid-item:hover h2 {
    transform: scale(1.05);
}

/* Popup Section (Center Area) */
.popup-section {
    grid-column: 2;
    grid-row: 1 / 4;
    position: relative;
    border-radius: clamp(10px, 1.2vw, 16px);
    overflow: hidden;
    min-height: clamp(350px, 40vh, 550px);
    display: flex;
    align-items: stretch;
}

.popup-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: clamp(10px, 1.2vw, 16px);
    background-color: #0a1628;
    pointer-events: none;
}

.carousel-item.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: clamp(14px, 2vw, 25px) clamp(16px, 2.5vw, 30px);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 80%, transparent 100%);
}

.carousel-badge {
    display: inline-block;
    background: #2196F3;
    padding: clamp(4px, 0.6vw, 7px) clamp(10px, 1.2vw, 15px);
    border-radius: clamp(3px, 0.5vw, 5px);
    font-size: clamp(10px, 1.1vw, 13px);
    font-weight: 600;
    margin-bottom: clamp(6px, 0.8vw, 10px);
    text-transform: uppercase;
    letter-spacing: clamp(0.3px, 0.05vw, 0.8px);
}

.carousel-title {
    font-size: clamp(18px, 2.2vw, 30px);
    font-weight: 700;
    margin-bottom: clamp(5px, 0.7vw, 10px);
    line-height: 1.3;
}

.carousel-details {
    font-size: clamp(12px, 1.4vw, 17px);
    color: var(--text-gray);
    line-height: 1.4;
}

/* Info Boxes Below Poster */
.info-boxes {
    grid-column: 2;
    grid-row: 3;
    display: flex;
    gap: clamp(8px, 1vw, 14px);
    align-items: stretch;
}

.info-box {
    flex: 1;
    background: linear-gradient(135deg, #1e3a5f 0%, #0a1628 100%);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.info-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.info-icon {
    width: 24px;
    height: 24px;
    stroke: #fff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
    flex-shrink: 0;
}

.info-box-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.info-status {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 10px);
    margin-bottom: clamp(6px, 0.8vw, 10px);
}

.status-indicator {
    width: clamp(9px, 1.1vw, 13px);
    height: clamp(9px, 1.1vw, 13px);
    border-radius: 50%;
    background: #666;
    box-shadow: 0 0 clamp(6px, 0.8vw, 10px) rgba(0, 0, 0, 0.5);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.status-indicator.open {
    background: #4CAF50;
    box-shadow: 0 0 clamp(10px, 1.2vw, 15px) rgba(76, 175, 80, 0.6);
}

.status-indicator.closed {
    background: #F44336;
    box-shadow: 0 0 clamp(10px, 1.2vw, 15px) rgba(244, 67, 54, 0.6);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.status-text {
    font-size: clamp(13px, 1.5vw, 17px);
    font-weight: 600;
    color: #fff;
}

.info-hours {
    font-size: clamp(11px, 1.3vw, 15px);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

.nameday-content {
    text-align: center;
    padding: clamp(3px, 0.5vw, 6px) 0;
}

.nameday-name {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 700;
    color: #fff;
    margin-bottom: clamp(3px, 0.5vw, 6px);
    line-height: 1.2;
}

.nameday-date {
    font-size: clamp(10px, 1.2vw, 14px);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

/* News Slider */
.news-slider {
    grid-column: 2;
    display: flex;
    gap: clamp(8px, 1vw, 14px);
    margin-top: clamp(8px, 1vw, 14px);
}

@media (max-width: 768px) {
    .news-slider {
        flex-direction: column;
    }
}

.news-card {
    flex: 1;
    border-radius: clamp(10px, 1.2vw, 14px) !important;
    padding: clamp(18px, 2.2vw, 26px) !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.25) !important;
    min-height: clamp(120px, 14vh, 180px);
    display: flex !important;
    flex-direction: column !important;
}

@media (max-width: 768px) {
    .news-card {
        min-width: 100%;
    }
}

.news-card:active {
    transform: scale(0.97);
}

.news-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.news-card.red {
    background: #D32F2F !important;
    background: linear-gradient(135deg, #E53935 0%, #C62828 100%) !important;
}

.news-card.green {
    background: #388E3C !important;
    background: linear-gradient(135deg, #43A047 0%, #2E7D32 100%) !important;
}

.news-card.blue {
    background: #1976D2 !important;
    background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%) !important;
}

.news-card-title {
    font-size: clamp(14px, 1.6vw, 18px);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: clamp(10px, 1.2vw, 16px);
    line-height: 1.3;
    letter-spacing: 1px;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-text {
    font-size: clamp(12px, 1.3vw, 15px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: clamp(14px, 1.6vw, 20px);
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    flex-wrap: wrap;
    gap: clamp(6px, 0.8vw, 10px);
}

.news-card-button {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: clamp(8px, 1vw, 12px) clamp(16px, 2vw, 22px);
    border-radius: clamp(8px, 1vw, 12px);
    font-size: clamp(11px, 1.2vw, 14px);
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}

.news-card-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(3px);
}

.news-card-date {
    display: inline-flex;
    align-items: center;
    gap: clamp(5px, 0.6vw, 7px);
    background: rgba(0, 0, 0, 0.2);
    padding: clamp(6px, 0.8vw, 9px) clamp(10px, 1.2vw, 14px);
    border-radius: clamp(6px, 0.8vw, 10px);
    font-size: clamp(10px, 1.1vw, 13px);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: clamp(12px, 1.4vw, 16px);
    letter-spacing: 0.3px;
}

/* Footer */
.footer {
    flex-shrink: 0;
    min-height: clamp(180px, 20vh, 280px);
    background: linear-gradient(0deg, #0a1628 0%, #1e3a5f 100%);
    border-top: 3px solid #2a4a6f;
    padding: clamp(15px, 2vh, 25px) clamp(20px, 3vw, 35px);
    overflow: visible;
    margin-top: clamp(15px, 2vw, 25px);
}

.emergency-numbers {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: clamp(12px, 1.5vw, 18px);
    margin-bottom: clamp(10px, 1.2vh, 15px);
}

@media (max-width: 1024px) {
    .emergency-numbers {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto;
    }
}

@media (max-width: 768px) {
    .emergency-numbers {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
}

@media (max-width: 480px) {
    .emergency-numbers {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
}

.emergency-item {
    background: #1e3a5f !important;
    background: linear-gradient(135deg, #2a4a7f 0%, #1a2e4f 100%) !important;
    border-radius: clamp(10px, 1.2vw, 14px) !important;
    padding: clamp(16px, 2vw, 24px) clamp(12px, 1.5vw, 18px) !important;
    text-align: center !important;
    border: 1px solid rgba(74, 144, 226, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: clamp(6px, 0.8vw, 10px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    min-height: clamp(80px, 10vh, 120px) !important;
}

.emergency-item:hover {
    background: linear-gradient(135deg, #2a4a7f 0%, #1a2e4f 100%);
    border: 2px solid rgba(74, 144, 226, 0.6) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.emergency-icon {
    font-size: clamp(24px, 3vw, 38px);
    margin-bottom: clamp(6px, 0.8vw, 10px);
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.emergency-text {
    font-size: clamp(10px, 1.2vw, 14px) !important;
    font-weight: 700 !important;
    margin-bottom: clamp(6px, 0.8vw, 10px) !important;
    color: #ffffff !important;
    line-height: 1.3;
    text-transform: uppercase !important;
    letter-spacing: 1px;
}

.emergency-number {
    font-size: clamp(15px, 1.8vw, 20px) !important;
    font-weight: 700 !important;
    color: #4CAF50 !important;
    letter-spacing: clamp(0.5px, 0.08vw, 0.8px);
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.footer-additional {
    display: none;
}

/* Modal Styles */
.modal-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
}

.modal-overlay.active {
    display: flex !important;
}

.modal-content {
    background: linear-gradient(135deg, #0f1f35 0%, #050a14 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: clamp(15px, 2vw, 30px);
    width: 90%;
    max-width: min(900px, 90vw);
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10000 !important;
}

.modal-close {
    position: absolute;
    top: clamp(20px, 2.5vw, 30px);
    right: clamp(20px, 2.5vw, 30px);
    width: clamp(50px, 6vw, 60px);
    height: clamp(50px, 6vw, 60px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: clamp(26px, 3.2vw, 32px);
    cursor: pointer;
    z-index: 10001 !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-close:active {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg) scale(0.95);
}

.modal-body {
    padding: clamp(70px, 8vw, 90px) clamp(30px, 4vw, 60px) clamp(30px, 4vw, 60px) clamp(30px, 4vw, 60px);
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    position: relative;
    z-index: 10000 !important;
}

.modal-body h2 {
    font-size: clamp(20px, 2.5vw, 36px);
    margin-bottom: clamp(20px, 2vw, 30px);
    margin-top: 0;
    text-align: center;
    font-weight: 700;
}

.modal-body p {
    font-size: clamp(14px, 1.5vw, 18px);
    line-height: 1.8;
    margin-bottom: clamp(15px, 1.5vw, 20px);
    color: rgba(255, 255, 255, 1);
}

/* Touch Feedback */
.touch-feedback {
    position: relative;
    overflow: hidden;
}

.touch-feedback::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.touch-feedback:active::after {
    width: 200px;
    height: 200px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zoomIn 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 32px;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.lightbox-close:active {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg) scale(0.95);
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pointer for clickable carousel */
.popup-section .carousel-item {
    cursor: pointer;
}

.popup-section .carousel-item.active:hover {
    transform: scale(1.01);
}