/* Import base styles from style.css for header and footer */
@import url('style.css');

/* Detail Page Specific Styles */
.detail-wrapper {
    display: flex;
    gap: 24px;
    max-width: 1208px;
    margin: 0 auto;
    padding: 64px;
    overflow-x: hidden;
}

/* Main Content (Left - Wide) */
.detail-main-content {
    flex: 1;
    max-width: 874px;
    min-width: 0;
    overflow-x: hidden;
}

.detail-main-content > * {
    max-width: 100%;
}

.detail-main-content img {
    max-width: 100%;
    height: auto;
}

/* Sidebar (Right - Narrow) */
.detail-sidebar {
    max-width: 310px;
    flex-shrink: 0;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--text-subtle);
}

.breadcrumb a {
    color: var(--text-brand);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.breadcrumb svg {
    flex-shrink: 0;
}

/* Article Header */
.article-header {
    margin-bottom: 32px;
}

.article-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-default);
}

.article-category {
    display: inline-block;
    color: var(--text-brand);
    font-size: 14px;
    font-weight: 600;
}

.article-date {
    font-size: 14px;
    color: var(--text-subtle);
}

.article-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 12px;
    color: var(--text-subtle);
}

.article-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.author-name {
    font-size: 14px;
    color: var(--text-brand);
}

.line-vertikal-brand {
    padding-left: 1px;
    height: 16px;
    background: var(--primary-color);
}

/* Article Featured Image */
.article-featured-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
    max-height: 470px;
}

/* Article Content */
.article-content {
    font-size: 16px;
    line-height: 28px;
    color: var(--text-default);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 8px 0;
}

.article-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--text-default);
}

.article-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 24px 0 12px;
    color: var(--text-default);
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-default);
}

.article-content ul,
.article-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

/* Pagination */
.article-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-pagination p {
    font-size: 16px;
    color: var(--text-default);
    font-weight: 700;
    margin: 0;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    border-radius: 8px;
    background: var(--elevation-surface-default);
    border: 1px solid var(--line-default);
    color: var(--text-default);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 4px 8px;
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    width: 40px;
    text-align: center;
    color: var(--text-subtle);
}

/* Tags Section */
.article-tags {
    margin: 32px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-tags h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-default);
}

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

.tag {
    display: inline-block;
    padding: 4px 8px;
    background: var(--elevation-surface-default);
    border: 1px solid var(--line-default);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-default);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

/* Related Articles */
.related-articles {
    margin: 48px 0;
}

.related-articles h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-default);
}

.related-articles-list {
    display: grid;
    gap: 16px;
}

.related-article-card {
    text-decoration: none;
    transition: all 0.3s ease;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-default);
}

.related-article-card:hover {
    transform: translateY(-4px);
}

.related-article-card .category {
    display: inline-block;
    color: var(--text-brand);
    font-size: 14px;
    font-weight: 600;
}

.related-article-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-default);
    line-height: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar-section {
    background: var(--elevation-surface-default);
    margin-bottom: 32px;
}

.sidebar-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-default);
    padding-bottom: 8px;
}

.recent-article-item {
    text-decoration: none;
    display: block;
    padding-bottom: 16px;
    transition: all 0.3s ease;
}

.recent-article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.recent-article-item .category {
    display: inline-block;
    color: var(--text-brand);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.recent-article-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-default);
    line-height: 24px;
}

.recent-article-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-subtle);
    align-items: center;
}

/* sosial media section */
.sosmed-section {
    display: grid;
    gap: 24px;
}

.sosmed-list {
    display: grid;
    gap: 12px;
}

.sosmed-item {
    border-radius: 8px;
    border: 1px solid var(--line-default);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    font-size: 12px;
    width: 100%;
    font-weight: 600;
}

.sosmed-item .name {
    color: var(--text-default);
}

.sosmed-item .follow-text {
    color: var(--text-brand);
}

.wrapper-icon {
    display: flex;
    align-items: center;
    gap: 12px;

}

.cta-section {
    padding-top: 32px;
}

.in-article-section {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--line-danger-subtlest);
    padding: 8px;
    border-radius: 8px;
}

.in-article-section img {
    width: 90px;
    height: 51px;
    border-radius: 4px;
    object-fit: cover;
}

.in-article-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.in-article-text h5 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-default);
    margin: 0;
    line-height: 20px;
}

.in-article-text p {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-brand);
    margin: 0;
}

.banner-app-mobile {
    display: none;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}

.banner-app-mobile img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

.author-info {
    display: flex;
    gap: 8px;
}

.share-list {
    display: flex;
    gap: 12px;
}

.share-item {
    width: 24px;
    height: 24px;
    border: 1px solid var(--line-default);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    cursor: pointer;
}

