/* Базовые стили */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    font-weight: 300;

    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Запрет прокрутки при открытом бургер-меню */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.site-header {
    background: #293844;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.site-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    z-index: -1;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-shrink: 0;
}

.header-contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: white;
    font-size: 0.9rem;
    margin-right: 15px;
}

.header-hours {
    white-space: nowrap;
    font-weight: 500;
}

.header-email {
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.header-email:hover {
    color: #e67e22;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-phones {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.header-phone {
    color: white;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
    font-size: 0.95em;
}

.header-phone:hover {
    color: #e67e22;
}

.logo img {
    height: 90px;
    width: auto;
    transition: all 0.3s;
}

.help-button {
    background: #e67e22;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    margin-left: 0;
    order: 2;
    cursor: pointer;
    border-radius: 25px;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.help-button:hover {
    background: #d35400;
}

main {
    flex: 1 0 auto;
    padding: 20px 0;
}

.main-nav {
    display: flex;
}

.main-nav ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #e67e22;
}

.main-nav li {
    position: relative;
}

.main-nav .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: -20px;
    background: #2c3e50;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.main-nav li:hover .dropdown {
    display: block;
}

.main-nav .dropdown li {
    padding: 0.5rem 1rem;
}

.main-nav .dropdown a {
    color: white !important;
    font-size: 1rem;
    z-index: 1000;
    min-width: auto;
    padding: 0.5rem 1.5rem;
    white-space: nowrap;
}

.main-nav .dropdown a:hover {
    color: #e67e22 !important;
}

/* Бургер меню */
.burger-menu {
    display: none;
}

.burger-checkbox {
    position: absolute;
    visibility: hidden;
}

.burger {
    position: relative;
    z-index: 1;
    cursor: pointer;
    display: block;
    border: none;
    background: transparent;
    width: 30px;
    height: 24px;
}

