.logo-ceor {
    background: url("/static/images/tpuLogo.png") no-repeat center / contain;
    width: 70px;
    height: 70px;
}

.logo-ceor-foot {
    background: url("/static/images/TsorLogo.png") no-repeat center / contain;
    width: 130px;
    height: 87px;
}

#brandCarousel .carousel-item {
    transition: transform 0.6s ease-in-out;
    border-radius: 24px;
    overflow: hidden;
}

#brandCarousel .carousel-control-prev-icon,
#brandCarousel .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.4);
    background-size: 50%;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

#brandCarousel .carousel-indicators [data-bs-target] {
    background-color: #aaa;
}

#brandCarousel .carousel-indicators .active {
    background-color: #fff;
}

.carousel-control-prev-custom,
.carousel-control-next-custom {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 50% !important;
}

.carousel-control-prev-custom i,
.carousel-control-next-custom i {
    font-size: 1.4rem;
}

.carousel-control-prev-custom:hover,
.carousel-control-next-custom:hover {
    background-color: var(--blue);
    border-color: var(--blue);
    color: white;
}

.carousel-indicators {
    margin-top: 20px !important;
    margin-bottom: 0;
}

.carousel-indicators button {
    background-color: #ccc !important;
    transition: background-color 0.2s;
}

.carousel-indicators button.active {
    background-color: var(--blue) !important;
}

#brandCarousel .container {
    padding-left: 20px;
    padding-right: 20px;
}

:root {
    --orange: #E65C1E;
    --blue: #1A5F9E;
    --green: #2E8B57;
}

:root,
[data-theme="light"] {
    --bg-body: #F5F7FA;
    --bg-card: #ffffff;
    --bg-navbar: #ffffff;
    --bg-footer: #1e2a36;
    --text-primary: #1e2f3e;
    --text-secondary: #4a5568;
    --text-muted: #6c757d;
    --text-footer: #cddfe7;
    --border-light: #e9ecef;
    --shadow: 0 2px 12px rgba(0,0,0,0.05);
    --shadow-hover: 0 16px 28px rgba(0,0,0,0.08);
    --btn-outline-border: #1A5F9E;
    --btn-outline-color: #1A5F9E;
    --btn-outline-hover-bg: #1A5F9E;
    --btn-outline-hover-color: #ffffff;
    --btn-primary-bg: #E65C1E;
    --btn-primary-hover-bg: #c94a0f;
    --carousel-control-bg: rgba(0,0,0,0.5);
    --lead-color: #4a5568;
}

[data-theme="dark"] {
    --bg-body: #12151f;
    --bg-card: #1e2433;
    --bg-navbar: #181e2a;
    --bg-footer: #0f131c;
    --text-primary: #eef2ff;
    --text-secondary: #cbd5e1;
    --text-muted: #a0aec0;
    --text-footer: #b9c3d4;
    --border-light: #2d3748;
    --shadow: 0 2px 12px rgba(0,0,0,0.3);
    --shadow-hover: 0 16px 28px rgba(0,0,0,0.4);
    --btn-outline-border: #3a7ca5;
    --btn-outline-color: #3a7ca5;
    --btn-outline-hover-bg: #3a7ca5;
    --btn-outline-hover-color: #ffffff;
    --btn-primary-bg: #E65C1E;
    --btn-primary-hover-bg: #f06a2c;
    --carousel-control-bg: rgba(0,0,0,0.7);
    --lead-color: #cbd5e1;
}

* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
}

.lead {
    color: var(--lead-color) !important;
}

