/*
Theme Name: Spinfuel Theme v3
Version: 3.0 - Claude Audit
*/

/* 1. CORE FONTS & BODY */
body { 
    font-family: 'Inter', sans-serif; 
    color: #111; 
    margin: 0; 
    padding: 0; 
    background: #fff; 
    line-height: 1.6;
}

/* 2. THE HEADLINES (Sophisticated Playfair) */
h1, h2, h3, .entry-title a {
    font-family: 'Playfair Display', serif;
    text-transform: uppercase !important;
    font-weight: 900 !important;
    letter-spacing: -1px;
    text-decoration: none;
    color: #111;
}

/* 3. THE LAB NOTES (Key Takeaways Box) */
.sf-key-takeaways {
    background: #fffafa; 
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 30px 0;
    margin: 40px auto;
    max-width: 650px;
    text-align: center;
}

.sf-key-takeaways h4 {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 3px;
    color: #ec3535;
    margin-bottom: 15px;
}

.sf-takeaway-text {
    font-size: 15px;
    color: #666;
    font-style: italic;
    line-height: 1.8;
    font-family: 'Inter', sans-serif;
}

/* 4. ELEGANT PAGINATION */
.pagination {
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid #eee;
    font-family: 'Inter', sans-serif;
    font-size: 12px !important;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 400 !important;
}

.pagination a, .pagination .page-numbers {
    padding: 8px 12px;
    color: #999 !important;
    text-decoration: none;
}

.pagination .current {
    color: #ec3535 !important;
    font-weight: 900;
}

/* 5. LOGO & NAV CONSTANTS */
.custom-logo-wrap img { 
    max-width: 380px !important; 
    height: auto !important; 
    margin: 0 auto; 
    display: block; 
}

.main-navigation { 
    background: #000; 
    padding: 15px 0; 
    border-bottom: 4px solid #ec3535; 
}

.main-navigation ul { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex; 
    justify-content: center; 
    gap: 30px; 
}

.main-navigation a { 
    color: #fff !important; 
    font-weight: 700; 
    font-size: 12px; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    text-decoration: none; 
}

/* 6. THE RED PILL SEARCH */
.sf-search-master-wrap { 
    width: 90%; 
    max-width: 600px; 
    height: 55px; 
    margin: 40px auto; 
    border: 2.5px solid #ec3535; 
    border-radius: 50px; 
    overflow: hidden; 
    display: flex; 
    background: #fff; 
}

input.is-search-input { 
    all: unset !important; 
    width: 100% !important; 
    height: 100% !important; 
    text-align: center !important; 
    font-size: 1rem !important; 
    font-weight: 700; 
    color: #111 !important; 
    text-transform: uppercase; 
}

/* 7. IMAGE VISIBILITY FIX */
.post-thumbnail img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
}

/* 8. GRID LOGIC (Desktop) */
.site-main div[style*="display: grid"] {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 80px !important;
}

/* 9. HOMEPAGE TITLE SIZING (Desktop defaults + Mobile overrides) */
.sf-hero-title {
    font-size: 3.8rem;
}

.sf-section-title {
    font-size: 3.5rem;
}

.sf-grid-title {
    font-size: 1.7rem;
}

/* Single post article title — desktop size controlled here, not inline */
.sf-single-title {
    font-size: 3.5rem;
}

/* --- CATEGORY BADGE --- */
.sf-category-badge {
    display: block;
}

