/*
 * Custom CSS for Fitness Coach Pro Theme
 * Implements July 2026 aesthetics: Glassmorphism, fluid transitions.
 */

:root {
    /* Colors are now injected dynamically via inc/class-theme-setup.php */
    --transition-spring: cubic-bezier(0.25, 1, 0.5, 1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --------------------------------------
 * Typography & Utilities
 * -------------------------------------- */
.text-center { text-align: center; }

/* --------------------------------------
 * Header / Nav
 * -------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: background 0.3s ease, top 0.3s ease;
}

/* WordPress Admin Bar Fixes */
.admin-bar .site-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}


.glass-header {
    background: transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
}

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

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
}
.site-title a { color: var(--text-color); }

.site-header.scrolled {
    background: var(--header-bg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-bottom: 1px solid var(--glass-border);
}

.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-navigation a {
    color: var(--text-muted); font-weight: 500;
}
.main-navigation a:hover { color: var(--text-color); }

.btn-logout {
    margin-left: 2rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    background: var(--glass-bg);
}
.btn-logout:hover {
    background: var(--glass-border-hover);
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block !important;
        z-index: 1001;
        position: relative;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--overlay-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s var(--transition-spring), visibility 0.4s;
        visibility: hidden;
    }

    .main-navigation.toggled {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .main-navigation a {
        font-size: 1.5rem;
    }

    .btn-logout {
        margin-left: 0;
        margin-top: 2rem;
    }
}

/* --------------------------------------
 * Buttons
 * -------------------------------------- */
.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-color); padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s var(--transition-spring);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.5);
    color: var(--text-color); }

.btn-primary:hover::after {
    left: 100%;
}

/* --------------------------------------
 * Hero Section
 * -------------------------------------- */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    padding-top: 80px; /* Offset for fixed header */
}

.hero-headline {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subheadline {
    font-size: 1.25rem;
    color: var(--text-muted); max-width: 600px;
    margin: 0 auto 2rem;
}

/* --------------------------------------
 * Glass Cards / Value Props
 * -------------------------------------- */
.value-props-section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

/* Background blob effect */
.value-props-section::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 600px; height: 600px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    filter: blur(150px);
    opacity: 0.1;
    z-index: 0;
}

.glass-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: transform 0.4s var(--transition-spring), border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.glass-card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.glass-card-desc {
    color: var(--text-muted); margin: 0;
}

/* --------------------------------------
 * Before / After Component
 * -------------------------------------- */
.before-after-section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.ba-slider {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    /* CSS Variable controlled by JS */
    --percentage: 50%; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
}

.ba-image-before, .ba-image-after {
    position: absolute;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
}

.ba-image-after {
    z-index: 1;
}

.ba-image-before {
    z-index: 2;
    clip-path: polygon(0 0, var(--percentage) 0, var(--percentage) 100%, 0 100%);
}

.ba-slider-handle {
    position: absolute;
    top: 0; bottom: 0;
    left: var(--percentage);
    width: 4px;
    background: var(--text-color); cursor: ew-resize;
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.ba-slider-handle::after {
    content: '< >';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; height: 40px;
    background: var(--primary-color);
    color: var(--text-color); border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* --------------------------------------
 * Dashboard (Gated Area)
 * -------------------------------------- */
.dashboard-main {
    padding-top: 100px; /* offset fixed header */
    min-height: calc(100vh - 80px);
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
}

.sidebar-title {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

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

.library-list li { margin-bottom: 0.5rem; }

.library-list a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-muted); border-radius: 8px;
    transition: background 0.3s ease, color 0.3s ease;
}

.library-list a:hover, .library-list a.active {
    background: var(--glass-bg);
    color: var(--text-color); }

.reading-area {
    max-width: 75ch; /* Optimal reading width */
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------
 * Polish Copy Sections (SEO & Flow)
 * -------------------------------------- */
.glass-section {
    padding: 5rem 0;
    position: relative;
}

.text-content p {
    font-size: 1.1rem;
    color: var(--text-muted); margin-bottom: 1.5rem;
}

.section-header {
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-muted); }

.dual-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.triple-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.text-primary { color: var(--primary-color); }
.text-danger { color: hsl(350, 100%, 65%); }

.feature-list {
    padding-left: 1.5rem;
    color: var(--text-muted); }
.feature-list li { margin-bottom: 0.5rem; }

.highlight-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color); }

