/* Modern Variable System */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #475569;
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.75rem;
}

/* Dark Mode Variables */
body[data-theme='dark'] {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
}

/* Global Reset & Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Form base colors */
.form-control,
.form-select {
    color: var(--text-primary);
    background-color: var(--surface-color);
    border-color: var(--border-color);
}

.form-control::placeholder,
.form-select::placeholder {
    color: var(--text-secondary);
    opacity: 1;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Theme-aware utility text colors */
.text-secondary,
.text-muted {
    color: var(--text-secondary) !important;
}

.text-dark,
.text-body,
.text-body-secondary,
.text-body-emphasis {
    color: var(--text-primary) !important;
}

body[data-theme='dark'] a.text-secondary,
body[data-theme='dark'] footer a {
    color: var(--text-primary) !important;
}

/* Pills / badges on dark theme */
.badge.bg-light,
.badge.bg-light.text-dark {
    background-color: var(--surface-color) !important;
    color: var(--text-primary) !important;
}

body[data-theme='dark'] .badge {
    border: 1px solid var(--border-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

/* Navbar Modernization */
.navbar {
    background-color: var(--surface-color) !important;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-weight: 800;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    object-fit: contain;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Header Icons Styling */
.navbar .btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.navbar .btn-link:hover {
    color: var(--primary-color) !important;
    transform: scale(1.1);
}

.navbar .btn-link svg {
    width: 18px;
    height: 18px;
    display: block;
    transition: transform 0.2s ease;
}

.navbar .btn-link:hover svg {
    transform: scale(1.1);
}

/* Legacy Font Awesome support */
.navbar .btn-link i {
    font-size: 1.1rem !important;
    display: inline-block !important;
    min-width: 16px;
    min-height: 16px;
    line-height: 1 !important;
    vertical-align: middle;
}

/* Ensure Font Awesome icons are visible */
.fas, .fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased;
}

.far, .fa-regular {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    display: inline-block !important;
}

.fab, .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
    display: inline-block !important;
}

/* Language Selector Styling */
.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.language-dropdown.show {
    display: block;
}

.language-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.language-item:last-child {
    border-bottom: none;
}

.language-item:hover {
    background-color: var(--bg-color);
}

.language-item .flag-icon {
    font-size: 1.25rem;
}

/* Google Translate Widget - Hidden but functional */
#google_translate_element {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* But allow the select element to be functional */
.goog-te-combo {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: auto !important;
    overflow: hidden !important;
}

/* Google Translate Banner - Completely hide it */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.skiptranslate,
body > .skiptranslate,
body > iframe[src*="translate.googleapis.com"],
iframe[name="google_translate_element"][src*="banner"],
iframe[title*="Google Translate"],
.goog-te-banner-frame.skiptranslate {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

body {
    position: relative !important;
    top: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove any top margin/padding that Google Translate might add */
body.translated,
body[style*="top"] {
    top: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.goog-te-balloon-frame {
    display: none !important;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 12px 16px;
    border-radius: var(--radius);
    display: none;
    gap: 12px;
    align-items: center;
    max-width: 520px;
    width: calc(100% - 24px);
    z-index: 1050;
}

.cookie-banner.show {
    display: flex;
}

.cookie-banner__text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-banner__actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
    white-space: nowrap;
}

/* Download logos tool */
.download-logos-container {
    max-width: 900px;
    margin: 40px auto;
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.download-logos-container .status-box {
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.download-logos-container .log {
    background: #0f172a;
    color: #e2e8f0;
    padding: 14px;
    border-radius: 8px;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #1e293b;
}

.download-logos-container .download-logos-form {
    margin-top: 20px;
}

/* Ad slot placeholder to prevent CLS when ads are enabled */
.ad-slot {
    min-height: 250px;
    background: #f8fafc;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
}

/* Hero Section */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 5rem 0;
    color: white;
    margin-bottom: 3rem;
    border-radius: 0 0 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(30, 64, 175, 0.3));
    z-index: 0;
}


.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.search-container {
    background: var(--surface-color);
    padding: 0.5rem;
    border-radius: 100px; /* Pill shape */
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 2rem auto 0;
    display: flex;
    align-items: center;
    position: relative;
}

.search-input {
    border: none;
    background: transparent;
    padding: 1rem 1.5rem;
    width: 100%;
    outline: none;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    transition: transform 0.2s, background-color 0.2s;
}

.search-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Modern Cards */
.uni-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.uni-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.uni-card-img {
    height: 200px;
    background-color: var(--secondary-color);
    background-size: cover;
    background-position: center;
    aspect-ratio: 16 / 9;
}

.uni-card-logo {
    height: 200px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    aspect-ratio: 16 / 9;
}

.uni-card-logo img {
    width: 120px;
    height: 120px;
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    aspect-ratio: 1 / 1;
}

.uni-card-logo-placeholder {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    aspect-ratio: 16 / 9;
}

.uni-logo-placeholder-small {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 8px;
    flex-shrink: 0;
}

.uni-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.uni-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.uni-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.uni-btn {
    margin-top: auto;
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.uni-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Detail Page Styles */
.detail-header {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .hero-section {
        border-radius: 0;
    }
    
    /* Mobil menü - yan yana kompakt görünüm */
    .navbar-collapse {
        margin-top: 1rem;
    }
    
    .navbar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
        justify-content: flex-start;
    }
    
    .navbar-nav .nav-item {
        margin: 0 !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        white-space: nowrap;
        border-radius: 0.375rem;
        transition: all 0.2s;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: var(--bg-color);
    }
    
    .navbar-nav .language-btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* İkon butonlarını daha küçük yap */
    .navbar-nav .btn-link {
        width: 28px;
        height: 28px;
    }
    
    .navbar-nav .btn-link svg {
        width: 16px;
        height: 16px;
    }
}

.info-box {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.info-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

#map {
    height: 300px;
    border-radius: var(--radius);
    width: 100%;
    z-index: 1; /* Fix leaflet layering issue */
}

/* Leaflet Popup Button Fix */
.leaflet-popup-content-wrapper {
    z-index: 10000 !important;
}

.leaflet-popup-content {
    z-index: 10001 !important;
    position: relative;
}

.leaflet-popup-content .btn {
    position: relative !important;
    z-index: 10002 !important;
    pointer-events: auto !important;
    display: inline-block !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.leaflet-popup-content a.btn {
    color: #fff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.leaflet-popup-content a.btn:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
    color: #fff !important;
}

/* Filter Sidebar Styles */
.filter-sidebar {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-sidebar .form-control {
    border: 1px solid var(--border-color);
    border-radius: calc(var(--radius) * 0.75);
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-sidebar .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.filter-sidebar .btn {
    border-radius: calc(var(--radius) * 0.75);
    font-weight: 600;
    padding: 0.75rem;
    transition: all 0.2s;
}

.filter-sidebar .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-sidebar .btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

.filter-sidebar .btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.filter-sidebar .btn-outline-secondary:hover {
    background-color: var(--bg-color);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* Dark Mode Specific Overrides */
body[data-theme='dark'] .search-container {
    background: #1e293b;
}
body[data-theme='dark'] .search-input {
    color: #f1f5f9;
}

body[data-theme='dark'] .filter-sidebar {
    background-color: var(--surface-color);
    border-color: var(--border-color);
}

body[data-theme='dark'] .filter-sidebar .form-control {
    background-color: #11182b;
    border-color: #243047;
    color: var(--text-primary);
}

body[data-theme='dark'] .filter-sidebar .form-control:focus {
    background-color: #0f172a;
    border-color: var(--primary-color);
}

body[data-theme='dark'] .filter-sidebar .form-control::placeholder {
    color: #cbd5e1;
    opacity: 1;
}

body[data-theme='dark'] .filter-sidebar .form-select {
    background-color: #11182b;
    border-color: #243047;
    color: var(--text-primary);
}

body[data-theme='dark'] .filter-sidebar .form-select:focus {
    background-color: #0f172a;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* Responsive adjustments for filter sidebar */
@media (max-width: 991px) {
    .filter-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
        border-radius: var(--radius);
        max-height: none;
    }
    
    /* Mobile filter toggle button */
    [data-bs-toggle="collapse"][data-bs-target="#mobileFilterCollapse"] {
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        padding: 0.875rem 1rem;
        border-radius: var(--radius);
    }
    
    /* Filter toggle icon animation */
    #filterToggleIcon {
        transition: transform 0.3s ease;
    }
    
    /* Mobile filter collapse animation */
    #mobileFilterCollapse.collapse:not(.show) {
        display: none;
    }
    
    #mobileFilterCollapse.collapsing {
        transition: height 0.35s ease;
    }
    
    /* Ensure filter form is visible on mobile */
    #mobileFilterCollapse .filter-sidebar {
        margin-top: 1rem;
    }
}

/* ================================
   GUIDES SECTION STYLES
   ================================ */

/* Guide Cards */
.guide-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.guide-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, var(--surface-color) 0%, rgba(37, 99, 235, 0.03) 100%);
}

.guide-card-header {
    padding: 2rem;
    color: white;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.guide-card-header i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.guide-card-header svg {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    display: block;
}

.guide-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    opacity: 0.9;
}

.guide-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.guide-title {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.guide-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.guide-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.guide-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.guide-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
}

.guide-link:hover {
    color: var(--primary-hover);
    transform: translateX(4px);
}

.guide-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.guide-badge.featured-badge {
    background-color: #fef3c7;
    color: #92400e;
}

/* Guide Detail Page */
.guide-header {
    position: relative;
}

.guide-meta-header {
    font-size: 0.9rem;
}

.guide-toc {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.toc-nav ul {
    margin: 0;
    padding: 0;
}

.toc-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
    padding: 0.5rem 0;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    transition: all 0.2s;
}

.toc-link:hover,
.toc-link.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

/* Guide Content Styling */
.guide-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.guide-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.guide-content h3,
.guide-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.guide-content p {
    margin-bottom: 1.25rem;
}

.guide-content ul,
.guide-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.guide-content li {
    margin-bottom: 0.75rem;
}

.guide-content .alert {
    border-radius: var(--radius);
    border: none;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.guide-content .alert-info {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--text-primary);
}

.guide-content .alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.guide-content .alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--text-primary);
}

