:root {
    --black: #1b1b1b;
    --red: #e60000;
    --grey: #727472;
    --white: #fff;
}

* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
    font-family: "Work Sans", sans-serif;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: "Hind", sans-serif;
    font-weight: 600;
    line-height: 1.4;
}

h1 {
    font-size: 1.75rem;
    font-size: clamp(
        1.75rem,
        1.6666666666666667rem + 0.4166666666666667vw,
        2rem
    );
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-size: clamp(
        1.5rem,
        1.4166666666666667rem + 0.4166666666666667vw,
        1.75rem
    );
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.375rem;
    font-size: clamp(
        1.375rem,
        1.3333333333333333rem + 0.20833333333333334vw,
        1.5rem
    );
    margin-bottom: 0.25rem;
}

h4 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

main {
    display: grid;
    grid-template-columns: 3vw 1fr 3vw;
    min-height: 100dvh;

    @media screen and (width > 1000px) {
        grid-template-columns: 8vw 1fr 8vw;
    }

    > .kpo-ads {
        grid-column: span 3;
    }
}

main > section {
    grid-column: 2;
}

main > .kpo-ads:first-child {
    grid-column: span 3;
}

a {
    text-decoration: none;
    color: var(--black);
}

img {
    display: block;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;

    @media screen and (width > 40rem) {
        grid-template-columns: 1fr 1fr;
    }

    @media screen and (width > 60rem) {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.bento-block {
    border-bottom: 5px solid var(--black);

    .block-excerpt {
        display: none;
        color: var(--white);
        padding-block: 0.75rem;
    }

    .block-btn {
        display: none;
    }
}

.bento-grid .bento-block {
    &:nth-child(3) {
        background: var(--black);
        padding-inline: 10px;
        min-height: 400px;

        .block-img {
            display: none;
        }

        .block-title {
            color: var(--white);
        }

        .block-excerpt {
            display: block;
        }

        .block-btn {
            display: block;
            color: var(--grey);
            width: fit-content;
            padding: 0.75rem;
            font-size: 14px;

            &:hover {
                color: var(--white);
            }
        }
    }
}

.bento-container {
    &:has(h1) {
        margin-bottom: 4rem;
    }

    &:nth-child(even) {
        .bento-block:nth-child(3) {
            order: 1;
        }
    }
}

.block-img {
    width: 100%;
    height: 20rem;

    img {
        height: 100%;
        border-bottom: 5px solid var(--red);
    }
}

.block-sub-info {
    padding: 1rem 1rem 0;
    display: flex;
    gap: 1.5rem;
    font-size: 14px;

    span {
        color: var(--grey);
    }
}

.block-title {
    font-weight: 500;
    font-size: 1.3rem;
    padding-block: 0.5rem;
    margin: 0;
}

.detail-page {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;

    @media screen and (width > 850px) {
        grid-template-columns: 1fr 316px;
    }

    .block-img {
        height: 15rem;
    }
}

.article-info {
    display: grid;
    gap: 0.25rem;
    margin-bottom: 1rem;

    > h1 {
        margin: 0;
    }
}

.post-block {
    line-height: 1.6;
    font-size: 21px;

    a {
        text-decoration: underline;
    }

    p {
        margin-bottom: 1rem;
    }

    ul {
        padding-left: 2rem;
        padding-bottom: 1rem;
    }
}

.video-embed > iframe,
.embed-wrapper > iframe {
    width: 100%;
}

.image-embed {
    width: fit-content;
    margin: 2rem auto;
    color: rgba(33, 37, 41, 0.5);
    font-size: 12px;
}

@media screen and (width > 800px) {
    .imgHeight {
        height: 650px;
    }

    .imgEqual {
        height: 650px;
        width: 650px;
    }

    .imgWidth {
        width: 700px;
    }
}

.related-block {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(190px, 2fr));
}

.recent-posts {
    display: grid;
    gap: 1rem;
}
.author-box {
    margin: 13rem 0 1rem;
    border: 2px solid #1b1b1b;
    padding: 1rem;
    border-radius: 1rem;
    position: relative;
    width: 100%;
    min-height: 10rem;
}
.author-info {
    position: absolute;
    top: -50%;
    left: 0;
    right: 0;
    display: flex;
    flex-flow: column;
    align-items: center;
}
.author-img {
    width: 200px;
    height: 200px;
    object-position: center;
    object-fit: cover;
    border-radius: 1rem;
}
.author-additional-info {
    margin-top: 10rem;

    > p {
        font-size: 21px;
        margin-bottom: 0.25rem;
    }
}
.author-additional-container {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;

    @media (width < 768px) {
        flex-flow: column;
        align-items: start;
    }
}
.author-social-info {
    display: flex;
    gap: 1rem;
    align-items: center;

    @media (width < 768px) {
        width: 100%;
        place-content: center;
    }
}

/* navbar */

#nav-bar {
    height: 70px;
    display: flex;
    border-bottom: 5px var(--red) solid;
    padding: 0px 10vw;
    margin-bottom: 0.5rem;
    background-color: var(--black);
    color: #fff;
    align-items: center;
    grid-column: span 3;
}

