/* 
 * Main Stylesheet for Alaverdi News Portal
 * Contains all styles for the website components including dark mode
 */

/* Base & Typography */
:root {
    /* Light Mode Variables */
    --bg-color-light: #f8f9fa;
    --text-color-light: #212529;
    --card-bg-light: #ffffff;
    --border-color-light: rgba(0,0,0,0.1);
    --shadow-light: rgba(0,0,0,0.1);
    --primary-light: #0d6efd;
    --secondary-light: #6c757d;
    --header-bg-light: #212529;
    --header-text-light: #ffffff;
}

[data-bs-theme="light"] {
    --bg-color: var(--bg-color-light);
    --text-color: var(--text-color-light);
    --card-bg: var(--card-bg-light);
    --border-color: var(--border-color-light);
    --shadow-color: var(--shadow-light);
    --primary: var(--primary-light);
    --secondary: var(--secondary-light);
    --header-bg: var(--header-bg-light);
    --header-text: var(--header-text-light);
}

[data-bs-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --border-color: rgba(255,255,255,0.1);
    --shadow-color: rgba(0,0,0,0.3);
    --primary: #3d8bfd;
    --secondary: #adb5bd;
    --header-bg: #000000;
    --header-text: #ffffff;
    --bs-body-color: #e0e0e0;
    --bs-body-bg: #121212;
    --bs-border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Noto Sans Georgian', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header & Navigation Styles with Dark Mode Support */
.site-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 0;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    padding: 0.5rem 0;
}

.navbar {
    padding: 12px 0;
    padding: 0;
}

/* Brand and main navigation */
.header-content {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    color: var(--header-text);
    font-size: 1.5rem;
    font-size: 1.4rem;
    letter-spacing: 0.6px;
    font-weight: 600;
}

.navbar-brand i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: var(--primary);
    font-size: 1.2rem;
    color: #3d8bfd;
    margin-right: 8px;
    vertical-align: -1px;
}

/* Hamburger menu on all screens */
.navbar-toggler {
    border: none;
    padding: 0.25rem;
    width: 40px;
    height: 40px;
    position: relative;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.3s;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.08);
    border: none;
    transition: all 0.2s;
}

.navbar-toggler:hover {
    background-color: rgba(255,255,255,0.1);
    background-color: rgba(13,110,253,0.25);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 18px;
    height: 18px;
}

/* Modal-style expanded menu */
.navbar-collapse {
    margin-top: 10px;
    background: var(--header-bg);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem 0;
    z-index: 1000;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
    margin-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.nav-link {
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 10px 20px;
    position: relative;
    transition: all 0.3s;
    color: var(--header-text);
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 3px;
    transition: all 0.2s ease;
}

.nav-link:hover, 
.nav-link.active {
    background-color: rgba(var(--primary), 0.2);
    color: var(--header-text);
    background-color: rgba(13,110,253,0.15);
    color: var(--header-text);
}

.nav-link:hover::before,
.nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary);
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    opacity: 1;
}

.nav-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

/* Auth buttons and theme toggle */
.header-controls {
    display: flex;
    align-items: center;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    display: flex;
    gap: 6px;
}

.auth-btn, 
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--header-text);
    background-color: rgba(255,255,255,0.1);
    transition: all 0.3s;
    text-decoration: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    transition: all 0.2s;
    background-color: rgba(255,255,255,0.08);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.auth-btn:hover,
.theme-toggle:hover {
    background-color: var(--primary);
    color: var(--header-text);
    transform: translateY(-2px);
    transform: translateY(-2px);
    background-color: rgba(13,110,253,0.25);
    box-shadow: 0 3px 10px rgba(13,110,253,0.2);
}

.auth-btn i,
.theme-toggle i {
    font-size: 1.1rem;
    font-size: 0.9rem;
}

.auth-btn.login {
    background-color: rgba(var(--primary), 0.2);
}

