:root {
    /* Light theme variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #dee2e6;
    --accent-color: #dc3545;
    --accent-hover: #bb2d3b;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --navbar-bg: #ffffff;
    --navbar-text: #212529;
    --navbar-border: #dee2e6;
    --footer-bg: #f8f9fa;
    --footer-text: #6c757d;
    --card-bg: #ffffff;
    --card-border: #dee2e6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --hero-bg-position-x: 50%;
    --hero-bg-position-y: 75%; 
    --hero-overlay-color: rgba(0, 0, 0, 0.25);
    
    /* Hover background colors */
    --hover-bg-light: #e2e6ea; /* Darker for light theme */
}

[data-theme="dark"] {
    /* Dark theme variables */
    --bg-primary: #191919;
    --bg-secondary: #252525;
    --bg-tertiary: #333333;
    --text-primary: #ffffff;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --border-color: #333333;
    --accent-color: #dc3545;
    --accent-hover: #e57373;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --navbar-bg: #191919;
    --navbar-text: #ffffff;
    --navbar-border: #333333;
    --footer-bg: #191919;
    --footer-text: #adb5bd;
    --card-bg: #252525;
    --card-border: #333333;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.5);
    
    /* Hover background colors */
    --hover-bg-light: #333333; /* Lighter for dark theme */
}

