/*
Theme Name: Pomantra Nexus
Version: 1.0.0
Description: The new Pomantra nexus theme. Distinct from Pomantra Authority.
Author: Pomantra
*/

/* --- 1. VARIABLES & RESET --- */
:root { 
    --ink: #0f172a;       /* Deep Navy-Black */
    --charcoal: #334155;  /* High contrast grey */
    --gold: #b45309;      /* Darker Gold for readability */
    --blue: #1e40af;      /* Deep Royal Blue */
    --border: #e2e8f0;    /* Crisp border */
    --bg: #f8fafc;        /* Eye-soothing light grey */
    --white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    background-color: #f8fafc; 
    color: var(--charcoal); 
    font-family: 'Merriweather', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7; 
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

/* --- 2. LAYOUT WRAPPERS --- */
.boxed-wrap { 
    width: 100%;
    max-width: 1340px; 
    margin: 0 auto; 
    background: var(--white); 
    box-shadow: 0 0 40px rgba(0,0,0,0.04); 
    min-height: 100vh;
    position: relative;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 0px; }

/* --- 3. HEADER & NAV --- */
header { 
    border-bottom: 1px solid var(--border); 
    padding: 20px 0; 
    background: var(--white); 
    position: relative; 
    z-index: 100; 
}

/* Force Main Content Layer Lower than Header */
main.container, .content-layout {
    position: relative;
    z-index: 1; 
}

.nav-flex { display: flex; justify-content: space-between; align-items: center; }

/* --- PREMIUM LOGO --- */
.logo a {
    font-family: 'Merriweather', serif; 
    font-weight: 900; 
    font-size: 34px;
	padding-top: 9px;
    letter-spacing: -1.5px; 
    color: var(--ink);
    text-decoration: none;
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
    -webkit-font-smoothing: antialiased;
}

.logo-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background-color: var(--gold);
    margin-left: 4px;
    margin-bottom: 4px; 
}

/* Footer Logo */
.footer-logo {
    font-family: 'Merriweather', serif;
    font-weight: 900;
    font-size: 38px;
    letter-spacing: -1.5px;
    color: #ffffff;
    display: inline-flex;
    align-items: baseline;
    text-decoration: none;
}
.footer-logo .logo-dot { background-color: var(--gold); }

/* Mobile Logo Adjustment */
@media (max-width: 1024px) {
    .logo a { font-size: 28px; }
    .footer-logo { font-size: 32px; }
    .logo-dot { width: 5px; height: 5px; margin-bottom: 3px; }
}

/* Desktop Menu */
.main-nav { display: block; position: relative; z-index: 101; }
.main-nav ul { list-style: none; display: flex; gap: 32px; margin: 0; padding: 0; }
.main-nav a { 
    text-decoration: none; color: var(--ink); 
    font-weight: 700; font-size: 14px; 
    text-transform: uppercase; letter-spacing: 0.5px; 
    transition: color 0.2s; 
}
.main-nav a:hover { color: var(--gold); }
.main-nav li { position: relative; }

/* Desktop Submenu */
.main-nav li ul { 
    display: block; position: absolute; top: 100%; left: 0; 
    background: var(--white); border: 1px solid var(--border); 
    width: 250px; padding: 10px 0; 
    visibility: hidden; opacity: 0; transform: translateY(10px); 
    transition: all 0.2s ease; box-shadow: 0 15px 30px rgba(0,0,0,0.15); 
    z-index: 1000; 
}

/* --- CONTENT AREA FIX --- */
.reading-area, .entry-title { 
    position: relative; 
    z-index: 1; 
}

.main-nav li:hover > ul { visibility: visible; opacity: 1; transform: translateY(0); }
.main-nav li ul li { display: block; border-bottom: 1px solid #f1f1f9; }
.main-nav li ul a { 
    padding: 12px 20px; text-transform: none; font-size: 14px; 
    font-weight: 500; display: block; color: var(--charcoal); 
}
.main-nav li ul a:hover { background: #f8fafc; color: var(--blue); }

/* --- 4. SEARCH UI (DESKTOP) --- */
.search-ui form { 
    background: #fff; border: 1px solid #cbd5e1; border-radius: 4px;
    padding: 6px 15px; display: flex; align-items: center; 
    width: 320px; 
    gap: 10px;
}
.search-ui input { 
    border: none; background: transparent; outline: none; 
    font-size: 13px; font-weight: 600; width: 100%; color: var(--ink); 
}
.search-btn-icon { border: none; background: none; cursor: pointer; color: var(--gold); font-size: 16px; }

.header-search-select {
    background: transparent;
    border: none;
    border-right: 1px solid #ddd;
    font-family: 'Merriweather', serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--charcoal);
    padding-right: 8px;
    margin-right: 8px;
    cursor: pointer;
    outline: none;
    max-width: 100px;
}

/* --- 5. MOBILE SEARCH & SIDEPANEL --- */

/* Mobile Search Icon (Trigger) */
.mobile-search-icon { 
    display: none; /* Hidden on Desktop */
    cursor: pointer; 
    padding: 10px; 
    color: var(--ink); 
    align-items: center;
    justify-content: center;
}

/* FIX: Ensure the SVG has a size so it is visible! */
.mobile-search-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.99); z-index: 2000000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.mobile-search-overlay.active { opacity: 1; visibility: visible; }

