/* 
 * Modal Styles
 * Стили для модальных окон
 */

/* Мобильные стили (до 767px) */
@media (max-width: 767px) {
    .modal {
        display: none;
        position: fixed;
        z-index: 9999;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.85);
        padding: 0;
        overflow-y: auto;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .modal::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .modal-content {
        background-color: #FFF9F2;
        margin: 0;
        border-radius: 0;
        max-width: 100%;
        width: 100%;
        height: 100vh;
        position: relative;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .close {
        position: absolute;
        top: 16px;
        right: 16px;
        background: rgba(255, 255, 255, 0.95);
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10001;
        transition: all 0.2s ease;
    }
    
    .close::before {
        content: '';
        width: 18px;
        height: 18px;
        background-image: url('../img/close.svg');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    .close:hover {
        background: white;
        transform: scale(1.1);
    }

    .modal-body {
        padding: 0 0 32px 0;
        height: 100%;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .article-full-image {
        width: 100%;
        height: 320px;
        background: #F0EAE3;
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 0;
        overflow: hidden;
        margin-bottom: 20px;
    }

    .article-full-content {
        padding: 20px 16px 0 16px;
        margin-bottom: 20px;
    }

    .article-full-category {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04px;
        line-height: 17px;
        color: #3056D3;
        margin-bottom: 15px;
        font-family: 'Inter', sans-serif;
    }

    .article-full-title {
        font-size: 24px;
        font-weight: 900;
        line-height: 28px;
        color: #2a2a2a;
        margin-bottom: 20px;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-meta {
        display: flex;
        flex-direction: row;
        gap: 24px;
        font-size: 14px;
        line-height: 17px;
        letter-spacing: 0.04px;
        color: #424242;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid #F1EAE2;
        border-bottom: 0.5px solid #FFF9F2;
        font-family: 'Inter', sans-serif;
    }

    .article-full-text {
        font-size: 16px;
        line-height: 1.5;
        letter-spacing: 0.04px;
        color: #2a2a2a;
        font-family: 'Inter', sans-serif;
    }

    .article-full-text h2 {
        font-size: 22px;
        font-weight: 700;
        line-height: 1.3;
        margin: 56px 0 16px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-text h3 {
        font-size: 20px;
        font-weight: 700;
        line-height: 1.3;
        margin: 30px 0 15px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-text h4 {
        font-size: 18px;
        font-weight: 600;
        line-height: 1.3;
        margin: 25px 0 12px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-text p {
        margin-bottom: 18px;
        line-height: 1.6;
    }

    .article-full-text ul,
    .article-full-text ol {
        margin: 20px 0;
        padding-left: 30px;
        line-height: 1.6;
    }

    .article-full-text li {
        margin-bottom: 10px;
        line-height: 1.6;
    }

    .article-full-text strong {
        font-weight: 600;
    }

    .article-full-text em {
        font-style: italic;
    }

    .article-social {
        margin-top: 40px;
        padding-top: 30px;
        border-top: 1px solid #F1EAE2;
        border-top: 0.5px solid #FFF9F2;
    }

    .article-social h3 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 15px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .social-buttons {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

    .social-button {
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 12px 18px;
        gap: 10px;
        background: #3056D3;
        border-radius: 32px;
        text-decoration: none;
        font-family: 'Inter', sans-serif;
        font-style: normal;
        font-weight: 700;
        font-size: 16px;
        line-height: 19px;
        color: #F1EAE2;
        transition: all 0.3s ease;
        flex: none;
    }

    .social-button:hover {
        opacity: 0.8;
        transform: translateY(-2px);
    }

    .social-icon {
        width: 18px;
        height: 18px;
        flex: none;
        object-fit: contain;
    }
}

/* Планшеты (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.85);
        padding: 20px;
        overflow-y: auto;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .modal::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .modal-content {
        background-color: #FFF9F2;
        margin: 0 auto;
        border-radius: 32px;
        max-width: 800px;
        width: 100%;
        position: relative;
        overflow: hidden;
    }

    .close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.95);
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1001;
        transition: all 0.2s ease;
    }
    
    .close::before {
        content: '';
        width: 24px;
        height: 24px;
        background-image: url('../img/close.svg');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    .close:hover {
        background: white;
        transform: scale(1.1);
    }

    .modal-body {
        padding: 0;
    }

    .article-full-image {
        width: 100%;
        height: 320px;
        background: #F0EAE3;
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 32px 32px 0 0;
        overflow: hidden;
    }

    .article-full-content {
        padding: 40px 30px;
    }

    .article-full-category {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04px;
        line-height: 17px;
        color: #3056D3;
        margin-bottom: 15px;
        font-family: 'Inter', sans-serif;
    }

    .article-full-title {
        font-size: 32px;
        font-weight: 900;
        line-height: 1.2;
        color: #2a2a2a;
        margin-bottom: 20px;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-meta {
        display: flex;
        flex-direction: row;
        gap: 24px;
        font-size: 14px;
        line-height: 17px;
        letter-spacing: 0.04px;
        color: #424242;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid #F1EAE2;
        border-bottom: 0.5px solid #FFF9F2;
        font-family: 'Inter', sans-serif;
    }

    .article-full-text {
        font-size: 17px;
        line-height: 1.6;
        letter-spacing: 0.04px;
        color: #2a2a2a;
        font-family: 'Inter', sans-serif;
    }

    .article-full-text h2 {
        font-size: 26px;
        font-weight: 700;
        line-height: 1.3;
        margin: 56px 0 18px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-text h3 {
        font-size: 24px;
        font-weight: 700;
        line-height: 1.3;
        margin: 30px 0 15px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-text h4 {
        font-size: 20px;
        font-weight: 600;
        line-height: 1.3;
        margin: 25px 0 12px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-text p {
        margin-bottom: 20px;
        line-height: 1.6;
    }

    .article-full-text ul,
    .article-full-text ol {
        margin: 20px 0;
        padding-left: 30px;
        line-height: 1.6;
    }

    .article-full-text li {
        margin-bottom: 10px;
        line-height: 1.6;
    }

    .article-full-text strong {
        font-weight: 600;
    }

    .article-full-text em {
        font-style: italic;
    }

    .article-social {
        margin-top: 40px;
        padding-top: 30px;
        border-top: 1px solid #F1EAE2;
        border-top: 0.5px solid #FFF9F2;
    }

    .article-social h3 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 15px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .social-buttons {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

    .social-button {
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 12px 18px;
        gap: 10px;
        background: #3056D3;
        border-radius: 32px;
        text-decoration: none;
        font-family: 'Inter', sans-serif;
        font-style: normal;
        font-weight: 700;
        font-size: 16px;
        line-height: 19px;
        color: #F1EAE2;
        transition: all 0.3s ease;
        flex: none;
    }

    .social-button:hover {
        opacity: 0.8;
        transform: translateY(-2px);
    }

    .social-icon {
        width: 18px;
        height: 18px;
        flex: none;
        object-fit: contain;
    }
}

/* Десктопы (1024px+) */
@media (min-width: 1024px) {
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.85);
        padding: 20px;
        overflow-y: auto;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .modal::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .modal-content {
        background-color: #FFF9F2;
        margin: 0 auto;
        border-radius: 40px;
        max-width: 1140px;
        width: 100%;
        position: relative;
        overflow: hidden;
    }

    .close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.95);
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1001;
        transition: all 0.2s ease;
    }
    
    .close::before {
        content: '';
        width: 24px;
        height: 24px;
        background-image: url('../img/close.svg');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    .close:hover {
        background: white;
        transform: scale(1.1);
    }

    .modal-body {
        padding: 0;
    }

    .article-full-image {
        width: 100%;
        height: 320px;
        background: #F0EAE3;
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 40px 40px 0 0;
        overflow: hidden;
    }

    .article-full-content {
        padding: 60px 80px;
    }

    .article-full-category {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04px;
        line-height: 17px;
        color: #3056D3;
        margin-bottom: 15px;
        font-family: 'Inter', sans-serif;
    }

    .article-full-title {
        font-size: 48px;
        font-weight: 900;
        line-height: 1.2;
        color: #2a2a2a;
        margin-bottom: 20px;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-meta {
        display: flex;
        flex-direction: row;
        gap: 24px;
        font-size: 14px;
        line-height: 17px;
        letter-spacing: 0.04px;
        color: #424242;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid #F1EAE2;
        border-bottom: 0.5px solid #FFF9F2;
        font-family: 'Inter', sans-serif;
    }

    .article-full-text {
        font-size: 18px;
        line-height: 1.6;
        letter-spacing: 0.04px;
        color: #2a2a2a;
        font-family: 'Inter', sans-serif;
    }

    .article-full-text h2 {
        font-size: 32px;
        font-weight: 700;
        line-height: 1.3;
        margin: 56px 0 20px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-text h3 {
        font-size: 28px;
        font-weight: 700;
        line-height: 1.3;
        margin: 30px 0 15px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-text h4 {
        font-size: 24px;
        font-weight: 600;
        line-height: 1.3;
        margin: 25px 0 12px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .article-full-text p {
        margin-bottom: 22px;
        line-height: 1.7;
    }

    .article-full-text ul,
    .article-full-text ol {
        margin: 20px 0;
        padding-left: 30px;
        line-height: 1.6;
    }

    .article-full-text li {
        margin-bottom: 10px;
        line-height: 1.6;
    }

    .article-full-text strong {
        font-weight: 600;
    }

    .article-full-text em {
        font-style: italic;
    }

    .article-social {
        margin-top: 40px;
        padding-top: 30px;
        border-top: 1px solid #F1EAE2;
        border-top: 0.5px solid #FFF9F2;
    }

    .article-social h3 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 15px;
        color: #2a2a2a;
        font-family: 'IBM Plex Serif', serif;
    }

    .social-buttons {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

    .social-button {
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 12px 18px;
        gap: 10px;
        background: #3056D3;
        border-radius: 32px;
        text-decoration: none;
        font-family: 'Inter', sans-serif;
        font-style: normal;
        font-weight: 700;
        font-size: 16px;
        line-height: 19px;
        color: #F1EAE2;
        transition: all 0.3s ease;
        flex: none;
    }

    .social-button:hover {
        opacity: 0.8;
        transform: translateY(-2px);
    }

    .social-icon {
        width: 18px;
        height: 18px;
        flex: none;
        object-fit: contain;
    }
}