.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }

.method-card {
    position: relative;
    padding-top: 3.5rem;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-color); font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.lead-magnet-section {
    padding: 6rem 0;
    background: var(--gradient-overlay);
}

.cta-card {
    max-width: 900px;
    margin: 0 auto;
}

.optin-form-placeholder {
    max-width: 500px;
    margin: 0 auto;
}

.glass-input {
    width: 100%;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-color); font-family: var(--font-body);
    font-size: 1rem;
    box-sizing: border-box;
}

.glass-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--glass-border);
}

.btn-block {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--text-color);
    padding: 1rem 2.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s var(--transition-spring);
}

.btn-secondary:hover {
    background: var(--glass-border-hover);
    transform: translateY(-3px);
}

.spam-notice { color: var(--text-muted); }

/* --------------------------------------
 * Blog Content Styles (single.php)
 * -------------------------------------- */
.entry-content h2 {
    font-size: 2rem;
    margin: 40px 0 20px;
    color: var(--text-color); }

.entry-content h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: #e0e0e0;
}

.entry-content p {
    margin-bottom: 25px;
    font-size: 1.15rem;
}

.entry-content ul, .entry-content ol {
    margin-bottom: 30px;
    padding-left: 20px;
}

.entry-content li {
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 30px 0;
    background: var(--glass-bg);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text-muted); }

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 30px 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-color); transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* --------------------------------------
 * Timeline Styles (template-about.php)
 * -------------------------------------- */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-dot {
    position: absolute;
    left: -46px; /* 40px padding + half dot width to center on line */
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-content {
    margin-left: 20px;
    padding: 30px;
}

@media (min-width: 768px) {
    .timeline {
        padding-left: 0;
    }
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }
    .timeline-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 80px;
    }
    .timeline-item:nth-child(odd) {
        flex-direction: row-reverse;
    }
    .timeline-content {
        width: 45%;
        margin-left: 0;
    }
    .timeline-dot {
        left: 50%;
        transform: translateX(-50%);
    }
}


/* --------------------------------------
 * Sticky Mobile CTA
 * -------------------------------------- */
.sticky-mobile-cta {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
    .sticky-mobile-cta {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        padding: 15px 0;
        border-top: 1px solid var(--glass-border);
        border-bottom: none;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
        animation: slideUp 0.5s ease forwards;
    }
    
    /* Extra padding for body so content isn't hidden behind the sticky footer */
    body {
        padding-bottom: 80px; 
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* --------------------------------------
 * Instagram Grid (Footer)
 * -------------------------------------- */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 768px) {
    .ig-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ig-item {
    display: block;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--glass-border);
}

.ig-img-wrap {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s var(--transition-spring);
}

.ig-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ig-icon {
    font-size: 2rem;
    color: var(--text-color); transform: scale(0.5);
    transition: transform 0.3s var(--transition-spring);
}

.ig-item:hover .ig-img-wrap {
    transform: scale(1.05);
}

.ig-item:hover .ig-overlay {
    opacity: 1;
}

.ig-item:hover .ig-icon {
    transform: scale(1);
}

/* --------------------------------------
 * Mobile Layout Polish (2026 UI)
 * -------------------------------------- */
.sales-author-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}

.reader-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    /* Make large grids 1-column on mobile */
    .sales-author-grid,
    .reader-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Reduce global paddings for sections on mobile */
    .value-props-section,
    .before-after-section,
    .author-section,
    .pricing-section,
    .inside-section,
    .testimonials-section,
    .faq-sales-section {
        padding: 3rem 0 !important;
    }

    /* Ensure text doesn't overflow */
    .hero-section {
        height: auto !important;
        min-height: 100vh;
        padding-top: 120px !important;
        padding-bottom: 60px !important;
    }
    
    .hero-headline {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
    }
    
    .section-title, h2 {
        font-size: 2rem !important;
    }

    /* Fix auto-fit grid overflow on tiny screens */
    .glass-cards-grid {
        grid-template-columns: 1fr !important;
    }
    
    .dual-grid, .triple-grid {
        grid-template-columns: 1fr !important;
    }

    /* Make reading area more comfortable on mobile */
    .dashboard-main {
        padding: 20px 0 !important;
    }
    .dashboard-content {
        padding: 20px !important;
    }
    
    .dashboard-sidebar {
        position: static !important;
        margin-bottom: 30px;
    }
}

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

