/* Professional Blog Post Single Layout */

/* Prevent horizontal overflow on mobile */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

/* Ensure all fixed elements don't cause overflow */
*, *::before, *::after {
    max-width: 100vw;
}

header {
    margin-top: 0 !important;
}

main {
    margin-top: 0 !important;
    background-color: white;
    margin-bottom: 0 !important;
    overflow-x: hidden;
}

#visual-backdrop {
    display: none;
}

.blog-post-single {
    max-width: 100%;
    margin: 0 auto;
    margin-bottom: 10vh;
    overflow-x: hidden;
}

.blog-post-content {
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* First heading displayed above author section */
.blog-post-first-heading {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.blog-post-first-heading h2,
.blog-post-first-heading h2.wp-block-heading {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0 !important;
    text-align: center;
    border-bottom: none !important;
}

/* Hero Section with Featured Image */
.blog-post-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    max-height: 600px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.blog-post-featured-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-post-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    pointer-events: none;
}

.blog-post-title-wrapper {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(1000px, calc(100% - 4rem));
    z-index: 1;
    padding: 0 2rem 1.5rem 2rem;
}

/* Hack: Shift right on wider screens to compensate for mystery spacing */
@media (min-width: 845px) {
    .blog-post-title-wrapper {
        margin-left: 2vw;
    }
}

.blog-post-hero .blog-post-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 !important;
    padding: 0 !important;
    color: white;
    text-align: left !important;
    text-wrap: pretty;
    hyphens: none;
    text-shadow:
        0 1px 3px rgba(0,0,0,0.8),
        0 2px 6px rgba(0,0,0,0.6),
        0 3px 9px rgba(0,0,0,0.5),
        0 4px 12px rgba(0,0,0,0.4),
        0 6px 18px rgba(0,0,0,0.3);
}

.blog-post-meta-hero {
    font-size: 0.9rem;
    color: #6b7280;
    padding: 0.5rem 2rem;
    max-width: 800px;
    margin: 0 auto 0.5rem;
}

.blog-post-meta-hero .blog-post-separator {
    margin: 0 0.5rem;
    color: #9ca3af;
}

/* Standard Header (no featured image) */
.blog-post-header {
    max-width: 800px;
    margin: 3rem auto 2rem;
    padding: 0 2rem;
}

.blog-post-header .blog-post-title {
    font-family: 'cinzel', serif;
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--mainColor);
    margin: 0;
}

/* Post Meta Container */
.blog-post-meta-container {
    max-width: 800px;
    margin: 0.5rem auto 1.5rem;
    padding: 0 2rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.blog-post-author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.blog-post-author-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #f3f4f6;
}

.blog-post-author-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.7rem;
    margin-bottom: 0.1rem;
}

.blog-post-meta-details {
    font-size: 0.55rem;
    color: #6b7280;
}

.blog-post-date {
    color: #babbbd;
}

.blog-post-separator {
    margin: 0 0.5rem;
    color: #9ca3af;
}

.blog-post-reading-time {
    color: #babbbd;
}

/* Buttons - Professional Call-to-Action Styling */
.wp-block-buttons {
    margin: 3rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.wp-block-button {
    margin: 0;
}

.wp-block-button__link {
    display: inline-block;
    padding: .75rem 2rem;
    background: linear-gradient(135deg, var(--mainColor) 0%, var(--darkTurquoise) 100%);
    color: var(--mainYellow) !important;
    font-family: var(--mainFont);
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    border: 3px solid transparent;
    box-shadow: 0 4px 15px rgba(27, 154, 170, 0.3);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    min-width: max-content;
}

.wp-block-button__link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--darkTurquoise) 0%, var(--veryDarkTurquoise) 100%);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.wp-block-button__link:hover {
    transform: translateY(-0px);
    color: white !important;
}

.wp-block-button__link:hover::before {
    left: 0;
}

.wp-block-button__link:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(27, 154, 170, 0.3);
}

/* Share Buttons */
.blog-post-share {
    display: flex;
    gap: 0.45rem;
}

