/* ============================================
   ONLINE КЛИНИКА «ВРАЧ РЯДОМ»
   Стили главной страницы
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

:root {
    --nav-top: 14px;
    --nav-height: 36px;
    --nav-gap: 12px;
    --time-gap: 10px;
    --time-height: 56px;
    --header-height: calc(var(--nav-top) + var(--nav-height) + var(--time-gap) + var(--time-height) + 12px);
    --card-shift: clamp(24px, 4vw, 64px);
    --card-padding: clamp(18px, 3vw, 32px);
    --card-gap: clamp(10px, 2vw, 18px);
    --card-title-size: clamp(22px, 3.2vw, 38px);
    --card-text-size: clamp(12px, 1.6vw, 15px);
    --card-line-height: 1.45;
    --slogan-size: clamp(14px, 1.8vw, 18px);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* ============================================
   СЛОЙ 1: ОСНОВНОЙ ФОН
   ============================================ */

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #4A90E2; /* Чистый голубой, без серого */
    z-index: 1;
}

/* ============================================
   СЛОЙ 2: АНИМАЦИОННЫЙ МЕДИЦИНСКИЙ ДОЖДЬ
   ============================================ */

#rainCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Применяется на всех страницах */
body canvas#rainCanvas {
    z-index: 2;
}

/* ============================================
   СЛОЙ 3: НАВИГАЦИОННАЯ ПАНЕЛЬ
   ============================================ */

.nav-panel {
    position: fixed;
    top: var(--nav-top);
    left: 0;
    right: 0;
    transform: none;
    display: flex;
    gap: var(--nav-gap);
    z-index: 4;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    height: var(--nav-height);
    padding: 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
}

.nav-btn {
    height: var(--nav-height);
    padding: 0 24px;
    border-radius: 18px;
    border: 1px solid rgba(198, 40, 40, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: #C62828; /* КРАСНЫЙ */
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    flex: 0 0 auto;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.nav-btn:hover {
    background: rgba(198, 40, 40, 0.2);
    color: #ffffff;
    border-color: rgba(198, 40, 40, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(198, 40, 40, 0.4);
}

.nav-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   СЛОЙ 4: СЕРВЕРНОЕ ВРЕМЯ
   ============================================ */

.server-time {
    position: fixed;
    top: calc(var(--nav-top) + var(--nav-height) + var(--time-gap));
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    text-align: center;
    margin-top: 0;
    min-height: var(--time-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.time-display {
    font-size: clamp(20px, 3vw, 32px);
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.date-display {
    font-size: clamp(12px, 1.6vw, 16px);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* ============================================
   СЛОЙ 5: ЦЕНТРАЛЬНЫЙ ИНФОРМАЦИОННЫЙ МОДУЛЬ
   ============================================ */

.central-card {
    position: fixed;
    top: calc(50% + (var(--header-height) / 2) - var(--card-shift));
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 720px;
    padding: var(--card-padding);
    background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.14));
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.25);
    z-index: 3;
    color: #0b1a3a;
    line-height: var(--card-line-height);
    max-height: calc(100vh - var(--header-height) - 24px);
    overflow-y: auto;
    text-align: center;
}

.central-card::-webkit-scrollbar {
    width: 8px;
}

.central-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.central-card::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: var(--card-title-size);
    font-weight: 700;
    margin-bottom: var(--card-gap);
    text-align: center;
    color: #0b1a3a;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.card-section {
    margin-bottom: var(--card-gap);
    text-align: center;
}

.card-text {
    font-family: 'Inter', sans-serif;
    font-size: var(--card-text-size);
    color: #0b1a3a;
    font-weight: 400;
    line-height: var(--card-line-height);
    margin: 0 0 4px 0;
}

.card-text strong {
    font-weight: 600;
}

.card-slogan {
    margin: calc(var(--card-gap) - 2px) auto 0;
    text-align: center;
    display: inline-block;
    background: rgba(255, 255, 255, 0.72);
    padding: 8px 16px;
    border-radius: 12px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.1);
}

.card-footer {
    margin-top: calc(var(--card-gap) / 1.4);
    font-size: clamp(11px, 1.4vw, 13px);
    color: rgba(11, 26, 58, 0.8);
    display: grid;
    gap: 6px;
}

.card-flags {
    display: inline-flex;
    justify-content: center;
    gap: 8px;
    font-size: clamp(14px, 2vw, 18px);
}

.slogan-text {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: var(--slogan-size);
    font-weight: 700;
    color: #C62828;
    line-height: 1.25;
    margin: 0;
    text-shadow: 0 2px 10px rgba(198, 40, 40, 0.35);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 768px) {
    :root {
        --nav-top: 10px;
        --nav-height: 32px;
        --nav-gap: 8px;
        --time-gap: 8px;
        --time-height: 48px;
        --header-height: calc(var(--nav-top) + var(--nav-height) + var(--time-gap) + var(--time-height) + 10px);
    }

    .nav-panel {
        padding: 0 10px;
    }
    
    .nav-btn {
        height: 32px;
        padding: 0 16px;
        font-size: 13px;
    }
    
    .time-display {
        font-size: 24px;
    }
    
    .date-display {
        font-size: 14px;
    }
    
}

@media (max-width: 480px) {
    :root {
        --nav-top: 6px;
        --nav-height: 28px;
        --nav-gap: 4px;
        --time-gap: 6px;
        --time-height: 42px;
        --header-height: calc(var(--nav-top) + var(--nav-height) + var(--time-gap) + var(--time-height) + 10px);
    }

    .nav-btn {
        height: 28px;
        padding: 0 10px;
        font-size: 11px;
    }
    
    .time-display {
        font-size: 20px;
    }
    
    .date-display {
        font-size: 12px;
    }

}
