* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f3ef;
    color: #2c2c2c;
    line-height: 1.6;
}

header {
    background-color: #1a1a1a;
    color: #f5f3ef;
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

.logo-image {
    max-height: 60px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}


.exhibition-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.buy-ticket-btn {
    background-color: #8b7355;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: background-color 0.3s;
}

.buy-ticket-btn:hover {
    background-color: #6d5a44;
}

nav {
    background-color: #2c2c2c;
    padding: 1rem 2rem;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 3rem;
}

.nav-content a {
    color: #f5f3ef;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-content a:hover,
.nav-content a.active {
    color: #8b7355;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.slider {
    height: 500px;
    background-color: #3a3a3a;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}

.slide {
    opacity: 0;
    top: 0;
    left: 0;
    position: absolute;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease-in-out;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    display: flex;
}

.slider-nav {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-dot.active {
    background-color: white;
}

.about-section {
    margin: 5rem 0;
}

.about-section h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    text-align: center;
}

.about-text {
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
    line-height: 1.8;
    color: #4a4a4a;
}

.news-section {
    margin: 5rem 0;
    padding: 4rem 0;
    background-color: #e8e5df;
}

.news-section h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 3rem;
    letter-spacing: 2px;
    text-align: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
/* .pottery-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.pottery-card.animate {
    opacity: 1;
    transform: translateY(0);
} */
.news-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform .5s ease;
    background-color: white;
    padding: 2rem;
    border: 1px solid #d0cdc7;
    /* transition: transform 0.3s; */
}
.news-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-date {
    font-size: 0.8rem;
    color: #8b7355;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.news-card h3 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.news-card p {
    color: #666;
    line-height: 1.6;
}

.teapots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.teapot-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform .5s ease;
    background-color: white;
    border: 1px solid #d0cdc7;
    overflow: hidden;
    cursor: pointer;
    /* transition: transform 0.3s; */
}
.teapot-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.teapot-card:hover {
    transform: translateY(-5px);
}

.teapot-image {
    width: 100%;
    height: 300px;
    background-color: #e8e5df;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b7355;
    font-size: 3rem;
}

.teapot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teapot-info {
    padding: 1.5rem;
}

.teapot-title {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.teapot-description {
    font-size: 0.9rem;
    color: #666;
}

.catalog-viewer {
    margin: 3rem 0;
    background-color: white;
    border: 1px solid #d0cdc7;
    padding: 3rem;
}

.catalog-page {
    max-width: 900px;
    margin: 0 auto;
    min-height: 700px;
    background-color: #f9f8f6;
    padding: 4rem;
    border: 1px solid #d0cdc7;
}

.catalog-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.catalog-btn {
    background-color: #2c2c2c;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: background-color 0.3s;
}

.catalog-btn:hover {
    background-color: #8b7355;
}

.catalog-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.page-number {
    font-size: 0.9rem;
    color: #8b7355;
    letter-spacing: 1px;
}

.catalog-content h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    color: #2c2c2c;
}

.catalog-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #d0cdc7;
}

.catalog-item:last-child {
    border-bottom: none;
}

.catalog-item-title {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #8b7355;
}

.catalog-item-details {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.8;
}

.archive-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.archive-photo {
    aspect-ratio: 1;
    background-color: #e8e5df;
    border: 1px solid #d0cdc7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8b7355;
    font-size: 2rem;
    position: relative;
    overflow: hidden;
}

.archive-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem;
    font-size: 0.7rem;
    text-align: center;
    letter-spacing: 1px;
}

.archive-photo-title {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: #666;
    background-color: #f5f3ef;
    border: 1px solid #d0cdc7;
    border-top: none;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.media-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform .5s ease;
    background-color: white;
    border: 1px solid #d0cdc7;
    padding: 1.5rem;
}
.media-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.video-placeholder {
    width: 100%;
    height: 250px;
    background-color: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1rem;
    font-size: 3rem;
}

.media-link {
    color: #8b7355;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.media-link:hover {
    text-decoration: underline;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin: 3rem 0;
    letter-spacing: 3px;
    text-align: center;
}

