/* ============================================
   5kop.ru - Рыболовный дневник
   Брендированный дизайн
   ============================================ */

:root {
    --primary-color: #1a5a8c;
    --primary-dark: #0d3b5c;
    --primary-light: #2a7ab8;
    --secondary-color: #f5a623;
    --secondary-dark: #d4891a;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gold-color: #f1c40f;
    
    --gradient-primary: linear-gradient(135deg, #1a5a8c 0%, #0d3b5c 100%);
    --gradient-accent: linear-gradient(135deg, #f5a623 0%, #d4891a 100%);
    --gradient-hero: linear-gradient(135deg, #1a5a8c 0%, #2a7ab8 50%, #f5a623 100%);
}

/* ============================================
   Общие стили
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f4f6f9;
    padding-top: 0px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
    flex: 1;
}

/* ============================================
   Брендированная навигация с фоном-логотипом
   ============================================ */
.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: 0 2px 20px rgba(26, 90, 140, 0.3);
    padding: 15px 0;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

/* Фон-логотип для шапки */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/static/logo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.50;
    filter: blur(0.5px) brightness(0.95);
    z-index: 0;
    pointer-events: none;
}

/* Затемнение поверх фона */
.navbar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 90, 140, 0.15);
    z-index: 0;
    pointer-events: none;
}

/* Все содержимое шапки поверх фона */
.navbar .container {
    position: relative;
    z-index: 1;
    padding-top: 8px;
    padding-bottom: 8px;
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.7rem;
    letter-spacing: -0.5px;
    color: white !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand .brand-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 2px 15px rgba(245, 166, 35, 0.5);
}

.navbar-brand .brand-text .domain {
    font-size: 0.7rem;
    opacity: 0.85;
    font-weight: 400;
    letter-spacing: 1.5px;
}

/* Увеличиваем ссылки */
.nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 10px 20px !important;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: white !important;
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(255,255,255,0.25);
    color: white !important;
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 8px;
    margin-top: 8px;
    z-index: 9999 !important;  /* Увеличиваем z-index */
    position: absolute !important;  /* Фиксируем позиционирование */
    min-width: 200px;
    background: white;
}

.navbar .dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
    background: var(--gradient-primary);
    color: white !important;
}

.navbar .dropdown-item i {
    width: 20px;
    margin-right: 8px;
}

.navbar .badge {
    font-size: 0.65rem;
    padding: 3px 7px;
    border: 2px solid white;
}

/* ============================================
   Брендированные карточки
   ============================================ */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 16px 24px;
    font-weight: 600;
}

.card-header.bg-warning {
    background: var(--gradient-accent) !important;
    color: #2c3e50 !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #27ae60, #1e8449) !important;
}

.card-header.bg-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #3498db, #2471a3) !important;
}

.card-body {
    padding: 24px;
}

.card-footer {
    background: #f8f9fa;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 16px 24px;
}

/* ============================================
   Кнопки
   ============================================ */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 10px 24px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 90, 140, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(26, 90, 140, 0.4);
    background: var(--gradient-primary);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(39, 174, 96, 0.4);
}

.btn-warning {
    background: var(--gradient-accent);
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 166, 35, 0.4);
    color: #2c3e50;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.btn-outline-success {
    border: 2px solid #27ae60;
    color: #27ae60;
    background: transparent;
}

.btn-outline-success:hover {
    background: #27ae60;
    color: white;
    border-color: transparent;
}

.btn-outline-danger {
    border: 2px solid #e74c3c;
    color: #e74c3c;
    background: transparent;
}

.btn-outline-danger:hover {
    background: #e74c3c;
    color: white;
    border-color: transparent;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}

/* ============================================
   Бейджи
   ============================================ */
.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
}

.badge-primary {
    background: var(--gradient-primary);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: white;
}

.badge-warning {
    background: var(--gradient-accent);
    color: #2c3e50;
}

.badge-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, #3498db, #2471a3);
    color: white;
}

.badge-dark {
    background: var(--dark-color);
    color: white;
}

/* ============================================
   Формы
   ============================================ */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 90, 140, 0.15);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: #e74c3c;
}

.form-control.is-invalid:focus, .form-select.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
}

/* ============================================
   Карточки постов
   ============================================ */
.post-card .card-img-top {
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #f0f2f5, #e9ecef);
}

.post-card .card-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.post-card .card-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.2s;
}

.post-card .card-title a:hover {
    color: var(--primary-color);
}

.post-card .card-text {
    color: #6c757d;
    font-size: 0.95rem;
}

/* ============================================
   Профиль
   ============================================ */
.profile-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '🐟';
    position: absolute;
    right: 30px;
    bottom: -10px;
    font-size: 100px;
    opacity: 0.1;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border: 3px solid rgba(255,255,255,0.3);
}

/* ============================================
   Комментарии
   ============================================ */
.comment-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    transition: background 0.2s;
    border-left: 4px solid var(--primary-color);
}

.comment-item:hover {
    background: #f0f2f5;
}

.reply-item {
    background: white;
    border-radius: 12px;
    padding: 14px 16px;
    border-left: 3px solid var(--secondary-color);
}

.replies-container {
    border-left: 2px dashed #dce1e8;
    padding-left: 20px;
}

/* ============================================
   Уведомления
   ============================================ */
.notification-item {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e9ecef;
}

.notification-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.notification-item.unread {
    background: #e8f4fd;
    border-left: 4px solid var(--primary-color);
}

/* ============================================
   Карта
   ============================================ */
.map-container {
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

/* ============================================
   Зоны оповещения
   ============================================ */
.notification-zone-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.notification-zone-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
/* Чтобы меню не обрезалось */
.navbar {
    overflow: visible !important;  /* Убираем overflow hidden */
}

/* Кнопка-бургер на мобильных тоже должна быть видна */
.navbar-toggler {
    z-index: 9999;
    position: relative;
}
/* ============================================
   Для мобильных устройств
   ============================================ */
@media (max-width: 992px) {
    .nav-link {
        font-size: 0.95rem;
        padding: 8px 16px !important;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 0;
        min-height: 65px;
    }
    
    .navbar::before {
        opacity: 0.5;
        filter: blur(1px) brightness(0.85);
    }
    
    .navbar::after {
        background: rgba(26, 90, 140, 0.25);
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-brand .brand-icon {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
    
    .navbar-brand .brand-text .domain {
        font-size: 0.55rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand .brand-text .domain {
        display: none;
    }
}

/* ============================================
   Анимации
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ============================================
   Скролл
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   Футер
   ============================================ */
.footer {
    background: var(--dark-color) !important;
    color: rgba(255,255,255,0.7);
    border-top: none;
    margin-top: 40px;
    padding: 20px 0;
}

.footer a {
    color: var(--gold-color);
    text-decoration: none;
}

.footer a:hover {
    color: white;
}

/* ============================================
   Утилиты
   ============================================ */
.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-accent {
    background: var(--gradient-accent);
}

.shadow-brand {
    box-shadow: 0 4px 20px rgba(26, 90, 140, 0.15);
}

.border-brand {
    border: 2px solid var(--primary-color);
}