.mobile-search-overlay form { 
    width: 85%; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}
.mobile-search-overlay input {
    font-family: 'Merriweather', serif; font-size: 26px; border: none; 
    background: transparent; outline: none; width: 100%; color: var(--ink);
    border-bottom: 2px solid var(--ink);
}

.mobile-search-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    font-family: 'Merriweather', serif;
    font-size: 16px;
    background: #fff;
    border-radius: 4px;
    outline: none;
    color: var(--charcoal);
}

.mobile-search-close {
    position: absolute; top: 20px; right: 20px; font-size: 36px; cursor: pointer;
}

/* Mobile Toggle Button */
.mobile-toggle { 
    display: none; background: none; border: none; cursor: pointer; 
    padding: 8px; z-index: 100; flex-direction: column; justify-content: center;
    height: 40px; width: 40px;
}
.mobile-toggle span { 
    display: block; width: 24px; height: 3px; background: var(--ink); 
    margin: 2px 0; 
    border-radius: 2px;
}

/* Sidepanel */
.sidepanel {
    position: fixed; top: 0; right: -100%; width: 300px; height: 100%;
    background: var(--white); z-index: 2000001;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    transition: 0.3s ease; display: flex; flex-direction: column;
}
.sidepanel.open { right: 0; }
.sidepanel-header { padding: 25px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.sidepanel-logo { font-family: 'Merriweather', serif; font-size: 24px; font-weight: 900; }
.sidepanel-close { background: none; border: none; font-size: 28px; cursor: pointer; }
.sidepanel-content { padding: 0; overflow-y: auto; }

.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu li { border-bottom: 1px solid var(--border); position: relative; }
.mobile-menu a { 
    display: block; padding: 16px 25px; 
    font-family: 'Merriweather', serif; font-size: 18px; font-weight: 700;
    color: var(--ink); text-decoration: none; width: 80%; 
}

/* Submenu Arrow Toggle */
.submenu-toggle {
    position: absolute; right: 0; top: 0; bottom: 0; width: 60px;
    display: flex; align-items: center; justify-content: center;
    border-left: 1px solid #f1f1f1; cursor: pointer; background: #fff;
}
.submenu-toggle svg { width: 14px; transition: 0.3s; }
.submenu-toggle.active { background: #f8fafc; }
.submenu-toggle.active svg { transform: rotate(180deg); }

.mobile-menu .sub-menu { display: none; background: #f8fafc; border-top: 1px solid var(--border); }
.mobile-menu .sub-menu li { border-bottom: 1px solid #e2e8f0; }
.mobile-menu .sub-menu a { 
    font-family: 'Merriweather', sans-serif; font-size: 14px; 
    padding: 12px 25px; font-weight: 500; width: 100%; color: var(--charcoal);
}

.sidepanel-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 2000000;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.sidepanel-overlay.active { opacity: 1; visibility: visible; }

/* --- 6. ADS --- */
.ad-container { margin: 30px auto; text-align: center; max-width: 100%; overflow: hidden; display: flex; justify-content: center; }
.ad-label { font-size: 9px; color: #999; text-transform: uppercase; margin-bottom: 5px; }

/* --- 7. HOME GRID --- */
.hero-section { display: flex; gap: 40px; margin: 40px 0; border-bottom: 1px solid var(--border); padding-bottom: 40px; }
.lead-story { flex: 2; }
.side-feed { width: 300px; border-left: 1px solid var(--border); padding-left: 30px; flex-shrink: 0; }
.mag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 40px 0; }

.category-tag { 
    color: var(--gold); font-weight: 800; font-size: 11px; text-transform: uppercase; 
    letter-spacing: 1px; display: inline-block; margin-bottom: 8px; text-decoration: none; 
}
.category-tag:hover { text-decoration: underline; }

h1.entry-title { font-family: 'Merriweather', serif; font-size: 48px; font-weight: 900; line-height: 1.2; color: var(--ink); margin-bottom: 20px; }
h2.hero-title { font-family: 'Merriweather', serif; font-size: 40px; font-weight: 900; line-height: 1.2; margin: 10px 0 15px; color: var(--ink); }
h4.grid-title { font-family: 'Merriweather', serif; font-size: 20px; font-weight: 700; line-height: 1.4; margin-top: 5px; }

/* --- 8. SINGLE POST CONTENT --- */
.content-layout { display: flex; justify-content: center; gap: inherit; margin-top: 50px; padding-bottom: 20px; }
.reading-area { width: 100%; max-width: 840px; margin:0 auto; } 
.sidebar { width: 300px; border-left: 1px solid var(--border); padding-left: 40px; flex-shrink: 0; }

.post-content {
    font-family: Georgia, Cambria, "Times New Roman", Times, serif;
    font-size: 20px;
    line-height: 1.6; 
    color: #2C2C2C; 
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.post-content a {
    text-decoration: underline;
    text-decoration-color: var(--border); 
    text-underline-offset: 4px;
    color: var(--blue);
}
.post-content a:hover {
    color: var(--gold);
    text-decoration-color: var(--gold);
}
.post-content p { margin-bottom: 28px; }
.post-content h2 { font-family: 'Merriweather', serif; font-size: 28px; color: var(--ink); margin: 45px 0 20px; font-weight: 900; letter-spacing: -0.5px; }
.post-content h3 { font-family: 'Merriweather', serif; font-size: 24px; color: var(--ink); margin: 35px 0 15px; font-weight: 700; }
.post-content h4 { font-family: 'Merriweather', serif; font-size: 20px; color: var(--ink); margin: 30px 0 10px; font-weight: 700; }

/* Lists */
.post-content ul { margin: 25px 0 25px 20px; padding: 0; list-style: none; }
.post-content ul li { margin-bottom: 12px; padding-left: 25px; position: relative; }
.post-content ul li::before {
    content: "•"; color: #393939; font-weight: 900; font-size: 20px;
    position: absolute; left: 0; top: 5px; line-height: 1;
}

.post-content ol { margin: 25px 0 25px 40px; padding: 0; list-style: decimal; }
.post-content ol li { margin-bottom: 12px; padding-left: 10px; position: relative; }
.post-content ol li::before { content: none !important; display: none; }
.post-content ol li::marker { color: var(--ink); font-weight: 700; font-family: 'Merriweather', serif; }

.post-content blockquote {
    border-left: 4px solid var(--gold); margin: 35px 0; padding: 10px 30px;
    background: #ffffff; font-family: 'Merriweather', serif;
    font-style: normal; color: var(--ink); font-size: 20px;
}


/* --- 9. FOOTER --- */
footer { 
    background: var(--ink); color: #fff; padding: 50px 0; 
    margin-top: 80px; border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-flex { display: flex; justify-content: space-between; align-items: center; }
.footer-brand { text-align: left; }
.copyright { font-family: 'Merriweather', sans-serif; font-size: 12px; color: #94a3b8; line-height: 1.5; margin-top: 8px; }

.footer-nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.footer-nav a { 
    color: var(--platinum); text-decoration: none; 
    font-family: 'Merriweather', sans-serif; font-size: 13px; 
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    transition: color 0.2s;
}
.footer-nav a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }

/* Pagination */
.pomantra-pagination ul { display: flex; justify-content: center; gap: 10px; list-style: none; margin: 40px 0; padding: 0; flex-wrap: wrap; }
.pomantra-pagination a, .pomantra-pagination span { 
    padding: 10px 16px; border: 1px solid var(--border); text-decoration: none; 
    color: var(--ink); font-weight: 700; background: #fff; 
    font-family: 'Merriweather', sans-serif; font-size: 14px; transition: all 0.2s ease;
}
.pomantra-pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pomantra-pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

@media (max-width: 480px) {
    .pomantra-pagination a, .pomantra-pagination span { padding: 8px 12px; font-size: 13px; }
    .pomantra-pagination ul { gap: 8px; }
}

/* --- 10. RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 768px) {
    .footer-flex { flex-direction: column; text-align: center; gap: 30px; }
    .footer-brand { text-align: center; order: 1; }
    .footer-nav ul { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px 24px; padding: 0 10px; }
    .footer-nav a { font-size: 12px; display: inline-block; }
}

@media (max-width: 1024px) {
    .main-nav, .search-ui { display: none; }
    
    /* Reveal Mobile Icons */
    .mobile-toggle, .mobile-search-icon { display: flex; }
    
    .hero-section { flex-direction: column; gap: 30px; }
    .content-layout { flex-direction: column; }
    .sidebar, .side-feed { width: 100% !important; border: none; padding: 10px; margin-top: 40px; border-top: 1px solid var(--border); padding-top: 30px; margin-left: -10px; }
    .mag-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    
    h1.entry-title { font-size: 32px; }
    h2.hero-title { font-size: 28px; }
    .logo a { font-size: 28px; }
}

/* Scroll Top */
#scrollTopBtn {
    display: flex; align-items: center; justify-content: center;
    position: fixed; bottom: 20px; right: 20px; z-index: 99;
    width: 45px; height: 45px; border: none; background-color: transparent;
    color: #555; font-family: 'Merriweather', sans-serif; font-size: 14px; 
    font-weight: 700; cursor: pointer; opacity: 0; visibility: hidden;
    transform: translateY(20px); transition: all 0.3s ease-in-out;
}
#scrollTopBtn:hover { background-color: var(--gold); color: #fff; transform: translateY(-3px); }
#scrollTopBtn.show { opacity: 1; visibility: visible; transform: translateY(0); }

@media (max-width: 768px) {
    #scrollTopBtn { bottom: 5px; right: 5px; width: 40px; height: 40px; font-size: 18px; }
}

li.pp-multiple-authors-boxes-li.author_index_0.author_pomantra.has-avatar::before { display: none; }
@media (max-width: 768px) {
    .post-content {
        font-size: 19px;
        line-height: 1.7;
		color: rgb(10, 24, 41);
    }
}

/* --- 11. SIDEBAR WIDGET STYLING (CLEAN & FLAT) --- */

.sidebar .widget-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: none;
    overflow: hidden;
}

.sidebar h3 {
    font-family: 'Merriweather', serif !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ink) !important;
    margin-bottom: 25px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #f0f0f0 !important;
    display: block;
    width: 100%;
}

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

.sidebar ul li {
    border-bottom: 1px solid #f8fafc;
    padding: 12px 0;
    display: flex;
    align-items: center;
}

.sidebar ul li:last-child {
    border-bottom: none;
}

.sidebar ul li a {
    text-decoration: none;
    color: #2C2C2C;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    transition: color 0.2s;
    width: 100%;
}

.sidebar ul li a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* Calendar Widget Specifics */
.widget_calendar table { width: 100%; text-align: center; }
.widget_calendar caption { font-weight: 700; margin-bottom: 10px; }
.widget_calendar th { background: #f1f5f9; padding: 5px; font-size: 12px; }
.widget_calendar td { padding: 5px; border: 1px solid #f1f5f9; }

/* Tag Cloud */
.tagcloud a {
    display: inline-block;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 4px; 
    font-size: 11px !important;
    color: var(--charcoal);
    text-decoration: none;
    margin: 0 4px 8px 0;
    font-weight: 600;
    text-transform: uppercase;
}
.tagcloud a:hover {
    background: var(--ink);
    color: #fff;
}

/* --- 12. GLOBAL FORM STYLING --- */

/* Text Inputs & Textareas */
input[type="text"], 
input[type="email"], 
input[type="url"], 
input[type="tel"], 
input[type="search"],
textarea, 
select {
    width: 100%;
    max-width: 100%;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 14px 18px;
    font-size: 16px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    margin-bottom: 20px;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="search"]:focus,
textarea:focus, 
select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="submit"], 
button[type="submit"] {
    display: inline-block;
    background: var(--ink);
    color: #fff;
    border: none;
    padding: 16px 32px;
    font-family: 'Merriweather', serif;
    font-weight: 900;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    width: auto;
}

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

.comment-form p { margin-bottom: 20px; }
.comment-notes { font-size: 14px; color: #666; margin-bottom: 20px; }

/* --- 13. HEADER SEARCH RESTORATION --- */

.search-ui input[type="search"],
.search-ui select {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    height: auto !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--ink) !important;
}

.search-ui select {
    border-right: 1px solid #ddd !important;
    padding-right: 8px !important;
    margin-right: 8px !important;
    width: auto !important;
}

.search-ui form {
    display: flex !important;
    align-items: center !important;
    padding: 6px 15px !important;
    background: #fff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    gap: 10px !important;
    width: 320px !important;
}

.search-ui .search-btn-icon {
    padding: 0 !important;
    background: none !important;
    border: none !important;
    width: auto !important;
    color: var(--gold) !important;
    font-size: 16px !important;
    margin: 0 !important;
}

/* --- 14. NEW LAYOUT STYLES --- */

/* Reading Area Full Width */
.reading-area-full {
    width: 100%;
    max-width: 840px;
    margin: 40px auto; 
}

/* --- CHANGED: APPLE STYLE SIDE-BY-SIDE --- */
.single-post-header {
    display: flex; 
    align-items: center; /* Vertically center the text next to image */
    gap: 40px;
    margin-bottom: 30px; 
    padding-bottom: 30px; 
    border-bottom: 1px solid var(--border);
}

.single-header-image { 
    flex: 0 0 280px; /* Fixed width for the artwork column */
    width: 280px; 
}

/* Apple Style Artwork Styling */
.apple-side-art {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px; /* Classic Apple rounded corner */
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); /* Nice deep shadow */
    border: 1px solid rgba(0,0,0,0.05); /* Subtle border definition */
    object-fit: cover;
    object-position: top center; /* Ensure heads are seen */
}

/* Header Content (Right Side) */
.single-header-content { 
    flex: 1; 
    text-align: left; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.single-header-content .entry-title {
    font-size: 32px !important; 
    margin: 0 0 15px 0 !important; 
    text-align: left !important; 
    line-height: 1.3;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.header-player-wrapper .pomantra-controls {
    border: none; background: transparent; padding: 0; margin: 0;
    justify-content: flex-start; gap: 10px;
}
.header-player-wrapper .pomantra-play-btn, 
.header-player-wrapper .pomantra-lib-btn,
.header-player-wrapper .pomantra-dl-btn {
    padding: 10px 20px !important; font-size: 13px;
}
.header-player-wrapper .pomantra-playlist-modern {
    margin-top: 10px; box-shadow: none; border: nne;
}

/* Grids */
.pm-mid-grid-container {
    margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid #f0f0f0;
}
.pm-mid-heading {
    font-family: 'Merriweather', serif; font-size: 14px; font-weight: 900; 
    color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px;
}
.pm-mid-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

/* CHANGED: Align background image to top for heads */
.pm-mid-img {
    display: block; width: 100%; height: 120px; 
    background-size: cover; 
    background-position: top center; 
    border-radius: 4px;
    margin-bottom: 10px; transition: opacity 0.2s;
}

.pm-mid-img:hover { opacity: 0.9; }
.pm-mid-title {
    font-family: 'Merriweather', serif; font-size: 14px; line-height: 1.4;
    color: var(--ink); font-weight: 700; text-decoration: none; display: block;
}
.pm-mid-title:hover { color: var(--gold); }

/* Mobile Responsive */
@media (max-width: 768px) {
    .single-post-header { flex-direction: column; text-align: center; gap: 20px; }
    .single-header-image { width: 100%; flex: auto; max-width: 350px; margin: 0 auto; }
    .single-header-content { text-align: center; }
    .single-header-content .entry-title { text-align: center !important; }
    .header-player-wrapper .pomantra-controls { justify-content: center; }
    .pm-mid-grid { grid-template-columns: 1fr; }
}

/* --- PLAYER Z-INDEX --- */
#pomantra-player {
    z-index: 2147483647 !important; 
    transition: bottom 0.4s ease;
}

#pomantra-player.active {
    bottom: 0 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* --- CAROUSEL SLIDER --- */

.pm-carousel-section {
    margin-bottom: 25px; 
    padding-bottom: 15px; 
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.pm-carousel-wrapper {
    position: relative;
}

.pm-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 15px;
    width: 100%;
    scrollbar-width: none; 
}
.pm-carousel::-webkit-scrollbar { display: none; }

.pm-carousel-item {
    flex: 0 0 150px; 
    max-width: 150px;
    position: relative;
}

/* CHANGED: Align background image to top for heads */
.pm-carousel-img {
    display: block;
    width: 150px;
    height: 150px;
    background-size: cover;
    background-position: top center;
    border-radius: 8px;
    margin-bottom: 12px;
    background-color: #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.pm-carousel-img:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.pm-carousel-title {
    font-family: 'Merriweather', serif; 
    font-size: 13px; 
    line-height: 1.4;
    color: var(--ink); 
    font-weight: 700; 
    text-decoration: none; 
    display: block;
    white-space: normal; 
    height: auto;
    overflow: visible;
}
.pm-carousel-title:hover { color: var(--gold); }

/* CAROUSEL ARROWS UPDATED */
.pm-nav {
    position: absolute;
    /* Center vertically relative to the image height (150px) */
    top: 60px; 
    background: rgba(255,255,255,0.9);
    border: 1px solid #eee;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #111;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    outline: none;
}

.pm-nav:hover {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
    transform: scale(1.1);
}

.nav-prev { left: -15px; } /* Pulled slightly out */
.nav-next { right: -15px; }

@media (max-width: 768px) {
    .pm-nav { display: none; } 
}

.sensei-buttons-container { display: none; }

/* --- RELATED POSTS GRID --- */
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}
.related-card {
    background: #fff;
    overflow: hidden; 
}
.related-card h5 {
    transition: color 0.2s;
    margin-top: 0;
}
.related-card:hover h5 { color: var(--gold); }

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr !important; 
        gap: 30px; 
    }
    .related-card { margin-bottom: 10px; }
}

