﻿/* =========================================
   style.css — стили для сайта ГКП «Костанай-СУ»
   Светлая и тёмная тема, адаптив, карта, карточки
   ========================================= */

/* --- Root variables --- */
:root {
    /* Брендовые */
    --brand: #0b3b5c;
    --accent: #0f6b9a;
    --danger: #dc3545;
    /* Цвета интерфейса */
    --bg: #f6f8fb;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #6b7280;
    --inverse: #ffffff;
    --card-bg: #e0e0e0;
    /* Спец */
    --highlight: #fff176;
    --footer-bg: #0b1220;
    --footer-text: #dfeeff;
    /* Эффекты */
    --shadow: 0 6px 18px rgba(16,24,40,0.06);
    --border: rgba(15,23,42,0.06);
    --focus: rgba(15,107,154,0.12);
}

/* --- Base resets --- */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    transition: background .3s ease, color .3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Элегантный шрифт для заголовков === */
h1, h2, h3, .navbar-brand, .nav-link {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    letter-spacing: 0.3px;
}

a {
    color: var(--brand);
    text-decoration: none;
}

/* --- Topbar --- */
.topbar {
    background: linear-gradient(90deg, var(--brand), var(--accent));
    color: var(--inverse);
    padding: .35rem 0;
    font-size: .9rem;
}

    .topbar .contact-quick a {
        color: inherit;
    }

/* --- Skip link --- */
.skip-link {
    position: absolute;
    left: -9999px;
}

.visually-hidden-focusable:focus {
    position: static;
    left: auto;
}

/* --- Navbar --- */
header {
    background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.navbar {
    background: transparent !important;
    border: none !important;
    padding: .6rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
}

.logo-img {
    height: 100px;
    max-height: 140px;
    width: auto;
    margin-bottom: .5rem;
}

header h1 {
    font-size: 1.25rem;
}

header p.small {
    font-size: 0.9rem;
}

@media (min-width: 1200px) {
    .logo-img {
        height: 120px;
    }

    header h1 {
        font-size: 1.5rem;
    }
}

.brand-title {
    font-weight: 700;
    color: var(--brand);
}

.brand-sub {
    color: var(--muted);
}

.navbar-collapse {
    flex: 1;
    display: flex;
    justify-content: center;
}

.navbar-nav {
    display: flex;
    gap: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

    .navbar-nav .nav-link {
        color: var(--inverse) !important;
        padding: .6rem 1rem;
        border-radius: 6px;
        transition: all .25s ease;
    }

        .navbar-nav .nav-link:hover,
        .navbar-nav .nav-link.active {
            background: rgba(255,255,255,0.15);
            color: #fff !important;
        }

/* --- Кнопка-бургер --- */
.navbar-toggler {
    border: none;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: .35rem .6rem;
}

/* --- Search & Lang --- */
.search-lang {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: 1rem;
}

    .search-lang form {
        flex-grow: 1;
        max-width: 400px;
    }

    .search-lang input[type="search"] {
        width: 100%;
        font-size: 0.95rem;
        padding: 0.4rem 0.6rem;
    }

    .search-lang .btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.85rem;
    }

/* универсальные стеклянные кнопки */
.btn-glass {
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    color: var(--inverse);
    transition: all .25s ease;
}

    .btn-glass:hover {
        background: rgba(255,255,255,0.25);
    }

#siteSearch {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: .35rem .6rem;
    margin-bottom: .4rem;
    background: #fff; /* белый фон */
    color: #000; /* черный текст */
    font-size: 0.9rem; /* чтобы текст был читаемым */
}

/* --- Dropdown Language Switch --- */
.dropdown .btn-lang {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    transition: all 0.25s ease;
}

    .dropdown .btn-lang:hover,
    .dropdown .btn-lang:focus {
        background: var(--brand);
        border-color: var(--brand);
        color: #fff;
    }

.dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.dropdown-item:hover {
    background: var(--accent);
    color: #fff;
}

/* --- Hero --- */
.hero {
    padding: 3.5rem 0;
    background: linear-gradient(180deg, rgba(11,59,92,0.04), transparent);
}

.display-5 {
    color: var(--brand);
}

.lead {
    color: var(--muted);
}