.aside-btn {
    background-color: var(--black);
    color: var(--white);
    font-size: 25px;
    border: none;
    cursor: pointer;
}

.logo {
    margin: 0 auto;

    a {
        color: var(--main);
    }

    img {
        height: 50px;
        width: 200px;
    }

    h2 {
        margin: 0px;
    }
}

#nav-aside {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    background-color: var(--black);
    max-width: 360px;
    width: 100%;
    padding: 80px 20px;
    overflow-y: scroll;
    z-index: 99;
    -webkit-transform: translateX(-100%);
    -ms-transform: translateX(-100%);
    transform: translateX(-100%);
    -webkit-transition: 0.4s all cubic-bezier(0.77, 0, 0.18, 1);
    transition: 0.4s all cubic-bezier(0.77, 0, 0.18, 1);
}

#nav-aside.active {
    -webkit-transform: translateX(0%);
    -ms-transform: translateX(0%);
    transform: translateX(0%);
}

.nav-aside-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-aside-menu li a {
    display: block;
    padding: 15px 0px;
    color: var(--white);
    border-bottom: 1px solid #323335;
}

.nav-aside-menu li a:hover,
.nav-aside-menu li a:focus {
    color: var(--red);
}

.nav-aside-menu li.has-dropdown > a {
    cursor: pointer;
}

.nav-aside-menu li.has-dropdown > a:after {
    font-family: "FontAwesome";
    content: "\f0d7";
    float: right;
}

.nav-aside-menu li.has-dropdown > .dropdown {
    display: none;
    margin-left: 30px;
    border-left: 1px solid #323335;
}

.nav-aside-menu li.has-dropdown.active > .dropdown {
    display: block;
}

.nav-aside-menu li.has-dropdown > .dropdown a {
    padding: 15px;
}

.nav-close {
    width: 50px;
    height: 50px;
    position: absolute;
    top: 10px;
    right: 15px;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.nav-close span {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
}

.nav-close span:before,
.nav-close span:after {
    content: "";
    display: block;
    width: 30px;
    background-color: var(--red);
    height: 2px;
}

.nav-close span:before {
    -webkit-transform: translateY(0px) rotate(-135deg);
    -ms-transform: translateY(0px) rotate(-135deg);
    transform: translateY(0px) rotate(-135deg);
}

.nav-close span:after {
    -webkit-transform: translateY(-2px) rotate(135deg);
    -ms-transform: translateY(-2px) rotate(135deg);
    transform: translateY(-2px) rotate(135deg);
}

.nav-close button:hover {
    background-color: transparent;
}

#search-bar {
    grid-column: span 3;
    margin-bottom: 2rem;
}

.search-bar-wrapper {
    position: relative;
    top: 10px;
    margin: 0 auto;
    border: 2px solid #6665;
    display: flex;
    gap: 10px;
    place-content: center;
    width: fit-content;
    padding: 12px;
    border-radius: 10px;
}

.search-bar-wrapper input {
    border: none;
    outline: none;
    width: 60vw;
}

.hide-search {
    display: none;
}

#searchbar img {
    width: 20px;
    height: 20px;
}

