html[data-theme="light"] body {
    background-color: #ffffff;
    color: #212529;
}

html[data-theme="dark"] body {
    background-color: #121212;
    color: #e9ecef;
}

html[data-theme="light"] .navbar {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(235, 235, 235, 1) 50%,
        rgba(238, 238, 238, 1) 100%
    );
    background-color: rgba(0, 0, 0, 0.9);
    background-color: #f3f3f3;
    border-radius: 0.5rem;
}

html[data-theme="dark"] .navbar {
    background-color: #1f1f1f;
    border-radius: 0.5rem;
}

html[data-theme="light"] .navbar-collapse {
    background-color: #f3f3f3;
}

html[data-theme="dark"] .navbar-collapse {
    background-color: #1f1f1f;
}

html[data-theme="light"] .navbar-toggler {
    color: rgba(0, 0, 0, 0.55);
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] .navbar-toggler {
    color: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0,0,0,0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'%3e%3c/path%3e%3c/svg%3e");
}

html[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255,255,255,0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'%3e%3c/path%3e%3c/svg%3e");
}

html[data-theme="light"] .offcanvas {
    background-color: #f3f3f3;
    color: #212529;
}

html[data-theme="dark"] .offcanvas {
    background-color: #1f1f1f;
    color: #e9ecef;
}

html[data-theme="light"] a {
    color: #4e4e4e;
}

html[data-theme="dark"] a {
    color: #8f8f8f;
}

html[data-theme="light"] a:hover,
html[data-theme="light"] a:active {
    color: #313131;
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:active {
    color: #bfbfbf;
}

html[data-theme="light"] .tm-footer {
    background: linear-gradient(
        rgba(238, 238, 238, 1) 100%,
        rgba(235, 235, 235, 1) 50%,
        90deg,
        rgba(255, 255, 255, 1) 0%
    );
    background-color: rgba(0, 0, 0, 0.9);
    background-color: #f3f3f3;
    border-radius: 0.5rem;
}

html[data-theme="dark"] .tm-footer {
    background-color: #1f1f1f;
    border-radius: 0.5rem;
}

html[data-theme="light"] {
    --page-window-bg: rgba(255, 255, 255, 0.9);
    --page-window-border: rgba(255, 255, 255, 0.6);
    --page-window-bg-image: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.9),
        rgba(245, 245, 245, 0.9)
    );
}

html[data-theme="dark"] {
    --page-window-bg: rgba(0, 0, 0, 0.9);
    --page-window-border: rgba(255, 255, 255, 0.2);
    --page-window-bg-image: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.9),
        rgba(32, 32, 32, 0.9)
    );
}

html[data-theme="light"] .btn-primary,
html[data-theme="light"] .btn-primary:hover,
html[data-theme="light"] .btn-primary:focus,
html[data-theme="light"] .btn-primary.disabled,
html[data-theme="light"] .btn-primary:disabled,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:focus,
html[data-theme="dark"] .btn-primary.disabled,
html[data-theme="dark"] .btn-primary:disabled {
    color: #fff;
}

html[data-theme="light"] .tm-bg-gray {
    background-color: #f3f3f3;
}

html[data-theme="dark"] .tm-bg-gray {
    background-color: #333;
}

html[data-theme="light"] .tm-text-gray {
    color: #999;
}

html[data-theme="dark"] .tm-text-gray {
    color: #ccc;
}

html[data-theme="light"] .tm-text-gray-dark {
    color: #666;
}

html[data-theme="dark"] .tm-text-gray-dark {
    color: #ccc;
}

html[data-theme="light"] .tm-text-primary {
    color: #000000;
}

html[data-theme="dark"] .tm-text-primary {
    color: #d7d7d7;
}

html[data-theme="light"] .tm-social-links li a {
    color: #999999;
    background-color: #fff;
}

html[data-theme="dark"] .tm-social-links li a {
    color: #ccc;
    background-color: #333;
}

html[data-theme="light"] .tm-social-links li a:hover {
    color: #fff;
    background-color: #009999;
}

html[data-theme="dark"] .tm-social-links li a:hover {
    color: #fff;
    background-color: #009999;
}

html[data-theme="light"] .tm-social li a i {
    color: #666666;
    background-color: #f3f3f3;
}

html[data-theme="dark"] .tm-social li a i {
    color: #ccc;
    background-color: #333;
}