.guide-section {
    scroll-margin-top: 100px;
}

/* Guide Intro Box */
.guide-intro {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-left: 4px solid var(--primary-color);
}

/* Author Box */
.author-box {
    transition: all 0.2s;
}

.author-box:hover {
    box-shadow: var(--shadow-md);
}

/* Related Guide Card */
.related-guide-card {
    transition: all 0.2s;
}

.related-guide-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color) !important;
}

/* Dark Mode for Guides */
body[data-theme='dark'] .guide-card {
    background-color: var(--surface-color);
    border-color: var(--border-color);
}

body[data-theme='dark'] .guide-badge.featured-badge {
    background-color: rgba(251, 191, 36, 0.2);
    color: #fcd34d;
}

body[data-theme='dark'] .guide-content .alert-info {
    background-color: rgba(37, 99, 235, 0.15);
}

body[data-theme='dark'] .guide-content .alert-warning {
    background-color: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
}

body[data-theme='dark'] .guide-disclaimer {
    background-color: rgba(251, 191, 36, 0.1) !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
}

body[data-theme='dark'] .guide-intro {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

body[data-theme='dark'] .toc-link:hover,
body[data-theme='dark'] .toc-link.active {
    background-color: rgba(37, 99, 235, 0.1);
}

/* Dark Mode Table Styles */
body[data-theme='dark'] .info-box .table {
    background-color: var(--surface-color);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body[data-theme='dark'] .info-box .table thead.table-light {
    background-color: rgba(51, 65, 85, 0.5) !important;
    border-color: var(--border-color);
    color: var(--text-primary);
}

body[data-theme='dark'] .info-box .table thead th {
    background-color: rgba(51, 65, 85, 0.5) !important;
    border-color: var(--border-color);
    color: var(--text-primary);
}

body[data-theme='dark'] .info-box .table tbody {
    background-color: var(--surface-color);
}

body[data-theme='dark'] .info-box .table tbody tr {
    border-color: var(--border-color);
    color: var(--text-primary);
    background-color: var(--surface-color);
}

body[data-theme='dark'] .info-box .table tbody td {
    border-color: var(--border-color);
    color: var(--text-primary);
    background-color: var(--surface-color);
}

body[data-theme='dark'] .info-box .table-hover tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.15) !important;
    color: var(--text-primary);
}

