/* =========================
   CSS VARIABLES
   ========================= */
:root {
    --primary-color: #4A90E2;
    --primary-dark: #357ABD;
    --accent-color: #F39C12;

    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-bg: #1a1a2e;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.2);
}

/* =========================
   RESET & BASE
   ========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    min-height: 100vh;

    /* защита от fixed header / footer */
    padding-top: 76px;
    padding-bottom: 80px;
}

@media (max-width: 576px) {
    body {
        padding-top: 64px;
        padding-bottom: 96px;
    }
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* =========================
   NAVBAR
   ========================= */
.navbar {
    background: var(--dark-bg) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Логотип и название сайта */
.navbar-brand {
    color: #ffffff !important; /* Белый цвет текста */
    font-weight: 700;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

/* =========================
   NAVBAR TOGGLER (гамбургер для мобильных)
   ========================= */
.navbar-toggler {
    border-color: var(--accent-color); /* рамка кнопки */
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=UTF8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='" + encodeURIComponent("#F39C12") + "' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}


.navbar-brand i {
    margin-right: 8px;
    font-size: 1.6rem;
    color: var(--accent-color); /* Иконка логотипа выделена акцентом */
}

/* Navbar links */
.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #ffffff !important;
}

.navbar .nav-link.active {
    color: var(--accent-color) !important;
}

.navbar .nav-link i {
    color: inherit;
}

/* Optional underline hover effect */
.navbar .nav-link::after {
    content: '';
    display: block;
    height: 2px;
    width: 0;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.navbar .nav-link:hover::after {
    width: 100%;
}

/* =========================
   HERO SECTION
   ========================= */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

.hero-section .container,
.hero-section .row,
.hero-section .col {
    position: relative;
    z-index: 1;
}

.hero-section img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }

    .hero-section img {
        max-height: 260px;
        margin-top: 24px;
    }
}

/* =========================
   FOOTER
   ========================= */
footer {
    background: var(--dark-bg);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.3);
    color: #f8f9fa;
    font-size: 14px;
}

footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color);
}

/* =========================
   GRID (ADS, CARDS)
   ========================= */
#ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* =========================
   CARDS
   ========================= */
.card {
    border-radius: 16px;
    background: white;
    border: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* =========================
   BUTTONS
   ========================= */
.btn {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

/* =========================
   FORMS
   ========================= */
.form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
}

/* =========================
   ANIMATIONS
   ========================= */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 0.4;
    }
}