.sf-cat-link {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #ffffff;
    background-color: #ec3535;
    padding: 4px 10px;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.sf-cat-link:hover {
    background-color: #111111;
    color: #ffffff;
}

/* 9a. MOBILE REFINEMENT (iPhone Pro & Smaller) */
@media (max-width: 768px) {
    
    /* Shrink the Homepage Section Header */
    .site-main header h2 {
        font-size: 1.6rem !important;
        letter-spacing: 1px !important;
        line-height: 1.2 !important;
        margin-top: 20px !important;
    }

    /* Shrink the Post Titles for Mobile */
    h1.entry-title, .sf-single-title, .site-main h2 a {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
        letter-spacing: -0.5px !important;
    }

    /* Flatten the 2-Column Grid to 1-Column for Phones */
    .site-main div[style*="display: grid"] {
        grid-template-columns: 1fr !important; 
        gap: 40px !important;
    }

    /* Search Bar Adjustment */
    .sf-search-master-wrap {
        height: 45px !important;
        margin: 20px auto !important;
    }
    
    input.is-search-input {
        font-size: 0.9rem !important;
    }

    /* Scale the Logo down */
    .custom-logo-wrap img {
        max-width: 220px !important;
    }

    /* Hide redundant taglines for space */
    .site-header p {
        display: none !important;
    }

    /* Mobile thumbnail height */
    .post-thumbnail {
        height: 220px !important;
    }

    /* Center and resize the main hero title */
    .sf-hero-title {
        font-size: 1.8rem !important;
        line-height: 1.15 !important;
    }

    /* Tame the section header */
    .sf-section-title {
        font-size: 1.8rem !important;
        letter-spacing: -1px !important;
    }

    /* Tighten hero article spacing for mobile */
    .sf-hero-article {
        margin-bottom: 15px !important;
        padding-bottom: 15px !important;
    }

    .sf-hero-article .post-thumbnail {
        margin-bottom: 15px !important;
    }

    /* Reduce grid gap on mobile */
    .sf-post-grid {
        gap: 30px !important;
    }

    /* Tighten space below "Latest Expert Reviews" header */
    .sf-section-header {
        margin-bottom: 10px !important;
    }

    /* Grid titles smaller than hero to maintain hierarchy */
    .sf-grid-title {
        font-size: 1.3rem !important;
    }
}

/* 9b. EXTRA SMALL SCREENS (iPhone SE, Mini, older devices) */
@media (max-width: 390px) {
    .sf-hero-title {
        font-size: 1.5rem !important;
        line-height: 1.15 !important;
    }

    .sf-section-title {
        font-size: 1.4rem !important;
    }

    h1.entry-title, .sf-single-title, .site-main h2 a {
        font-size: 1.2rem !important;
    }

    .sf-grid-title {
        font-size: 1.1rem !important;
    }
}

/* 10. TABLE OF CONTENTS (Consolidated) */
#ez-toc-container, .toc_container, #lwptoc {
    all: revert !important;
    float: none !important;
    clear: both !important;
    display: block !important;
    background: #fff !important;
    border: 1px solid #eee !important;
    padding: 15px !important;
    min-width: 250px !important;
    max-width: 450px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    margin: 40px auto !important;
    text-align: center !important;
    font-family: 'Inter', sans-serif !important;
}

#ez-toc-container a, .toc_container a {
    font-size: 12px !important;
    color: #444 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
}

.ez-toc-list, .toc_list {
    margin-top: 10px !important;
}

#ez-toc-container ul, .toc_container ul {
    text-align: left !important;
    display: inline-block !important;
    margin: 0 auto !important;
}

/* 12. THE EDITORIAL IMAGE FLOW */
/* This fixes the "Flat" look of the 5,000 migrated articles */

.entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 40px auto; /* Centers images and gives them "Lab" breathing room */
    border-radius: 8px;
}

/* If any images still have the old WordPress alignment classes */
.alignleft {
    float: left;
    margin: 0 30px 20px 0 !important;
    max-width: 50% !important;
}

.alignright {
    float: right;
    margin: 0 0 20px 30px !important;
    max-width: 50% !important;
}

/* Mobile Fix: On iPhones, images should never "float" or they crush the text */
@media (max-width: 768px) {
    .alignleft, .alignright {
        float: none !important;
        margin: 30px auto !important;
        max-width: 100% !important;
        display: block !important;
    }
}

/* 14. (Consolidated into Section 9 mobile rules above) */

/* (Tagline styling moved to THE TAGLINE ATOMIC OVERRIDE section below) */

/* 16. DATELINE MOBILE */
@media (max-width: 768px) {
    .sf-dateline {
        font-size: 9px;
        letter-spacing: 2px;
    }
}

/* 2. THE CHRONICLES: THE MUSEUM BLACKOUT (ID 30256) */

/* Target ONLY the main content area, not the whole page/header */
.page-id-30256 #primary, 
.page-id-30256 #main, 
.page-id-30256 .entry-content {
    background-color: #0c0d0f !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure the header and footer stay their original colors */
.page-id-30256 .site-header, 
.page-id-30256 .site-footer {
    background-color: transparent !important;
}

/* Hide the duplicate page title */
.page-id-30256 .entry-header {
    display: none !important;
}

/* Forces your Black Chronicles Graphic to be 100% wide with no gaps */
.page-id-30256 .entry-content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    border: none !important;
}

/* --- THE CHRONICLES MASTER GRID (ID 30256) --- */

.page-id-30256 .sf-chronicles-container {
    background-color: #0c0d0f !important;
    width: 100% !important;
    display: block !important;
}

/* Force the Image to Center */
.sf-chronicles-hero {
    text-align: center !important;
    background: #000;
}

.sf-chronicles-hero img {
    max-width: 1100px !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
}

/* Center the Narrative Text */
.sf-chronicles-narrative {
    text-align: center !important;
    padding: 60px 20px !important;
    color: #fff !important;
}

.sf-chronicles-narrative h2 {
    color: #cc0000 !important;
    font-size: 32px !important;
}

/* THE FIX: Force the 3-Column Grid */
.sf-year-grid-system {
    max-width: 1000px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* Forces 3 columns */
    gap: 20px !important;
    padding: 40px 20px !important;
}

.sf-year-grid-system a {
    background: #1a1c1f !important;
    border: 1px solid #333 !important;
    padding: 25px !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    text-align: center !important;
    display: block !important;
}

.sf-year-grid-system a:hover {
    background: #cc0000 !important;
}

/* 2012 Special Styling */
.sf-origin-year {
    border-color: #cc0000 !important;
    color: #cc0000 !important;
}

