/* ====================================
   RESET & BASE
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f4f8;
    color: #1a202c;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ====================================
   CONTAINER
   ==================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====================================
   HEADER
   ==================================== */
.header {
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    color: white;
    padding: 16px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 28px;
    color: #48bb78;
}

.logo h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo h1 span {
    color: #48bb78;
}

.header-info {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.header-info a {
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.header-info a:hover {
    color: #48bb78;
}

.header-info .phone {
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.btn-demo {
    background: #48bb78;
    color: white !important;
    padding: 8px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
}

.btn-demo:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
    color: white !important;
}

/* ====================================
   MAIN CONTENT
   ==================================== */
.main-content {
    flex: 1;
    padding: 30px 0;
}

/* ====================================
   INFO GRID (CARDS)
   ==================================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: white;
    padding: 24px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-left: 4px solid #48bb78;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.info-card i {
    font-size: 28px;
    color: #48bb78;
    margin-bottom: 10px;
    display: block;
}

.info-card h3 {
    font-size: 16px;
    color: #2d3748;
    margin-bottom: 6px;
    font-weight: 700;
}

.info-card p {
    font-size: 14px;
    color: #718096;
    line-height: 1.5;
}

/* ====================================
   MAP
   ==================================== */
.map-wrapper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

.map-header {
    padding: 16px 24px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.map-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-header h2 i {
    color: #48bb78;
}

.cameras-count {
    font-size: 14px;
    color: #718096;
    background: #edf2f7;
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 600;
}

#map {
    width: 100%;
    height: 500px;
    background: #e2e8f0;
}

/* ====================================
   BALLOON STYLES (Кастомный балун)
   ==================================== */
.balloon-video {
    padding: 5px;
    min-width: 320px;
    max-width: 400px;
}

.balloon-video .camera-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
    color: #1a365d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.balloon-video .open-camera-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.balloon-video .open-camera-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(72, 187, 120, 0.5);
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.balloon-video .open-camera-btn:active {
    transform: translateY(0px);
}

.balloon-video .video-container {
    background: #1a202c;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.balloon-video .video-container video {
    width: 100%;
    display: block;
    background: #000;
}

.balloon-video .video-placeholder {
    color: #a0aec0;
    text-align: center;
    padding: 30px 20px;
}

.balloon-video .video-placeholder i {
    font-size: 40px;
    color: #48bb78;
    display: block;
    margin-bottom: 10px;
}

.balloon-video .video-placeholder .btn-open-vlc {
    display: inline-block;
    background: #48bb78;
    color: white;
    padding: 8px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.balloon-video .video-placeholder .btn-open-vlc:hover {
    background: #38a169;
    transform: scale(1.05);
}

.balloon-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.balloon-info .address {
    font-size: 13px;
    color: #4a5568;
}

.balloon-info .address i {
    color: #e53e3e;
    margin-right: 5px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #48bb78;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.status-badge i {
    font-size: 8px;
}

/* ====================================
   FOOTER
   ==================================== */
.footer {
    background: #2d3748;
    color: #cbd5e0;
    padding: 24px 0;
    margin-top: 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-content p {
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover {
    color: #48bb78;
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 992px) {
    #map {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-info {
        justify-content: center;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    #map {
        height: 350px;
    }
    
    .balloon-video {
        min-width: 280px;
        max-width: 320px;
    }
    
    .map-header {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .balloon-video .open-camera-btn {
        font-size: 13px;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .header-info {
        flex-direction: column;
        width: 100%;
    }
    
    .header-info a {
        width: 100%;
        justify-content: center;
    }
    
    #map {
        height: 300px;
    }
    
    .balloon-video {
        min-width: 240px;
        max-width: 280px;
    }
    
    .balloon-info {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .status-badge {
        justify-content: center;
    }
}
