/* ==========================================================================
   Blog — themed to match masnoi.com (dark glass cards, teal accents,
   Montserrat headings / Inter body, same tokens as critical.css / style.min.css)
   ========================================================================== */

.blog-list,
.blog-post {
    max-width: 750px;
    margin: 0 auto;
    padding: 8rem 1rem 5rem;
}

.blog-header {
    margin-bottom: 1rem;
}

/* .section-label / .section-title / .section-subtitle are already styled
   globally (teal label, Montserrat title, secondary-text subtitle) so the
   blog header inherits the same look as every other section on the site. */

.blog-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
}

/* Post list card — matches .service-card / .benefit-item / .faq-item */
.blog-card {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-bottom: 3px solid var(--teal);
    border-radius: var(--border-radius);
    box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, 0.1), 0 8px 32px rgba(29, 84, 108, 0.15);
    padding: 2rem 1.8rem;
    margin-bottom: 1.5rem;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 148, 136, 0.5);
    box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, 0.1), 0 16px 40px rgba(13, 148, 136, 0.2);
}

.blog-card h2 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.blog-card h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.25s ease;
}

.blog-card h2 a:hover,
.blog-card h2 a:focus-visible {
    color: var(--teal);
}

.blog-card .post-date,
.blog-post .post-date {
    display: block;
    color: var(--teal);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.blog-card p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.blog-post p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.2rem;
    color: var(--teal);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: gap 0.25s ease, color 0.25s ease;
}

.read-more::after {
    content: '\2192';
    transition: transform 0.25s ease;
}

.read-more:hover,
.read-more:focus-visible {
    color: var(--off-white);
    gap: 0.6rem;
}

.read-more:hover::after,
.read-more:focus-visible::after {
    transform: translateX(3px);
}

/* Single post article */
.blog-post article {
    animation: none;
}

.post-topbar {
    margin-bottom: 2rem;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.25s ease, gap 0.25s ease;
}

.back-to-blog i {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.back-to-blog:hover,
.back-to-blog:focus-visible {
    color: var(--teal);
    gap: 0.8rem;
}

.back-to-blog:hover i,
.back-to-blog:focus-visible i {
    transform: translateX(-3px);
}

.post-eyebrow {
    color: var(--teal);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

.blog-post h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.1rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.12;
    color: var(--text-primary);
    margin-bottom: 0.9rem;
}

.blog-post .post-date {
    margin-bottom: 0;
}

.post-dek {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 1.4rem 0 2.2rem;
    padding-bottom: 2.2rem;
    border-bottom: 1px solid var(--glass-border);
}

.post-toc {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--teal);
    border-radius: 14px;
    padding: 1.3rem 1.6rem;
    margin-bottom: 2.5rem;
}

.post-toc summary {
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.post-toc summary::-webkit-details-marker {
    display: none;
}

.post-toc summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--teal);
    transition: transform 0.25s ease;
}

.post-toc[open] summary::after {
    transform: rotate(180deg);
}

.post-toc ul {
    list-style: none;
    margin-top: 1.1rem;
    padding-left: 0;
    display: grid;
    gap: 0.6rem;
}

.post-toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.post-toc a:hover,
.post-toc a:focus-visible {
    color: var(--teal);
}

