/* blog */
/* Card Styles */

.card-sl {
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    background: #fff;
    overflow: hidden;
    min-height: 0; /* agar flex child tidak overflow */
}

/* Padding untuk card heading agar teks tidak rapat ke kiri/kanan */
.card-sl .card-heading {
    padding: 1rem 1.5rem;
}
.card-sl .card-heading .card-author,
.card-sl .card-heading h2 {
    padding-left: 0;
    margin-bottom: 0;
}
.card-sl .card-heading h2 {
    line-height: 1.4;
}

.card-image {
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 17px;
    font-weight: bold;
    color: #2c2c2c;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.card-description {
    font-size: 14px;
    color: #636262;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.card-date {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* Card Meta Information */
.card-sl .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #6c757d;
}

.card-author,
.card-date {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-left: 20px;
}

.card-author i,
.card-date i {
    color: #007bff;
    font-size: 0.8rem;
}

.card-author span,
.card-date span {
    font-weight: 500;
}

/* Blog Content Overflow Prevention */
.blog-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    line-height: 1.6;
}

/* Typography Styling */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

.blog-content h1 {
    font-size: 2rem;
}
.blog-content h2 {
    font-size: 1.75rem;
}
.blog-content h3 {
    font-size: 1.5rem;
}
.blog-content h4 {
    font-size: 1.25rem;
}
.blog-content h5 {
    font-size: 1.1rem;
}
.blog-content h6 {
    font-size: 1rem;
}

.blog-content p {
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Prevent long URLs from breaking layout */
.blog-content a {
    word-break: break-all;
    overflow-wrap: break-word;
    hyphens: auto;
    color: #007bff;
    text-decoration: none;
}

.blog-content a:hover {
    text-decoration: underline;
}

/* Handle long code blocks */
.blog-content pre,
.blog-content code {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    max-width: 100%;
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: "Courier New", monospace;
}

.blog-content pre {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

/* Enhanced Table Styling */
.blog-content table {
    width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
    border-collapse: collapse;
    margin: 1rem 0;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.blog-content th,
.blog-content td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 0;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
    vertical-align: top;
}

.blog-content th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.blog-content tr:nth-child(even) {
    background-color: #f8f9fa;
}

.blog-content tr:hover {
    background-color: #e9ecef;
}

/* Responsive table for mobile */
@media (max-width: 768px) {
    .blog-content table {
        font-size: 0.875rem;
    }

    .blog-content th,
    .blog-content td {
        padding: 0.5rem;
    }
}

/* Handle colgroup and col elements */
.blog-content colgroup,
.blog-content col {
    min-width: auto !important;
}

/* Override inline styles for better responsive behavior */
.blog-content table[style*="min-width"] {
    min-width: auto !important;
    width: 100% !important;
}

.blog-content col[style*="min-width"] {
    min-width: auto !important;
}

/* Additional content styling */
.blog-content ul,
.blog-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #6c757d;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

/* YouTube Embed Responsive */
.blog-content [data-youtube-video] {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.blog-content [data-youtube-video] iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
    border-radius: 8px;
}

/* Override inline styles for responsive behavior */
.blog-content [data-youtube-video] iframe[width],
.blog-content [data-youtube-video] iframe[height] {
    width: 100% !important;
    height: 100% !important;
}

/* Additional responsive video container */
.blog-content .video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.blog-content .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.card-action {
    position: relative;
    float: right;
    margin-top: -25px;
    margin-right: 20px;
    z-index: 2;
    color: #e26d5c;
    background: #fff;
    border-radius: 100%;
    padding: 15px;
    font-size: 15px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.19);
}

.card-action:hover {
    color: #fff;
    background: #e26d5c;
    -webkit-animation: pulse 1.5s infinite;
}

.card-button {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    width: 100%;
    background-color: #111111;
    color: #fff;
    border-radius: 0 0 8px 8px;
}

.card-button:hover {
    text-decoration: none;
    background-color: #333333;
    color: #fff;
}

@-webkit-keyframes pulse {
    0% {
        -moz-transform: scale(0.9);
        -ms-transform: scale(0.9);
        -webkit-transform: scale(0.9);
        transform: scale(0.9);
    }

    70% {
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -webkit-transform: scale(1);
        transform: scale(1);
        box-shadow: 0 0 0 50px rgba(90, 153, 212, 0);
    }

    100% {
        -moz-transform: scale(0.9);
        -ms-transform: scale(0.9);
        -webkit-transform: scale(0.9);
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(90, 153, 212, 0);
    }
}

/* Konten artikel detail - biar HTML dari API rapi & gambar tidak jebol */
.blog-article-content .post-body {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
}

.blog-article-content .post-body p {
    margin-bottom: 1rem;
}

.blog-article-content .post-body h1,
.blog-article-content .post-body h2,
.blog-article-content .post-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #111;
}

.blog-article-content .post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    display: block;
}

.blog-article-content .post-body ul,
.blog-article-content .post-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.blog-article-content .post-body a {
    color: #e26d5c;
    text-decoration: underline;
}

.blog-article-content .post-body a:hover {
    color: #c95a4a;
}

.blog-article-content .post-body strong {
    font-weight: 600;
}

/* Promo Carousel - match pizzaranjang.com */
/* container-xxl: Bootstrap 5 class, fallback for Bootstrap 4 */
.container-xxl {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 1400px) {
    .container-xxl {
        max-width: 1320px;
    }
}
.promo .promo-item {
    display: block;
}
.promo .promo-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Menu page: pagination normal size, no oversized arrows */
.menu-pagination .pagination {
    font-size: 0.875rem;
}
.menu-pagination .page-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    max-width: 2.5rem;
    text-align: center;
}
.menu-pagination .page-item:first-child .page-link,
.menu-pagination .page-item:last-child .page-link {
    max-width: 2.5rem;
}