.navbar-custom {
    background-color: var(--bg-navbar) !important;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-light);
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-custom.navbar-scrolled {
    padding: 6px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.navbar-custom.navbar-scrolled .brand-letters {
    font-size: 1.6rem;
}

.navbar-custom.navbar-scrolled .brand-sub {
    font-size: 0.7rem;
}

body {
    padding-top: 85px;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}

.brand-letters {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
}
.letter-c { color: var(--orange); }
.letter-o { color: var(--blue); }
.letter-r { color: var(--green); }

.brand-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.navbar-nav .nav-link {
    color: var(--text-primary) !important;
}
.navbar-nav .nav-link.active {
    font-weight: 600;
    color: var(--orange) !important;
}
.navbar-nav .nav-link:hover {
    color: var(--orange) !important;
}

.hero-block {
    background-color: var(--bg-card);
    border-radius: 32px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    margin: 2rem 0;
    transition: all 0.2s;
}

.invite-block {
    background-color: var(--bg-card);
    border-radius: 32px;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.invite-block h3,
.invite-block .lead {
    color: var(--text-primary);
}

.invite-block .btn-brand-primary {
    background-color: var(--btn-primary-bg);
    border: none;
    transition: all 0.2s;
}

.invite-block .btn-brand-primary:hover {
    background-color: var(--btn-primary-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-outline-brand {
    border: 1.5px solid var(--btn-outline-border);
    color: var(--btn-outline-color);
    background: transparent;
}
.btn-outline-brand:hover {
    background-color: var(--btn-outline-hover-bg);
    color: var(--btn-outline-hover-color);
}
.btn-brand-primary {
    background-color: var(--btn-primary-bg);
    border: none;
    color: white;
}
.btn-brand-primary:hover {
    background-color: var(--btn-primary-hover-bg);
}

[data-theme="dark"] .btn-outline-brand {
    color: #77bbff;
}
[data-theme="dark"] .btn-outline-brand:hover {
    color: var(--btn-outline-hover-color);
}

.section-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: var(--shadow);
    border-bottom: 3px solid transparent;
    height: 100%;
}
.section-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.section-card.accent-orange:hover {
    border-bottom-color: var(--orange);
}
.section-card .section-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}
.section-card.accent-orange:hover .section-icon {
    color: var(--orange);
}
.section-card h5,
.section-card .fw-semibold {
    color: var(--text-primary);
}
.section-card .small,
.section-card .text-muted-custom {
    color: var(--text-muted) !important;
}

.project-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: var(--shadow);
    border-bottom: 3px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-bottom-color: var(--blue);
}
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.project-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 30px;
    white-space: nowrap;
    line-height: 1.2;
    margin: 0;
}
.status-orange { background: #ffe8e0; color: var(--orange); }
.status-blue { background: #e6f0fa; color: var(--blue); }
.status-green { background: #e0f5e9; color: var(--green); }
[data-theme="dark"] .status-orange { background: #4a2a1a; color: #ffaa77; }
[data-theme="dark"] .status-blue { background: #1a334a; color: #77bbff; }
[data-theme="dark"] .status-green { background: #1a3a2a; color: #77ffaa; }
.project-card h5 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}
.project-card .small {
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--text-muted);
}
.project-card .progress {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: var(--border-light);
}
.project-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.offer-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    padding: 1.25rem;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: var(--shadow);
    border-bottom: 3px solid transparent;
    height: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

.offer-card h5,
.offer-card p {
    overflow-wrap: break-word;
    word-break: break-word;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-bottom-color: var(--blue);
}

.offer-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(26, 95, 158, 0.1) 0%, rgba(26, 95, 158, 0.02) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--blue);
}

.offer-card:hover .offer-icon {
    background-color: var(--blue);
    color: white;
}

.btn-link-custom {
    font-size: 0.8rem;
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.offer-card:hover .btn-link-custom {
    gap: 8px;
    text-decoration: underline;
}

[data-theme="dark"] .btn-link-custom {
    color: #77bbff;
}

.event-card {
    background-color: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: var(--shadow);
    border-bottom: 3px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-bottom-color: var(--green);
}
.event-img {
    object-fit: contain;
    width: 100%;
    border-radius: 5px;
    padding: 2px;
}
.event-date {
    font-size: 0.75rem;
    color: var(--blue);
    font-weight: 600;
}

[data-theme="dark"] .event-date {
    color: #77bbff;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--carousel-control-bg);
    border-radius: 50%;
    padding: 20px;
    background-size: 50% 50%;
}

#eventsCarousel .event-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: var(--shadow);
    border-bottom: 3px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#eventsCarousel .event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-bottom-color: var(--green);
}

#eventsCarousel .event-img {
    width: 100%;
    /*height: 150px;*/
    object-fit: cover;
    background-color: var(--border-light);
}

#eventsCarousel .event-card .p-3 {
    padding: 0.75rem !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#eventsCarousel .event-card h5 {
    font-size: 0.95rem;
    margin: 0.5rem 0;
    line-height: 1.3;
}

#eventsCarousel .event-card .event-date {
    font-size: 0.7rem;
    color: var(--blue);
    font-weight: 600;
}