.share-button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.share-button svg {
    width: 12px;
    height: 12px;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.share-button[data-share="twitter"]:hover {
    border-color: #1DA1F2;
    color: #1DA1F2;
    background: #f0f9ff;
}

.share-button[data-share="facebook"]:hover {
    border-color: #1877F2;
    color: #1877F2;
    background: #f0f6ff;
}

.share-button[data-share="linkedin"]:hover {
    border-color: #0A66C2;
    color: #0A66C2;
    background: #f0f7ff;
}

.share-button[data-share="bluesky"]:hover {
    border-color: #1185fe;
    color: #1185fe;
    background: #f0f8ff;
}

/* Blog Post Footer - Professional Design */
.blog-post-footer {
    max-width: 800px;
    margin: 4rem auto 3rem;
    padding: 0 2rem;
}

.blog-post-footer-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    gap: 1rem;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--mainColor), transparent);
    opacity: 0.3;
}

.divider-icon {
    color: var(--mainColor);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(27, 154, 170, 0.1) 0%, rgba(26, 83, 92, 0.1) 100%);
    border-radius: 50%;
    border: 2px solid rgba(27, 154, 170, 0.2);
}

.blog-post-footer-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.blog-post-footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-section-title {
    font-family: 'cinzel', serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--mainColor);
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(27, 154, 170, 0.2);
    padding-bottom: 0.75rem;
}

.footer-section-title svg {
    color: var(--mainColor);
    opacity: 0.8;
}

.footer-taxonomy-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.footer-category-link,
.footer-tag-link {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    background: white;
    border: 2px solid var(--mainColor);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: system-ui, -apple-system, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    color: var(--mainColor);
    z-index: 1;
}

.footer-category-link::before,
.footer-tag-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--mainColor) 0%, var(--navBgColor) 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.footer-category-link:hover::before {
    width: 100%;
}

.footer-category-link span,
.footer-tag-link span {
    position: relative;
    z-index: 1;
}

.footer-category-link:hover {
    color: rgb(73, 73, 73);
    border-color: var(--mainColor);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(27, 154, 170, 0.25);
}

.footer-category-link:hover span {
    color: rgb(73, 73, 73) !important;
}

.footer-tag-link {
    background: white;
    border-color: rgba(27, 154, 170, 0.4);
    border-style: dashed;
}

.footer-tag-link::before {
    background: linear-gradient(135deg, var(--mainColor) 0%, var(--darkTurquoise) 100%);
}

.footer-tag-link:hover::before {
    width: 100%;
}

.footer-tag-link:hover {
    color: white;
    border-color: var(--mainColor);
    border-style: solid;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(27, 154, 170, 0.2);
}


/* Post Content */
.blog-post-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1.125rem;
    line-height: 1.75;
    color: #2d3748;
}

