* {
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}
body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    overflow-x: hidden;
    width: 100vw;
}
/* Шапка */
header {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 10px 300px;
    background-color: #FFFFFF;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100vw;
    z-index: 10;
    box-sizing: border-box;
}
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.logo img {
    height: 70px;
    width: auto;
    max-width: 200px;
}
.menu {
    display: flex;
    gap: 20px;
    flex-grow: 1;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}
.menu > li > a {
    text-decoration: none;
    color: #333333;
    font-size: 19px;
    transition: color 0.3s;
    white-space: nowrap;
}
.menu > li > a:hover {
    color: #60739B;
}
.hamb {
    display: none; 
    align-items: center;
    margin-left: auto; 
}
.hamb__field {
    padding: 10px 0;
    cursor: pointer;
}
.bar {
    display: block;
    width: 30px;
    height: 3px;
    margin: 6px auto;
    background-color: #333;
    transition: 0.2s;
}
.popup {
    position: fixed;
    top: 80px; 
    left: -100%; 
    width: 100%;
    height: calc(100% - 80px); 
    background-color: #fff;
    z-index: 99; 
    display: flex;
    transition: 0.3s;
    overflow-y: auto; 
}
.popup.open {
    left: 0; 
}
.popup .menu {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    padding: 50px 0;
    overflow: auto;
}
.popup .menu > li {
    width: 100%;
}
.popup .menu > li > a {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    font-size: 20px;
    font-weight: bold;
    color: #3f3f3f;
}
.popup .menu > li > a:hover {
    background-color: rgba(96, 115, 155, 0.1); 
}
.hamb__field.active .bar:nth-child(2) {
    opacity: 0;
}
.hamb__field.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamb__field.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}
body.noscroll {
    overflow: hidden; 
}
@media (max-width: 1200px) {
    header {
        padding: 15px;
    }
    .menu {
        gap: 15px;
    }
    .menu > li > a {
        font-size: 18px;
    }
}
@media (max-width: 1000px) { 
    header {
        padding: 10px 20px; 
        justify-content: space-between;
    }
    .menu {
        display: none; 
    }
    .hamb {
        display: flex; 
    }
    .logo {
        margin-right: auto; 
    }
    .switch {
        margin-left: 20px; 
    }
}
@media (max-width: 768px) {
    header {
        flex-direction: row; 
        align-items: center;
        padding: 10px 15px;
        position: fixed; 
        width: 100vw;
    }
    .logo img {
        height: 60px; 
    }
    .switch {
        margin-left: 10px; 
    }
    .popup {
        top: 70px; 
        height: calc(100% - 70px);
    }
}
@media (max-width: 480px) {
    .logo img {
        height: 50px;
    }
    .menu > li > a {
        font-size: 15px;
    }
}


/* Кнока переключения темной темы */
.switch {
    font-size: 17px;
    position: relative;
    display: inline-block;
    width: 4em;
    height: 2.2em;
    border-radius: 30px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2a2a2a;
    transition: 0.4s;
    border-radius: 30px;
    overflow: hidden;
}
.slider:before {
    position: absolute;
    content: "";
    height: 1.2em;
    width: 1.2em;
    border-radius: 20px;
    left: 0.5em;
    bottom: 0.5em;
    transition: 0.4s;
    transition-timing-function: cubic-bezier(0.81, -0.04, 0.38, 1.5);
    box-shadow: inset 8px -4px 0px 0px #fff;
}
.switch input:checked + .slider {
    background-color: #60739B;
}
.switch input:checked + .slider:before {
    transform: translateX(1.8em);
    box-shadow: inset 15px -4px 0px 15px #ffcf48;
}
.star {
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    width: 5px;
    transition: all 0.4s;
    height: 5px;
}
.star_1 {
    left: 2.5em;
    top: 0.5em;
}
.star_2 {
    left: 2.2em;
    top: 1.2em;
}
.star_3 {
    left: 3em;
    top: 0.9em;
}
.switch input:checked ~ .slider .star {
    opacity: 0;
}
.cloud {
    width: 3.5em;
    position: absolute;
    bottom: -1.4em;
    left: -1.1em;
    opacity: 0;
    transition: all 0.4s;
}
.switch input:checked ~ .slider .cloud {
    opacity: 1;
}


#page-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-top: 100px;
}

.museum-detail-page {
    max-width: 1000px;
    margin: 0 auto; 
    padding: 20px;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px; 
}

.back-link-container {
    max-width: 1000px; 
    margin: 0 auto;
    padding: 20px; 
    text-align: left;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #60739B;
    font-size: 1.1em;
    font-weight: bold;
    transition: color 0.3s;
}

.back-link span {
    font-size: 1.5em;
    line-height: 1;
}

.back-link:hover {
    color: #60739B;
}


.detail-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.detail-header h1 {
    font-size: 3em;
    color: #60739B;
    margin-top: 0;
    margin-bottom: 10px;
}

.detail-header .subtitle {
    font-size: 1.3em;
    color: #777;
}

.detail-main-info {
    font-size: 1.1em;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.main-museum-image {
    width: 100%;
    height: 400px; 
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-gallery h2, .practical-info h2 {
    font-size: 2em;
    color: #60739B;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.gallery-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

.practical-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1em;
    color: #333;
}

.practical-info ul li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.practical-info ul li strong {
    color: #60739B;
}

.practical-info ul li:before {
    content: "•";
    color: #60739B;
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: 0;
}

.practical-info a {
    color: #60739B;
    text-decoration: none;
    transition: color 0.3s;
}

.practical-info a:hover {
    color: #60739B;
}

.map-embed {
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
}
.map-embed h3 {
    text-align: center; 
    font-size: 1.5em;
    color: #60739B;
    margin-bottom: 15px;
}
.map-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.map-wrapper {
    flex: 2;
    position: relative;
    overflow: hidden;
    min-width: 0;
    height: 600px;
    border-radius: 8px;
}
.reviews-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-width: 0;
    height: 600px;
    border-radius: 8px;
}
.reviews-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .reviews-wrapper {
        display: none; 
    }
    .map-wrapper {
        flex: 1 1 100%;
    }
}


