@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-layout-9 {
    width: 100%;
    box-sizing: border-box;
}

.detail-9-container {
    width: 100%;
    padding: 80px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-9-header {
    width: 100%;
    max-width: 900px;
    text-align: center;
    margin-bottom: 48px;
}

.detail-9-title {
    margin-bottom: 16px;
    text-align: center;
    animation: fadeInUp 1.5s ease-out;
}

.detail-9-description {
    margin: 0;
    animation: fadeInUp 1.5s ease-out;
}

.detail-9-description ul,
.detail-9-description ol {
    padding-left: 0;
    margin: 0;
    list-style-position: inside;
}

.detail-9-media-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 4s ease-out;
}

.detail-9-row-top {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 24px;
    width: 100%;
}

.detail-9-row-bottom {
    display: flex;
    justify-content: center;
    width: 100%;
}

.detail-9-media-box {
    display: flex;
    overflow: hidden;
}

.detail-9-row-top .detail-9-media-box {
    flex: 0 1 auto;
    max-height: 300px;
    align-items: flex-end;
}

.detail-9-row-bottom .detail-9-media-box {
    width: 100%;
    max-height: 400px;
    justify-content: center;
}

.detail-9-media-link {
    display: flex;
    align-items: flex-end;
    max-width: 100%;
}

.detail-9-media-box img,
.detail-9-media-box video {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.detail-9-row-top .detail-9-media-box img {
    max-height: 300px;
}

@media (min-width: 768px) and (max-width: 1024.98px) {
    .detail-9-container {
        padding: 80px 24px !important;
    }

    .detail-9-header {
        max-width: 720px !important;
        margin-bottom: 48px !important;
    }

    .detail-9-media-grid {
        gap: 24px !important;
        width: 100% !important;
        max-width: 720px !important;
        margin: 0 auto !important;
    }

    .detail-9-row-top {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }

    .detail-9-row-top .detail-9-media-box:first-child {
        justify-content: flex-end !important;
    }
    
    .detail-9-row-top .detail-9-media-box:last-child {
        justify-content: flex-start !important;
    }

    .detail-9-row-top .detail-9-media-box {
        width: 100% !important;
        max-width: 348px !important;
        max-height: 200px !important;
        height: auto !important;
        aspect-ratio: auto !important;
    }

    .detail-9-row-bottom .detail-9-media-box {
        width: 100% !important;
        max-width: 720px !important;
        max-height: 365px !important;
        height: auto !important;
        aspect-ratio: auto !important;
    }

    .detail-9-media-box img,
    .detail-9-media-box video {
        width: auto !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
    }
}

@media (max-width: 767.98px) {
    .detail-9-container {
        padding: 16px !important;
        gap: 24px !important;
    }

    .detail-9-header {
        max-width: 100% !important;
        margin-bottom: 0 !important;
        text-align: center !important;
    }

    .detail-9-media-grid {
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 48px !important;
    }

    .detail-9-row-top {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
    }

    .detail-9-row-top .detail-9-media-box:first-child,
    .detail-9-row-top .detail-9-media-box:last-child {
        justify-content: center !important;
    }

    .detail-9-row-top .detail-9-media-box,
    .detail-9-row-bottom .detail-9-media-box {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 200px !important;
        aspect-ratio: auto !important;
    }
}