/* ============================================
   POST PAGE - Modern Professional Stylesheet
   Uses variables from style.css
   ============================================ */

/* ============================================
   POST HERO / FEATURED IMAGE
   ============================================ */
.post-hero {
    position: relative;
    overflow: hidden;
    background: var(--gray-200);
    aspect-ratio: 16 / 9;
}
.post-hero img,
.post-hero picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.post-hero picture {
    display: block;
    width: 100%;
    height: 100%;
}
.post-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0,0,0,.4), transparent);
    pointer-events: none;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.post-breadcrumb {
    background: var(--gray-100);
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-300);
}
.post-breadcrumb ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.post-breadcrumb li {
    font-size: 14px;
    color: var(--gray-600);
}
.post-breadcrumb li a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}
.post-breadcrumb li a:hover {
    color: var(--primary);
}
.post-breadcrumb li + li::before {
    content: '\f104';
    font-family: FontAwesome;
    margin-left: 8px;
    color: var(--gray-400);
    font-size: 12px;
}
.post-breadcrumb li.active {
    color: var(--gray-800);
    font-weight: 600;
}

/* ============================================
   POST LAYOUT (2-column grid)
   ============================================ */
.post-layout {
    padding: 40px 0 60px;
}
.post-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}
.post-main {
    min-width: 0;
}

/* ============================================
   POST HEADER (Title + Meta)
   ============================================ */
.post-header {
    margin-bottom: 30px;
}
.post-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.5;
    margin-bottom: 16px;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
}
.post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--gray-600);
}
.post-meta-item i {
    color: var(--primary);
    font-size: 14px;
}
.post-meta-item a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}
.post-meta-item a:hover {
    color: var(--primary);
}

/* ============================================
   POST CONTENT
   ============================================ */
.post-content {
    line-height: 2.2;
    color: var(--gray-700);
    font-size: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.post-content h1 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin: 28px 0 16px;
    font-weight: 800;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.post-content h2 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin: 24px 0 14px;
    font-weight: 700;
    position: relative;
    padding-right: 16px;
}
.post-content h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 4px;
    width: 4px;
    height: calc(100% - 8px);
    background: var(--primary);
    border-radius: 2px;
}
.post-content h3,
.post-content h4 {
    color: var(--gray-900);
    margin: 20px 0 12px;
    font-weight: 700;
}
.post-content h3 { font-size: 1.25rem; }
.post-content h4 { font-size: 1.1rem; }
.post-content p {
    margin-bottom: 16px;
    text-align: justify;
}
.post-content p:last-child {
    margin-bottom: 0;
}
.post-content strong,
.post-content b {
    color: var(--gray-900);
    font-weight: 700;
}
.post-content a {
    color: var(--primary-dark);
    text-decoration: underline;
    text-decoration-color: rgba(212,168,67,.3);
    text-underline-offset: 3px;
    transition: var(--transition-fast);
}
.post-content a:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}
.post-content img {
    border-radius: var(--radius);
    max-width: 100%;
    height: auto;
    margin: 16px 0;
    box-shadow: var(--shadow-sm);
}
.post-content ul,
.post-content ol {
    padding-right: 24px;
    margin-bottom: 16px;
}
.post-content ul li,
.post-content ol li {
    margin-bottom: 8px;
    padding-right: 4px;
}
.post-content ul li::marker {
    color: var(--primary);
}
.post-content blockquote {
    border-right: 4px solid var(--primary);
    padding: 16px 20px;
    margin: 20px 0;
    background: var(--gray-100);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--gray-800);
}
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.post-content table th,
.post-content table td {
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    text-align: right;
}
.post-content table th {
    background: var(--gray-100);
    font-weight: 700;
    color: var(--gray-900);
}

/* ============================================
   POST GALLERY (reuses gallery-card from category)
   ============================================ */
.post-gallery {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-200);
}
.post-gallery-title {
    text-align: center;
    margin-bottom: 30px;
}
.post-gallery-title h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}
.post-gallery-title .title-line {
    width: 50px;
    height: 3px;
    background: var(--primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.post-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

.post-gallery-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}
.post-gallery-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}
.post-gallery-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--gray-200);
}
.post-gallery-card-image img,
.post-gallery-card-image picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}
.post-gallery-card-image picture {
    display: block;
    width: 100%;
    height: 100%;
}
.post-gallery-card:hover .post-gallery-card-image img,
.post-gallery-card:hover .post-gallery-card-image picture img {
    transform: scale(1.06);
}