#eventsCarousel .event-card .small {
    font-size: 0.75rem;
    flex-grow: 1;
}

#eventsCarousel .event-card .btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    align-self: flex-start;
    margin-top: 0.5rem;
}

#eventsCarousel .carousel-control-prev-icon,
#eventsCarousel .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 1rem;
    background-size: 50% 50%;
}

#eventsCarousel .carousel-control-prev,
#eventsCarousel .carousel-control-next {
    width: 5%;
    opacity: 0.7;
}

#eventsCarousel .carousel-control-prev:hover,
#eventsCarousel .carousel-control-next:hover {
    opacity: 1;
}

.bg-white-custom {
    background-color: var(--bg-card) !important;
}
.bg-white-custom,
.bg-white-custom * {
    color: var(--text-primary);
}
.bg-white-custom .text-muted-custom,
.bg-white-custom p:not(.text-primary),
.bg-white-custom .small {
    color: var(--text-muted) !important;
}
.bg-white-custom h4,
.bg-white-custom .fw-semibold {
    color: var(--text-primary);
}

.footer {
    background-color: var(--bg-footer) !important;
    color: var(--text-footer);
}
.footer a {
    color: var(--text-footer);
    text-decoration: none;
}
.footer a:hover {
    color: white;
    text-decoration: underline;
}
.footer hr {
    border-color: var(--border-light);
}
[data-theme="light"] .footer h6,
[data-theme="light"] .footer h5 {
    color: #ffffff !important;
}

