/* =================MAIN==================== */
.main__img {
    width: 100%;
    height: 500px;

    position: relative;
}

.main__img img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}

.blog__title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
    padding: 0 20px;
}

.blog__title-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;

}

.blog__title {
    text-align: center;
    max-width: 950px;
    font-size: 45px;
    font-weight: 600;
    color: var(--white);
    line-height: 1.3;
    letter-spacing: 0.2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);

    margin-bottom: 16px;
    padding: 2px;

    z-index: 2;
}

.blog__date {
    color: var(--white);
    padding: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);

    z-index: 2;
}

/* ===================================== */
.blog {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 50px 0;
    background: #cecdcd4d;
}

.blog__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;

    padding: 0 20px;
}

.blog__inner h4 {
    width: 100%;
    text-align: left;
}

.blog__image-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;

    margin-bottom: 50px;
}

/*-------------Image popup------------ */
.popup {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.popup img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
}

.popup img:hover {
    opacity: 0.85;
}

.show {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.img-show {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
}

.img-show img {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 6px;
}

.img-show span.popup-close {
    position: absolute;
    top: -14px;
    right: -14px;
    background: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
}

/*------------------------------------*/
.blog__image {
    width: 350px;
    height: 350px;
    overflow: hidden;

    position: relative;
}

.blog__image img {
    display: block;
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}

.blog__btn {
    display: flex;
    align-self: center;

    text-decoration: underline;
    text-underline-offset: 4px;

    margin-top: 20px;
    width: 100%;
    max-width: 300px;
}

.blog__inner hr {
    background: black;
    width: 100%;
    margin: 1px;
}

/*-------- social ------------*/
.tags-N-social {
    display: flex;
    justify-content: space-between;
    gap: 5px;

    width: 100%;
    height: 24px;
}

.tags {
    display: flex;
}

.tags a {
    display: inline-block;
    padding: 5px 19px;
    background: #363636;

    font-size: 10px;
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    width: max-content;
    margin-right: 6px;
    transition: all 0.3s;
    cursor: pointer;
}

.tags a:hover {
    background: var(--accent-light);
}


.social-share {
    display: flex;
    justify-content: end;
    gap: 5px;

    width: 100%;
    height: 24px;
}

.social-share span {
    display: flex;
    align-self: center;

    font-size: 16px;
    color: #b3b3b3;

    margin-right: 5px;
}

.social-share a {
    width: fit-content;
    height: fit-content;

    color: #000000;
    -webkit-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
}

.social-share a:hover {
    color: var(--accent-light);
}

/*--------------form----------------*/
.contact-section {
    width: 100%;
    background: #cecdcd4d;

    padding-bottom: 50px;
}

.contact-section__inner {
    display: flex;
    flex-direction: column;

    margin: 0 auto;
}

.contact-section__title {
    display: flex;
    justify-self: center;

    font-size: 30px;
    font-weight: 400;
    margin-bottom: 24px;
    color: var(--text-color);
    letter-spacing: 0.3px;
}

/*--------------from----------------*/
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;

    padding: 40px 20px;
    background: #cecdcd4d;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form__group br {
    display: none;
}

.form__group p {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form__label {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

.form__label span {
    color: #cc0000;
    margin-left: 2px;
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--text-color);
    background: var(--white);
    transition: border-color 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.form__input:focus,
.form__textarea:focus {
    border-color: var(--accent-light);
}

.form__textarea {
    resize: vertical;
    max-height: 200px;
}

.form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color);
    cursor: pointer;
}

.form__checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--accent-light);
    cursor: pointer;
}

.form__error {
    font-size: 16px;
    color: #cc0000;
    display: block;
}

.form__error[hidden] {
    display: none;
}

.form__required-note {
    font-size: 16px;
    color: var(--text-color);
}

.form__submit {
    display: block;
    width: 100%;
    padding: 12px 24px;
    background-color: transparent;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--text-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.form__submit:hover {
    background-color: var(--text-color);
    color: var(--white);
}

.form__message {
    display: none;
    padding: 10px 14px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
}

.form__message--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form__message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form__message--visible {
    display: block;
}

/*==================RESPONSIVE=========================*/
@media (max-width: 1200px) {
    .blog__title {
        font-size: 35px;
    }
}

@media (max-width: 1000px) {
    .tags-N-social {
        flex-wrap: wrap;
    }

    .tags {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .tags a {
        padding: 5px 10px
    }

    .social-share {
        justify-content: start;
    }

    /*-------------------*/
    .contact-section {
        padding-top: 100px;
    }
}

@media (max-width: 800px) {
    .main__img {
        height: 350px;
    }
}

@media (max-width: 650px) {
    .form{
        padding: 0;
    }
}

@media (max-width: 600px) {
    .contact-section .container {
        padding: 0 10px;
    }

    .blog__image-wrapper {
        gap: 5px
    }

    .blog__image {
        width: 300px;
        height: 300px;
    }
}