/* Ensure theme toggle icon uses proper colors in dark mode */
[data-theme="dark"] .theme-toggle {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

[data-theme="dark"] .theme-toggle:hover {
    color: #ffffff;
    border-color: var(--accent-color);
    background-color: var(--accent-color);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    position: relative;
    min-height: 100%;
    height: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    flex: 1;
}

a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.hero-section {
    color: white;
    padding: 2rem 0;
    margin: 0;
    height: 450px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/img/bacowka-412.png');
    background-size: cover;
    background-position: var(--hero-bg-position-x) var(--hero-bg-position-y);
    background-repeat: no-repeat;
    filter: blur(5px);
    z-index: -1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(var(--hero-overlay-color), var(--hero-overlay-color));
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-weight: 300;
}

.hero-section .lead {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    max-width: 800px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-buttons .btn {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 500;
    transition: all 0.3s ease;
}

.hero-buttons .btn-danger {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.hero-buttons .btn-danger:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-buttons .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.image-source {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(4px);
    text-align: right;
}

.source-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.1rem;
    font-weight: 500;
    text-align: left;
}

@media only screen and (max-width: 1280px) and (min-width: 768px) {
    :root {
        --hero-bg-position-y: 65%;
    }
}

/* Tablet and Mobile Navigation */
@media (max-width: 991px) {
    /* Hide Bootstrap's default collapse behavior */
    .navbar-collapse:not(.custom-menu-active) {
        display: none !important;
    }
    
    /* Custom mobile/tablet menu */
    .navbar-collapse.custom-menu-active {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background-color: var(--navbar-bg) !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .navbar-collapse.custom-menu-active.custom-menu-show {
        transform: translateX(0);
    }
    
    .mobile-menu-logo {
        position: absolute;
        top: 1rem;
        left: 1.5rem;
        z-index: 10;
        text-decoration: none;
        transition: opacity 0.3s ease;
    }
    
    .mobile-menu-logo:hover {
        opacity: 0.8;
    }
    
    .mobile-menu-logo img {
        width: 150px;
        height: auto;
        max-height: 50px;
    }
    

    
    .navbar-collapse .navbar-nav {
        padding: 4rem 2rem 2rem 2rem;
        margin-top: 25px;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .navbar-collapse .nav-item {
        width: 100%;
        margin: 0;
        position: relative;
    }
    
    .navbar-collapse .nav-item.dropdown {
        display: flex;
        flex-direction: column;
    }
    
    .navbar-collapse .nav-link {
        font-size: 1.2rem;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        margin: 0;
        width: 100%;
        text-align: left;
        background-color: rgba(168, 168, 168, 0.05);
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: auto;
        order: 1;
    }
    
    .navbar-collapse .nav-link.dropdown-toggle {
        position: relative;
        z-index: 1;
    }
    
    .navbar-collapse .nav-link.dropdown-toggle::after {
        transition: transform 0.3s ease;
    }
    
    .navbar-collapse .nav-link.dropdown-toggle[aria-expanded="true"]::after {
        transform: rotate(180deg);
    }
    
    .navbar-collapse .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background-color: transparent !important;
        padding: 0 !important;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
        display: block !important;
        transform: none !important;
        inset: auto !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        order: 2;
    }
    
    .navbar-collapse .dropdown-menu.show {
        max-height: 300px;
        padding: 0.5rem 0 !important;
        position: static !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    .navbar-collapse .dropdown-item {
        padding: 0.75rem 0 0.75rem 2rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-color);
        background-color: rgba(168, 168, 168, 0.1);
        width: 100%;
        margin: 0;
        color: var(--text-primary);
        text-decoration: none;
        display: block;
        border-radius: 0;
    }
    
    .navbar-collapse .dropdown-item:hover {
        background-color: rgba(168, 168, 168, 0.08);
        color: var(--text-primary);
    }
    
    .navbar-collapse .dropdown-menu li:first-child .dropdown-item {
        border-top-left-radius: 0.5rem !important;
        border-top-right-radius: 0.5rem !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
    
    .navbar-collapse .dropdown-menu li:last-child .dropdown-item {
        border-bottom: none;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 0.5rem !important;
        border-bottom-right-radius: 0.5rem !important;
    }
    
    /* Single item dropdown (first and last child at the same time) */
    .navbar-collapse .dropdown-menu li:first-child:last-child .dropdown-item {
        border-top-left-radius: 0.5rem !important;
        border-top-right-radius: 0.5rem !important;
        border-bottom-left-radius: 0.5rem !important;
        border-bottom-right-radius: 0.5rem !important;
    }
    
    .navbar-collapse .theme-toggle {
        margin: 0 auto 1rem auto;
        align-self: center;
        width: auto;
        height: auto;
        border-radius: 0.5rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        font-weight: 500;
        background-color: var(--accent-color);
        border: none;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: all 0.3s ease;
        text-align: center;
    }
    
    .navbar-collapse .theme-toggle:hover {
        background-color: var(--accent-hover);
        color: #ffffff;
        transform: none;
    }
    
    .navbar-collapse .theme-toggle .theme-icon {
        display: inline-block;
        margin: 0;
        font-size: 0.8rem;
    }
    
    /* Keep hamburger button visible and functional */
    .modern-navbar .navbar-toggler {
        position: relative;
        z-index: 1001;
        border-color: var(--border-color);
    }
    
    /* Custom hamburger icon colors for themes */
    .modern-navbar .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%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    [data-theme="dark"] .modern-navbar .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");
    }
    
    .modern-navbar .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
        border: 1px solid var(--border-color);
        margin-left: 1rem;
        flex-shrink: 0;
        z-index: 1001;
        position: relative;
    }
}

@media (max-width: 768px) {
    :root {
        /* Mobile hero background positioning */
        --hero-bg-position-x: 85%;
        --hero-bg-position-y: 0px;
    }
    
    /* Mobile text spacing */
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* Mobile navbar adjustments */
    .modern-navbar {
        padding: 0.5rem 0;
    }
    
    .modern-navbar .container {
        padding: 0 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    
    .navbar-logo {
        height: 40px;
    }
    
    .hero-section {
        height: 550px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .image-source {
        top: 15px;
        bottom: auto;
        right: 15px;
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    
    .source-label {
        margin-bottom: 0;
        font-size: 0.6rem;
    }
}

/* Update existing components to use CSS variables */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 31px;
    }
}

.timeline-item {
    padding: 1rem 0;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--bg-secondary);
}

@media (max-width: 768px) {
    .timeline-item::before {
        left: 31px;
    }
}

.timeline-content {
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    width: calc(50% - 2rem);
    margin-left: auto;
    transition: all 0.3s ease;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: auto;
}

@media (max-width: 768px) {
    .timeline-content {
        width: calc(100% - 4rem);
        margin-left: 4rem !important;
    }
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}


@media (prefers-reduced-motion: reduce) {
    .card {
        transition: none;
    }
    
    .card:hover {
        transform: none;
    }
}



/* Generic section styles */
.content-section {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 4rem 0;
    margin: 0;
    transition: all 0.3s ease;
}

/* Automatic alternating backgrounds for content sections */
.content-section:nth-of-type(even) {
    background: var(--bg-primary);
}

.content-section-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 2.25rem;
}

.content-section-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.content-section-text:last-child {
    margin-bottom: 0;
}

.content-section-text strong {
    font-weight: 600;
}

.content-section-list {
    margin-bottom: 1.75rem;
}

.content-section-list ul {
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.content-section-list li {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.content-section-list li:last-child {
    margin-bottom: 0;
}

.content-section-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.content-section-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.content-section-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Generic button styles based on hero section */
.btn-modern {
    padding: 0.75rem 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 500;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border: 1px solid transparent;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-modern-outline {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: rgba(255, 255, 255, 0.9);
}

.btn-modern-outline:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.btn-modern-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

.btn-modern-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

/* Alternative outline style for content sections (lighter backgrounds) */
.btn-modern-outline-dark {
    background-color: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    text-shadow: none;
}

.btn-modern-outline-dark:hover {
    background-color: var(--text-secondary);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

/* Legacy content-section-btn classes for backward compatibility */
.content-section-btn {
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.content-section-btn-outline {
    background-color: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
}

.content-section-btn-outline:hover {
    background-color: var(--text-secondary);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.content-section-btn-primary {
    background-color: var(--accent-color);
    border: 1px solid var(--accent-color);
    color: #ffffff;
}

.content-section-btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .content-section {
        padding: 3rem 0;
    }
    
    .content-section-title {
        font-size: 1.875rem;
    }
    
    .content-section-text,
    .content-section-list li {
        font-size: 1rem;
    }

    .content-section-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .content-section-btn,
    .btn-modern {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .content-section-btn:hover,
    .btn-modern:hover,
    .btn-modern-outline:hover,
    .btn-modern-primary:hover,
    .btn-modern-outline-dark:hover {
        transform: none;
    }
}

.disclaimer-section {
    border-top: 2px solid var(--border-color);
    padding-top: 3rem;
    margin-top: 3rem;
    color: var(--text-secondary);
}

/* Remove old footer styles - they are now in .modern-footer */

.navbar-brand {
    font-weight: 600;
}

.section-padding {
    padding: 3rem 0;
}

.img-placeholder {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    min-height: 200px;
    border: 1px solid var(--border-color);
}

/* Modern Navbar */
.modern-navbar {
    background-color: var(--navbar-bg);
    border-bottom: 1px solid var(--navbar-border);
    padding: 0.25rem 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.modern-navbar .container {
    display: flex;
    align-items: center;
}

.modern-navbar .navbar-nav {
    align-items: center;
}

.modern-navbar .nav-item {
    display: flex;
    align-items: center;
}

.modern-navbar .nav-link {
    color: var(--accent-color);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
    display: flex;
    align-items: center;
}

.modern-navbar .nav-link.active {
    background-color: rgba(220, 53, 69, 0.15);
    color: var(--accent-color);
    font-weight: 600;
}

.modern-navbar .navbar-brand {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.navbar-logo {
    height: 50px;
    width: auto;
    transition: opacity 0.3s ease;
}

.modern-navbar .navbar-brand:hover .navbar-logo {
    opacity: 0.8;
}

.modern-navbar .navbar-brand .brand-short {
    display: none;
}

.modern-navbar .navbar-brand .brand-full {
    display: inline;
}

.modern-navbar .navbar-brand:hover {
    color: var(--accent-color);
}

.modern-navbar .nav-link:hover,
.modern-navbar .nav-link:focus {
    color: #ffffff;
    background-color: var(--accent-color);
}

.modern-navbar .dropdown-menu {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    margin-top: 0;
    top: 100%;
}

.modern-navbar .dropdown-item {
    color: var(--accent-color);
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
}

.modern-navbar .dropdown-item.active {
    background-color: rgba(220, 53, 69, 0.15);
    color: var(--accent-color);
    font-weight: 600;
}

.modern-navbar .dropdown-item:hover {
    color: #ffffff;
    background-color: var(--accent-color);
}

.modern-navbar .navbar-toggler {
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}

.modern-navbar .navbar-toggler:focus {
    box-shadow: none !important;
    border-color: var(--border-color) !important;
}

.modern-navbar .dropdown-toggle:focus,
.modern-navbar .dropdown-toggle:active {
    box-shadow: none !important;
}

.modern-navbar .dropdown-item:focus,
.modern-navbar .dropdown-item:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    margin-top: 0;
    color: var(--accent-color);
    align-self: center;
}

.theme-toggle:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

/* Ensure nav-item containing theme toggle is properly aligned */
.nav-item:has(.theme-toggle) {
    display: flex;
    align-items: center;
}

.theme-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease, color 0.3s ease;
    color: inherit;
    margin-left: 2px;
    margin-bottom: 2px;
}

.theme-toggle:hover .theme-icon {
    color: inherit;
}

/* Theme toggle button focus */
.theme-toggle:focus,
.theme-toggle:active {
    outline: none !important;
    box-shadow: none !important;
    border-color: var(--border-color) !important;
}

/* Modern Footer */
.modern-footer {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0 1rem;
    margin-top: auto;
    transition: all 0.3s ease;
}

.footer-brand h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.footer-note {
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

@media (min-width: 768px) {
    .footer-nav {
        justify-content: flex-end;
        margin-top: 0;
    }
}

@media (max-width: 767px) {
    .modern-footer {
        padding: 1rem 0;
    }
    
    .footer-nav {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
}

/* Remove default focus outlines but maintain accessibility */
button:focus,
.btn:focus,
.nav-link:focus,
.navbar-brand:focus,
.dropdown-toggle:focus,
.dropdown-item:focus,
a:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Optional: Add subtle custom focus styles for accessibility */
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.navbar-brand:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Account section styling */
.account-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--accent-color);
    text-decoration: none;
    background-color: rgba(220, 53, 69, 0.15);
    border-radius: 0.375rem;
    margin-right: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.account-link:hover,
.account-link:focus {
    background-color: rgba(220, 53, 69, 0.25);
    color: var(--accent-color);
    text-decoration: none;
}

.account-dropdown-toggle {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--accent-color);
    text-decoration: none;
    background-color: rgba(220, 53, 69, 0.15);
    border-radius: 0.375rem;
    margin-right: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.account-dropdown-toggle:hover,
.account-dropdown-toggle:focus {
    background-color: rgba(220, 53, 69, 0.25);
    text-decoration: none;
}

/* Chevron animation for all dropdowns */
.account-dropdown-toggle::after,
.nav-link.dropdown-toggle::after {
    transition: transform 0.3s ease;
}

.account-dropdown-toggle[aria-expanded="true"]::after,
.nav-link.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    border: none !important;
}

/* Mobile menu styling for account buttons */
@media (max-width: 991.98px) {
    .navbar-nav.ms-auto {
        flex-direction: column !important;
        align-items: center;
        margin-top: -2rem;
        margin-bottom: 1rem;
    }
    
    .navbar-nav.ms-auto .nav-item {
        margin: 0;
    }
    
    .navbar-nav.ms-auto .account-link {
        margin-right: 0;
        white-space: nowrap;
    }
    
    /* Wrapper for account buttons to display them in a row */
    .mobile-account-buttons {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    /* Mobile dropdown chevron positioning */
    .mobile-account-buttons .account-dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: auto;
        min-width: 120px;
        margin-right: 0 !important;
    }
    
    .mobile-account-buttons .account-dropdown-toggle::after {
        margin-left: auto;
        margin-right: 0;
        transition: transform 0.3s ease;
    }
    
    /* Rotate chevron when dropdown is open */
    .mobile-account-buttons .account-dropdown-toggle[aria-expanded="true"]::after {
        transform: rotate(180deg);
    }
}