/* --- THE TAGLINE ATOMIC OVERRIDE --- */

/* 1. Hide the existing text regardless of its container */
#site-description, .site-description, .tagline, .header-description {
    font-size: 0 !important;
    visibility: hidden !important;
    line-height: 0 !important;
}

/* 2. Inject the full, authoritative brand string */
#site-description:after, .site-description:after, .tagline:after, .header-description:after {
    content: "THE ART OF VAPING • THE ART OF EVALUATION" !important;
    visibility: visible !important;
    display: block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    color: #888 !important;
    text-transform: uppercase !important;
    padding-top: 10px !important;
    width: 100% !important;
    text-align: center !important;
}

/* --- MOBILE MENU OVERFLOW FIX --- */
@media only screen and (max-width: 768px) {
    header.site-header, 
    .nav-container, 
    .main-navigation {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Force the menu toggle to stay inside the box */
    .menu-toggle {
        right: 15px !important;
    }
}

/* --- SPINFUEL DARK FORM FIX --- */
/* Scoped to WPForms container with high specificity to override plugin defaults */

/* 1. Make the Labels (Name, Email, Message) White */
div.wpforms-container-full .wpforms-form .wpforms-field-label,
div.wpforms-container-full .wpforms-form .wpforms-title,
div.wpforms-container-full .wpforms-form .wpforms-description,
div.wpforms-container-full .wpforms-form label {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    letter-spacing: 1px;
}

/* 2. Style the Input Boxes (Inside the fields) */
div.wpforms-container-full .wpforms-form .wpforms-field input,
div.wpforms-container-full .wpforms-form .wpforms-field input[type="text"],
div.wpforms-container-full .wpforms-form .wpforms-field input[type="email"],
div.wpforms-container-full .wpforms-form .wpforms-field textarea {
    background-color: #25282c !important;
    border: 1px solid #444 !important;
    color: #ffffff !important;
    padding: 12px !important;
}

/* 3. Style the "Submit" Button to match Spinfuel Red */
div.wpforms-container-full .wpforms-form .wpforms-submit,
div.wpforms-container-full .wpforms-form button[type="submit"] {
    background-color: #ec3535 !important;
    color: #ffffff !important;
    border: none !important;
    text-transform: uppercase !important;
    font-weight: 900 !important;
    letter-spacing: 2px !important;
    padding: 15px 40px !important;
    transition: 0.3s ease;
}

div.wpforms-container-full .wpforms-form .wpforms-submit:hover,
div.wpforms-container-full .wpforms-form button[type="submit"]:hover {
    background-color: #ffffff !important;
    color: #111111 !important;
}

/* --- WPFORMS NAME FIELD ALIGNMENT FIX --- */

/* 1. Force the Main Label (Name*) to its own row at 100% width */
div.wpforms-container-full .wpforms-form .wpforms-field-name .wpforms-field-label {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    margin-bottom: 10px !important;
}

/* 2. Fix the "First" and "Last" sub-labels and inputs */
div.wpforms-container-full .wpforms-form .wpforms-field-name-row {
    display: flex !important;
    gap: 20px !important;
}

div.wpforms-container-full .wpforms-form .wpforms-field-row-block {
    flex: 1 !important;
}

/* 3. Ensure sub-labels (First/Last) are white and visible */
div.wpforms-container-full .wpforms-form .wpforms-field-sublabel {
    color: #888 !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    margin-top: 5px !important;
    display: block !important;
}

/* --- FORCE ALL LABELS AND FIELDS TO LEFT MARGIN --- */

/* 1. Target the overall field containers */
div.wpforms-container-full .wpforms-form .wpforms-field {
    text-align: left !important;
    clear: both !important;
    margin-bottom: 25px !important;
    width: 100% !important;
}

/* 2. Target all labels (Name, Email, Message) */
div.wpforms-container-full .wpforms-form .wpforms-field-label,
div.wpforms-container-full .wpforms-form .wpforms-field-sublabel {
    display: block !important;
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100% !important;
}

/* 3. Ensure the input boxes themselves aren't centering */
div.wpforms-container-full .wpforms-form .wpforms-field input,
div.wpforms-container-full .wpforms-form .wpforms-field textarea,
div.wpforms-container-full .wpforms-form .wpforms-field select {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* --- SPINFUEL CUSTOM THEME: MOBILE NAV FIX --- */
@media only screen and (max-width: 480px) {
    
    /* 1. Force the nav container to stay in bounds */
    .nav-container, 
    #main-nav {
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
        display: block !important;
    }

    /* 2. Shrink the menu text and allow it to wrap */
    .nav-menu a {
        font-size: 10px !important; /* Smaller for mobile */
        letter-spacing: 1px !important;
        padding: 10px 5px !important;
        white-space: normal !important; /* This allows (CANNABIS/CBD) to wrap to a 2nd line */
        display: inline-block !important;
    }

    /* 3. Ensure the list items don't force a horizontal row */
    .nav-menu li {
        display: inline-block !important;
        margin: 0 2px !important;
    }
}