html[data-theme="light"] .tm-social li a:hover i {
    color: #fff;
    background-color: #009999;
}

html[data-theme="dark"] .tm-social li a:hover i {
    color: #fff;
    background-color: #009999;
}

html[data-theme="light"] .table {
    --bs-table-bg: #fff;
    --bs-table-striped-bg: #f3f3f3;
    --bs-table-striped-color: #212529;
    --bs-table-hover-bg: #e9ecef;
    --bs-table-hover-color: #212529;
    --bs-table-border-color: #dee2e6;
    color: #212529;
    border-radius: 0.5rem;
    overflow: hidden;
}

html[data-theme="dark"] .table {
    --bs-table-bg: #1f1f1f;
    --bs-table-striped-bg: #2a2a2a;
    --bs-table-striped-color: #e9ecef;
    --bs-table-hover-bg: #333;
    --bs-table-hover-color: #e9ecef;
    --bs-table-border-color: #333;
    color: #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
}

.alert {
    border-radius: 0.5rem;
}

html[data-theme="light"] .list-group-item {
    background-color: #fff;
    color: #212529;
    border-color: #dee2e6;
}

html[data-theme="dark"] .list-group-item {
    background-color: #1f1f1f;
    color: #e9ecef;
    border-color: #333;
}

html[data-theme="light"] .list-group-item:hover {
    background-color: #f3f3f3;
}

html[data-theme="dark"] .list-group-item:hover {
    background-color: #333;
}

html[data-theme="light"] .dropdown-menu {
    background-color: #fff;
    color: #212529;
    border-color: #dee2e6;
}

html[data-theme="dark"] .dropdown-menu {
    background-color: #1f1f1f;
    color: #e9ecef;
    border-color: #333;
}

html[data-theme="light"] .dropdown-menu .dropdown-item {
    color: #212529;
}

html[data-theme="dark"] .dropdown-menu .dropdown-item {
    color: #e9ecef;
}

html[data-theme="light"] .dropdown-menu .dropdown-item:hover {
    background-color: #f3f3f3;
    color: inherit;
}

html[data-theme="dark"] .dropdown-menu .dropdown-item:hover {
    background-color: #333;
    color: inherit;
}

html[data-theme="dark"] .dropdown-menu .dropdown-item:focus,
html[data-theme="dark"] .dropdown-menu .dropdown-item:active,
html[data-theme="dark"] .dropdown-menu .dropdown-item.active {
    background-color: #333;
    color: inherit;
}

html[data-theme="light"] .btn-close {
    filter: none;
}

