/* Blog-specific: Make header non-sticky */
body .site-header {
    position: relative !important;
    top: auto !important;
}

.blog-header {
    text-align: center;
    padding: 10px 20px 40px 20px;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000 100%);
    border-bottom: 1px solid var(--border-color);
}

.blog-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 15px;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .blog-title {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .blog-header {
        padding: 40px 20px;
    }
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.blog-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-image {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.card-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.blog-card:hover .card-image img {
    transform: scale(1.02);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.05);
}

.blog-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 15px;
}

.blog-content h3 {
    color: #a5b4fc;
    /* Lavender blue from reference */
    margin: 0;
    font-size: 0.8rem !important;
    line-height: 1.4;
    font-family: 'Cinzel Decorative', cursive;
    flex: 1;
}

.blog-date {
    font-size: 0.85rem;
    color: #888;
}

.read-more {
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #a5b4fc;
    gap: 8px;
}

.blog-card-share-btn {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--gold);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 5;
    position: relative;
    font-weight: 600;
}

.blog-card-share-btn:hover {
    background: var(--gold);
    color: #000;
}

.blog-card-share-btn svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}

/* Story Mode Modal */
#story-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.story-container {
    width: 90vw;
    max-width: 380px;
    aspect-ratio: 9/16;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid var(--gold);
    border-radius: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    background-size: cover;
    background-position: center;
}

.story-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 18px;
    z-index: 1;
}

.story-content-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: center;
}

.story-text {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 2rem;
    color: var(--gold);
    line-height: 1.3;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.story-brand {
    position: absolute;
    bottom: 40px;
    font-size: 0.9rem;
    color: rgba(212, 175, 55, 0.8);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
}

.close-story {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
}

.finalize-share {
    margin-top: 30px;
    background: var(--gold);
    color: #000;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.finalize-share:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--gold);
}

/* Stretched Link: Makes the whole card clickable via the read-more link */
.blog-card .read-more::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Featured Image */
.featured-image-container {
    margin: -20px -20px 30px -20px;
    /* Pull out to edges on mobile, standard margin otherwise */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 400px;
}

@media (min-width: 768px) {
    .featured-image-container {
        margin: 0 0 40px 0;
        /* Reset negative margins on desktop */
    }
}

/* Author Box */
.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    object-fit: cover;
}