/* Button section */
.header-buttons {
    display: flex;
    align-items: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Navigation menu */
.navbar-nav {
    width: 100%;
    padding: 0 15px;
}

/* Auth buttons inside menu */
.nav-auth-buttons {
    display: flex;
    padding: 10px 20px;
    justify-content: center;
    margin-top: 15px;
    gap: 15px;
}

.nav-auth-btn {
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-auth-btn:hover {
    background: #0d6efd;
    color: white;
}

.nav-auth-btn.login {
    background: rgba(13, 110, 253, 0.3);
}

/* Card Styles with Dark Mode */
.card {
    border-radius: 0;
    border: none;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: transform 0.2s, background-color 0.3s ease;
    position: relative;
    overflow: hidden;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.card:hover {
    transform: translateY(-5px);
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
}

.card-title {
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
}

.card-text {
    flex-grow: 1;
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Featured News Cards */
.main-news-card {
    border-radius: 0;
    border: none;
    min-height: 400px;
}

.main-news-image {
    height: 400px;
    object-fit: cover;
    border-radius: 0;
}

.news-image {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Category style - side at bottom */
.news-category-tag {
    color: #0d6efd;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: bold;
}

.news-date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Card footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.card-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Card action buttons */
.card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.card-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--secondary);
    background-color: rgba(var(--bg-color-light), 0.1);
    box-shadow: 0 1px 3px var(--shadow-color);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.card-action-icon:hover {
    background-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px var(--shadow-color);
}

/* Read more button - გაუმჯობესებული ვერსია დიზაინის შესანარჩუნებლად */
.btn-read-more {
    display: inline-block;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--primary);
    background-color: transparent;
    color: var(--primary);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px var(--shadow-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-decoration: none !important;
}

.btn-read-more:hover {
    background-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px var(--shadow-color);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Category box */
.category-card {
    border-left: 3px solid #0d6efd;
    background-color: white;
    margin-bottom: 1rem;
}

/* Image overlay styles */
.card-img-overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.img-category {
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background-color: rgba(13, 110, 253, 0.85);
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.img-date {
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: rgba(33, 37, 41, 0.85);
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Swiper/Slider Styles with Dark Mode */
.swiper-container {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.swiper-slide {
    position: relative;
    background: var(--card-bg);
    border-radius: 0;
    overflow: hidden;
    height: auto;
    box-shadow: 0 2px 5px var(--shadow-color);
    width: 100%;
}

.swiper-slide img, .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.slide-content {
    position: relative;
    background: var(--card-bg);
    padding: 15px;
    transition: background-color 0.3s ease;
}

.slide-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

.slide-text {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.swiper-container:hover {
    cursor: grab;
}

.swiper-container:active {
    cursor: grabbing;
}

/* Simplified Swiper Pagination Styles */
.swiper-pagination {
    position: relative;
    margin-top: 15px;
    bottom: auto !important;
    text-align: center;
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background-color: #ddd;
    opacity: 0.8;
    margin: 0 5px;
}

.swiper-pagination-bullet-active {
    background-color: var(--primary);
    opacity: 1;
    width: 10px;
    height: 10px;
}

/* Individual swiper containers spacing */
.main-news-swiper,
.sports-news-swiper,
.culture-news-swiper {
    margin-bottom: 25px;
}

/* Section Titles with Dark Mode */
.section-title {
    border-left: 5px solid var(--primary);
    padding-left: 10px;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--text-color);
    font-size: 1.5rem;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
    margin-bottom: 18px;
    font-weight: 600;
    line-height: 1.2;
}

/* Section title with link */
.section-title a {
    display: flex;
    align-items: center;
    color: inherit;
    transition: color 0.2s;
}

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

.section-title a i {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.section-title a:hover i {
    opacity: 1;
    transform: translateX(0);
}

/* Category Header */
.category-header {
    background-color: var(--primary);
    color: #ffffff;
    padding: 20px 0;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, darken(var(--primary), 15%) 100%);
    padding: 15px 0;
}

.category-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

/* Footer with Dark Mode */
.footer {
    background-color: var(--header-bg);
    color: var(--header-text);
}

/* Theme toggle button */
.theme-toggle {
    margin-left: 10px;
    position: relative;
}

.theme-toggle .theme-label {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.theme-toggle:hover .theme-label {
    opacity: 1;
}

/* Category page styles */
.breadcrumb-item a {
    color: #ffffff;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7);
    color: rgba(255, 255, 255, 0.6);
}

/* Article page breadcrumbs - with background color */
.article-breadcrumb .breadcrumb-item a {
    color: var(--primary);
}

.article-breadcrumb .breadcrumb-item.active {
    color: var(--text-color);
}

/* Article Category & Subcategory Badges */
.article-content .badge {
    font-weight: 500;
    padding: 5px 10px;
    transition: all 0.2s;
}

.article-content .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.badge.bg-primary {
    background-color: #0d6efd !important; /* Main category */
}

.badge.bg-secondary {
    background-color: #6c757d !important; /* Subcategory */
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Card bottom info */
    .card-img-overlay-bottom {
        padding: 8px 12px;
    }
    
    .img-category, .img-date {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    /* Card actions */
    .card-actions {
        gap: 12px;
    }
    
    .card-action-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .btn-read-more {
        padding: 4px 12px;
        font-size: 0.75rem;
    }
    
    /* Swiper */
    .swiper-wrapper {
        margin-left: 0;
        margin-right: 0;
    }
    
    .swiper-slide {
        width: 100% !important;
        margin-right: 0 !important;
    }
    
    .swiper-container {
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
    }
    
    .container .swiper-container {
        margin-left: -12px;
        margin-right: -12px;
        width: calc(100% + 24px);
    }
    
    /* Footer */
    .footer {
        display: none;
    }
}

/* ---------- UPDATED HEADER STYLES WITH LOGO ---------- */

/* Header & Navigation with modern look */
.site-header {
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    padding: 0.5rem 0;
}

.navbar {
    padding: 0;
}

/* Brand logo improvements */
.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
    border-radius: 50%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Show/hide logos based on theme */
.logo-light {
    display: none;
}

.logo-dark {
    display: block;
}

[data-bs-theme="dark"] .logo-light {
    display: block;
}

[data-bs-theme="dark"] .logo-dark {
    display: none;
}

/* Header controls - cleaner design */
.header-controls {
    display: flex;
    align-items: center;
}

.auth-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-btn, 
.theme-btn, 
.menu-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--header-text);
    transition: all 0.25s ease;
    background-color: rgba(255,255,255,0.08);
    border: none;
    cursor: pointer;
}

.auth-btn:hover, 
.theme-btn:hover, 
.menu-btn:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(13,110,253,0.25);
}

.auth-btn i, 
.theme-btn i, 
.menu-btn i {
    font-size: 1rem;
}

/* Theme icon switching */
.theme-icon-light {
    display: none;
}

.theme-icon-dark {
    display: block;
}

[data-bs-theme="dark"] .theme-icon-light {
    display: block;
}

[data-bs-theme="dark"] .theme-icon-dark {
    display: none;
}

/* Navigation styles */
.navbar-collapse {
    margin-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 3px;
    transition: all 0.2s ease;
}

.nav-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    opacity: 1;
}

.nav-link:hover, 
.nav-link.active {
    background-color: rgba(13,110,253,0.15);
    color: var(--header-text);
}

/* ჩანიშვნის ღილაკის სტილები */
.card-action-icon.bookmark-btn.active {
    color: var(--bs-primary);
}

.card-action-icon.bookmark-btn:hover {
    transform: scale(1.1);
}

.card-action-icon.bookmark-btn {
    transition: transform 0.2s ease, color 0.2s ease;
}
