/* ================================================================
   BLOG PAGES — blog.css
   Used by: blog_list.html  +  blog_detail.html
   ================================================================ */


/* ----------------------------------------------------------------
   SHARED: BREADCRUMB
---------------------------------------------------------------- */
.blog-breadcrumb {
    margin: 0;
}

.blog-breadcrumb .breadcrumb-item a {
    color: rgba(242, 231, 213, 0.65);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.blog-breadcrumb .breadcrumb-item a:hover {
    color: var(--gold);
}

.blog-breadcrumb .breadcrumb-item.active {
    color: var(--parchment);
    font-size: 0.85rem;
}

.blog-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(212, 162, 75, 0.45);
    content: "›";
    font-size: 1rem;
}


/* ================================================================
   BLOG LIST PAGE
   ================================================================ */

/* ----------------------------------------------------------------
   HERO
---------------------------------------------------------------- */
.blog-hero {
    position: relative;
    padding: 8rem 0 6rem;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.blog-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        #1e0c04  0%,
        var(--mahogany) 30%,
        var(--olive)    70%,
        #1a1708  100%
    );
}

.blog-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(43, 22, 8, 0.3);
}

/* Scattered dot pattern */
.blog-hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background-image: radial-gradient(
        circle,
        var(--gold) 1px,
        transparent 1px
    );
    background-size: 32px 32px;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
}

.blog-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    color: var(--parchment);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.blog-hero-divider {
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--orange));
    margin: 1rem auto 1.5rem;
    border-radius: 2px;
}

.blog-hero-subtitle {
    color: rgba(242, 231, 213, 0.78);
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

.blog-hero-cut {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--parchment);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    z-index: 2;
}


/* ----------------------------------------------------------------
   MAIN SECTION
---------------------------------------------------------------- */
.blog-main-section {
    background: var(--parchment);
    padding: 4rem 0 6rem;
}


/* ----------------------------------------------------------------
   BLOG CARD
---------------------------------------------------------------- */
.blog-reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    transition-delay: calc(var(--blog-delay, 0) * 0.1s);
}

.blog-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.blog-card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.blog-card-link:hover { text-decoration: none; }

.blog-card {
    background: var(--white);
    border: 1px solid rgba(212, 162, 75, 0.12);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-7px);
    border-color: rgba(212, 162, 75, 0.3);
}

/* Cover image area */
.blog-card-cover {
    position: relative;
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.blog-card:hover .blog-card-img {
    transform: scale(1.07);
}

.blog-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--mahogany) 0%, var(--olive) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(212, 162, 75, 0.35);
    transition: var(--transition);
}

.blog-card:hover .blog-card-img-placeholder {
    color: rgba(212, 162, 75, 0.6);
}

.blog-card-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 50%,
        rgba(43, 22, 8, 0.5) 100%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
}

.blog-card:hover .blog-card-cover-overlay {
    opacity: 1;
}

/* Date badge on cover */
.blog-card-date-badge {
    position: absolute;
    bottom: 0.85rem;
    right: 0.85rem;
    background: var(--mahogany);
    border: 1px solid rgba(212, 162, 75, 0.35);
    border-radius: 6px;
    padding: 0.4rem 0.65rem;
    text-align: center;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.blog-date-day {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.blog-date-month {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(242, 231, 213, 0.65);
    margin-top: 0.2rem;
}

/* Card body */
.blog-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.blog-meta-author {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.blog-meta-author i {
    color: var(--gold);
    font-size: 0.72rem;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--mahogany);
    line-height: 1.35;
    margin-bottom: 0.65rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.blog-card:hover .blog-card-title {
    color: var(--olive);
}

.blog-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

.blog-card-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 162, 75, 0.1);
    margin-top: auto;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--gold);
    transition: var(--transition);
}

.blog-read-more i {
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-read-more {
    color: var(--orange);
}

.blog-card:hover .blog-read-more i {
    transform: translateX(4px);
}


/* ----------------------------------------------------------------
   PAGINATION
---------------------------------------------------------------- */
.blog-pagination {
    margin-top: 4rem;
    text-align: center;
}

.blog-pagination .pagination {
    gap: 0.35rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.blog-pagination .page-link {
    background: var(--white);
    border: 1.5px solid rgba(212, 162, 75, 0.25);
    color: var(--mahogany);
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius) !important;
    transition: var(--transition);
}

.blog-pagination .page-link:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--mahogany);
}