.share-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.share-item svg {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

/* Responsive Design */
@media (max-width: 1040px) {
    .detail-wrapper {
        padding: 32px;
    }

    .detail-main-content {
        max-width: 605px;
    }

    .detail-sidebar {
        max-width: 339px;
    }

    .article-title {
        font-size: 32px;
    }

    .article-content {
        font-size: 15px;
        line-height: 26px;
    }

    .article-content h2 {
        font-size: 22px;
    }

    .article-content h3 {
        font-size: 18px;
    }

    .related-articles h3 {
        font-size: 22px;
    }

    .sidebar-section h3 {
        font-size: 22px;
    }

    .cta-section {
        max-width: 399px;
    }

    .cta-section img {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 640px) {
    .detail-wrapper {
        padding: 32px 24px;
        flex-direction: column;
    }

    .detail-sidebar {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        order: 999;
    }

    .detail-main-content {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .sidebar-section {
        order: 1;
    }

    .sosmed-section {
        order: 2;
    }

    .cta-section {
        display: none;
    }

    .breadcrumb {
        order: -1;
    }

    .article-header {
        order: 0;
    }

    .article-title {
        font-size: 20px;
        line-height: 32px;
    }

    .article-content {
        font-size: 14px;
        line-height: 24px;
    }

    .article-content h2 {
        font-size: 18px;
        margin: 24px 0 12px;
    }

    .article-content h3 {
        font-size: 16px;
        margin: 20px 0 10px;
    }

    .related-articles-list {
        grid-template-columns: 1fr;
    }

    .related-articles h3 {
        font-size: 20px;
    }

    .article-pagination {
        gap: 6px;
    }

    .pagination-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    .in-article-section img {
        width: 90px;
        height: auto;
    }

    .in-article-text h5 {
        font-size: 12px;
        line-height: 18px;
    }

    .in-article-text p {
        font-size: 14px;
    }

    .banner-app-mobile  {
        max-width: 100%;
        width: 100%;
        display: block;
        overflow: hidden;
    }
    .banner-app-mobile img {
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .detail-wrapper {
        padding: 24px 16px;
    }

    .article-title {
        font-size: 20px;
        line-height: 30px;
    }

    .article-content {
        font-size: 14px;
        line-height: 24px;
    }

    .article-content h2 {
        font-size: 18px;
        margin: 20px 0 12px;
    }

    .article-content h3 {
        font-size: 16px;
        margin: 16px 0 10px;
    }

    .banner-app-mobile {
        max-width: 100%;
        width: 100%;
        height: auto;
        display: block;
        overflow: hidden;
    }

    .banner-app-mobile img {
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 8px;
    }

     .article-featured-image {
        max-height: 194px;
     }

    .in-article-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .in-article-section img {
        width: 100%;
        max-width: 120px;
        height: auto;
    }

    .pagination-btn {
        font-size: 12px;
        padding: 5px 9px;
    }

    .related-articles h3 {
        font-size: 18px;
    }

    .sidebar-section h3 {
        font-size: 18px;
    }
}

@media (max-width: 375px) {
    .detail-wrapper {
        padding: 20px 16px;
    }

    .breadcrumb {
        font-size: 12px;
        gap: 8px;
    }

    .article-header {
        margin-bottom: 8px;
    }

    .article-title {
        font-size: 18px;
        line-height: 28px;
    }

    .article-author {
        font-size: 10px;
        gap: 8px;
    }

    .article-author img {
        width: 20px;
        height: 20px;
    }

    .author-name {
        font-size: 12px;
    }

    .article-featured-image {
        margin-bottom: 10px;
        max-height: 194px;
    }

    .article-content {
        font-size: 14px;
        line-height: 22px;
    }

    .article-content h2 {
        font-size: 18px;
        margin: 20px 0 10px;
    }

    .article-content h3 {
        font-size: 16px;
        margin: 16px 0 8px;
    }

    .article-pagination {
        justify-content: space-between;
        width: 100%;
    }

    .article-pagination p {
        font-size: 14px;
    }

    .pagination-buttons {
        gap: 4px;
    }

    .pagination-btn {
        font-size: 11px;
        padding: 4px 8px;
    }

    .article-tags h3 {
        font-size: 16px;
    }

    .tag {
        font-size: 12px;
        padding: 4px 8px;
    }

    .related-articles {
        margin: 32px 0;
    }

    .related-articles h3 {
        font-size: 16px;
    }

    .related-article-card .category {
        font-size: 12px;
    }

    .related-article-card h4 {
        font-size: 14px;
        line-height: 20px;
    }

    .sidebar-section h3 {
        font-size: 16px;
    }

    .recent-article-item .category {
        font-size: 12px;
        margin-bottom: 0;
    }

    .recent-article-item h4 {
        font-size: 14px;
        line-height: 20px;
    }
    

    .in-article-section {
        flex-direction: column;
        align-items: start;
        gap: 4px;
    }

    .in-article-section img {
        width: 90px;
        height: auto;
    }

    .in-article-text h5 {
        font-size: 12px;
        line-height: 16px;
    }

    .in-article-text p {
        font-size: 14px;
    }

    .sosmed-section {
        font-size: 16px;
        gap: 16px;
    }

    .banner-app-mobile {
        max-width: 100%;
        height: auto;
    }

    .banner-app-mobile img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .share-list {
        gap: 6px;
    }

    .share-item {
        width: 18px;
        height: 18px;
        padding: 2px;
        border-radius: 4px;
    }

    .share-item a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    .share-item svg {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
    }
}