.post-share {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.post-share-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.post-share-links {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.post-share-links a,
.post-share-copy {
    height: 38px;
    min-width: 38px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    background: transparent;
    transition: all 0.25s ease;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
}

.post-share-links a {
    width: 38px;
}

.post-share-links a:hover,
.post-share-links a:focus-visible,
.post-share-copy:hover,
.post-share-copy:focus-visible {
    border-color: var(--teal);
    color: var(--teal);
    background: rgba(13, 148, 136, 0.1);
}

.post-share-copy {
    padding: 0 1.1rem;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-bottom-nav {
    margin-top: 2.5rem;
}

.blog-content {
    margin-top: 0;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 3rem;
    margin-bottom: 1.1rem;
    letter-spacing: -0.01em;
    /* Keeps a heading from being hidden under the fixed header when a
       reader jumps to it from the "On this page" TOC. Match this to the
       real fixed-header height if that ever changes. */
    scroll-margin-top: 110px;
}

.blog-content h2 {
    font-size: 1.55rem;
    padding-top: 0.15rem;
}

/* A short teal rule above every H2 gives the eye a clear "new section"
   cue, so the article reads as chunks rather than one continuous scroll. */
.blog-content h2::before {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    border-radius: 2px;
    background: var(--teal);
    margin-bottom: 1rem;
}

.blog-content h3 {
    font-size: 1.2rem;
    margin-top: 2.2rem;
}

.blog-content p {
    margin: 0 0 1.4rem;
}

.blog-content strong {
    color: var(--text-primary);
}

.blog-content pre,
.blog-content code {
    font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

.blog-content pre {
    background: rgba(10, 15, 26, 0.6);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 12px;
    overflow-x: auto;
}

.blog-content pre code {
    background: none;
    padding: 0;
    color: var(--text-secondary);
}

.blog-content code {
    background: rgba(255, 255, 255, 0.08);
    color: var(--teal);
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.75rem 0 2.25rem;
    font-size: 0.94rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    overflow: hidden;
}

.blog-content th,
.blog-content td {
    padding: 0.9rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: top;
    line-height: 1.65;
}

.blog-content thead th {
    background: rgba(13, 148, 136, 0.14);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.blog-content td {
    color: var(--text-secondary);
}

.blog-content tbody tr:last-child td {
    border-bottom: none;
}

.blog-content tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.025);
}

/* Prevents a wide table from breaking mobile layout — scrolls horizontally
   inside its own frame instead of overflowing the page. */
@media (max-width: 640px) {
    .blog-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.blog-content blockquote {
    border-left: 3px solid var(--teal);
    background: var(--glass-bg);
    color: var(--text-secondary);
    padding: 1rem 1.25rem;
    margin: 1.75rem 0;
    border-radius: 0 12px 12px 0;
}

.blog-content ul,
.blog-content ol {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    margin: 0.25rem 0 1.5rem;
    line-height: 1.8;
}

.blog-content li {
    margin-bottom: 0.6rem;
}

.blog-content li:last-child {
    margin-bottom: 0;
}

.blog-content li > ul,
.blog-content li > ol {
    margin-top: 0.6rem;
    margin-bottom: 0;
}

.blog-content hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 2.5rem 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    display: block;
    margin: 1.5rem auto;
}

/* Definition / key-takeaway callout — breaks up long stretches of body
   copy the same way IBM uses pull-outs and asides between sections. */
.blog-content .content-callout {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--teal);
    border-radius: 0 14px 14px 0;
    padding: 1.5rem 1.75rem;
    margin: 2.25rem 0;
}

.blog-content .content-callout p:first-child {
    margin-top: 0;
}

.blog-content .content-callout p:last-child,
.blog-content .content-callout ul:last-child,
.blog-content .content-callout ol:last-child {
    margin-bottom: 0;
}

/* Big-number stat pull-out — gives the eye a resting point instead of
   burying a notable figure inside a paragraph. */
.blog-content .stat-callout {
    display: flex;
    align-items: baseline;
    gap: 1.4rem;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.14), rgba(13, 148, 136, 0.02));
    border: 1px solid rgba(13, 148, 136, 0.3);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin: 2.25rem 0;
}

.blog-content .stat-callout .stat-number {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(2.3rem, 6vw, 3.1rem);
    color: var(--teal);
    line-height: 1;
    flex-shrink: 0;
}

.blog-content .stat-callout .stat-caption {
    color: var(--text-secondary);
    font-size: 0.97rem;
    line-height: 1.65;
}

.blog-content .stat-callout .stat-caption strong {
    color: var(--text-primary);
}

/* FAQ accordion — native <details>/<summary>, so it's keyboard and
   screen-reader accessible without any JS, and it stops six full Q&A
   blocks from reading as one dense wall of text. */
.blog-content .faq-list {
    display: grid;
    gap: 0.75rem;
    margin: 1.5rem 0 2rem;
}

.blog-content details.faq-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1.05rem 1.4rem;
    transition: border-color 0.25s ease;
}

.blog-content details.faq-item[open] {
    border-color: rgba(13, 148, 136, 0.45);
}