/* --- FIXES --- */
body, .boxed-wrap { overflow-x: hidden; }
h1, h2, h3, h4, h5, h6, .entry-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

@media (max-width: 768px) {
    .woocommerce-MyAccount-navigation, 
    .woocommerce-MyAccount-content {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
    .woocommerce table.shop_table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
}
/* ... (Top of file unchanged) ... */

/* --- MOBILE MENU FIX --- */
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu li { 
    border-bottom: 1px solid var(--border); 
    position: relative; 
    list-style-type: none !important; /* Force remove bullets */
}
/* Force remove any pseudo elements that might add bullets/content */
.mobile-menu li::before { content: none !important; display: none !important; }

.mobile-menu a { 
    display: block; padding: 16px 25px; 
    font-family: 'Merriweather', serif; font-size: 18px; font-weight: 700;
    color: var(--ink); text-decoration: none; width: 80%; 
}

/* ... (Rest of file unchanged) ... */
/* --- NEW SINGLE POST DESIGN --- */

/* 1. Enhanced Header Typography */
.single-category-label {
    display: inline-block;
    font-family: 'Inter', sans-serif; /* Fallback to sans */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold);
    margin-bottom: 15px;
}

.single-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Merriweather', serif;
    font-size: 13px;
    color: #64748b; /* Slate grey */
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.single-meta-row span { display: flex; align-items: center; gap: 5px; }