.blog-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--gold), var(--orange));
    border-color: var(--gold);
    color: var(--mahogany);
    box-shadow: 0 4px 12px rgba(212, 162, 75, 0.35);
}

.blog-pagination .page-item.disabled .page-link {
    opacity: 0.4;
    pointer-events: none;
}

.blog-pagination-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}


/* ----------------------------------------------------------------
   EMPTY STATE
---------------------------------------------------------------- */
.blog-empty {
    text-align: center;
    padding: 5rem 2rem;
    max-width: 480px;
    margin: 0 auto;
}

.blog-empty-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(212, 162, 75, 0.1), rgba(230, 126, 34, 0.07));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--gold);
    margin: 0 auto 1.5rem;
}

.blog-empty h3 {
    font-family: var(--font-heading);
    color: var(--mahogany);
    margin-bottom: 0.75rem;
}

.blog-empty p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}


/* ----------------------------------------------------------------
   BOTTOM CTA
---------------------------------------------------------------- */
.blog-cta {
    position: relative;
    overflow: hidden;
}

.blog-cta-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--mahogany) 0%, var(--olive) 100%);
}

/* Diagonal top cut */
.blog-cta::before {
    content: '';
    display: block;
    height: 60px;
    background: var(--parchment);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 0);
    position: relative;
    z-index: 1;
}

.blog-cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 3.5rem 0 5rem;
    flex-wrap: wrap;
}

.blog-cta-text h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--gold);
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.blog-cta-text p {
    color: rgba(242, 231, 213, 0.75);
    font-size: 0.95rem;
    margin: 0;
    max-width: 480px;
    line-height: 1.7;
}

.blog-cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.blog-cta-outline {
    border-color: rgba(242, 231, 213, 0.4) !important;
    color: var(--parchment) !important;
}

.blog-cta-outline:hover {
    background: rgba(242, 231, 213, 0.1) !important;
    border-color: var(--parchment) !important;
    color: var(--parchment) !important;
}


/* ================================================================
   BLOG DETAIL PAGE
   ================================================================ */

/* ----------------------------------------------------------------
   POST HERO
---------------------------------------------------------------- */
.post-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 5.5rem;
    overflow: hidden;
}

.post-hero-bg {
    position: absolute;
    inset: 0;
}

.post-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.03);
    animation: post-hero-zoom 20s ease-in-out infinite alternate;
}

@keyframes post-hero-zoom {
    from { transform: scale(1.03); }
    to   { transform: scale(1.08); }
}

.post-hero-gradient {
    background: linear-gradient(
        135deg,
        var(--mahogany) 0%,
        var(--olive)    100%
    );
}

.post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(43, 22, 8, 0.45) 0%,
        rgba(43, 22, 8, 0.88) 100%
    );
}

.post-hero-content {
    position: relative;
    z-index: 2;
    padding-top: 6rem;
}

.post-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(242, 231, 213, 0.65);
    letter-spacing: 0.04em;
}

.post-meta-item i {
    color: var(--gold);
    font-size: 0.75rem;
}

.post-meta-sep {
    color: rgba(212, 162, 75, 0.4);
    font-size: 1.1rem;
}

.post-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 5vw, 3rem);
    color: var(--parchment);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.post-hero-excerpt {
    color: rgba(242, 231, 213, 0.78);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 640px;
}

.post-hero-cut {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--parchment);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    z-index: 3;
}


/* ----------------------------------------------------------------
   POST BODY
---------------------------------------------------------------- */
.post-body-section {
    background: var(--parchment);
    padding: 4rem 0 5rem;
}

.post-content-card {
    background: var(--white);
    border: 1px solid rgba(212, 162, 75, 0.12);
    border-radius: 8px;
    padding: 2.5rem 3rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

/* CKEditor rich text */
.post-rich-text {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.9;
}

.post-rich-text h2,
.post-rich-text h3,
.post-rich-text h4 {
    font-family: var(--font-heading);
    color: var(--mahogany);
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
}

.post-rich-text h2 { font-size: 1.6rem; }
.post-rich-text h3 { font-size: 1.3rem; }
.post-rich-text h4 { font-size: 1.1rem; }

.post-rich-text p {
    margin-bottom: 1.25rem;
    color: #3d2e1e;
}

.post-rich-text ul,
.post-rich-text ol {
    padding-left: 1.5rem;
    margin-bottom: 1.35rem;
}

.post-rich-text li {
    margin-bottom: 0.5rem;
    color: #3d2e1e;
}

.post-rich-text ul li::marker {
    color: var(--gold);
}

.post-rich-text strong {
    color: var(--mahogany);
    font-weight: 700;
}

.post-rich-text em {
    color: var(--olive);
}

.post-rich-text a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-rich-text a:hover {
    color: var(--orange);
}

.post-rich-text blockquote {
    border-left: 4px solid var(--gold);
    background: linear-gradient(
        135deg,
        rgba(212, 162, 75, 0.07),
        rgba(230, 126, 34, 0.04)
    );
    margin: 2rem 0;
    padding: 1.25rem 1.75rem;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--olive);
    font-family: var(--font-heading);
}