/* --- Service cards --- */
.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: var(--card-bg);
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    color: var(--brand);
}

    /* Иконка внутри кружка */
    .service-card i {
        font-size: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 70px;
        height: 70px;
        border-radius: 50%;
        background: #f1f1f1;
        margin-bottom: 10px;
        transition: all 0.3s ease;
    }

    /* Текст */
    .service-card span {
        margin-top: 5px;
        display: block;
    }

/* Ховер — подсветка кружка */
.hover-blue:hover i {
    background: rgba(0, 123, 255, 0.15);
    color: #0d6efd;
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(13, 110, 253, 0.5);
}

.hover-green:hover i {
    background: rgba(25, 135, 84, 0.15);
    color: #198754;
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(25, 135, 84, 0.5);
}

.hover-purple:hover i {
    background: rgba(111, 66, 193, 0.15);
    color: #6f42c1;
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(111, 66, 193, 0.5);
}

.hover-orange:hover i {
    background: rgba(253, 126, 20, 0.15);
    color: #fd7e14;
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(253, 126, 20, 0.5);
}


/* --- Lists --- */
ul li {
    margin: .35rem 0;
}

.list-unstyled li a {
    color: var(--brand);
}

.card .list-unstyled li {
    padding: .2rem 0;
    border-bottom: 1px dashed var(--border);
}

/* --- Map --- */
#map {
    width: 100%;
    height: 320px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: opacity 0.5s ease;
}

    #map.leaflet-container {
        opacity: 1;
    }

.map-legend {
    background: rgba(255,255,255,0.95);
    padding: .5rem;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    font-size: .9rem;
}

    .map-legend .item {
        display: flex;
        align-items: center;
        gap: .5rem;
        margin-bottom: .3rem;
    }

/* --- News grid --- */
#newsGrid .card {
    height: 100%;
}

#newsGrid .card-body {
    display: flex;
    flex-direction: column;
}

    #newsGrid .card-body .mt-auto {
        margin-top: auto;
    }

/* --- Footer --- */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
}

    .footer a {
        color: var(--footer-text);
    }

        .footer a:hover {
            color: #fff;
            text-decoration: underline;
        }

/* --- Buttons --- */
.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

    .btn-outline-primary:hover {
        background: var(--brand);
        color: var(--inverse);
    }

/* --- Highlights --- */
.highlight {
    background: yellow;
    padding: 0 2px;
    border-radius: 2px
}

/* --- Utils --- */
.small {
    font-size: .9rem;
}

.text-muted {
    color: var(--muted);
}

.section-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--brand);
}

.kv {
    display: flex;
    gap: 1rem;
    align-items: center;
}

    .kv .label {
        font-weight: 700;
        color: var(--brand);
    }

    .kv .value {
        color: var(--muted);
    }

.badge-live {
    background: var(--danger);
    color: var(--inverse);
    padding: .25rem .5rem;
    border-radius: 8px;
    font-weight: 600;
}

.link-muted {
    color: var(--muted);
    text-decoration: none;
}

    .link-muted:hover {
        text-decoration: underline;
    }

.hidden {
    display: none;
}

/* --- Effects, hovers & animations --- */
a:hover {
    color: var(--accent);
}

.btn {
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

    .btn:hover {
        transform: scale(1.05);
    }

    .btn:active {
        transform: scale(0.97);
    }

a:focus, button:focus, input:focus {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 6px;
}

/* --- Анимации --- */
@keyframes bounce-fade {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce-scale {
    0%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }

    70% {
        transform: translateY(3px);
    }
}

.marker-animate {
    animation: bounce-fade 0.6s ease;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .topbar .contact-quick {
        display: none;
    }

    .hero {
        padding: 2rem 0;
    }

    #map {
        height: 300px;
    }

    .navbar-toggler {
        margin: 0 auto 1rem;
    }

    .navbar-collapse {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: center;
        gap: .75rem;
        text-align: center;
    }

    .search-lang {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: .5rem;
        margin-left: 0;
    }

        .search-lang form {
            width: 100%;
            max-width: 400px;
        }

        .search-lang input[type="search"] {
            text-align: center;
        }
}

/* --- Вращающийся логотип --- */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin-logo {
    display: inline-block;
    animation: spin 20s linear infinite;
}


/* 🎨 Цвета иконок */
.icon-blue {
    color: #2563eb;
    background: #dbeafe;
}

