/*
Theme Name: Gravitational Health
Theme URI: https://github.com/oyolokorai/coyolmediagroup
Description: A clean, minimal WordPress theme for the Gravitational Media portfolio. Pure white background, Inter font, exceptional readability. Colors easily customizable per property. Includes native ads monetization with admin UI.
Version: 3.7.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
Author: Coyol Media Group
Author URI: https://github.com/oyolokorai
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: gravitational-health
Tags: clean, minimal, portfolio, white, simple, readable, native-ads, monetization
*/

/* ==========================================
   DESIGN PHILOSOPHY
   ========================================== 
   - White background always (#fff)
   - Inter font for maximum readability
   - 18px base font, 1.7em line height
   - #333 text color for comfortable reading
   - Colors controlled via CSS variables
   - Minimal, clean, professional
   ========================================== */

/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================
   CSS VARIABLES - EASY COLOR CUSTOMIZATION
   ========================================== */
:root {
    /* Primary brand color - easily customizable per property */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    
    /* Link color - Standard hyperlink blue for accessibility */
    --link-color: #0000EE;
    --link-visited: #551A8B;
    --link-hover: #0000CC;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 18px;
    --line-height-base: 1.7em;
    
    /* Colors - Always white background */
    --color-background: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #e5e5e5;
    
    /* Layout */
    --max-width: 1200px;
    --content-width: 900px;
    --spacing: 2rem;
}

/* ==========================================
   RESET & BASE
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
    margin-top: 2em;
    margin-bottom: 0.75em;
}

h1 { font-size: 2.5rem; margin-top: 0; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5em;
}

a {
    color: var(--link-color);
    text-decoration: underline;
    transition: color 0.2s ease;
}

a:visited {
    color: var(--link-visited);
}

a:hover {
    color: var(--link-hover);
}

strong, b {
    font-weight: 600;
}

em, i {
    font-style: italic;
}

/* ==========================================
   LAYOUT
   ========================================== */
.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing);
    width: 100%;
}

.content-area {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* Content with Sidebar Layout - Desktop Only */
.site-content.has-sidebar {
    max-width: var(--max-width);
    margin: 0 auto;
    display: block;
}

.site-content.has-sidebar .content-area {
    max-width: 100%;
    margin: 0;
}

.site-content.has-sidebar .sidebar {
    margin-top: 2rem;
    width: 100%;
}

/* Desktop: Side-by-side layout */
@media (min-width: 769px) {
    .site-content.has-sidebar {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 2rem;
        align-items: start;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .site-content.has-sidebar .content-area {
        max-width: 100%;
        min-width: 0;
        padding-right: 1rem;
    }
    
    .site-content.has-sidebar .sidebar {
        position: sticky;
        top: 2rem;
        padding-left: 2rem;
        border-left: 2px solid var(--color-border);
        margin-top: 0;
        width: 300px;
    }
}

/* ==========================================
   HEADER
   ========================================== */
.site-header {
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem var(--spacing);
}

.site-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--color-text);
    text-decoration: none;
}

.site-description {
    display: none;
}

.custom-logo {
    max-width: 300px;
    max-height: 150px;
    width: auto;
    height: auto;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 0;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
}

/* ==========================================
   CONTENT
   ========================================== */