.post-rich-text img {
    max-width: 100%;
    border-radius: 6px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-md);
}

.post-rich-text hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 2.5rem 0;
}


/* ----------------------------------------------------------------
   SHARE STRIP
---------------------------------------------------------------- */
.post-share-strip {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--white);
    border: 1px solid rgba(212, 162, 75, 0.12);
    border-radius: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-share-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
}

.post-share-links {
    display: flex;
    gap: 0.6rem;
}

.post-share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid rgba(212, 162, 75, 0.25);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-muted);
}

.post-share-whatsapp:hover { background: #25D366; border-color: #25D366; color: #fff; }
.post-share-twitter:hover  { background: #000;    border-color: #000;    color: #fff; }
.post-share-facebook:hover { background: #1877F2; border-color: #1877F2; color: #fff; }
.post-share-copy:hover     { background: var(--gold); border-color: var(--gold); color: var(--mahogany); }

.post-share-copy.copied {
    background: #4A8C5C;
    border-color: #4A8C5C;
    color: #fff;
}

/* Back link */
.post-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.post-back-link:hover {
    color: var(--gold);
}


/* ----------------------------------------------------------------
   SIDEBAR
---------------------------------------------------------------- */
.post-sidebar-card {
    background: var(--white);
    border: 1px solid rgba(212, 162, 75, 0.12);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.post-sidebar-card:last-child { margin-bottom: 0; }

.post-sidebar-header {
    background: linear-gradient(135deg, var(--mahogany) 0%, var(--olive) 100%);
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 1rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
}

.post-sidebar-body {
    padding: 1.5rem;
}

/* Author card */
.post-author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 162, 75, 0.15), rgba(230, 126, 34, 0.1));
    border: 2px solid rgba(212, 162, 75, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--gold);
    margin: 0 auto 1rem;
}

.post-author-name {
    display: block;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--mahogany);
    text-align: center;
    margin-bottom: 0.65rem;
}

.post-author-bio {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.65;
    text-align: center;
    margin: 0;
}

/* Recent posts */
.post-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-recent-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 162, 75, 0.08);
    transition: var(--transition);
}

.post-recent-list li:last-child .post-recent-link {
    border-bottom: none;
}

.post-recent-link:hover {
    background: rgba(212, 162, 75, 0.05);
    text-decoration: none;
}

.post-recent-thumb {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--mahogany), var(--olive));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(212, 162, 75, 0.4);
    font-size: 1.1rem;
}

.post-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-recent-text {
    flex: 1;
    min-width: 0;
}

.post-recent-text strong {
    display: block;
    font-size: 0.85rem;
    color: var(--mahogany);
    line-height: 1.35;
    margin-bottom: 0.25rem;
    transition: var(--transition);
}

.post-recent-link:hover .post-recent-text strong {
    color: var(--gold);
}

.post-recent-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-recent-text span i {
    color: var(--gold);
    font-size: 0.7rem;
}

/* CTA card */
.post-cta-card .post-sidebar-body p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}


/* ----------------------------------------------------------------
   MORE POSTS SECTION
---------------------------------------------------------------- */
.more-posts-section {
    background: var(--parchment-dark);
    padding: 5rem 0 6rem;
    border-top: 1px solid rgba(212, 162, 75, 0.1);
}


/* ----------------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .blog-hero      { padding: 6rem 0 5rem; }
    .post-hero      { min-height: 400px; padding-bottom: 4.5rem; }
    .post-content-card { padding: 1.75rem; }
}

@media (max-width: 767.98px) {
    .blog-cta-inner {
        flex-direction: column;
        text-align: center;
    }
    .blog-cta-actions { justify-content: center; }
    .post-hero-title  { font-size: 1.8rem; }
    .post-share-strip { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 575.98px) {
    .post-content-card { padding: 1.25rem; }
}