/*
Theme Name: Динамічны картки
Author: Serhiy SV
Version: 1.2
Description: Тема для оренди спецтехніки на Bootstrap 5
Text Domain: bobcat-rent
*/

/* 1. ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ И ОСНОВА */
:root { 
    --accent: #ffc107; 
    --accent-hover: #e5af06;
    --dark: #212529; 
    --light: #f8f9fa; 
    --transition: all 0.3s ease;
}

html, body {
    overflow-x: hidden; 
    width: 100%;
    scroll-behavior: smooth;
}

body { 
    font-family: 'Segoe UI', Roboto, sans-serif; 
    background-color: var(--light); 
    color: var(--dark); 
}

img { max-width: 100%; height: auto; }

/* 2. ШАПКА И НАВИГАЦИЯ (ФИНАЛЬНАЯ ВЕРСИЯ БЕЗ АВТО-ПОДСВЕТКИ) */
header { border-bottom: 4px solid var(--accent); }

/* Базовый стиль ссылок: чистый фон, темный текст */
.navbar-nav .nav-link {
    border-radius: 8px;
    padding: 0.6rem 1.2rem !important;
    margin: 2px;
    transition: background-color 0.2s ease, color 0.2s ease;
    color: var(--dark) !important;
    font-weight: 600;
    background-color: transparent !important;
    touch-action: manipulation;
}

/* --- ПОДСВЕТКА И ХОВЕР (ТОЛЬКО DESKTOP) --- */
@media (min-width: 992px) {
    /* Подсветка загорается только при наведении мыши */
    .navbar-nav .nav-item:hover > .nav-link,
    .navbar-nav .nav-link:hover {
        background-color: var(--accent) !important;
        color: var(--dark) !important;
    }

    /* Раскрытие выпадающего меню при наведении */
    .nav-item.dropdown:hover .dropdown-menu { 
        display: block; 
        margin-top: 0; 
        animation: fadeIn 0.3s ease;
    }
}

/* --- ПОДСВЕТКА ПРИ КЛИКЕ И ОТКРЫТИИ (MOBILE + CLICK) --- */
.navbar-nav .nav-link:active,
.navbar-nav .nav-link:focus,
.navbar-nav .dropdown-toggle[aria-expanded="true"] {
    background-color: var(--accent) !important;
    color: var(--dark) !important;
}

/* Выпадающие списки (Dropdown) */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    transition: 0.2s ease;
    padding: 0.6rem 1rem;
    color: var(--dark);
    background-color: transparent !important;
}

.dropdown-item:hover, 
.dropdown-item:active, 
.dropdown-item:focus {
    background-color: var(--accent) !important;
    color: var(--dark) !important;
}

/* Мобильная адаптация навигации */
@media (max-width: 991.98px) {
    .navbar-collapse {
        max-height: 85vh;
        overflow-y: auto;
    }

    .navbar-collapse.show {
        background: #fff;
        padding: 15px;
        border-radius: 12px;
        margin-top: 10px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    }
    
    .dropdown-menu.show {
        display: block !important;
        position: static !important;
        background-color: #f8f9fa;
        margin-top: 5px;
        border: none;
        box-shadow: none;
    }
}

/* 3. КАРТОЧКИ И КОНТЕНТ */
.card { 
    border: none; 
    border-radius: 15px; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    overflow: hidden; 
}

.card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.1) !important; 
}

.equipment-img {
    height: 140px;
    object-fit: contain;
    width: 100%;
}

.card-img-top {
    object-fit: cover;
    height: 200px;
}

/* 4. КНОПКИ */
.btn-warning { 
    background-color: var(--accent); 
    border: none; 
    font-weight: 700; 
    color: var(--dark); 
    transition: var(--transition);
}

.btn-warning:hover { 
    background-color: var(--accent-hover); 
    transform: scale(1.02); 
}

/* 5. HERO BLOCK И СЕКЦИИ */
.hero-box { 
    min-height: 500px; 
    display: flex; 
    align-items: center; 
    border-radius: 30px; 
}

.backdrop-blur {
    background: rgba(33, 37, 41, 0.65) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1.5rem;
}

.section-title { 
    font-weight: 800; 
    text-transform: uppercase; 
    position: relative; 
    padding-bottom: 15px; 
}

.section-title::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 60px; 
    height: 4px; 
    background: var(--accent); 
}

/* 6. ФУТЕР И ПЛАВАЮЩАЯ КНОПКА */
.footer-links li a {
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-links li a:hover {
    color: var(--accent) !important;
    padding-left: 5px;
}

.btn-call-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: var(--accent);
    color: var(--dark) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
    animation: pulse-ring 2s infinite;
}

/* АНИМАЦИИ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}
.entry-content img, .content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}