.icon-green {
    color: #059669;
    background: #d1fae5;
}

.icon-purple {
    color: #7c3aed;
    background: #ede9fe;
}

.icon-orange {
    color: #ea580c;
    background: #ffedd5;
}

/* 🌈 Hover-подсветка */
.hover-blue:hover {
    background: #eff6ff;
}

    .hover-blue:hover i {
        color: #1d4ed8;
        background: #bfdbfe;
        animation: bounce-scale 0.6s;
    }

.hover-green:hover {
    background: #ecfdf5;
}

    .hover-green:hover i {
        color: #047857;
        background: #a7f3d0;
        animation: bounce-scale 0.6s;
    }

.hover-purple:hover {
    background: #f5f3ff;
}

    .hover-purple:hover i {
        color: #6d28d9;
        background: #c4b5fd;
        animation: bounce-scale 0.6s;
    }

.hover-orange:hover {
    background: #fff7ed;
}

    .hover-orange:hover i {
        color: #c2410c;
        background: #fdba74;
        animation: bounce-scale 0.6s;
    }

.service-card span {
    font-size: 1rem;
}

/* --- News Cards --- */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

    .news-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

    .news-card img {
        height: 180px;
        object-fit: cover;
    }

/* --- Consumer Cards --- */
.consumer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e0e6ed;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-decoration: none;
    color: #222;
    transition: all 0.3s ease, background-color 0.3s ease;
    height: 100%;
}

    .consumer-card i {
        font-size: 2.2rem;
        margin-bottom: 15px;
        color: var(--accent, #0f6b9a);
        transition: transform 0.3s ease, color 0.3s ease;
    }

    .consumer-card h5 {
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0;
    }

    .consumer-card:hover {
        background: var(--accent); /* или градиент */
        color: #fff;
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    }

        .consumer-card:hover i {
            color: #fff;
            transform: scale(1.2);
        }

        .consumer-card:hover::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 107, 154, 0.15); /* мягкий голубой */
            border-radius: 12px;
            pointer-events: none;
        }


.div-emoji-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.search-dropdown {
    display: block; /* всегда в потоке, но скрываем через прозрачность */
    position: absolute;
    top: 120%;
    right: 0;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(0,0,0,0.1);
    padding: .5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 220px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all .25s ease;
}

    .search-dropdown.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .search-dropdown input[type="search"] {
        width: 100%;
        border: 1px solid #ccc;
        border-radius: 6px;
        padding: .35rem .6rem;
        margin-bottom: .4rem;
    }

/* Малые телефоны (до 576px) */
@media (max-width: 576px) {
    .logo-img

{
    height: 70px;
}

header h1 {
    font-size: 1rem;
    text-align: center;
}

header p.small {
    font-size: 0.8rem;
    text-align: center;
}

.hero {
    padding: 1.5rem 0;
    text-align: center;
}

.service-card {
    flex-direction: column;
    border-radius: 12px;
    padding: 16px;
    gap: 10px;
}

.news-card img {
    height: 140px;
}

.consumer-card {
    padding: 20px 15px;
}

.search-lang {
    width: 100%;
}

}

/* Планшеты (576px–768px) */
@media (max-width: 768px) {
    .logo-img {
        height: 80px;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .service-card {
        flex-direction: row;
        padding: 12px;
    }

    .consumer-card {
        padding: 24px 18px;
    }
}

/* Небольшие ноутбуки (768px–992px) */
@media (max-width: 992px) {
    .navbar-nav {
        flex-direction: column;
        align-items: center;
    }

    .navbar-collapse {
        flex-direction: column;
    }

    .search-lang {
        width: 100%;
        flex-direction: column;
        margin-top: 0.5rem;
    }

    #map {
        height: 260px;
    }
}

/* Большие экраны (1200px+) */
@media (min-width: 1200px) {
    .hero {
        padding: 4rem 0;
    }

    .service-card {
        padding: 20px 24px;
    }

    .consumer-card {
        padding: 36px 24px;
    }
}

/* Анимация появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Все элементы изначально прозрачные */
.fade-in,
.fade-up {
    opacity: 0;
}

/* Когда секция попадает в видимую область — запускаем */
.reveal-section .fade-in,
.reveal-section .fade-up {
    animation: fadeInUp 1s ease forwards;
}

/* Задержки */
.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}