/* 2. Content Typography - "Drop Cap" Effect */
.post-content-enhanced {
    font-size: 20px;
    line-height: 1.8;
    color: #1f1f1f;
}

/* Makes the first letter big (Magazine style) */
.post-content-enhanced > p:first-of-type::first-letter {
    font-size: 3.5em;
    line-height: 0.8;
    font-weight: 900;
    float: left;
    margin-right: 12px;
    color: var(--gold);
    margin-top: -4px;
}

/* 3. Polished Restricted Box */
.pomantra-restricted-box-styled {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--gold);
    border-radius: 6px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}
.pomantra-restricted-box-styled h3 { margin-top: 10px; color: var(--ink); }
.pomantra-login-btn-styled {
    display: inline-block;
    background: var(--ink);
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    margin-top: 15px;
    transition: background 0.2s;
}
.pomantra-login-btn-styled:hover { background: var(--gold); color: #fff; }

/* 4. Section Divider */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
    margin: 40px 0;
}

/* --- 15. FORCE TOP ALIGNMENT (FACES) FOR HOME & GRIDS --- */
/* This overrides server cropping by fitting the larger image in browser */

/* FORCE HEIGHT AND TOP ALIGNMENT */
.lead-story img {
    width: 100%;
    height: 500px !important; /* Fixed height for consistency */
    object-fit: cover !important;
    object-position: top center !important; /* Focus on faces */
    border-radius: 4px;
}