html[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

html[data-theme="light"] .card.filter-card {
    --bs-card-bg: #fff;
    --bs-card-color: #212529;
    --bs-card-border-color: #dee2e6;
    background-color: var(--bs-card-bg);
    color: var(--bs-card-color);
    border-color: var(--bs-card-border-color);
}

html[data-theme="dark"] .card.filter-card {
    --bs-card-bg: #1f1f1f;
    --bs-card-color: #e9ecef;
    --bs-card-border-color: #333;
    background-color: var(--bs-card-bg);
    color: var(--bs-card-color);
    border-color: var(--bs-card-border-color);
}

html[data-theme="light"] .filter-card .card-header {
    --bs-card-cap-bg: #fff;
    --bs-card-cap-color: #212529;
    background-color: var(--bs-card-cap-bg);
    border-color: var(--bs-card-border-color);
    color: var(--bs-card-cap-color);
    cursor: pointer;
}

html[data-theme="dark"] .filter-card .card-header {
    --bs-card-cap-bg: #333;
    --bs-card-cap-color: #e9ecef;
    background-color: var(--bs-card-cap-bg);
    border-color: var(--bs-card-border-color);
    color: var(--bs-card-cap-color);
    cursor: pointer;
}

/* Admin statistics cards */
html[data-theme="light"] body.admin-statistics .card {
    --bs-card-bg: #fff;
    --bs-card-color: #212529;
    --bs-card-border-color: #dee2e6;
    background-color: var(--bs-card-bg);
    color: var(--bs-card-color);
    border-color: var(--bs-card-border-color);
}

html[data-theme="dark"] body.admin-statistics .card {
    --bs-card-bg: #1f1f1f;
    --bs-card-color: #e9ecef;
    --bs-card-border-color: #333;
    background-color: var(--bs-card-bg);
    color: var(--bs-card-color);
    border-color: var(--bs-card-border-color);
}

html[data-theme="light"] body.admin-statistics .card-header {
    --bs-card-cap-bg: #fff;
    --bs-card-cap-color: #212529;
    background-color: var(--bs-card-cap-bg);
    border-color: var(--bs-card-border-color);
    color: var(--bs-card-cap-color);
}

html[data-theme="dark"] body.admin-statistics .card-header {
    --bs-card-cap-bg: #333;
    --bs-card-cap-color: #e9ecef;
    background-color: var(--bs-card-cap-bg);
    border-color: var(--bs-card-border-color);
    color: var(--bs-card-cap-color);
}

html[data-theme="light"] body.admin-visits .card {
    --bs-card-bg: #fff;
    --bs-card-color: #212529;
    --bs-card-border-color: #dee2e6;
    background-color: var(--bs-card-bg);
    color: var(--bs-card-color);
    border-color: var(--bs-card-border-color);
}

html[data-theme="dark"] body.admin-visits .card {
    --bs-card-bg: #1f1f1f;
    --bs-card-color: #e9ecef;
    --bs-card-border-color: #333;
    background-color: var(--bs-card-bg);
    color: var(--bs-card-color);
    border-color: var(--bs-card-border-color);
}

html[data-theme="light"] body.admin-visits .card-header {
    --bs-card-cap-bg: #fff;
    --bs-card-cap-color: #212529;
    background-color: var(--bs-card-cap-bg);
    border-color: var(--bs-card-border-color);
    color: var(--bs-card-cap-color);
}

html[data-theme="dark"] body.admin-visits .card-header {
    --bs-card-cap-bg: #333;
    --bs-card-cap-color: #e9ecef;
    background-color: var(--bs-card-cap-bg);
    border-color: var(--bs-card-border-color);
    color: var(--bs-card-cap-color);
}

html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select {
    background-color: #fff;
    border-color: #ced4da;
    color: #212529;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background-color: #1f1f1f;
    border-color: #333;
    color: #e9ecef;
}

html[data-theme="light"] .form-control:focus,
html[data-theme="light"] .form-select:focus {
    background-color: #fff;
    border-color: #86b7fe;
    color: #212529;
    box-shadow: none;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    background-color: #333;
    border-color: #555;
    color: #e9ecef;
    box-shadow: none;
}

html[data-theme="light"] .form-check-input {
    background-color: #fff;
    border-color: rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .form-check-input {
    background-color: #1f1f1f;
    border-color: #333;
}

html[data-theme="light"] .form-check-input:checked {
    background-color: #009999;
    border-color: #009999;
}

html[data-theme="dark"] .form-check-input:checked {
    background-color: #009999;
    border-color: #009999;
}

html[data-theme="light"] .modal-content {
    background-color: #fff;
    color: #212529;
    border-color: #dee2e6;
}

html[data-theme="dark"] .modal-content {
    background-color: #1f1f1f;
    color: #e9ecef;
    border-color: #333;
}

/* Modal backdrop */
html[data-theme="light"] .modal-backdrop.show,
html[data-theme="dark"] .modal-backdrop.show {
    opacity: 0.9;
}

html[data-theme="light"] .protected-image-wrapper,
html[data-theme="dark"] .protected-image-wrapper {
    position: relative;
    display: inline-block;
}

html[data-theme="light"] .protected-image-overlay,
html[data-theme="dark"] .protected-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
}

html[data-theme="light"] .gallery-image-wrapper,
html[data-theme="dark"] .gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

html[data-theme="light"] .gallery-image-wrapper .protected-image-wrapper,
html[data-theme="dark"] .gallery-image-wrapper .protected-image-wrapper {
    width: 100%;
    height: 100%;
    display: block;
}

html[data-theme="light"] .photo-thumb,
html[data-theme="dark"] .photo-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

html[data-theme="light"] .gallery-image-wrapper:hover .photo-thumb,
html[data-theme="dark"] .gallery-image-wrapper:hover .photo-thumb {
    transform: scale(1.05);
    cursor: pointer;
}

/* Gallery filter form */
html[data-theme="light"] .filter-form select[multiple],
html[data-theme="dark"] .filter-form select[multiple] {
    min-height: 8rem;
}

/* Home page background and floating window */
html[data-theme="light"] body.home-page,
html[data-theme="light"] body.photos-page,
html[data-theme="light"] body.map-page,
html[data-theme="light"] body.services-page,
html[data-theme="light"] body.contact-page,
html[data-theme="light"] body.about-page,
html[data-theme="light"] body.login-page,
html[data-theme="light"] body.admin-page,
html[data-theme="light"] body.admin-about-page,
html[data-theme="light"] body.admin-footer-page,
html[data-theme="light"] body.admin-photos-page,
html[data-theme="light"] body.admin-photos-parameters-page,
html[data-theme="light"] body.admin-photos-parameters-edit-page,
html[data-theme="light"] body.admin-statistics-page,
html[data-theme="light"] body.admin-info-page,
html[data-theme="light"] body.admin-watermark-page,
html[data-theme="light"] body.admin-tests,
html[data-theme="light"] body.watermark-page {
    background: url("../img/bg_light-2RXjb1N.jpg") no-repeat center center fixed;
    background-size: cover;
}

html[data-theme="dark"] body.home-page,
html[data-theme="dark"] body.photos-page,
html[data-theme="dark"] body.map-page,
html[data-theme="dark"] body.services-page,
html[data-theme="dark"] body.contact-page,
html[data-theme="dark"] body.about-page,
html[data-theme="dark"] body.login-page,
html[data-theme="dark"] body.admin-page,
html[data-theme="dark"] body.admin-about-page,
html[data-theme="dark"] body.admin-footer-page,
html[data-theme="dark"] body.admin-photos-page,
html[data-theme="dark"] body.admin-photos-parameters-page,
html[data-theme="dark"] body.admin-photos-parameters-edit-page,
html[data-theme="dark"] body.admin-statistics-page,
html[data-theme="dark"] body.admin-info-page,
html[data-theme="dark"] body.admin-watermark-page,
html[data-theme="dark"] body.admin-tests,
html[data-theme="dark"] body.watermark-page {
    background: url("../img/bg_dark-X6YH-o8.jpg") no-repeat center center fixed;
    background-size: cover;
}

html[data-theme="light"] .page-window,
html[data-theme="dark"] .page-window {
    background-color: var(--page-window-bg);
    background-image: var(--page-window-bg-image);
    background-size: cover;
    background-repeat: no-repeat;
    border: 1px solid var(--page-window-border);
    border-radius: 0.5rem;
    margin: 2rem auto;
    padding: 2rem;
    max-width: 85%;
    backdrop-filter: blur(4px);
}

html[data-theme="light"] .page-window {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(235, 235, 235, 1) 50%,
        rgba(238, 238, 238, 1) 100%
    );
    background-color: rgba(0, 0, 0, 0.9);
    background-color: rgba(255, 255, 255, 1);
    background-image: none;
    opacity: 0.9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .page-window {
    background-image: none;
    opacity: 1;
    box-shadow: 0 4px 15px rgba(158, 158, 158, 0.5);
}

@media (max-width: 767.98px) {
    html[data-theme="light"] body.home-page,
    html[data-theme="light"] body.photos-page,
    html[data-theme="light"] body.map-page,
    html[data-theme="light"] body.services-page,
    html[data-theme="light"] body.contact-page,
    html[data-theme="light"] body.about-page,
    html[data-theme="dark"] body.home-page,
    html[data-theme="dark"] body.photos-page,
    html[data-theme="dark"] body.map-page,
    html[data-theme="dark"] body.services-page,
    html[data-theme="dark"] body.contact-page,
    html[data-theme="dark"] body.about-page {
        background-image: none;
    }

    html[data-theme="light"] .page-window,
    html[data-theme="dark"] .page-window {
        border: none;
        margin: 0;
        padding: 0;
        max-width: 100%;
        box-shadow: none;
        backdrop-filter: none;
    }

    html[data-theme="light"] .page-window {
        background-color: rgba(255, 255, 255, 0.9);
        background-image: none;
    }

    html[data-theme="dark"] .page-window {
        background-color: rgba(0, 0, 0, 0.9);
        background-image: none;
    }
}

/* Parallax section */
html[data-theme="light"] .parallax-section,
html[data-theme="dark"] .parallax-section {
    min-height: 400px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

html[data-theme="light"] .parallax-section {
    background-image: url("../img/bg_light-2RXjb1N.jpg");
}

html[data-theme="dark"] .parallax-section {
    background-image: url("../img/bg_dark-X6YH-o8.jpg");
}

.admin-visits-page .scrollable-box {
    max-height: 250px;
    overflow-y: auto;
}