.blog-content details.faq-item summary {
    cursor: pointer;
    list-style: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.blog-content details.faq-item summary::-webkit-details-marker {
    display: none;
}

.blog-content details.faq-item summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: var(--teal);
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.blog-content details.faq-item[open] summary::after {
    transform: rotate(180deg);
}

.blog-content details.faq-item summary:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 4px;
    border-radius: 6px;
}

.blog-content details.faq-item p {
    margin: 0.9rem 0 0;
    font-size: 0.97rem;
}

.blog-content a {
    color: var(--teal);
    text-decoration: underline;
    text-decoration-color: rgba(13, 148, 136, 0.4);
    text-underline-offset: 3px;
    transition: color 0.25s ease, text-decoration-color 0.25s ease;
}

.blog-content a:hover,
.blog-content a:focus-visible {
    color: var(--off-white);
    text-decoration-color: currentColor;
}

/* Closing CTA — a real button instead of a teal text link that's easy to
   miss at the bottom of a long article. */
.blog-content .post-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.9rem 1.6rem;
    border-radius: 50px;
    background: var(--off-white);
    color: var(--deep-navy);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    box-shadow: 0 8px 32px rgba(244, 244, 244, 0.2);
    transition: all 0.3s ease;
}

.blog-content .post-cta-btn:hover,
.blog-content .post-cta-btn:focus-visible {
    color: var(--deep-navy);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(244, 244, 244, 0.3);
}

/* Pagination — pill buttons matching nav-cta / btn-secondary */
.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2rem;
    justify-content: center;
}

.pagination-link {
    padding: 0.6rem 1.1rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.pagination-link:hover,
.pagination-link:focus-visible {
    border-color: var(--teal);
    color: var(--text-primary);
    background: rgba(13, 148, 136, 0.1);
}

.pagination-link.active {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--off-white);
}

/* Admin — same dark glass language, private page but stays on-brand */
.admin-login-form,
.admin-edit-form {
    max-width: 720px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.admin-login-form label,
.admin-edit-form label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: -0.4rem;
}

.admin-login-form input,
.admin-edit-form input,
.admin-edit-form textarea {
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: rgba(10, 15, 26, 0.6);
    color: var(--text-primary);
    transition: border-color 0.25s ease;
}

.admin-login-form input:focus,
.admin-edit-form input:focus,
.admin-edit-form textarea:focus {
    outline: none;
    border-color: var(--teal);
}

.admin-edit-form textarea {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    resize: vertical;
}

.admin-edit-form .field-hint {
    margin: -0.6rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.admin-login-form button,
.admin-edit-form button,
.admin-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.5rem;
    border-radius: 50px;
    border: none;
    color: var(--deep-navy);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    background: var(--off-white);
    box-shadow: 0 8px 32px rgba(244, 244, 244, 0.25);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.admin-login-form button:hover,
.admin-edit-form button:hover,
.admin-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(244, 244, 244, 0.35);
}

.admin-actions {
    margin-bottom: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--glass-border);
    padding: 0.9rem 1.2rem;
    text-align: left;
    color: var(--text-secondary);
}

.admin-table th {
    background: rgba(255, 255, 255, 0.04);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table a {
    color: var(--teal);
    text-decoration: none;
    margin-right: 1rem;
    font-weight: 600;
}

.admin-table a:hover {
    color: var(--off-white);
}

.admin-notice.success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 1rem;
}

.form-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fca5a5;
    padding: 1rem 1.25rem;
    border-radius: 14px;
}

@media (max-width: 768px) {
    .blog-list,
    .blog-post {
        padding: 2rem 1rem 3rem;
    }

    .blog-card {
        padding: 1.6rem 1.4rem;
    }

    .admin-login-form,
    .admin-edit-form {
        padding: 1.5rem;
    }

    .post-dek {
        margin: 1.1rem 0 1.8rem;
        padding-bottom: 1.8rem;
    }

    .post-toc {
        padding: 1.1rem 1.3rem;
        margin-bottom: 2rem;
    }

    .post-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.9rem;
    }

    .blog-content .stat-callout {
        flex-direction: column;
        gap: 0.3rem;
        padding: 1.4rem 1.5rem;
    }

    .blog-content .content-callout {
        padding: 1.25rem 1.4rem;
    }

    .blog-content details.faq-item {
        padding: 0.9rem 1.1rem;
    }
}