@media (max-width: 768px) {
    #page-content-wrapper {
        padding-top: 80px; 
    }

    .museum-detail-page {
        padding: 15px;
        margin-top: 0; 
        margin-bottom: 20px;
    }

    .back-link-container {
        padding: 15px;
    }

    .detail-header h1 {
        font-size: 2.2em;
    }
    .detail-header .subtitle {
        font-size: 1em;
    }
    .detail-main-info {
        font-size: 0.95em;
    }
    .main-museum-image {
        height: 280px;
    }
    .detail-gallery h2, .practical-info h2 {
        font-size: 1.6em;
        margin-top: 30px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    .gallery-grid img {
        height: 120px;
    }
    .practical-info ul li {
        font-size: 0.9em;
    }
}


/* Стили для подвала */
footer {
    background-color: #5b75a9;
    padding: 40px 20px;
    color: white;
    font-family: 'Open Sans', sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-logo img {
    height: 80px;
    width: auto;
    max-width: 200px;
}

.footer-contacts h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: block;
}

.social-icons img {
    width: 30px;
    height: 30px;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
    .footer-logo,
    .footer-contacts {
        width: 100%;
    }
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 30px 15px;
    }
    .footer-logo img {
        height: 60px;
    }
    .footer-nav h4,
    .footer-contacts h4 {
        font-size: 1.1em;
    }
    .social-icons img {
        width: 25px;
        height: 25px;
    }
}

/* Темная тема */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}
header.dark-theme {
    background-color: #222;
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.05);
}
.dark-theme .menu > li > a {
    color: #e0e0e0;
}
.dark-theme .menu > li > a:hover {
    color: #8fa4d3;
}
.dark-theme .practical-info,
.dark-theme .practical-info h2,
.dark-theme .practical-info ul,
.dark-theme .practical-info li,
.dark-theme .practical-info a,
.dark-theme .practical-info strong {
    color: #e0e0e0;
}
.dark-theme .bar {
    background-color: #e0e0e0;
}
.dark-theme .popup {
    background-color: #222;
}
.dark-theme .popup .menu > li > a {
    color: #e0e0e0;
}
.dark-theme .popup .menu > li > a:hover {
    background-color: rgba(143, 164, 211, 0.1);
}

.dark-theme .museum-detail-page {
    background-color: #222;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.dark-theme .back-link {
    color: #8fa4d3;
}
.dark-theme .back-link:hover {
    color: #a8b9e0;
}
.dark-theme .detail-header h1 {
    color: #8fa4d3;
}
.dark-theme .detail-header .subtitle {
    color: #aaa;
}
.dark-theme .detail-main-info {
    color: #e0e0e0;
}
.dark-theme .main-museum-image {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.dark-theme .detail-gallery h2,
.dark-theme .practical-info h2 {
    color: #8fa4d3;
    border-bottom-color: #444;
}
.dark-theme .gallery-grid img {
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}
.dark-theme .practical-info ul li strong {
    color: #8fa4d3;
}
.dark-theme .practical-info ul li:before {
    color: #8fa4d3;
}
.dark-theme .practical-info a {
    color: #8fa4d3;
}
.dark-theme .practical-info a:hover {
    color: #a8b9e0;
}
.dark-theme .map-embed {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.dark-theme .map-embed h3 {
    color: #8fa4d3;
}
.dark-theme .reviews-wrapper iframe {
    border-color: #444;
    background-color: #222;
}
footer.dark-theme {
    background-color: #222;
}
@media (max-width: 768px) {
    .dark-theme .map-embed h3 {
        color: #8fa4d3;
    }
}

/* Стили для полноэкранного просмотра изображений */
.enlarged-image-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.enlarged-image {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 8px;
}
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.nav-arrow:hover {
    opacity: 1;
}
.arrow-left {
    left: 20px;
}
.arrow-right {
    right: 20px;
}
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.close-btn:hover {
    opacity: 1;
}
.gallery-grid img {
    cursor: pointer;
    transition: transform 0.3s ease;
}
.gallery-grid img:hover {
    transform: scale(1.03);
}
body.dark-theme .enlarged-image-container {
    background-color: rgba(0, 0, 0, 0.9);
}

 /* Подвал */
footer {
    background-color: #5b75a9;
    padding: 40px 20px;
    color: white;
    font-family: 'Open Sans', sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-info {
    display: flex;
    gap: 40px;
}

.footer-logo img {
    height: 80px;
    width: auto;
    max-width: 200px;
}

.footer-contacts h4,
.photo-sources h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: block;
}

.social-icons img {
    width: 30px;
    height: 30px;
}

.photo-sources ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.photo-sources li {
    margin-bottom: 8px;
}

.photo-sources a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.photo-sources a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
    
    .footer-info {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .footer-logo,
    .footer-contacts,
    .photo-sources {
        width: 100%;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .photo-sources ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 30px 15px;
    }
    
    .footer-logo img {
        height: 60px;
    }
    
    .footer-contacts h4,
    .photo-sources h4 {
        font-size: 1.1em;
    }
    
    .social-icons img {
        width: 25px;
        height: 25px;
    }
}