.author-info h4 {
    color: var(--gold);
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.author-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* Valentine's Day Zodiac Grid Redesign */
.zodiac-valentine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.zodiac-valentine-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.zodiac-valentine-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.zodiac-valentine-card .card-header {
    background: rgba(212, 175, 55, 0.1);
    /* Low opacity gold */
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.zodiac-valentine-card .sign-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

.zodiac-valentine-card h3 {
    margin: 0;
    font-family: 'Cinzel Decorative', cursive;
    color: var(--gold);
    font-size: 1.4rem;
}

.zodiac-valentine-card .dates {
    font-size: 0.85rem;
    color: #aaa;
    display: block;
    margin-top: 5px;
    font-family: 'Lato', sans-serif;
}

.zodiac-valentine-card .card-body {
    padding: 20px;
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.zodiac-valentine-card .card-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
}

.match-group {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.match-group:last-child {
    margin-bottom: 0;
}

.match-label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.match-value {
    color: #fff;
}

.match-group.best .match-label {
    color: #4ade80;
    /* Green */
}

.match-group.avoid .match-label {
    color: #f87171;
    /* Red */
}


/* Mobile Optimization for Blog Text */
@media (max-width: 768px) {

    /* Override center alignment for blog content to ensure readability */
    .content-box p,
    .content-box h2,
    .content-box h3,
    .content-box ul,
    .content-box li,
    .intro-text {
        text-align: left !important;
    }

    /* Ensure list bullets are visible */
    .content-box ul,
    .content-box ol {
        padding-left: 20px;
        list-style-position: outside;
    }

    /* Reduce Heading Sizes on Mobile to prevent 3-line wrapping - Handled by global style.css now */

    /* Keep the main title centered if desired, or left */
    .blog-title {
        text-align: center;
    }
}


/* Mobile Padding Adjustment */
.blog-main-container {
    max-width: 1100px;
    padding: 40px 20px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .blog-main-container {
        padding: 20px 5px !important;
        /* Minimal horizontal padding */
        width: 100%;
        max-width: 100%;
    }

    .content-box {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Ensure cards and tables go full width */
    .zodiac-valentine-grid,
    .valentine-table,
    .intro-text,
    p,
    h2,
    h3 {
        width: 100%;
    }

    /* Small buffer for text so it doesn't literally touch the pixel edge */
    .content-box p,
    .content-box h2,
    .content-box h3,
    .content-box ul,
    .content-box li,
    .intro-text {
        padding-left: 5px;
        padding-right: 5px;
    }
}


.color-highlight {
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.5px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.extra-insight {
    margin-top: 15px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--gold);
    font-size: 0.95rem;
    font-style: italic;
    color: #ddd;
}

@media (max-width: 768px) {
    .zodiac-valentine-card .card-header {
        text-align: center;
    }

    .zodiac-valentine-card .card-header img {
        margin-left: auto;
        margin-right: auto;
    }
}


/* Global Card-style Table Layout (Replaces specific table styles) */
.zodiac-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 0.95rem;
    display: block;
    /* Make table block-level container */
}

.zodiac-table thead {
    display: none;
    /* Hide standard headers globally */
}

.zodiac-table tbody {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.zodiac-table tr {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    /* Slightly transparent background */
    height: 100%;
    /* Ensure equal height cards */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.zodiac-table tr:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(212, 175, 55, 0.3);
}

.zodiac-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ddd;
}

.zodiac-table td:last-child {
    border-bottom: none;
}

.zodiac-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--gold);
    text-align: left;
    margin-right: 20px;
    flex-shrink: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Special styling for the Sign Name (Header of the card) - assumes 1st column is title */
.zodiac-table td:first-child {
    background: rgba(212, 175, 55, 0.15);
    color: #fff;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.2rem;
    padding: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.zodiac-table td:first-child::before {
    display: none;
    /* Hide the label for the header cell */
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 20px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.post-navigation a {
    text-decoration: none;
    color: var(--gold);
    font-weight: 500;
    transition: all 0.3s ease;
}

.post-navigation a:hover {
    color: #fff;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.nav-previous {
    text-align: left;
    flex: 1;
}

.nav-next {
    text-align: right;
    flex: 1;
}

@media (max-width: 600px) {
    .post-navigation {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .nav-previous,
    .nav-next {
        text-align: center;
        width: 100%;
    }
}

/* Internal Link Callout */
.internal-link-callout {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--gold);
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
    font-size: 1.05rem;
    color: #eee;
    line-height: 1.6;
}

.internal-link-callout strong {
    color: #fff;
    font-weight: 700;
}

.internal-link-callout a {
    color: var(--gold);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dotted var(--gold);
    transition: all 0.3s ease;
}

.internal-link-callout a:hover {
    border-bottom: 1px solid var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Heading Hierarchy Standardization */
.content-box h2 {
    font-size: 1.75rem !important;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 15px;
}

.content-box h3 {
    font-size: 1.25rem !important;
    margin-top: 35px;
    margin-bottom: 15px;
}

.content-box h4 {
    font-size: 1.0rem !important;
    margin-top: 25px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .content-box h2 {
        font-size: 1.4rem !important;
    }

    .content-box h3 {
        font-size: 1.15rem !important;
    }

    .content-box h4 {
        font-size: 0.95rem !important;
    }
}

/* Social Share Buttons */




/* Table of Contents */
.toc-container {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 20px 25px;
    margin: 30px 0;
    max-width: 600px;
}

.toc-title {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--gold);
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    font-size: 1.4rem !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 10px;
    text-align: left !important;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
}

.toc-list li::before {
    content: '•';
    color: var(--gold);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1;
    top: -2px;
}

.toc-link {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.toc-link:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

html {
    scroll-behavior: smooth;
}

/* Collapsible TOC Styles */
.toc-title {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    margin-bottom: 0 !important;
}

.toc-title::after {
    content: '➤';
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

.toc-container.expanded .toc-title::after {
    transform: rotate(90deg);
}

.toc-list {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toc-container.expanded .toc-list {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease;
    margin-top: 15px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}