body[data-theme='dark'] .info-box .table th,
body[data-theme='dark'] .info-box .table td {
    border-color: var(--border-color);
}

/* Accordion customization for guides */
.guide-content .accordion-item {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius) !important;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.guide-content .accordion-button {
    background-color: var(--surface-color);
    color: var(--text-primary);
    font-weight: 600;
}

.guide-content .accordion-button:not(.collapsed) {
    background-color: rgba(37, 99, 235, 0.05);
    color: var(--primary-color);
}

.guide-content .accordion-body {
    background-color: var(--surface-color);
    color: var(--text-primary);
}

body[data-theme='dark'] .guide-content .accordion-button {
    background-color: var(--surface-color);
    color: var(--text-primary);
}

body[data-theme='dark'] .guide-content .accordion-button:not(.collapsed) {
    background-color: rgba(37, 99, 235, 0.15);
}

/* Cookie Preferences Modal */
.cookie-preferences {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1060;
    padding: 1rem;
}

.cookie-preferences.show {
    display: flex;
}

.cookie-preferences__container {
    background: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cookie-preferences__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.cookie-preferences__header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cookie-preferences__close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.cookie-preferences__close:hover {
    color: var(--text-primary);
}

.cookie-preferences__body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-preferences__description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.cookie-preference-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cookie-preference-item:last-child {
    border-bottom: none;
}

.cookie-preference-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-preference-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.cookie-preference-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-toggle label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + label {
    background-color: var(--primary-color);
}

.cookie-toggle input:checked + label:before {
    transform: translateX(20px);
}

.cookie-toggle.disabled label {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-preferences__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Responsive Cookie Preferences */
@media (max-width: 576px) {
    .cookie-preferences {
        padding: 0.5rem;
    }
    
    .cookie-preferences__container {
        max-width: 100%;
        max-height: 95vh;
    }
    
    .cookie-preferences__header {
        padding: 0.875rem 1rem;
    }
    
    .cookie-preferences__header h3 {
        font-size: 1.1rem;
    }
    
    .cookie-preferences__body {
        padding: 1rem;
    }
    
    .cookie-preferences__footer {
        flex-direction: column;
        padding: 1rem;
    }
    
    .cookie-preferences__footer .btn {
        width: 100%;
    }
    
    .cookie-preference-item__header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cookie-toggle {
        align-self: flex-start;
    }
}

/* Theme Toggle */
.theme-toggle {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-color);
    transform: scale(1.1);
}

/* Breadcrumb styling */
.breadcrumb {
    margin: 0;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* Form check customization for guides */
.guide-content .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive Guide Styles */
@media (max-width: 991px) {
    .guide-toc {
        position: relative !important;
        top: 0 !important;
        margin-bottom: 2rem;
    }
    
    .guide-card.featured .row {
        flex-direction: column;
    }
    
    .guide-featured-image {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .guide-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .guide-meta-header {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .guide-content {
        font-size: 1rem;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-box .author-avatar {
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }
}