/* footer */

footer {
    background-color: var(--black);
    border-top: 5px solid var(--red);
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr min(100% - 40px, 64rem) 1fr;

    > .footer-content {
        grid-column: 2;
    }
}

.footer-content {
    display: block;
    padding-block: 1rem;
    color: var(--white);

    @media screen and (width > 900px) {
        display: grid;
        gap: 2rem;
        grid-template-columns: 1fr 1fr 1fr;
    }

    a,
    a:hover {
        color: var(--white);
    }
}

.footer-link {
    list-style: none;
    display: flex;
    flex-flow: column;
    gap: 0.5rem;
    padding: 0;
    margin-bottom: 2rem;
}

.footer-social-links {
    display: flex;
    flex-flow: column;

    img {
        width: 45px;
        height: 45px;
    }
}

.footer-info {
    margin-bottom: 2rem;

    > img {
        width: 150px;
        margin-bottom: 0.5rem;
    }
}

.footer-label {
    display: block;
    padding-bottom: 5px;
    margin-bottom: 0.75rem;
    position: relative;
    font-size: 20px;
    font-weight: 600;
}

.footer-label::after {
    content: "";
    position: absolute;
    bottom: -2px;
    width: 50%;
    height: 3px;
    background-color: var(--white);
    left: 0;
}

.footer-social-item {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

/* MV CSS  */
@media only screen and (max-width: 359px) {
    .instagram-media {
        min-width: unset !important;
    }

    .tiktok-embed {
        width: 320px !important;
        margin-left: -10px !important;
    }
}

.page-section {
    .page-content {
        p {
            margin-bottom: 10px;
        }
        ul,
        ol {
            margin: 5px 10px;
            padding: 10px;
        }
    }
}

.static-user-wrapper {
    display: grid;
    gap: 30px 30px;
    @media screen and (width > 40rem) {
        grid-template-columns: repeat(3, 1fr);
        /*grid-template-columns: 1fr 1fr 1fr;*/
    }
}
.static-user-block {
    box-shadow: 0 1px 6px #0008;
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    width: 100%;

    img {
        width: 100%;
        height: 18rem;
        object-fit: cover;
        margin-bottom: 15px;
    }

    h5 {
        margin-bottom: 0.75rem;
    }
}
.detail-title-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.check-badge-container {
    position: relative;
    &:hover {
        .check-badge-message {
            display: block;
        }
    }
}
.check-badge {
    padding: 4px 12px;
    font-size: 12px;
    color: green;
    border: 1px solid green;
    border-radius: 12px;
    cursor: pointer;

    &:hover {
        background-color: green;
        color: #fff;
    }
}
.check-badge-message {
    position: absolute;
    top: 25px;
    right: 0;
    max-width: 520px;
    width: 520px;
    background-color: #fff;
    padding: 6px;
    border: 1px solid green;
    border-radius: 8px;
    display: none;

    @media (width < 560px) {
        width: calc(100vw - 30px);
    }
    a {
        text-decoration: underline;
        color: red;
    }
    p {
        margin-bottom: 0.25rem;
    }
    &:hover {
        display: block;
    }
}
.post-author-block p {
    margin-bottom: 0.5rem;

    a {
        color: red;
    }
}
.reference-container {
    border: 1px solid #98b0ca;
    border-radius: 1rem;
    margin-bottom: 2rem;
    width: 100%;
}
.reference-header {
    padding: 0.75rem 2rem;
    background-color: #dde4ec;
    border-radius: 1rem 1rem 0 0;

    h3 {
        margin: 0;
    }
}
.reference-body {
    padding: 1rem;

    p {
        margin-bottom: 0.25rem;
    }

    ol {
        margin: 0.75rem 1.25rem 0;
    }

    li:not(:last-child) {
        margin-bottom: 0.75rem;
    }
}
.post-author-tab-section {
    margin-bottom: 2rem;
}
.tabs-container {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.tab {
    padding: 0.5rem 1rem;
    border: 1px solid #888;
    border-radius: 0.75rem 0.75rem 0 0;
    font-size: 14px;
    cursor: pointer;
    &:hover {
        background-color: #dde4ecbd;
    }
}
.tab.active-tab {
    background-color: #dde4ec;
}
.tab-info,
.author-tooltip-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    align-items: center;

    h4 {
        margin-bottom: 0.25rem;
    }
}
.tab-bio p {
    margin-bottom: 0.75rem;
}
.tab-container-info:not(:last-child) {
    margin-bottom: 0.75rem;
}
.tab-avatar img,
.author-tooltip-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    min-width: 100px;
    min-height: 100px;
}
.tab-message {
    padding: 1rem;
    border: 1px solid #888;
    border-radius: 0 0.75rem 0.75rem;
    display: none;
}
.tab-message.active-box {
    display: block;
}

