/* 
 * ProStables Blog Section Styling - SVG Cutout Design
 * Inspired by the provided example
 */

.blog-section a,
.blog-single-content-section a,
.blog-related-section a,
.blog-card,
.tag-pill,
.cat-pill,
.meta-tag-pill,
.share-links a {
    cursor: pointer !important;
}

.blog-section {
    padding: 0 0 100px 0;
    background: #F9F7F2;
    position: relative;
    overflow: hidden;
}

.blog-listing-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Centered vertically */
    margin-bottom: 40px;
    gap: 40px;
}

.header-text {
    flex: 1;
}

.blog-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
    line-height: 1.1;
}

.blog-subtitle {
    font-size: 1.1rem;
    color: rgba(14, 3, 56, 0.7);
    margin: 0;
}

/* Search Form Styles */
.header-search {
    min-width: 380px;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid rgba(14, 3, 56, 0.1);
    border-radius: 100px;
    padding: 4px 4px 4px 20px;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(14, 3, 56, 0.05);
    height: 56px;
    /* Fixed height for better alignment */
}

.search-input-wrap:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 15px 40px rgba(14, 3, 56, 0.1);
    transform: translateY(-2px);
}

.search-icon {
    font-size: 1.2rem;
    color: rgba(14, 3, 56, 0.3);
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.blog-search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-primary);
    outline: none !important;
    padding: 0;
    height: 100%;
    -webkit-appearance: none;
}

.blog-search-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    height: 100%;
    padding: 0 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-search-btn:hover {
    background: var(--color-accent);
    transform: scale(1.02);
}

/* Mode ProTrot Mode Support */
body.mode-protrot .blog-search-btn {
    background: var(--color-accent);
}

