/* === ЗАГАЛЬНА ОБГОРТКА СТАТТІ === */
.article-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.article-wrapper {
    width: 100%;
    max-width: 1260px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 0 12px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

/* === РОЗДІЛЮВАЧІ ЛІНІЙ === */
.article-header,
.article-description,
.article-iframe-wrapper,
.article-detail-link,
.article-footer,
.article-comments,
.article-comment-form {
    position: relative;
    padding: 1.5rem 0;
}

.article-header::after,
.article-description::after,
.article-iframe-wrapper::after,
.article-detail-link::after,
.article-footer::before,
.article-comments::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #eee 50%, transparent 100%);
}

/* Розташування ліній */
.article-header::after { bottom: 0; }
.article-description::after { bottom: 0; }
.article-iframe-wrapper::after { bottom: 0; }
.article-detail-link::after { bottom: 0; }
.article-footer::before { top: 0; }
.article-comments::before { top: 0; }

/* === ХЕДЕР ТА НАЗАД === */
.article-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem;
    min-height: 3.5rem;
    text-align: center;
}

.article-header__back {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #333;
    cursor: pointer;
    transition: transform 0.2s;
}

.article-header__back:hover {
    color: #007bff;
    transform: translate(-3px, -50%);
}

.article-header__title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto;
    max-width: 80%;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    text-align: center;
}



/* === ОПИС СТАТТІ === */
.article-description {
    font-size: 1.1rem;
    text-align: justify;
    text-indent: 1.7rem;
    color: #007bff;
    padding: 1.2rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 3px dashed #ec9f0d;
}

/* === IFRAME БЛОК === */
.article-iframe-wrapper {
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    background: #f8fcff;
    box-shadow: inset 0 0 15px rgba(66, 165, 245, 0.08);
    padding: 1rem;
    margin: 1.5rem 0;
}

.editor-iframe {
    border-radius: 8px;
    background: white;
}

/* === КНОПКА ІНФО === */
.article-detail-link {
    text-align: right;
    margin: 1rem 0;
}

.article-detail-button {
    font-size: 2rem;
    color: #007BFF;
    transition: all 0.3s;
    background: none;
    border: none;
    cursor: pointer;
}

.article-detail-button:hover {
    color: #0056b3;
    transform: scale(1.1);
}

/* === ФУТЕР === */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #777;
    padding: 1rem 0;
}

.article-footer__label {
    color: #d32f2f;
    font-weight: bold;
    padding: 0.2rem 0.5rem;
    background: #ffebee;
    border-radius: 4px;
}

/* === КОМЕНТАРІ === */
.article-comments {
    padding-top: 2rem;
}

.article-comment {
    background: #fff;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    border-left: 3px solid #007bff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.article-comment__author {
    font-weight: 600;
    color: #1a237e;
}

.article-comment__text {
    margin: 0.5rem 0 0;
    color: #455a64;
}

/* === Форма коментаря — ширше, гарніше === */
.article-comment-form {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.article-comment-input {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.article-comment-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}
.article-comment-button {
    align-self: flex-start;
    margin-top: 1rem;
    background: #007bff;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.article-comment-button:hover {
    background: #0056b3;
}
/* === ПОПЕРЕДЖЕННЯ === */
.article-login-warning {
    color: #d32f2f;
    padding: 1rem;
    background: #ffebee;
    border-radius: 8px;
    border: 1px solid #ffcdd2;
    text-align: center;
}

/* === АДАПТИВНІСТЬ === */
@media screen and (max-width: 768px) {
    .article-wrapper {
        padding: 0.4rem;
    }


    .article-header__title {
        font-size: 1.3rem;
    }

    .article-iframe-wrapper {
        padding: 0.5rem;
        margin: 1rem 0;
    }

    .article-comment-form {
        padding: 1rem 0;
    }
}