/* RESPONSIVE.CSS - Адаптивные стили из вашего оригинального файла */

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    aside {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #cbd3dc;
        order: 2;
    }

    main {
        width: 100%;
        order: 1;
    }

    .biography-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .biography-layout .main-content {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        order: 2;
    }

    .biography-layout nav.toc {
        order: 1 !important;
        width: 100% !important;
        position: static !important;
        margin-top: 20px !important;
        background: #edf2f7 !important;
        padding: 15px !important;
        border: 1px solid #cfd9e3 !important;
        border-radius: 8px !important;
        order: 1;
    }

    body {
        overflow-x: hidden;
    }

    aside, main {
        padding: 15px;
        box-sizing: border-box;
    }

    .story-nav-buttons {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .spacer {
        display: none;
    }

    .featured-banner {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .author-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-photo {
        width: 120px;
        height: 120px;
    }

    .biography-gallery .slide img {
        height: 200px;
    }

    .slide {
        display: flex !important;
        justify-content: center;
        align-items: center;
        min-height: 300px;
        background-color: #e7ecf1 !important;
    }

    .slide img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 300px;
        object-fit: cover;
        display: block;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .slider-btn.prev {
        left: 10px;
    }

    .slider-btn.next {
        right: 10px;
    }

    .slide-content {
        padding: 20px 15px 15px;
    }

    .slide-content h4 {
        font-size: 1.1em;
    }

    .slide-content p {
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
        overflow-x: hidden;
    }
    
    .container {
        flex-direction: column;
        min-height: auto;
    }

    header h1 {
        font-size: 20px;
    }

    header, footer {
        padding: 15px;
    }

    .site-footer {
        padding: 20px 15px;
    }

    aside {
        width: 100% !important;
        padding: 10px;
        box-sizing: border-box;
    }

    main {
        width: 100% !important;
        padding: 10px;
        box-sizing: border-box;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
    }

    .card {
        height: auto;
        min-height: 300px;
        margin-bottom: 15px;
        padding: 12px;
    }

    .biography-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        padding: 0;
    }

    .biography-layout .main-content {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        box-sizing: border-box;
    }

    .biography-layout nav.toc {
        order: 1 !important;
        width: 100% !important;
        position: static !important;
        margin-top: 15px !important;
        padding: 10px !important;
        box-sizing: border-box;
        background: #edf2f7 !important;
        border: 1px solid #cfd9e3 !important;
        border-radius: 8px !important;
    }

    .biography-detail h1 {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .bio-image {
        margin-bottom: 15px;
        max-height: 250px;
    }

    .bio-content {
        font-size: 16px;
        line-height: 1.6;
    }

    .toc h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .toc a {
        font-size: 13px;
    }

    .story-nav-buttons {
        margin-top: 20px;
        flex-direction: column;
        gap: 10px;
    }

    .prev-btn, .next-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        box-sizing: border-box;
    }

    .featured-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        margin-bottom: 30px;
    }

    .featured-banner .featured-image img {
        width: 100%;
        height: 200px;
    }

    .featured-banner .featured-title {
        font-size: 1.5rem;
    }

    .birthdays-today-section {
        padding: 0 10px;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .birthday-card {
        flex: 1 1 100%;
        max-width: none;
    }

    .birthday-photo-link {
        margin-right: 10px;
    }

    .slide {
        height: auto;
        min-height: 300px;
        background-color: #e7ecf1;
    }

    .slide img {
        height: auto;
        object-fit: cover;
        width: 100%;
        background-color: #e7ecf1;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .slider-btn.prev {
        left: 5px;
    }

    .slider-btn.next {
        right: 5px;
    }

    .slide-content {
        padding: 15px 10px 10px;
    }

    .slide-content h4 {
        font-size: 1em;
    }

    .slide-content p {
        font-size: 0.8em;
    }

    .calendar-table td {
        padding: 6px 4px;
        height: 60px;
    }

    .calendar-table a {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .container {
        min-height: auto;
    }

    aside, main {
        padding: 8px;
    }

    .card {
        padding: 12px;
        min-height: 280px;
    }

    .card img {
        height: 120px;
    }

    .biography-detail h1 {
        font-size: 20px;
    }

    .bio-content {
        font-size: 15px;
    }

    .featured-banner .featured-title {
        font-size: 1.3rem;
    }

    .slide {
        height: auto;
        min-height: 300px;
        background-color: #e7ecf1;
    }

    .slide img {
        height: auto;
        max-height: 300px;
        object-fit: cover;
        width: 100%;
        height: 100%;
        background-color: #e7ecf1;
    }
}