.instagram-section {
    padding: 60px 0 20px 0;
}
.instagram-section h3 {
    margin-bottom: 30px;
}
.instagram-section h3 a {
    color: var(--text-color);
}
.btn-sticky-cta {
    width: 100%; box-sizing: border-box; font-size: 1.1rem; padding: 15px;
}

/* Home.php */
.hero-section.blog-hero {
    background-image: linear-gradient(var(--header-bg), var(--overlay-bg)); padding: 120px 0 60px 0; min-height: auto;
}
.blog-hero-headline {
    font-size: 3rem;
}
.blog-hero-subheadline {
    max-width: 600px; margin: 0 auto;
}
.blog-archive-section {
    padding: 60px 0 100px 0;
}
.blog-card {
    display: flex; flex-direction: column;
}
.blog-thumbnail {
    margin: -30px -30px 20px -30px; border-radius: 20px 20px 0 0; overflow: hidden; height: 200px;
}
.blog-thumbnail-img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease;
}
.blog-card .entry-header {
    margin-bottom: 15px;
}
.post-category {
    color: var(--primary-color); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 10px;
}
.blog-card .entry-title {
    font-size: 1.5rem; margin-bottom: 10px; font-family: var(--font-heading);
}
.blog-card .entry-title a {
    color: var(--text-color); text-decoration: none; transition: color 0.3s ease;
}
.blog-card .entry-summary {
    color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; flex-grow: 1;
}
.blog-card .entry-footer {
    margin-top: auto;
}
.btn-read-more {
    padding: 8px 20px; font-size: 0.9rem; display: inline-block;
}
.blog-archive-section .pagination {
    margin-top: 50px; text-align: center;
}

/* Single.php */
.single-entry-header {
    padding: 120px 20px 60px 20px; background-size: cover; background-position: center; border-bottom: 1px solid var(--glass-bg);
}
.single-container {
    max-width: 800px; margin: 0 auto;
}
.single-post-category {
    font-size: 0.9rem; font-weight: 700; letter-spacing: 2px; margin-bottom: 15px;
}
.single-entry-title {
    font-size: 2.5rem; margin-bottom: 20px;
}
.single-entry-meta {
    color: var(--text-muted); font-size: 0.9rem;
}
.meta-separator {
    margin: 0 10px;
}
.single-article {
    padding: 60px 0;
}
.single-entry-content {
    color: var(--text-muted); font-size: 1.1rem; line-height: 1.8;
}
.custom-audio-player {
    margin-bottom: 30px; padding: 20px; display: flex; align-items: center; gap: 20px;
}
.audio-btn {
    width: 50px; height: 50px; border-radius: 50%; border: none; background: var(--primary-color); color: var(--text-color); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.audio-timeline {
    flex: 1; display: flex; flex-direction: column; gap: 5px;
}
.audio-label {
    font-size: 0.9rem; color: var(--text-muted); font-weight: bold;
}
.progress-bar-bg {
    width: 100%; height: 6px; background: var(--glass-border); border-radius: 3px; cursor: pointer; position: relative;
}
.progress-bar-fill {
    width: 0%; height: 100%; background: var(--primary-color); border-radius: 3px; position: absolute; left: 0; top: 0; pointer-events: none;
}
.audio-time-container {
    display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }
.single-entry-footer {
    margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--glass-border);
}
.tags-links {
    color: var(--text-muted); }
.post-lead-magnet {
    padding: 60px 0;
}
.lead-magnet-card {
    border: 1px solid var(--primary-color);
}
.lead-magnet-card h2 {
    font-size: 1.8rem; margin-bottom: 15px;
}
.lead-magnet-card p {
    color: var(--text-muted); margin-bottom: 25px;
}