/* Drop Cap - Server-Side with Slow Swell */
.blog-post-content .drop-cap {
    font-family: 'cinzel', serif;
    font-size: 7.5rem;
    font-weight: 700;
    line-height: 0.75;
    float: left;
    margin: 0 0.1em -0.05em 0;
    padding: 0.05em;
    color: #116258;
    background: linear-gradient(135deg, #116258 0%, #0d4a44 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: drop-cap-swell 12s ease-in-out infinite;
}

/* Slow swell animation */
@keyframes drop-cap-swell {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}


.blog-post-content h1,
.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4,
.blog-post-content h5,
.blog-post-content h6 {
    font-family: 'cinzel', serif;
    color: var(--mainColor);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.blog-post-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

.blog-post-content h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

.blog-post-content p {
    margin-bottom: 1rem;
    padding: 0;
}

/* H3 with emoji - tight spacing to following paragraph */
.blog-post-content h3.wp-block-heading {
    margin-bottom: 0.15rem !important;
    padding-bottom: 0 !important;
}

.blog-post-content h3.wp-block-heading + p {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Content images (not inline emojis) */
.blog-post-content figure img,
.blog-post-content p > img:only-child {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
}

/* Inline emoji images - no margin */
.blog-post-content p img[src*="/images/"] {
    margin: 0 !important;
    border-radius: 0;
}

/* Emoji in h3 headings - vertically centered */
.blog-post-content h3.wp-block-heading img {
    margin: 0 0.3em 0 0 !important;
    vertical-align: middle;
    border-radius: 0;
}

.blog-post-content blockquote {
    border-left: 4px solid var(--mainColor);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6b7280;
}

.blog-post-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.blog-post-content code {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
}

.blog-post-content pre code {
    background: none;
    padding: 0;
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
}

.blog-post-content a {
    color: var(--mainColor);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.blog-post-content a:hover {
    color: var(--navBgColor);
}

/* Author Bio Box */
.blog-post-author-bio {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #f3f4f6 0%, #f9fafb 100%);
    border-radius: 16px;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.author-bio-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.author-bio-content {
    flex: 1;
}

.author-bio-title {
    font-family: 'cinzel', serif;
    color: var(--mainColor);
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.author-bio-text {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

/* Post Navigation */
.blog-post-navigation {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.post-nav-link {
    padding: 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.post-nav-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: var(--mainColor);
}

.post-nav-prev {
    text-align: left;
}

.post-nav-next {
    text-align: right;
}

.post-nav-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.post-nav-title {
    font-family: 'cinzel', serif;
    color: var(--mainColor);
    font-size: 1.125rem;
    line-height: 1.3;
}

/* Footer Border for Blog Posts */
footer {
    border-top: 3px solid #2d3748 !important;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15) !important;
    padding-top: 0 !important;
}

/* Back to Blog Button Enhancement */
#back-to-blogs {
    cursor: pointer;
    position: absolute;
    top: 100px;
    left: .5rem;
    z-index: 1;
    background: var(--mainColorMoreTransparent);
    padding-block: .5rem;
    padding-inline: 1rem;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

#back-to-blogs:hover {
    background: var(--mainYellow);
    transform: translateX(4px);
}

#back-to-blogs a {
    color: white;
    text-decoration: none;
    font-family: 'cinzel', serif;
    font-size: 0.95rem;
}

#back-to-blogs a:hover {
    color: black;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-post-hero {
        height: 50vh;
        min-height: 300px;
    }

    .blog-post-hero-content {
        max-width: 90vw;
    }

    .blog-post-hero .blog-post-title {
        font-size: 2rem;
    }

    .blog-post-header .blog-post-title {
        font-size: 1.875rem;
    }

    .blog-post-meta-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .blog-post-share {
        width: 100%;
        justify-content: flex-start;
    }

    .blog-post-content {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Adjust drop cap for tablets */
    .blog-post-content .drop-cap {
        font-size: 6rem;
    }

    /* Responsive buttons for tablets */
    .wp-block-buttons {
        gap: 0.75rem;
    }

    .wp-block-button__link {
        font-size: 1rem;
        padding: 0.65rem 1.75rem;
    }

    .blog-post-footer {
        padding: 0 1rem;
        margin: 3rem auto 2rem;
    }

    .blog-post-footer-content {
        padding: 1.5rem;
    }

    .footer-section-title {
        font-size: 1rem;
    }

    .footer-category-link,
    .footer-tag-link {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .blog-post-author-bio {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .blog-post-navigation {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    #back-to-blogs {
        display: inline-block;
    }
}

@media (max-width: 480px) {
    .blog-post-hero .blog-post-title {
        font-size: 1.5rem;
    }

    .blog-post-hero-content {
        padding: 0 1rem;
        max-width: 90vw;
    }

    .blog-post-header {
        padding: 0 1rem;
    }

    .blog-post-meta-container {
        padding: 0 1rem;
        padding-bottom: 1.5rem;
    }

    .blog-post-footer {
        margin: 2rem auto 1.5rem;
    }

    .blog-post-footer-content {
        padding: 1.25rem;
    }

    .footer-section-title {
        font-size: 0.9375rem;
        gap: 0.5rem;
    }

    .footer-category-link,
    .footer-tag-link {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    .divider-icon {
        width: 32px;
        height: 32px;
    }

    .divider-icon svg {
        width: 18px;
        height: 18px;
    }

    /* Adjust drop cap for mobile */
    .blog-post-content .drop-cap {
        font-size: 5rem;
    }

    /* Responsive buttons for mobile */
    .wp-block-buttons {
        gap: 0.5rem;
        flex-direction: row;
        align-items: center;
    }

    .wp-block-button__link {
        font-size: 0.9375rem;
        padding: 0.625rem 1.5rem;
        max-width: 30vw;
    }
}

@media (max-width: 400px) {
    .blog-post-hero-content {
        max-width: 70vw;
    }
}