.page-subtitle {
    text-align: center;
    color: #8b7355;
    margin-bottom: 3rem;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

/* Контент модального окна - увеличенные размеры для десктопа */
.modal-content {
    background-color: white;
    width: 90%;
    max-width: 900px; /* Увеличен максимальный размер */
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Кнопка закрытия */
.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: #8b7355;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    color: #2c2c2c;
    background-color: rgba(0, 0, 0, 0.05);
}
.modal-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 2rem 0;
    max-width: 900px; /* Максимальная ширина контейнера */
    margin-left: auto;
    margin-right: auto;
}

/* Адаптивный блок изображения с фиксированным соотношением сторон */
.modal-image {
    width: 100%;
    padding-bottom: 75%; /* Соотношение сторон 4:3 (300/400 = 0.75) */
    position: relative;
    background-color: #e8e5df;
    border: 1px solid #d0cdc7;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s;
}

.modal-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Изображение внутри блока */
.modal-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.photo-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform .5s ease;
    background-color: white;
    border: 1px solid #d0cdc7;
    overflow: hidden;
}
.photo-item.animate {
    opacity: 1;
    transform: translateY(0);
}
.photo-image {
    width: 100%;
    height: 300px;
    background-color: #e8e5df;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b7355;
    font-size: 3rem;
}

.photo-caption {
    padding: 1.5rem;
}

.photo-caption h3 {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #2c2c2c;
}

.photo-caption p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
}

footer {
    background-color: #1a1a1a;
    color: #f5f3ef;
    padding: 3rem 2rem;
    margin-top: 5rem;
    text-align: center;
}

/* Модальное окно для архивных фото */
.archive-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.archive-modal.active {
    display: flex;
}

.archive-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive-modal-image-container {
    max-width: 80vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.archive-modal-image-container img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border: 2px solid #8b7355;
}

.archive-modal-caption {
    background: rgba(139, 115, 85, 0.9);
    color: white;
    padding: 1rem 2rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    letter-spacing: 1px;
    text-align: center;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.archive-modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 3rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 3001;
    transition: color 0.3s;
}

.archive-modal-close:hover {
    color: #8b7355;
}

.archive-modal-prev,
.archive-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    padding: 1rem 1.5rem;
    transition: background 0.3s, color 0.3s;
    z-index: 3001;
}

.archive-modal-prev {
    left: 20px;
}

.archive-modal-next {
    right: 20px;
}

.archive-modal-prev:hover,
.archive-modal-next:hover {
    background: rgba(139, 115, 85, 0.8);
    color: white;
}

