/* ==========================================================================
   Clinical Skincare Blog - Core Post Body Typography
   ========================================================================== */

/* Apply a clean, modern, medical-grade font stack to the post container */
.wp-block-html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: #334155; /* Soft charcoal instead of harsh pure black */
    max-width: 720px; /* Optimal reading width for human eyes */
    margin: 0 auto;
    padding: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize heading weights and typography spacing */
.wp-block-html h1, 
.wp-block-html h2, 
.wp-block-html h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #0f172a; /* Deep slate for strong contrast on titles */
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em; /* Gives titles a premium, editorial look */
}

/* Body Paragraphs styling */
.wp-block-html p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #475569;
    margin-top: 0;
    margin-bottom: 1.5rem; /* Generous spacing between thoughts */
}

/* Bold text optimization */
.wp-block-html strong {
    color: #0f172a; /* Makes bold keywords pop visually out of the grey text */
    font-weight: 600;
}

/* Standard bulleted and numbered lists in the body */
.wp-block-html ul,
.wp-block-html ol {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.wp-block-html li {
    font-size: 1.05rem;
    line-height: 1.65;
    color: #475569;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Clinical Skincare Blog - Post Structure & Product Cards
   ========================================================================== */

/* 1. Global Typography & Article Wrapper */
.wp-block-html h1 {
    font-size: 2.25rem;
    color: #1a202c;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.wp-block-html h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 0.5rem;
}

.wp-block-html p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: #4a5568;
    margin-bottom: 1.25rem;
}

.wp-block-html a {
    color: #0076d6;
    text-decoration: none;
}

.wp-block-html a:hover {
    text-decoration: underline;
}

/* 2. Navigation / Table of Contents (TOC) Grid */
.beauty-toc {
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc-header {
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: #718096;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

.toc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem 1.5rem;
}

/* Creates a clean two-column layout on desktop viewports */
@media (min-width: 768px) {
    .toc-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.toc-link {
    margin: 0 !important;
    font-size: 0.95rem;
}

/* 3. Clinical Product Review Cards (Split-Screen UX) */
.clinical-product-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin: 3rem 0;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.card-badge {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.card-body {
    display: flex;
    flex-direction: column; /* Stacks image above text on mobile devices */
}

@media (min-width: 768px) {
    .card-body {
        flex-direction: row; /* Converts to split-screen layout on desktop screen sizes */
    }
}

.image-frame {
    flex: 1;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

@media (min-width: 768px) {
    .image-frame {
        max-width: 300px;
        border-bottom: none;
        border-right: 1px solid #e2e8f0;
    }
}

.image-frame img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply; /* Keeps white product backgrounds looking seamless */
}

.details-frame {
    flex: 2;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 1.4rem;
    color: #1a202c;
    margin: 0 0 0.75rem 0;
    font-weight: 700;
}

.product-description {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #4a5568;
}

.expert-note {
    background-color: #f0f7ff;
    border-left: 3px solid #0076d6;
    padding: 0.75rem 1rem;
    font-size: 0.9rem !important;
    color: #2b6cb0;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

/* 4. Product Technical Specification Tables */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
}

.spec-table tr {
    border-bottom: 1px solid #edf2f7;
}

.spec-table tr:last-child {
    border-bottom: none;
}

.spec-table td {
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.spec-table td.label {
    font-weight: 700;
    color: #718096;
    width: 30%;
}

.spec-table td.value {
    color: #2d3748;
}

/* 5. UX Call-To-Action (Affiliate Shopping Buttons) */
.affiliate-button {
    display: inline-block;
    background-color: #2c3e50;
    color: #ffffff !important;
    text-align: center;
    padding: 0.85rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.affiliate-button:hover {
    background-color: #1a252f;
    transform: translateY(-1px);
}

.affiliate-button:active {
    transform: translateY(0);
}

/* 6. Inline Commercial Conversion Banners */
.cta-banner-inline {
    background: linear-gradient(135deg, #f6f8fa 0%, #edf2f7 100%);
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    padding: 1.25rem;
    margin: 2.5rem 0;
    text-align: center;
}

.cta-banner-inline p {
    margin: 0 !important;
    font-size: 0.95rem !important;
    color: #4a5568;
}

/* ==========================================================================
   Clinical Skincare Blog - Post Sign-off Audit Tag
   ========================================================================== */

.clinical-audit-tag {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0076d6; /* Striking clinical blue accent line */
    border-radius: 4px 8px 8px 4px;
    padding: 1.25rem;
    margin: 2.5rem 0;
}

.audit-badge {
    display: inline-block;
    background-color: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.audit-statement {
    margin: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #334155 !important;
}

.audit-statement strong {
    color: #0f172a;
}

/* ==========================================================================
   Clinical Skincare Blog - Media Layouts & End-of-Post CTA
   ========================================================================== */

/* 1. Editorial Image Formatting */
.wp-block-html img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 8px; /* Softens sharp corners for a premium editorial look */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); /* Soft, medical-site drop shadow */
}

/* Captions underneath your skincare photography */
.wp-block-html figcaption,
.image-caption {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: -1.25rem;
    margin-bottom: 2rem;
    font-style: italic;
}

/* 2. Responsive Video Embeds (YouTube, Vimeo, Wistia) */
.video-responsive-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Perfect 16:9 widescreen aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 2.5rem 0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    background-color: #000000;
}

.video-responsive-wrapper iframe,
.video-responsive-wrapper object,
.video-responsive-wrapper embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0; /* Erases harsh default browser borders */
}

/* 3. The End-of-Post CTA Box (High-Key Clinical Aesthetic) */
.end-post-cta {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-top: 4px solid #2c3e50; /* Matches your core brand slate tone */
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .end-post-cta {
        padding: 3.5rem; /* Expands spacing nicely on desktop views */
    }
}

.cta-heading {
    font-size: 1.6rem !important;
    color: #0f172a !important;
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important;
    font-weight: 700;
}

.cta-subtext {
    font-size: 1rem !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    max-width: 580px;
    margin: 0 auto 2rem auto !important;
}

/* Form Layout - Fluid on Mobile, Stacked Inline on Desktop */
.cta-form-inline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 480px;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .cta-form-inline {
        flex-direction: row; /* Snaps field and button side-by-side */
        gap: 0;
        background-color: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 6px;
        padding: 4px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    }
    
    /* Highlight form ring when user interacts with input */
    .cta-form-inline:focus-within {
        border-color: #0076d6;
        box-shadow: 0 0 0 3px rgba(0, 118, 214, 0.15);
    }
}

.cta-input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: #334155;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    font-family: inherit;
}

@media (min-width: 480px) {
    .cta-input-field {
        border: none; /* Strips double border when wrapped in desktop block */
        padding: 0.6rem 1rem;
    }
}

.cta-submit-btn {
    background-color: #0076d6; /* Vibrant clinical callout blue */
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-family: inherit;
}

.cta-submit-btn:hover {
    background-color: #005eb1;
}

.cta-submit-btn:active {
    transform: scale(0.98); /* Satisfying tactile squish effect on touch click */
}

.cta-disclaimer {
    font-size: 0.8rem !important;
    color: #94a3b8 !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   Clinical Skincare Blog - Custom Component Styling
   ========================================================================== */

/* 1. Too Long; Didn't Read (TL;DR) Summary Box */
.tldr-summary-box {
    background-color: #f8f9fa; 
    border-left: 4px solid #2c3e50; 
    padding: 1.5rem; 
    margin: 2rem 0; 
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.tldr-summary-box ul {
    margin: 0; 
    padding-left: 1.25rem; 
    font-size: 0.95rem;
    color: #4a5568;
}

.tldr-summary-box li {
    margin-bottom: 0.5rem;
}

.tldr-summary-box li:last-child {
    margin-bottom: 0;
}

.tldr-summary-box a {
    color: #0076d6;
    text-decoration: none;
    font-weight: 500;
}

.tldr-summary-box a:hover {
    text-decoration: underline;
}

/* 2. Frequently Asked Questions (FAQ) Accordion/List Structure */
.faq-container {
    margin: 3rem 0; 
    padding-top: 1.5rem; 
    border-top: 2px solid #e9ecef;
}

.faq-item {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Subtly elevate the question card when a user hovers over it */
.faq-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.faq-item h3 {
    font-size: 1.15rem; 
    color: #2c3e50; 
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Decorative Q&A indicators for better readability */
.faq-item h3::before {
    content: "Q.";
    color: #0076d6;
    font-weight: 700;
}

.faq-item p {
    margin: 0; 
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
}

/* 3. Responsive Skin-Type Matching Table Styling */
.table-responsive {
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.skin-match-table {
    width: 100%; 
    border-collapse: collapse; 
    min-width: 600px; /* Prevents text crowding on tiny mobile views */
    background-color: #ffffff;
}

.skin-match-table th {
    background-color: #f8f9fa; 
    padding: 14px; 
    text-align: left; 
    font-weight: 700; 
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e9ecef;
}

.skin-match-table td {
    padding: 14px;
    font-size: 0.95rem;
    color: #4a5568;
    border-bottom: 1px solid #e9ecef;
    line-height: 1.5;
}

.skin-match-table tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Clinical Skincare Blog - Post Sign-off Audit Tag
   ========================================================================== */

.clinical-audit-tag {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0076d6; /* Striking clinical blue accent line */
    border-radius: 4px 8px 8px 4px;
    padding: 1.25rem;
    margin: 2.5rem 0;
}

.audit-badge {
    display: inline-block;
    background-color: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.audit-statement {
    margin: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #334155 !important;
}

.audit-statement strong {
    color: #0f172a;
}