article {
    margin-bottom: 4rem;
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    margin-bottom: 0.5rem;
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.entry-meta a {
    color: var(--color-text-light);
}

.entry-thumbnail {
    margin-bottom: 2rem;
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-content {
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ==========================================
   ARCHIVE/INDEX
   ========================================== */
.post-list {
    list-style: none;
}

.post-list-item {
    margin-bottom: 3rem;
}

.post-thumbnail {
    margin-bottom: 1rem;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.read-more {
    display: inline-block;
    color: var(--link-color);
    font-weight: 500;
    margin-top: 0.25rem;
    text-decoration: underline;
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar {
    margin-top: 0;
}

.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    margin-bottom: 0.5rem;
}

/* Native Ads Widget */
.native-ads-widget {
    margin-bottom: 2rem;
}

.native-ad-item {
    display: block;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
}

.native-ad-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.native-ad-item:hover .native-ad-title {
    color: var(--link-hover);
}

.native-ad-image {
    width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    display: block;
}

/* Native ads without images */
.native-ad-item:not(:has(img)) .native-ad-title {
    margin-top: 0;
}

.native-ad-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
}

.native-ad-sponsored {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    background: var(--color-background);
    border-top: 2px solid var(--color-border);
    padding: 3rem var(--spacing) 1.5rem;
    margin-top: 4rem;
}

.site-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Portfolio Properties List */
.footer-properties {
    margin-bottom: 2rem;
    text-align: center;
}

.footer-properties-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-properties-list {
    font-size: 0.875rem;
    line-height: 1.8;
}

.footer-properties-list a {
    color: var(--link-color);
    text-decoration: underline;
}

/* Footer Navigation */
.footer-navigation {
    margin-bottom: 2rem;
    text-align: center;
}

.footer-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.footer-navigation a {
    font-size: 0.875rem;
    color: var(--link-color);
}

/* Disclaimers */
.footer-disclaimers {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f9f9f9;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.footer-disclaimer {
    font-size: 11px;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    text-align: left;
}

.footer-disclaimer:last-child {
    margin-bottom: 0;
}

.footer-disclaimer strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 12px;
    color: var(--color-text);
}

/* Site Info & Copyright */
.site-info {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.site-info p {
    margin: 0.5rem 0;
}

.footer-address {
    font-style: normal;
    margin-top: 0.5rem;
}

.footer-navigation a {
    color: var(--color-text-light);
}

/* ==========================================
   FORMS & BUTTONS
   ========================================== */
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 1rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

button,
input[type="submit"],
.button {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

button:hover,
input[type="submit"]:hover,
.button:hover {
    background: var(--primary-hover);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    :root {
        --spacing: 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-background);
        border-top: 1px solid var(--color-border);
        padding: 1rem;
    }
    
    .main-navigation.toggled {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        border-bottom: 1px solid var(--color-border);
    }
    
    .main-navigation a {
        display: block;
        padding: 1rem 0;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }
}

/* ==========================================
   UTILITIES
   ========================================== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* ==========================================
   15. ARTICLE CONTENT STRUCTURE STYLING
   Enhanced styling for published articles
   ========================================== */

/* Article Header */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.article-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.article-meta time {
    color: var(--text-muted);
}

.reading-time {
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
}

/* Article Content */
.article-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-color);
}

/* Lead Paragraph - First paragraph emphasis */
.lead-paragraph {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.lead-paragraph p {
    font-size: 1.15rem;
}

/* Article Headings */
.article-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.article-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 0.875rem;
    color: var(--text-color);
}

/* Article Paragraphs */
.article-content p {
    margin-bottom: 1.5rem;
}

/* Article Lists */
.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}

.article-content ul li,
.article-content ol li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

/* Blockquotes in Articles */
.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--background-lighter);
    border-left: 4px solid var(--primary-color);
    font-size: 1.125rem;
    font-style: italic;
    color: var(--text-light);
}

.article-content blockquote p {
    margin-bottom: 0;
}

/* Call to Action Styling */
.call-to-action {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--background-lighter) 0%, var(--background-light) 100%);
    border-radius: 8px;
    border: 2px solid var(--primary-color);
}

.call-to-action h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Strong/Bold text in articles */
.article-content strong {
    font-weight: 600;
    color: var(--text-color);
}

/* Article Links */
.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}

.article-content a:hover {
    color: var(--secondary-color);
}

/* Responsive Article Styling */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 1.75rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .lead-paragraph {
        font-size: 1.0625rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
    
    .call-to-action {
        padding: 1.5rem;
    }
}

/* ==========================================
   IN-CONTENT NATIVE ADS
   ========================================== */
.in-content-native-ad {
    background: #f9fafb;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.native-ad-label {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    font-weight: 600;
}

.native-ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.native-ad-inline-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.native-ad-inline-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--link-color);
    line-height: 1.4;
}

.native-ad-link:hover .native-ad-inline-title {
    color: var(--link-hover);
}

/* ==========================================
   RELATED POSTS SECTION
   ========================================== */
.related-posts-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--color-border);
}

.related-posts-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.related-post-item {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-post-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-post-thumbnail {
    position: relative;
    overflow: hidden;
    /* Fallback for browsers that do not support aspect-ratio */
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

@supports (aspect-ratio: 16 / 9) {
    .related-post-thumbnail {
        aspect-ratio: 16 / 9;
        padding-bottom: 0;
    }
}

.related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related-post-title {
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text);
    margin: 0;
}

.related-post-link:hover .related-post-title {
    color: var(--primary-color);
}

/* ==========================================
   TABLE OF CONTENTS
   ========================================== */
.table-of-contents {
    background: #f9fafb;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.toc-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
}

.toc-list {
    list-style: decimal;
    padding-left: 1.5rem;
    margin: 0;
}

.toc-item {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.toc-item a {
    color: var(--link-color);
    text-decoration: none;
}

.toc-item a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* TOC indentation levels */
.toc-level-2 {
    margin-left: 0;
}

.toc-level-3 {
    margin-left: 1.5rem;
    list-style-type: lower-alpha;
}

.toc-level-4 {
    margin-left: 3rem;
    list-style-type: lower-roman;
}

/* ==========================================
   FROM THE NETWORK MODULE (In Header)
   ========================================== */
.gm-network-module {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0 0.5rem 0 2rem;
}

.gm-network-module-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gm-network-header {
    text-align: center;
}

.gm-network-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    white-space: nowrap;
}

.gm-network-items {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.gm-network-item {
    min-width: 0;
}

.gm-network-link {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.gm-network-link:hover {
    opacity: 0.7;
}

.gm-network-title {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.gm-network-source {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 400;
}

/* Mobile responsiveness for related posts */
@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .table-of-contents {
        padding: 1rem 1.5rem;
    }
    
    /* Hide network module on mobile (CSS safeguard) */
    .gm-network-module {
        display: none !important;
    }
}