.archive-modal-counter {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.collection-nav {
    position: sticky;
    top: 100px;
    background-color: #f5f3ef;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid #d0cdc7;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.collection-nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.collection-nav-link {
    color: #2c2c2c;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 0.5rem 0.5rem;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.collection-nav-link:hover {
    color: #8b7355;
    border-bottom-color: #8b7355;
}

.collection-section {
    margin: 3rem 0;
    scroll-margin-top: 200px;
}

.collection-title {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    color: #8b7355;
    border-left: 4px solid #8b7355;
    padding-left: 1rem;
}

.collection-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 2rem;
    padding-left: 1rem;
    line-height: 1.8;
}
@media (max-width: 1024px) {
    .collection-nav-content {
        padding: 0 1rem;
        grid-template-columns: repeat(2, 1fr);
        display: grid;
        gap: 1rem;
        font-size: 0.8rem;
    }
}
/* АДАПТИВ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    .collection-nav {
        top: 180px;
        gap: 0.5rem 1rem;
        padding: 1rem 0;
    }
    
    .collection-nav-content {
        padding: 0 1rem;
        grid-template-columns: repeat(2, 1fr);
        display: grid;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .collection-nav-link {
        font-size: 0.6rem;
        padding: 0.4rem 0.8rem;
    }
    
    .collection-title {
        font-size: 1.4rem;
    }
    
    .collection-section {
        margin: 2rem 0;
        scroll-margin-top: 200px;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .logo {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .exhibition-title {
        font-size: 0.6rem;
    }

    .buy-ticket-btn {
        width: 100%;
        padding: 0.7rem 1.5rem;
        font-size: 0.85rem;
    }

    nav {
        padding: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-content {
        gap: 1.5rem;
        justify-content: flex-start;
        white-space: nowrap;
        padding: 0.5rem;
    }

    .nav-content a {
        font-size: 0.8rem;
    }

    .container {
        padding: 0 1rem;
    }

    .slider {
        height: 300px;
        margin: 2rem 0;
    }

    .slide {
        font-size: 1.5rem;
    }

    .slider-nav {
        bottom: 1rem;
    }

    .slider-dot {
        width: 10px;
        height: 10px;
    }

    .about-section {
        margin: 3rem 0;
    }

    .about-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        letter-spacing: 1px;
    }

    .about-text {
        text-align: left;
        font-size: 0.95rem;
    }

    .news-section {
        margin: 3rem 0;
        padding: 2rem 0;
    }

    .news-section h2 {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .news-card {
        padding: 1.5rem;
    }

    .news-card h3 {
        font-size: 1rem;
    }

    .page-title {
        font-size: 1.8rem;
        margin: 2rem 0;
        letter-spacing: 2px;
    }

    .page-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .teapots-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }

    .teapot-image {
        height: 250px;
    }

    .catalog-viewer {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .catalog-page {
        padding: 2rem 1.5rem;
        min-height: 500px;
    }

    .catalog-content h3 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .catalog-item {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .catalog-item-title {
        font-size: 1rem;
    }

    .catalog-item-details {
        font-size: 0.85rem;
    }

    .catalog-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .catalog-btn {
        width: 100%;
        padding: 0.7rem;
        font-size: 0.85rem;
    }

    .page-number {
        font-size: 0.85rem;
        order: -1;
    }

    .archive-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin: 2rem 0;
    }

    .archive-photo {
        font-size: 1.5rem;
    }

    .archive-caption {
        font-size: 0.6rem;
        padding: 0.3rem;
    }


    .photo-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }

    .photo-image {
        height: 250px;
    }

    .photo-caption {
        padding: 1rem;
    }

    .photo-caption h3 {
        font-size: 0.9rem;
    }

    .photo-caption p {
        font-size: 0.8rem;
    }

    .media-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }

    .media-item {
        padding: 1rem;
    }

    .video-placeholder {
        height: 200px;
        font-size: 2rem;
    }

    .media-item h3 {
        font-size: 1rem;
    }

    .media-item p {
        font-size: 0.85rem;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }

    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.8rem;
    }

    .modal-images {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin: 1.5rem 0;
    }

    .modal-image {
        height: 180px;
    }

    footer {
        padding: 2rem 1rem;
        margin-top: 3rem;
    }

    .archive-modal-prev,
    .archive-modal-next {
        font-size: 2.5rem;
        padding: 0.5rem 1rem;
    }

    .archive-modal-prev {
        left: 5px;
    }

    .archive-modal-next {
        right: 5px;
    }

    .archive-modal-close {
        top: 10px;
        right: 10px;
        font-size: 2rem;
    }

    .archive-modal-image-container {
        max-width: 95vw;
        max-height: 85vh;
    }

    .archive-modal-image-container img {
        max-height: 70vh;
    }

    .archive-modal-caption {
        font-size: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .archive-modal-counter {
        bottom: 10px;
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        gap: 0.8rem;
    }

    .logo {
        font-size: 1rem;
    }

    .exhibition-title {
        font-size: 0.6rem;
    }

    .slider {
        height: 250px;
    }

    .slide {
        font-size: 1.2rem;
    }

    .page-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .news-card {
        padding: 1.2rem;
    }

    .teapot-image {
        height: 220px;
        font-size: 2.5rem;
    }

    .archive-gallery {
        grid-template-columns: 1fr;
    }

    .catalog-page {
        padding: 1.5rem 1rem;
    }
}