.mag-grid article img,
.search-results article img,
.related-card img {
    width: 100%;
    height: 260px !important; /* Fixed height for cards */
    object-fit: cover !important;
    object-position: top center !important;
    border-radius: 4px;
}

/* Specific fix for Apple-style side art */
.apple-side-art {
    object-position: top center !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lead-story img { height: 300px !important; }
    .mag-grid article img { height: 220px !important; }
}
.plethoraplugins-tabs-container--horizontal.plethoraplugins-theme__minimal :before {display: none;}
.plethoraplugins-tabs-container--horizontal.plethoraplugins-theme__minimal, .plethoraplugins-tabs-container--horizontal.plethoraplugins-theme__minimal *, .plethoraplugins-tabs-container--horizontal.plethoraplugins-theme__minimal :after, .plethoraplugins-tabs-container--horizontal.plethoraplugins-theme__minimal :before {
    box-sizing: border-box;
    color: #1f1f1f;
}

/* --- POPUP DESCRIPTION STYLES --- */

/* 1. The Preview Text (Limited to 3 lines) */
.pm-desc-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--charcoal);
    position: relative;
}

/* 2. The Read More Button */
.pm-read-more-btn {
    display: inline-block;
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
    padding: 10px 24px;
    font-family: 'Merriweather', serif;
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pm-read-more-btn:hover {
    background: var(--gold);
    color: #fff;
}

/* 3. The Modal Background (Fixed Overlay) */
.pm-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000005; /* High z-index, but below the player if needed */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent body scroll interactions */
    background-color: rgba(15, 23, 42, 0.9); /* Dark overlay using var(--ink) */
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pm-modal.active {
    display: block;
    opacity: 1;
}

/* 4. The Modal Content Box (Full Width/Responsive) */
.pm-modal-wrap {
    background-color: #fff;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    position: relative;
    overflow-y: auto; /* Enable scrolling inside the modal */
    animation: slideUp 0.4s ease-out;
}

/* Animation for opening */
@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Container inside modal to match site width */
.pm-modal-inner {
    max-width: 1000px; /* Matches your reading-area-full width */
    margin: 80px auto; /* Top margin to clear close button */
    padding: 0 24px 100px 24px;
}

/* 5. Close Button */
.pm-modal-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: var(--ink);
    background: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2000010;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.pm-modal-close:hover {
    transform: rotate(90deg);
    color: var(--gold);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .pm-modal-inner {
        margin-top: 60px;
    }
    .pm-modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}
.pm-next-normal {
    font-size: 15px !important;
    color: #1f1f1f !important;
}
.pm-time-highlight {
    color: #1f1f1f !important;
}
/* --- SHUFFLE BUTTON STYLES --- */
.pm-control-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.pm-btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    font-family: 'Merriweather', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--ink, #0f172a);
    background: var(--ink, #0f172a);
    color: #fff;
    min-width: 200px; 
}

.pm-btn-small:hover {
    background: var(--gold, #b45309);
    border-color: var(--gold, #b45309);
    transform: translateY(-1px);
}

@media(max-width: 480px) {
    .pm-control-bar { margin: 20px 0; }
    .pm-btn-small { width: 100%; } 
}
/* GLOBAL RESPONSIVE FIX FOR POMANTRA TOOLS */
@media (max-width: 480px) {
    /* Stack all grids on small phones */
    .mn-input-grid, 
    .mn-input-row, 
    .mn-check-grid,
    .mn-pct-grid {
        grid-template-columns: 1fr !important;
        display: grid !important;
    }
    
    /* Ensure side-by-side inputs (like ft/in) stay side-by-side or wrap */
    .mn-flex-inputs {
        gap: 10px !important;
    }

    /* Make text slightly smaller on mobile for fit */
    .mn-res-val, .mn-bmi-value {
        font-size: 32px !important;
    }
}
/* --- PREMIUM READING EXPERIENCE (Drop Cap) --- */
.pm-modal .post-content-enhanced > p:first-of-type::first-letter {
    float: left;
    font-size: 3.5em;
    line-height: 0.85;
    font-weight: 900;
    margin-right: 12px;
    margin-top: -4px;
    color: #b45309; /* Gold Accent */
    font-family: 'Merriweather', serif;
}

.pm-modal .post-content-enhanced p {
    font-size: 18px;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 24px;
}
/* --- SIDEBAR STYLING --- */

/* 1. Sticky Container (Follows user on scroll) */
.pm-sidebar-container {
    position: sticky;
    top: 100px; /* offset for header */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 2. Widget Cards */
.widget {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 0; /* Handled by gap above */
    list-style: none; /* Remove WP default bullets */
}

/* 3. Widget Titles */
.widget-title {
    font-family: 'Merriweather', serif;
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 4. Link Lists (Categories, Recent Posts) */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget ul li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #f1f5f9;
}
.widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.widget ul li a {
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s, padding-left 0.2s;
    display: block;
}
.widget ul li a:hover {
    color: #b45309; /* Gold Accent */
    padding-left: 5px; /* Slide effect */
}

/* 5. Search Widget (Specific Fix) */
.widget_search .wp-block-search__label { display: none; }
.widget_search .wp-block-search__input {
    width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 6px;
}
.widget_search .wp-block-search__button {
    margin-top: 10px; width: 100%; background: #0f172a; color: #fff;
    padding: 10px; border: none; border-radius: 6px; cursor: pointer;
}
/* --- GLOBAL MOBILE "APP VIEW" FIX --- */
@media (max-width: 768px) {

    /* 1. RESET MAIN CONTAINER PADDING */
    /* Gives text a little breathing room, but allows cards to go full width */
    .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
        max-width: 100% !important;
        overflow-x: hidden; /* Prevents horizontal scroll */
    }

    /* 2. MAKE ALL "CARDS" FLAT & FULL WIDTH */
    /* This targets Archive, Search, Single, Tools, and Dashboard boxes */
    .pm-library-container,       /* Archive/Search/Index Lists */
    .pm-content-card,            /* Single Post Content */
    .pm-tool-workspace,          /* Tool Calculator Box */
    .post-content-preview-container, /* Read More Accordion */
    .pm-full-card,               /* Full Width Page */
    .mn-dash-container           /* Front Page Dashboard */
    {
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important; /* Optional: Remove white bg if body is white */
        
        /* MAGIC TRICK: Pulls content to the edge, ignoring container padding */
        margin-left: -15px !important;
        margin-right: -15px !important;
        width: auto !important;
        padding-left: 15px !important; /* Add internal padding back so text doesn't touch edge */
        padding-right: 15px !important;
    }

    /* 3. FIX LIST ITEMS (Archive/Search) */
    .pm-lib-item {
        padding: 15px 0 !important; /* Remove side padding */
        border-bottom: 1px solid #eee !important;
    }
    
    /* 4. FIX PAGINATION (Search/Archive) */
    .pm-pagination {
        border-top: 1px solid #eee;
        margin-left: -15px; margin-right: -15px; /* Full width line */
        padding: 20px 10px;
        display: flex; flex-wrap: wrap; justify-content: center; gap: 5px;
    }
    .pm-pagination .page-numbers {
        margin: 0 !important;
        padding: 8px 12px !important;
        font-size: 14px;
    }

    /* 5. FIX FRONT PAGE GRID */
    .pm-dashboard-wrapper {
        padding: 0 !important;
        margin-top: -20px !important;
    }
    
    /* 6. SINGLE POST PLAYER HERO */
    .pm-player-hero {
        margin-bottom: 0 !important; /* Connects directly to content */
    }
}
/* --- MOBILE APP VIEW FIXES --- */
@media (max-width: 768px) {

    /* 1. HEADER FIX: Stop it from pulling content up */
    .pm-library-header,
    .pm-app-header {
        margin-bottom: 0 !important;      /* RESET negative margin */
        padding-bottom: 30px !important;  /* Reduce excess padding */
        border-bottom: 1px solid #e2e8f0; /* Add separator line */
    }

    /* 2. CONTAINER FIX: Push it down & make it flat */
    .pm-library-container,
    .pm-full-card,
    .pm-content-card {
        margin-top: 0 !important;         /* RESET negative margin */
        border-radius: 0 !important;      /* Remove rounded corners */
        box-shadow: none !important;      /* Remove shadow */
        border: none !important;          /* Remove border */
        background: #fff !important;      /* Ensure background is white */
        
        /* Edge-to-Edge Logic */
        margin-left: -20px !important;    /* Pull to left edge */
        margin-right: -20px !important;   /* Pull to right edge */
        padding-left: 20px !important;    /* Restore internal padding */
        padding-right: 20px !important;
        width: auto !important;
    }

    /* 3. PAGINATION FIX: Prevent Overlap */
    .pm-pagination {
        display: flex;
        flex-wrap: wrap; /* Allow numbers to wrap to next line */
        justify-content: center;
        gap: 10px;
        padding-bottom: 40px;
    }
    
    /* 4. LIST ITEM FIX: Clean Divider Lines */
    .pm-lib-item {
        padding: 15px 0 !important;
        border-bottom: 1px solid #f1f5f9;
    }
}
/* --- MOBILE SIDEBAR FIX (Edge-to-Edge) --- */
@media (max-width: 768px) {
    
    /* 1. Target the Sidebar Container */
    .pm-sidebar-container {
        margin-top: 40px !important; /* Separator from main content */
        padding-top: 20px !important;
        border-top: 1px solid #e2e8f0; /* divider line */
    }

    /* 2. Target the Widget Cards */
    .pm-sidebar-container .widget,
    .pm-sidebar-container .pm-widget-card,
    .pm-pro-box {
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        
        /* EDGE-TO-EDGE MAGIC */
        margin-left: -20px !important;
        margin-right: -20px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        
        /* Spacing between widgets */
        margin-bottom: 0 !important;
        padding-bottom: 30px !important;
        border-bottom: 1px solid #f1f5f9 !important; /* Divider between widgets */
    }

    /* 3. Adjust Widget Titles */
    .widget-title, 
    .pm-pro-title {
        font-size: 18px !important;
        margin-bottom: 15px !important;
        padding-left: 0 !important;
    }
}
/* --- FIX: Restore Dark Background for Promo Box on Mobile --- */
@media (max-width: 768px) {
    
    /* 1. Force the Gradient Background Back */
    .pm-pro-box {
        background: linear-gradient(135deg, #0f172a 0%, #334155 100%) !important;
        color: #ffffff !important; /* Ensure text is white */
        
        /* Keep Edge-to-Edge width */
        margin-left: -20px !important;
        margin-right: -20px !important;
        padding: 20px 20px !important;
        
        /* Reset borders so it looks like a distinct section */
        border-bottom: 5px solid #b45309 !important; /* Gold bottom border for style */
        margin-bottom: 30px !important;
    }

    /* 2. Ensure Text Elements are Visible */
    .pm-pro-box p, 
    .pm-pro-box .pm-pro-title, 
    .pm-pro-box div {
        color: #ffffff !important;
        display: block !important; /* Force show if hidden */
        opacity: 1 !important;
    }

    /* 3. Make Button Full Width & Distinct */
    .pm-pro-btn {
        width: 100% !important;
        display: block !important;
        margin-top: 15px !important;
        background: #b45309 !important;
    }
}
/* --- MOBILE SUB-MENU STYLES --- */

/* 1. Hide Sub-menus by Default */
.mobile-menu .sub-menu {
    display: none; /* Hidden until clicked */
    background: #f8fafc; /* Lighter background */
    padding-left: 20px; /* Indent */
    border-left: 2px solid #e2e8f0;
    margin: 10px 0 10px 10px;
}

/* 2. Style the "▼" Toggle Button */
.pm-submenu-toggle {
    float: right; /* Push to right side */
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 12px; color: #64748b;
    border-left: 1px solid #f1f5f9;
    transition: all 0.2s;
}

/* 3. Active State (When Open) */
.pm-submenu-toggle.active {
    background: #b45309; /* Gold Background */
    color: #fff;
    transform: rotate(0deg); /* Optional rotation */
}

/* 4. Fix Link Width */
.mobile-menu .menu-item-has-children {
    position: relative; /* Container for positioning */
}
.mobile-menu li a {
    display: inline-block; /* Allow text and button to sit side-by-side */
    width: calc(100% - 50px); /* Leave room for button */
}
.pm-full-card {
	max-width: 100% !important;
    margin: 0 auto !important;
}
.pm-wrap {max-width:1000px !important}
.wp-block-heading {
    margin-top: 10px;
}
li {
    margin-bottom: 15px;
}