/* ============ Blogs Page — hero, grid, testimonials, CTA ============ */

/* ---------- Hero ---------- */
.blog-hero {
    background: var(--n-gradient-soft);
    padding: 7rem 0 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero-crumb {
    display: inline-flex;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--n-slate-light);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.blog-hero-crumb a {
    color: var(--n-slate-light);
    text-decoration: none;
}

.blog-hero-crumb a:hover {
    color: var(--n-primary);
}

.blog-hero-crumb .active {
    color: var(--n-accent);
}

.blog-hero-title {
    font-family: var(--n-font-display);
    font-size: clamp(2.1rem, 4vw, 3rem);
    color: var(--n-navy);
    margin-bottom: 1rem;
    line-height: 1.15;
}

.blog-hero-sub {
    max-width: 560px;
    margin: 0 auto 3rem;
    color: var(--n-slate);
    font-size: 1.05rem;
}

.blog-hero-gallery {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

.blog-hero-gallery img {
    border-radius: var(--n-radius-md);
    object-fit: cover;
    box-shadow: var(--n-shadow-md);
    width: 100%;
    display: block;
    transition: opacity 0.5s ease, height 0.4s ease, flex-basis 0.4s ease, transform 0.4s ease;
}

/* Sizes: edges smallest, center tallest — matches the reference arc shape */
.bhg-slot-0 {
    flex: 0 0 14%;
    height: 120px;
}

.bhg-slot-1 {
    flex: 0 0 17%;
    height: 160px;
}

.bhg-slot-2 {
    flex: 0 0 24%;
    height: 220px;
}

.bhg-slot-3 {
    flex: 0 0 17%;
    height: 160px;
}

.bhg-slot-4 {
    flex: 0 0 14%;
    height: 120px;
}

.blog-hero-gallery img.bhg-fading {
    opacity: 0;
}

@media (max-width: 768px) {
    .blog-hero-gallery {
        flex-wrap: wrap;
    }

    .bhg-slot-0,
    .bhg-slot-1,
    .bhg-slot-2,
    .bhg-slot-3,
    .bhg-slot-4 {
        flex: 0 0 30%;
        height: 110px;
    }
}

/* ---------- Listing header ---------- */
.blog-list-section {
    padding: var(--n-section-padding) 0;
}

.blog-list-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.blog-list-eyebrow {
    display: inline-block;
    color: var(--n-primary);
    background: var(--n-bg-alt);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: var(--n-radius-pill);
    margin-bottom: 0.75rem;
}

.blog-list-head h2 {
    font-family: var(--n-font-display);
    font-size: 1.8rem;
    color: var(--n-navy);
    margin: 0;
}

.blog-list-desc {
    max-width: 380px;
    color: var(--n-slate);
    font-size: 0.95rem;
    margin: 0;
}

/* ---------- Cards ---------- */
.blog-card {
    background: var(--n-white);
    border-radius: var(--n-radius-md);
    border: 1px solid var(--n-border);
    overflow: hidden;
    height: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.blog-card:hover {
    box-shadow: var(--n-shadow-md);
    transform: translateY(-3px);
}

.blog-card-media {
    position: relative;
    overflow: hidden;
    height: 190px;
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-media img {
    transform: scale(1.06);
}

/* Read more pill — now a button, style kept the same */
.blog-card-readmore {
    position: absolute;
    bottom: 0.9rem;
    left: 0.9rem;
    background: var(--n-white);
    color: var(--n-navy);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: var(--n-radius-pill);
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
}

.blog-card:hover .blog-card-readmore {
    opacity: 1;
    transform: translateY(0);
}

.blog-card-body {
    padding: 1.25rem 1.35rem 1.5rem;
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--n-slate-light);
    margin-bottom: 0.6rem;
}

.blog-card-title {
    font-family: var(--n-font-display);
    font-size: 1.05rem;
    color: var(--n-navy);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.blog-card-excerpt {
    font-size: 0.88rem;
    color: var(--n-slate);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Pagination ---------- */
.blog-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.blog-pagination nav>div:first-child,
.blog-pagination p {
    display: none;
}

.blog-pagination .pagination {
    gap: 0.4rem;
}

.blog-pagination .page-link {
    border: none;
    border-radius: 50%;
    color: var(--n-slate);
    background: var(--n-bg-alt);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.blog-pagination .active .page-link {
    background: var(--n-primary);
    color: #fff;
}

.blog-pagination .page-link:hover {
    background: var(--n-primary);
    color: #fff;
}

.blog-pagination .page-item.disabled .page-link {
    background: transparent;
    color: var(--n-border);
}

/* ---------- Empty state ---------- */
.blog-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--n-slate-light);
    border: 1px dashed var(--n-border);
    border-radius: var(--n-radius-md);
}

/* ---------- Testimonials ---------- */
.blog-testimonials {
    padding: var(--n-section-padding) 0;
    background: var(--n-bg);
}

.blog-testimonials-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.blog-testimonials-eyebrow {
    display: block;
    color: var(--n-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-testimonials-head h2 {
    font-family: var(--n-font-display);
    font-size: 1.8rem;
    color: var(--n-navy);
    margin: 0;
}

.blog-testimonials-desc {
    max-width: 340px;
    color: var(--n-slate);
    font-size: 0.92rem;
    margin: 0;
}

.testimonial-card {
    background: var(--n-white);
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius-md);
    box-shadow: var(--n-shadow-sm);
    padding: 1.75rem;
    height: 100%;
}

.testimonial-stars {
    color: #F5B942;
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
}

.testimonial-quote {
    font-size: 0.92rem;
    color: var(--n-slate);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.testimonial-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-name {
    font-weight: 600;
    color: var(--n-navy);
    font-size: 0.9rem;
    line-height: 1.3;
}

.testimonial-role {
    color: var(--n-slate-light);
    font-size: 0.8rem;
}

.testimonial-nav {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 2rem;
}

.testimonial-nav button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--n-border);
    background: var(--n-white);
    color: var(--n-slate);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-nav button:last-child {
    background: var(--n-navy);
    color: #fff;
    border-color: var(--n-navy);
}

/* ---------- CTA banner ---------- */
.blog-cta {
    background: var(--n-gradient-soft);
    border-radius: var(--n-radius-lg);
    margin: 0 auto var(--n-section-padding);
    max-width: 1140px;
    padding: 3rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.blog-cta-eyebrow {
    display: inline-block;
    color: var(--n-secondary-dark);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.blog-cta h2 {
    font-family: var(--n-font-display);
    font-size: 1.6rem;
    color: var(--n-navy);
    max-width: 480px;
    margin-bottom: 0.9rem;
}

.blog-cta p {
    color: var(--n-slate);
    max-width: 460px;
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

.blog-cta-btn {
    background: var(--n-navy);
    color: #fff;
    border: none;
    padding: 0.75rem 1.6rem;
    border-radius: var(--n-radius-pill);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    display: inline-block;
}

.blog-cta-btn:hover {
    background: var(--n-primary-dark);
    color: #fff;
}

/* ================= NOTEBOOK MODAL ================= */
.book-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 25, 35, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(6px);
}

.book-overlay.active {
    display: flex;
}

.book-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    perspective: 2000px;
}

/* The notebook itself */
.notebook {
    display: flex;
    width: 100%;
    height: 700px;
    background: #fdfbf7;
    border-radius: 6px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Center spine */
.notebook::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.02) 50%, rgba(0, 0, 0, 0.09));
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
}

/* Pages */
.notebook-page {
    flex: 1;
    padding: 45px 50px 60px 50px;
    position: relative;
    overflow-y: auto;
    background: #fdfbf7;
    display: flex;
    flex-direction: column;
}

.notebook-page-left {
    border-right: 1px solid rgba(0, 0, 0, 0.04);
}

/* Corner curl */
.notebook-page::before {
    content: '';
    position: absolute;
    bottom: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.06) 50%);
    pointer-events: none;
}

.notebook-page-left::before {
    left: 0;
    transform: scaleX(-1);
}

.notebook-page-right::before {
    right: 0;
}

/* ----- COVER (Left page) ----- */
.cover-category {
    display: inline-block;
    align-self: flex-start;
    background: #E8998D;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.cover-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    margin-bottom: 22px;
}

.cover-title {
    font-size: 1.7rem;
    color: #2A3650;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 18px;
    font-family: Georgia, 'Times New Roman', serif;
}

.cover-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
    padding-top: 16px;
    border-top: 1px dashed #d8d0c0;
}

.cover-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cover-meta i {
    color: #5B9A8B;
    font-size: 1rem;
}

.cover-meta strong {
    color: #2A3650;
    font-weight: 600;
}

/* ----- Content body ----- */
.page-content-title {
    font-size: 1.05rem;
    color: #2A3650;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e0d0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-content-title i {
    color: #5B9A8B;
}

.blog-body {
    font-size: 1rem;
    line-height: 1.9;
    color: #3a3a3a;
    font-family: Georgia, 'Times New Roman', serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog-body p {
    margin-bottom: 18px;
    display: block;
}

/* Drop cap on the first paragraph */
.blog-body.dropcap p:first-child::first-letter {
    font-size: 2.6rem;
    font-weight: 700;
    color: #2A3650;
    float: left;
    line-height: 0.9;
    margin: 6px 10px 0 0;
    font-family: Georgia, serif;
}

/* Page number */
.page-number {
    position: absolute;
    bottom: 20px;
    font-size: 0.75rem;
    color: #b0a89a;
    font-family: Georgia, serif;
    font-style: italic;
}

.notebook-page-left .page-number {
    left: 50px;
}

.notebook-page-right .page-number {
    right: 50px;
}

/* ----- Close button ----- */
.notebook-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    line-height: 1;
}

.notebook-close:hover {
    background: #E8998D;
    border-color: #E8998D;
    transform: rotate(90deg);
}

/* ----- Navigation ----- */
.notebook-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    color: #fff;
}

.notebook-nav-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.notebook-nav-btn:hover:not(:disabled) {
    background: #5B9A8B;
    border-color: #5B9A8B;
}

.notebook-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-indicator {
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 900px) {
    .notebook {
        flex-direction: column;
        height: 85vh;
        overflow-y: auto;
    }

    .notebook::after {
        display: none;
    }

    .notebook-page {
        padding: 30px;
    }

    .notebook-page-left {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .cover-image {
        height: 180px;
    }

    .cover-title {
        font-size: 1.4rem;
    }

    .notebook-close {
        top: -45px;
    }
}