.author-tooltip {
    position: relative;
    display: inline-block;
}

.author-tooltip:hover + .author-tooltip-text {
    display: block;
}

.author-tooltip-text {
    border: 1px solid #888;
    padding: 1rem;
    border-radius: 1rem;
    display: none;
    position: absolute;
    background-color: #fff;
    width: 40rem;
    z-index: 100;
    left: 0;
    top: 100%;
    margin-top: 5px;
}

.author-tooltip-body {
    display: flex;
    gap: 0.25rem;
    flex-flow: column;
}

.author-biodata {
    line-height: 1.6;
    font-size: 21px;
    margin: 2rem 0;

    a {
        text-decoration: underline;
        color: red;
    }
    p {
        margin-bottom: 0.75rem;
    }
}
.reference-message {
    a {
        text-decoration: underline;
        color: red;
    }

    p {
        margin-bottom: 0.25rem;
    }
}
.reference-item {
    a {
        text-decoration: underline;
        color: red;
    }
}
.author-data {
    a {
        text-decoration: underline;
        color: red;
    }
    p {
        margin-bottom: 0.25rem;
    }
}
.link-red {
    text-decoration: underline;
    color: red;
}
.bold-text {
    font-weight: bold;
    a {
        font-weight: 400;
    }
}

/* // @media only screen and (min-width: 770px) { */
/* //     #detail { */
/* //         grid-template-columns: minmax(350px,auto) 300px!important; */
/* //     } */
/**/
/* //     .imgHeight, .imgWidth { */
/* //         max-width: 100% !important; */
/* //         height: auto !important; */
/* //     } */
/* // } */
/* // End MV CSS  */

/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Container */
.write-for-us-container {
    margin: 50px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Heading */
.write-for-us-title {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* Form Styles */
.write-for-us-form {
    display: flex;
    flex-direction: column;
}

/* Form Group */
.write-for-us-form__group {
    margin-bottom: 15px;
    width: -webkit-fill-available;
    width: -moz-available;
}

.write-for-us-form__label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.write-for-us-form__input,
.write-for-us-form__textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.write-for-us-form__textarea {
    resize: vertical;
}

/* Submit Button */
.write-for-us-form__submit {
    background-color: #007bff;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-transform: uppercase;
    transition: background 0.3s;
}

.write-for-us-form__submit:hover {
    background-color: #0056b3;
}

/* Success Message */
.write-for-us-success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 15px;
}

/* Error Message */
.write-for-us-form__error {
    color: red;
    font-size: 14px;
}

.write-for-us-error {
    color: red;
    font-size: 14px;
}

.write-for-us-error-summary {
    color: red;
    font-size: 16px;
    padding: 10px;
    background-color: #f8d7da;
    border-radius: 5px;
}

.write-for-us-error {
    display: block;
    font-size: 12px;
    color: red;
}
.htmx-indicator {
    display: none;
    color: #007bff;
    font-size: 14px;
    margin-top: 10px;
}

.htmx-request .htmx-indicator {
    display: inline;
}

.d-flex {
    display: flex;
    gap: 20px;
}
/* Define the fade-out animation */
.fade-out {
    animation: fadeOut 1s forwards; /* Apply fadeOut for 5 seconds and keep the final state */
}

/* Define the fadeOut keyframes */
@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        display: none; /* Hide the element after fading out */
    }
}

.write-for-us-success,
.write-for-us-error {
    animation: fadeOut 10s forwards;
}