.burger::before,
.burger::after {
    content: '';
    left: 0;
    position: absolute;
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger span {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
    transform-origin: center;
    top: 50%;
    transform: translateY(-50%);
}

.burger::before {
    top: 0;
    transform: translateY(0);
}

.burger::after {
    bottom: 0;
    transform: translateY(0);
}

.burger-checkbox:checked + .burger::before {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.burger-checkbox:checked + .burger::after {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

.burger-checkbox:checked + .burger span {
    opacity: 0;
}

.burger-checkbox:checked ~ .mobile-menu {
    top: 100%; 
    position: absolute;
    width: 100%;
    left: 0;
}

.burger:hover::before,
.burger:hover::after {
    background: #e67e22;
}

.burger:hover span {
    background: #e67e22 !important;
}

/* Основной контент */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.hero-section img {
    max-height: 500px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.history-timeline {
    border-left: 3px solid #8B4513;
    padding-left: 25px;
    margin: 40px 0;
}

.main-content {
    background: #f9f9f9;
    padding: 30px;
    max-height: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Галерея музея */
.museum-section .image-gallery {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 4rem 0;
}

/* Центральное вертикальное изображение */
.main-image {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.main-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border-radius: 8px;
}

/* Сетка с тремя колонками */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-items: center;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    aspect-ratio: 3/2;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Стили для архитектурного блока */
.architecture {
    margin: 4rem 0;
    padding: 2rem 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.architecture h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.architecture h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #8B4513;
    margin: 1rem auto 0;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem;
}

.arch-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-wrapper {
    position: relative;
    padding-top: 75%; /* Соотношение 4:3 */
    overflow: hidden;
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.arch-item:hover {
    transform: translateY(-5px);
}

.arch-item:hover img {
    transform: scale(1.05);
}

.arch-item figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    padding: 1.2rem;
    font-size: 0.95rem;
    z-index: 2;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    background: rgba(0,0,0,0.6);
}

.arch-item:hover figcaption {
    transform: translateY(0);
}

.poem-block {
    background: #fff5e6;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    font-style: italic;
}

h1, h2 {
    color: #2c4f6b;
    margin: 25px 0;
}

.authors {
    background: #e8e8e8;
    padding: 20px;
    border-radius: 8px;
    margin-top: 40px;
    text-align: center;
}
  
/* Сетка для логотипов */
.image-authors {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 столбца на десктопе */
    gap: 20px;
    margin: 25px 0;
}
  
/* Обёртка для каждого логотипа: фиксированная высота для выравнивания логотипов */
.authors-logo {
    height: 180px;  /* можно подогнать под конкретные логотипы */
    display: flex;
    align-items: center;
    justify-content: center;
}
  
/* Стили для изображений */
.authors-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;  /* логотип полностью вписывается в область, сохраняя пропорции */
}

.jewish-holidays h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

/* Сетка для праздников */
.holiday-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Стили для карточек */
.holiday-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.holiday-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.holiday-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    margin-bottom: 15px;
}

.holiday-card h3 {
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 10px;
}

.holiday-card p {
    font-size: 1rem;
    color: #777;
    line-height: 1.5;
}

/* Подвал */
.site-footer {
    background: #293844;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer {
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-left {
    text-align: left;
}

.footer-right {
    text-align: right;
}

.work-time {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.work-time span {
    font-size: 0.9em;
    color: #666;
}

.footer-copyright {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.footer-email {
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.footer-email:hover {
    color: #e67e22;
}

.footer-phone {
    color: white;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
    font-size: 0.95em;
}

.footer-phone:hover {
    color: #e67e22;
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (orientation: landscape) and (max-width: 1024px) {
    .header-contacts {
        display: none;
    }

    .main-nav a {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }

    .main-nav ul {
        gap: 10px;
    }

    .header-row {
        gap: 10px;
    }
}

@media (min-width: 769px) {
    .main-nav {
        display: flex !important;
    }
}

@media (max-width: 768px) {

    .site-header {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .header-row {
        padding: 15px 0;
    }

    .header-right-group {
        order: 2;
    }
    
    .header-contacts {
        margin-right: 0.5rem;
    }

    .header-contacts,
    .header-phone {
        display: none;
    }

    .logo img {
        height: 70px;
    }

    .help-button {
        order: 1;
        margin-left: auto;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #293844;
        padding: 20px;
    }

    .main-nav li {
        padding: 0.5rem 0;
    }

    .main-nav.active {
        display: block;
        border-top-color: #405365;
    }
    
    .main-nav .dropdown {
        position: static;
        display: none;
        background: transparent;
        box-shadow: none;
        padding: 0 0 0 20px;
    }
    
    .main-nav .dropdown li {
        padding: 0;
    }

    .main-nav li:hover .dropdown {
        display: block;
    }

    .main-nav .dropdown a {
        padding: 12px 0;
        font-size: 1rem;
        color: #e67e22;
    }

    .main-nav > ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav > ul > li {
        width: 100%;
        border-bottom: 1px solid #405365;
    }
    
    .main-nav > ul > li > a {
        display: block;
        padding: 15px 0;
        font-size: 1.2rem;
    }

    .burger-menu {
        display: block;
        margin-left: 15px;
        order: 3;
    }

    .hero-section {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }

    .hero-section img {
        max-height: 300px;
        order: -1; /* Перемещаем изображение наверх */
        margin-bottom: 20px;
        border-radius: 8px;
    }

    .main-content {
        padding: 20px;
        max-height: none;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .history-timeline {
        border-left-width: 2px;
        padding-left: 15px;
        margin: 30px 0;
    }

    .history-timeline p {
        font-size: 14px;
        line-height: 1.6;
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    h3 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }

    p {
        font-size: 15px;
        line-height: 1.6;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .gallery-grid img {
        height: 250px;
    }
    
    .main-image {
        max-width: 300px;
    }
    
    .architecture h2 {
        font-size: 2rem;
    }
    
    .arch-description {
        font-size: 1rem;
        padding: 1rem;
    }

    .image-authors {
        grid-template-columns: 1fr; /* один столбец на узких экранах */
    }

    .authors-logo {
        height: auto;
        padding: 10px 0;
    }

    .footer-row {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-left,
    .footer-right {
        text-align: center;
        width: 100%;
    }
    
    .work-time {
        align-items: center;
    }

    .burger-checkbox:checked ~ .main-nav {
        display: block;
    }
}

@media (max-width: 480px) {
    .gallery-grid img {
        height: 200px;
    }
}