.theme-toggle-container {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.theme-toggle-switch {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.theme-toggle-track {
    position: relative;
    width: 60px;
    height: 30px;
    background-color: var(--border-light);
    border-radius: 30px;
    transition: background-color 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: var(--bg-card);
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.theme-icon-sun,
.theme-icon-moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.theme-icon-sun {
    left: 8px;
    color: var(--orange);
}

.theme-icon-moon {
    right: 8px;
    color: #a0aec0;
}

[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(0);
}

[data-theme="light"] .theme-icon-moon {
    opacity: 0.5;
}

[data-theme="light"] .theme-icon-sun {
    opacity: 1;
}

[data-theme="dark"] .theme-toggle-track {
    background-color: #2d3748;
}

[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(30px);
    background-color: var(--orange);
}

[data-theme="dark"] .theme-icon-sun {
    opacity: 0.5;
}

[data-theme="dark"] .theme-icon-moon {
    opacity: 1;
}

.theme-toggle-switch:hover .theme-toggle-thumb {
    transform: scale(1.05);
}

[data-theme="dark"] .theme-toggle-switch:hover .theme-toggle-thumb {
    transform: translateX(30px) scale(1.05);
}

.global-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-80%);
    min-width: 300px;
    width: auto;
    z-index: 1050;
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 0 0 12px 12px;
    max-height: 350px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
    box-shadow: var(--shadow-hover);
    display: none;
}
.global-autocomplete-list li {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.15s;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.global-autocomplete-list li:last-child {
    border-bottom: none;
}
.global-autocomplete-list li:hover {
    background-color: var(--bg-body);
}
.global-autocomplete-list li .global-ac-category {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: var(--bg-body);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 12px;
}
.global-autocomplete-list li strong {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

[data-theme="dark"] .global-autocomplete-list {
    background-color: #1e2433;
    border-color: #2d3748;
}
[data-theme="dark"] .global-autocomplete-list li {
    border-bottom-color: #2d3748;
}
[data-theme="dark"] .global-autocomplete-list li:hover {
    background-color: #12151f;
}
[data-theme="dark"] .global-autocomplete-list li .global-ac-category {
    background-color: #12151f;
    color: #a0aec0;
}

@media (max-width: 576px) {
    .global-autocomplete-list {
        top: auto;
        bottom: 100%;
        left: 0;
        transform: none;
        min-width: 100%;
        width: 100%;
        z-index: 9999;
    }
    /*.navbar-collapse {
        overflow: visible !important;
        overflow-y: auto;
    }*/
    .navbar .container {
        overflow: visible !important;
    }
    .search-wrapper {
        position: relative;
        z-index: 9999;
    }
}

.text-muted-custom {
    color: var(--text-muted) !important;
}
.border-custom {
    border-color: var(--border-light) !important;
}
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

.author-link {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.author-link:hover {
    color: var(--orange);
    text-decoration: underline;
}
.author-link:visited {
    color: var(--blue);
}

[data-theme="dark"] .author-link {
    color: #77bbff;
}
[data-theme="dark"] .author-link:hover {
    color: var(--orange);
}

.code-input {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 6px 10px;
    /*width: 100%;*/
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .code-input {
    background-color: #1a1f2e;
    border-color: #3a4a6e;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .code-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(26, 95, 158, 0.3);
}

[data-theme="dark"] .btn-copy,
[data-theme="dark"] .copy-btn {
    background-color: #1a2436;
    border-color: #3a4a6e;
    color: #cbd5e1;
}

[data-theme="dark"] .btn-copy:hover,
[data-theme="dark"] .copy-btn:hover {
    background-color: var(--blue);
    color: white;
    border-color: var(--blue);
}

.btn-submit {
    background-color: var(--orange);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 40px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-submit:hover {
    background-color: #c94a0f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-submit:active {
    transform: translateY(0);
}

[data-theme="dark"] .btn-submit {
    background-color: #e06c2e;
}

[data-theme="dark"] .btn-submit:hover {
    background-color: var(--orange);
}

.btn-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 92, 30, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 200px;
}
.search-wrapper .form-control {
    padding-left: 38px;
    flex: 1;
}
.search-wrapper .search-btn,
.search-wrapper .clear-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    padding: 0 8px;
    font-size: 1rem;
    line-height: 1;
    color: var(--text-muted);
}
.search-wrapper .search-btn {
    left: 6px;
    color: var(--blue);
}
.search-wrapper .clear-btn {
    right: 6px;
    color: var(--text-muted);
    display: none;
}
.search-wrapper .search-btn:hover,
.search-wrapper .clear-btn:hover {
    color: var(--orange);
}

.search-wrapper .search-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

input[type="search"]::-moz-search-clear-button {
    display: none;
}

input[type="search"]::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}

[data-theme="dark"] .navbar-toggler {
    border-color: rgba(255,255,255,0.3);
}
[data-theme="dark"] .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(255,255,255,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.icon-outline {
    text-shadow:
        -1px -1px 0 var(--icon-outline-color, currentColor),
        1px -1px 0 var(--icon-outline-color, currentColor),
        -1px 1px 0 var(--icon-outline-color, currentColor),
        1px 1px 0 var(--icon-outline-color, currentColor),
        0 0 2px var(--icon-outline-color, currentColor);
    
    --icon-outline-color: rgba(255, 255, 255, 0.8);
    transition: text-shadow 0.2s ease;
}

.icon-outline-thick {
    --icon-outline-color: rgba(255, 255, 255, 0.9);
    text-shadow:
        -2px -2px 0 var(--icon-outline-color),
        2px -2px 0 var(--icon-outline-color),
        -2px 2px 0 var(--icon-outline-color),
        2px 2px 0 var(--icon-outline-color),
        0 0 4px var(--icon-outline-color);
}

[data-theme="dark"] .icon-outline {
    --icon-outline-color: rgba(255, 255, 255, 0.9);
}
[data-theme="light"] .icon-outline {
    --icon-outline-color: rgba(0, 0, 0, 0.3);
}

.footer .list-unstyled li a {
    color: #cddfe7;
    text-decoration: underline;
}
.footer .list-unstyled li a:hover {
    color: #fff;
}

@media (max-width: 575.98px) {
    .footer .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 0.5rem;
    }
    .footer .navbar-brand {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }
    .footer .logo-ceor-foot {
        width: 80px;
        height: 54px;
    }
    .footer .navbar-brand span {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    .footer h6 {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    .footer ul {
        padding-left: 0;
        margin-bottom: 0.5rem;
    }
    .footer ul li {
        font-size: 0.75rem;
        line-height: 1.4;
        margin-bottom: 0.25rem;
    }
    .footer .list-unstyled li a {
        font-size: 0.75rem;
    }
    .footer hr {
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
    .footer .text-center.small {
        font-size: 0.65rem;
        padding: 0 0.5rem;
    }
}
@media (max-width: 992px) {
    .footer .row {
        row-gap: 1rem;
    }
}

@media (max-width: 991.98px) {
    .navbar .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    .navbar-top-row {
        flex-wrap: nowrap !important;
    }
    .navbar-brand {
        flex-shrink: 1;
        min-width: 0;
    }
    .navbar-brand .lead {
        font-size: 0.85rem !important;
        line-height: 1.2;
    }
    .logo-ceor {
        width: 50px;
        height: 50px;
    }
    .theme-toggle-container {
        margin-left: 0 !important;
    }
    .theme-toggle-track {
        width: 50px;
        height: 26px;
    }
    .theme-toggle-thumb {
        width: 20px;
        height: 20px;
        top: 3px;
        left: 3px;
    }
    [data-theme="dark"] .theme-toggle-thumb {
        transform: translateX(24px);
    }
    [data-theme="dark"] .theme-toggle-switch:hover .theme-toggle-thumb {
        transform: translateX(24px) scale(1.05);
    }
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }

    .navbar-collapse .search-wrapper {
        width: 100%;
        margin-top: 0.5rem;
    }

    .theme-icon-sun,
    .theme-icon-moon {
        font-size: 0.7rem;
    }
    .theme-icon-sun {
        left: 6px;
    }
    .theme-icon-moon {
        right: 6px;
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-navbar);
        padding: 1rem;
        border-radius: 0 0 12px 12px;
        box-shadow: var(--shadow-hover);
        z-index: 1050;
        max-height: 80vh;
        overflow-y: auto;
        border-top: 1px solid var(--border-light);
    }
    .navbar-collapse .navbar-nav {
        margin-bottom: 0.5rem;
    }
    .navbar-collapse .search-wrapper {
        width: 100%;
        margin-top: 0.5rem;
    }
    .navbar-collapse .d-lg-none {
        display: flex !important;
        justify-content: flex-end;
    }
    .navbar-collapse .d-none.d-lg-flex {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand .lead {
        font-size: 0.75rem !important;
    }
    .logo-ceor {
        width: 40px;
        height: 40px;
    }
    .theme-toggle-track {
        width: 44px;
        height: 22px;
    }
    .theme-toggle-thumb {
        width: 16px;
        height: 16px;
        top: 3px;
        left: 3px;
    }
    [data-theme="dark"] .theme-toggle-thumb {
        transform: translateX(22px);
    }
    [data-theme="dark"] .theme-toggle-switch:hover .theme-toggle-thumb {
        transform: translateX(22px) scale(1.05);
    }
    .theme-icon-sun,
    .theme-icon-moon {
        font-size: 0.6rem;
    }
    .theme-icon-sun {
        left: 5px;
    }
    .theme-icon-moon {
        right: 5px;
    }
}

@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }
    .d-none.d-lg-flex {
        display: flex !important;
    }
}

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: var(--bg-card);
    border-top: 3px solid var(--blue);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    padding: 1rem 1.5rem;
    transition: transform 0.4s ease, opacity 0.4s ease;
    transform: translateY(100%);
    opacity: 0;
}
.cookie-consent.show {
    transform: translateY(0);
    opacity: 1;
}
.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cookie-consent p {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin: 0;
    flex: 1 1 auto;
}
.cookie-link {
    color: var(--blue);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-link:hover {
    color: var(--orange);
}
.cookie-btn {
    flex-shrink: 0;
    padding: 0.5rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    background-color: var(--btn-primary-bg);
    border: none;
    color: white;
    transition: background-color 0.2s, transform 0.2s;
}
.cookie-btn:hover {
    background-color: var(--btn-primary-hover-bg);
    transform: scale(1.02);
}

@media (max-width: 576px) {
    .cookie-consent {
        padding: 0.75rem 1rem;
    }
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.75rem;
    }
    .cookie-consent p {
        font-size: 0.85rem;
    }
    .cookie-btn {
        width: 100%;
        padding: 0.5rem;
    }
}

[data-theme="dark"] .cookie-consent {
    background-color: #1e2433;
    border-top-color: var(--blue);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
[data-theme="dark"] .cookie-consent p {
    color: #eef2ff;
}

[data-theme="dark"] .modal-content {
    background-color: #1e2433;
    color: #eef2ff;
    border-color: #2d3748;
}
[data-theme="dark"] .modal-header {
    border-bottom-color: #2d3748;
}
[data-theme="dark"] .modal-footer {
    border-top-color: #2d3748;
}
[data-theme="dark"] .btn-close {
    filter: invert(1);
}