/* Overlay */
.post-gallery-card-image .post-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}
.post-gallery-card:hover .post-gallery-overlay {
    opacity: 1;
}
.post-gallery-overlay i {
    color: #fff;
    font-size: 26px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255,255,255,.3);
    transition: var(--transition);
}
.post-gallery-card:hover .post-gallery-overlay i {
    transform: scale(1.1);
    background: var(--primary);
    border-color: var(--primary);
}

/* Caption */
.post-gallery-caption {
    padding: 12px 14px;
}
.post-gallery-caption h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 4px;
    line-height: 1.5;
}
.post-gallery-caption h4 a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}
.post-gallery-caption h4 a:hover {
    color: var(--primary);
}
.post-gallery-caption p {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   SHARE SECTION
   ============================================ */
.post-share {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.post-share-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
}
.post-share-links {
    display: flex;
    gap: 10px;
}
.post-share-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    color: var(--white);
    transition: var(--transition);
    text-decoration: none;
}
.post-share-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.post-share-links .share-facebook { background: #1877f2; }
.post-share-links .share-twitter { background: #1da1f2; }
.post-share-links .share-whatsapp { background: #25d366; }
.post-share-links .share-telegram { background: #0088cc; }

/* ============================================
   TAGS
   ============================================ */
.post-tags {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.post-tags-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}
.post-tags a {
    display: inline-block;
    padding: 4px 14px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--gray-200);
    transition: var(--transition-fast);
}
.post-tags a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ============================================
   EMPTY GALLERY
   ============================================ */
.post-empty-gallery {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}
.post-empty-gallery i {
    font-size: 40px;
    margin-bottom: 12px;
    color: var(--gray-400);
    display: block;
}

/* ============================================
   SIDEBAR
   ============================================ */
.article-sidebar {
    position: sticky;
    top: 90px;
}
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 20px;
}
.widget-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-title i {
    color: var(--primary);
    font-size: 16px;
}

/* Latest Articles */
.latest-articles {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.latest-item {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    text-decoration: none;
    transition: var(--transition-fast);
}
.latest-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.latest-item:first-child {
    padding-top: 0;
}
.latest-item:hover {
    text-decoration: none;
}
.latest-info h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 6px;
    line-height: 1.6;
    transition: var(--transition-fast);
}
.latest-item:hover .latest-info h5 {
    color: var(--primary-dark);
}
.latest-date {
    font-size: 12px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}
.latest-date i {
    font-size: 12px;
    color: var(--gray-400);
}

/* Popular Tags */
.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.popular-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--gray-200);
    transition: var(--transition-fast);
}
.popular-tag:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    text-decoration: none;
}

/* Contact Widget */
.contact-widget {
    background: var(--secondary) !important;
    border-color: var(--secondary-light) !important;
}
.contact-widget .widget-title {
    color: var(--white);
    border-bottom-color: var(--secondary-light);
}
.contact-widget .widget-title i {
    color: var(--primary-light);
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,.08);
    border-radius: var(--radius-sm);
    color: var(--gray-300);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition-fast);
}
.contact-item:hover {
    background: rgba(255,255,255,.15);
    color: var(--white);
    text-decoration: none;
}
.contact-item i {
    font-size: 18px;
    color: var(--primary-light);
    width: 20px;
    text-align: center;
}
.contact-item.whatsapp i {
    color: #25d366;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .post-grid {
        grid-template-columns: 1fr 260px;
        gap: 24px;
    }
    .post-title {
        font-size: 1.7rem;
    }
    .post-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        position: static;
    }
    .post-title {
        font-size: 1.4rem;
    }
    .post-layout {
        padding: 30px 0 40px;
    }
    .post-content {
        font-size: 15px;
    }
    .post-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .post-gallery-caption {
        padding: 10px 12px;
    }
    .post-share {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 575px) {
    .post-title {
        font-size: 1.3rem;
    }
    .post-gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .post-content {
        font-size: 14px;
        line-height: 2;
    }
}
