/* =========================================================
   Global/Utility Styles
   ========================================================= */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.post-site-main .flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================================
   Custom Post Archive Listings
   ========================================================= */

.custom-post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    padding-bottom: 20px;
}

.custom-post-item {
    width: fit-content;
    transition: transform 0.3s ease-in-out;
}

.custom-post-item:hover {
    transform: scale(1.01);
}

.default-image {
    max-width: 530px;
    max-height: 308px;
    width: 100%;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
}

.default-post-title {
    font-size: 32px;
    font-weight: bold;
    color: black;
    margin: 0;

    /* Required for line-clamp to work */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Optional but highly recommended for truncated text */

    /* Your existing line-clamp properties */
    line-clamp: 1;
    -webkit-line-clamp: 1;
}

.custom-post-content-divider {
    border: none;
    border-top: 1px solid #646464;
    margin: 10px 0;
}

.custom-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

.custom-post-date,
.custom-post-company {
    color: #646464;
    font-weight: 500;
    font-size: 19px;
}

.custom-post-referrer-holder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 65px;
    height: 25px;
    border: 1px solid #646464;
    border-radius: 20px;
    cursor: pointer;
}

.custom-post-referrer-icon {
    width: 15px;
    height: 16px;
    color: #646464;
}

/* =========================================================
   Custom Post Single Page
   ========================================================= */

.post-thumbnail {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.post-thumbnail img {
    max-width: 1100px;
    width: 100%;
    height: auto;
    max-height: 650px;
    object-fit: cover;
}

.post-video {
    max-width: 1100px;
    position: relative;
    width: 100%;
    padding-bottom: 59.09%;
    height: 0;
    overflow: hidden;
    background-color: #000;
    margin: 0 auto 20px auto;
    border-radius: 30px;
}

.post-video iframe,
.post-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.post-video .video-poster-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}

.post-video .video-poster-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.post_header {
    margin-top: 30px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.post-body-title {
    font-size: 50px;
}

.seminar-type-tag {
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 16px;
    font-weight: 900;
    background-color: #07913b;
    padding: 3px 24px;
    border-radius: 5px;
}

.seminar-header-date {
    font-weight: 500;
    font-size: 20px;
}

/* =========================================================
   Editor Content Specific Styles
   ========================================================= */

.post-site-main .editor_contents .wp-block-image img {
    max-width: 1100px;
    width: 100%;
    height: auto;
    max-height: 650px;
}

.post-site-main .editor_contents .wp-block-gallery {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 20px;
}

.post-site-main .editor_contents .has-many-images {
    gap: 25px;
}

.post-site-main .editor_contents .has-many-images img {
    max-height: 200px;
}

.post-site-main .editor_contents .wp-block-gallery .wp-block-image {
    max-width: 520px;
    width: 100%;
    height: auto;
    max-height: 308px;
}

.post-site-main .wp-block-media-text {
    margin-block: 2rem;
}

.post-site-main .wp-block-media-text .wp-block-media-text__media img {
    max-height: 290px;
    max-width: 500px;
    width: 100%;
    object-fit: cover;
    margin-inline: 0 !important;
}

.post-site-main .wp-block-media-text .wp-block-media-text__content {
    padding: 0;
}

.post-site-main .wp-block-media-text .wp-block-media-text__media figure {
    max-height: 290px;
    max-width: 500px;
    width: 100%;
}

.post-site-main .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media img {
    justify-self: end;
}

/* =========================================================
   Button Styles
   ========================================================= */

.post-site-main .wp-block-button {
    width: 100%;
}

.post-site-main .wp-block-button__link {
    color: white;
    margin-block: 0.5rem;
    border-radius: 10px !important;
    display: flex;
    align-items: center;
    padding-block: 10px;
    padding-inline: 10px;
    transition: ease-in-out 200ms;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none !important;
}

.post-site-main .wp-block-button__link:hover {
    transform: scale(1.01);
}

.post-site-main .wp-block-button__link:visited {
    color: white;
}

/* Normal Button: Centered text with arrow at the end */
.post-site-main .wp-block-button__link:not(.external-link-annotation) {
    background-color: var(--color);
    max-width: 311px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.post-site-main .wp-block-button__link:not(.external-link-annotation)::after {
    content: "";
    display: block;
    width: 0.5em;
    height: 0.5em;
    border-top: solid 2px white;
    border-right: solid 2px white;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    margin-left: 1rem;
}

/* External Link Button: Text left, icon right */
.post-site-main .wp-block-button__link.external-link-annotation {
    background-color: #3695d9 !important;
    justify-content: space-between;
    max-width: 311px;
    width: 100%;
    padding-inline-start: 16px;
}

.post-site-main .wp-block-button__link.external-link-annotation::after {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='3' stroke='white' class='size-6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m8.25 4.5 7.5 7.5-7.5 7.5' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    vertical-align: middle;
    margin-left: 1rem;
}

/* General external link annotation (not for buttons) */
.external-link-annotation:not(.wp-block-button__link)::after {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15.43 15.43'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23b09a96;%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg id='_%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3' data-name='%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3'%3E%3Cg%3E%3Cpath class='cls-1' d='M2.89,0v12.54h12.54V0H2.89ZM14.23,11.33H4.1V1.21h10.13v10.13Z'/%3E%3Cpolygon class='cls-1' points='1.21 14.23 1.21 8.92 1.21 4.1 1.21 2.89 0 2.89 0 15.43 12.54 15.43 12.54 14.23 11.33 14.23 1.21 14.23'/%3E%3Cpolygon class='cls-1' points='7.02 9.43 10.57 5.88 10.57 8.43 11.78 8.43 11.78 3.82 7.16 3.82 7.16 5.02 9.72 5.02 6.17 8.58 7.02 9.43'/%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    vertical-align: middle;
    margin-left: 0.25em;
}

/* =========================================================
   General Editor Content & Miscellaneous Styles
   ========================================================= */

.post-site-main h2 {
    margin: 1em 0 0.8em;
}

.post-site-main .editor_contents p {
    margin: 0;
    line-height: 28px;
}

.post-site-main .common-button {
    margin-top: 4.3rem;
}

/* =========================================================
   Responsive Adjustments (All Sections)
   ========================================================= */

@media screen and (max-width: 1345px) {
    .post-site-main .wp-block-media-text {
        gap: 24px;
    }
}

@media screen and (max-width: 900px) {
    .custom-post-grid {
        grid-template-columns: 1fr;
        padding-bottom: 15px;
    }

    .custom-post-item {
        width: 100%;
    }

    .custom-post-date,
    .custom-post-company {
        font-size: 16px;
    }

    .default-image {
        max-height: none;
    }

    .default-post-title {
        font-size: 21px;
    }

    .seminar-header-date {
        font-size: 15px;
    }

    .post_header {
        margin-top: 24px;
        margin-bottom: 0.5rem;
    }

    .post-body-title {
        font-size: 35px;
        line-height: 46px;
    }

    .seminar-type-tag {
        font-size: 12px;
        padding: 2px 16px;
    }

    .post-site-main .editor_contents .wp-block-gallery {
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .post-site-main .editor_contents .wp-block-image img {
        object-fit: cover;
        border-radius: 0 !important;
    }

    .post-site-main .wp-block-media-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

@media screen and (max-width: 375px) {

    .post-site-main .wp-block-media-text .wp-block-media-text__media figure,
    .post-site-main .wp-block-media-text .wp-block-media-text__media figure>img {
        max-height: 180px;
        max-width: 310px;
        width: 100%;
        object-fit: cover;
    }
}