body.mode-protrot .blog-search-btn:hover {
    filter: brightness(1.1);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Blog Card */
.blog-card {
    height: 380px;
    overflow: hidden;
    position: relative;
    border-radius: 24px;
    background: #0E0338;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer !important;
}

.card-media {
    background-position: center;
    background-size: cover;
    height: 100%;
    position: absolute;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    width: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

/* Zoom removed as requested */

.blog-card:hover {
    box-shadow: 0 40px 80px rgba(14, 3, 56, 0.2);
}

.blog-card:hover .card-figcaption {
    /* Elevation removed as requested */
}

.card-figcaption {
    color: #0E0338;
    height: calc(100% - 30px);
    margin: 15px;
    left: 0;
    position: absolute;
    top: 0;
    width: 280px;
    z-index: 2;
    pointer-events: none;
    border-radius: 24px;
    /* Rounded corners for the whole block */
    overflow: hidden;
    /* Clips children (SVG & Body) to these corners */
}

.card-body {
    background-color: white;
    bottom: 0;
    padding: 18px;
    position: absolute;
    width: 100%;
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.05);
    transition: background-color 0.4s ease;
}

.blog-card:hover .card-body {
    background-color: var(--color-accent);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag-pill {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(14, 3, 56, 0.05);
    color: var(--color-primary);
    padding: 4px 10px;
    border-radius: 50px;
    border: 1px solid rgba(14, 3, 56, 0.1);
    transition: all 0.4s ease;
    cursor: pointer !important;
}

.blog-card:hover .tag-pill {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.tag-pill.more {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.card-body p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
    color: #0E0338;
    font-weight: 400;
    /* Less bold */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.4s ease;
}

.blog-card:hover .card-body p {
    color: white;
}

.card-anchor {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 3;
    cursor: pointer !important;
}

/* SVG Mask Styles */
.card-figcaption svg {
    height: inherit;
    width: 100%;
}

.mask-alpha {
    fill: white;
}

/* ═══════════════════════════════════
   SINGLE ARTICLE PAGE
   ═══════════════════════════════════ */

.blog-single-hero {
    height: 80vh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: var(--color-primary);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.8;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(14, 3, 56, 0.4) 0%, rgba(14, 3, 56, 0.8) 100%);
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    margin-bottom: 40px;
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s;
}

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

.hero-cutout-block {
    max-width: 900px;
}

.cutout-header {
    background: white;
    padding: 20px 40px;
    border-radius: 24px 24px 0 0;
    display: inline-block;
}

.cutout-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.meta-date {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.9rem;
}

.meta-cats {
    display: flex;
    gap: 8px;
}

.cat-pill {
    background: rgba(14, 3, 56, 0.05);
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.cutout-svg-wrap {
    background: white;
    padding-bottom: 20px;
    border-radius: 0 0 24px 24px;
}

.cutout-svg-wrap svg {
    width: 100%;
    height: auto;
    max-height: 400px;
}

/* Single Content Grid */
.blog-single-content-section {
    padding: 0 0 40px 0;
    background: #F9F7F2;
}

.blog-single-content-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ═══════════════════════════════════
   SINGLE ARTICLE PREMIUM UPGRADE
   ═══════════════════════════════════ */

.blog-single-content-section {
    padding: 0 0 120px;
    background: #F9F7F2;
    position: relative;
}

/* Background Decoration */
.blog-single-content-section::before {
    content: "PREMIUM";
    position: absolute;
    top: 50px;
    left: -50px;
    font-size: 15vw;
    font-weight: 900;
    color: rgba(14, 3, 56, 0.02);
    z-index: 0;
    pointer-events: none;
    line-height: 1;
}

.blog-single-content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

.content-intro-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 100px;
    align-items: flex-start;
}

/* Sidebar Left (Text) */
.article-meta-header {
    margin-bottom: 50px;
}

.meta-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.meta-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.meta-date {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cat-pill {
    background: var(--color-accent);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 5px 15px var(--color-accent-glow);
    cursor: pointer !important;
}

.single-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-tag-pill {
    background: white;
    border: 1px solid rgba(14, 3, 56, 0.1);
    color: var(--color-primary);
    padding: 5px 15px;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.meta-tag-pill:hover {
    background: var(--color-primary);
    color: white;
    cursor: pointer !important;
}

.single-article-title {
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.05;
    color: var(--color-primary);
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

/* Article Body Wrapper (Now in Left Column) */
.article-body-wrapper {
    width: 100%;
    margin-bottom: 50px;
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-text-2);
}

.article-body h2 {
    font-size: 2.2rem;
    color: var(--color-primary);
    margin: 60px 0 25px;
    font-weight: 700;
}

.article-body blockquote {
    background: white;
    padding: 40px;
    border-radius: 30px;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--color-primary);
    margin: 50px 0;
    position: relative;
    border: 1px solid rgba(14, 3, 56, 0.05);
    box-shadow: 0 20px 40px rgba(14, 3, 56, 0.05);
}

.article-body blockquote::before {
    content: "“";
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 6rem;
    color: var(--color-accent);
    opacity: 0.15;
    font-family: serif;
}

/* Sidebar Right (Media) */
.article-featured-column {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.article-featured-image {
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(14, 3, 56, 0.15);
    margin-bottom: 50px;
    aspect-ratio: 16/10;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.article-featured-image:hover img {
    transform: scale(1.05);
}

/* Premium Author Box */
.author-box.premium-author {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 0;
    padding: 30px 0;
    border-top: 1px solid rgba(14, 3, 56, 0.1);
    border-bottom: 1px solid rgba(14, 3, 56, 0.1);
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    background: #eee;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: rgba(14, 3, 56, 0.4);
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 3px;
}

.author-name {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    color: var(--color-primary);
    font-weight: 700;
}

.author-bio {
    font-size: 0.85rem;
    color: rgba(14, 3, 56, 0.6);
    margin: 0;
    line-height: 1.4;
}

.share-block {
    background: var(--color-accent);
    padding: 15px 30px;
    border-radius: 20px;
    margin-top: 20px;
    box-shadow: 0 15px 35px rgba(14, 3, 56, 0.08);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: background 0.4s ease;
}

.share-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0;
    display: block;
    white-space: nowrap;
}

.share-links {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.share-links a {
    width: 40px;
    height: 40px;
    background: white;
    color: var(--color-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer !important;
}

.share-links a:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-5px) rotate(8deg);
    box-shadow: 0 15px 30px rgba(14, 3, 56, 0.2);
}

/* Article Body Wrapper */
.article-body-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 50px;
    border-top: 1px solid rgba(14, 3, 56, 0.06);
}

.article-body {
    font-size: 1.25rem;
    line-height: 2;
    color: var(--color-text-2);
}

.article-body h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin: 80px 0 30px;
    font-weight: 700;
}

.article-body blockquote {
    background: white;
    padding: 60px;
    border-radius: 40px;
    font-style: italic;
    font-size: 1.6rem;
    color: var(--color-primary);
    margin: 80px 0;
    position: relative;
    border: 1px solid rgba(14, 3, 56, 0.05);
    box-shadow: 0 30px 60px rgba(14, 3, 56, 0.05);
}

.article-body blockquote::before {
    content: "“";
    position: absolute;
    top: 20px;
    left: 40px;
    font-size: 8rem;
    color: var(--color-accent);
    opacity: 0.15;
    font-family: serif;
}

@media (max-width: 1100px) {
    .content-intro-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

/* Main Content Area */
.article-featured-image {
    margin-bottom: 30px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(14, 3, 56, 0.1);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--color-text-2);
    max-width: 800px;
}

.article-body h2 {
    font-size: 2.2rem;
    margin: 60px 0 30px;
    color: var(--color-primary);
}

.article-body h3 {
    font-size: 1.6rem;
    margin: 40px 0 20px;
    color: var(--color-primary);
}

.article-body p {
    margin-bottom: 30px;
}

.article-body blockquote {
    margin: 60px 0;
    padding: 40px;
    background: white;
    border-left: 6px solid var(--color-accent);
    border-radius: 0 24px 24px 0;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--color-primary);
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .article-sidebar {
        position: static;
        order: 2;
    }

    .article-main {
        order: 1;
    }
}

/* Related Section */
.blog-related-section {
    padding: 0 0 100px 0;
    background: var(--color-primary);
    position: relative;
    overflow: hidden;
}

.blog-related-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.blog-related-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

.related-header {
    margin-bottom: 60px;
}

.related-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .blog-single-hero {
        height: auto;
        padding: 120px 0 60px;
    }

    .cutout-header {
        padding: 15px 20px;
    }

    .meta-cats {
        display: none;
    }

    .blog-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-section {
        padding: 0 0 20px 0;
    }
}

.mask-text {
    font-size: 20px;
    /* Reduced further to prevent overflow */
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    /* Extra bold */
    letter-spacing: 0.2px;
}

.mask-base {
    fill: white;
    transition: fill 0.4s ease;
}

.blog-card:hover .mask-base {
    fill: var(--color-accent);
}

/* Pagination Styles */
.blog-pagination {
    display: flex !important;
    justify-content: center;
    margin: 60px auto 0;
}

.blog-pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
    align-items: center;
}

.blog-pagination ul li a,
.blog-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: var(--color-primary);
}

.blog-pagination ul li span.current {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 10px 20px rgba(14, 3, 56, 0.15);
}

.blog-pagination ul li a:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    transform: translateY(-3px);
}

/* Mode ProTrot */
body.mode-protrot .blog-title {
    color: var(--color-accent);
}

body.mode-protrot .blog-pagination ul li span.current {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

/* Responsive */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .card-figcaption {
        width: 80%;
    }
}