/*
Theme Name: TDF Minimal Theme
Description: Lightweight WordPress theme designed specifically for Troy Davies Fitness plugins
Version: 1.1.1
Author: Sean Shepley
Author URI: https://troydaviesfitness.com
Text Domain: tdf-minimal
License: GPL v2 or later
*/

/* CSS Reset and Base Styles */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    color: #1f2937;
    line-height: 1.6;
}

/* ========================================================================
   SITE HEADER - CONSISTENT ACROSS ALL PAGES
   ======================================================================== */

.site-header {
    background: #1e293b !important;
    color: white !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    min-height: 60px;
}

/* Branding */
.site-branding {
    flex-shrink: 0;
}

.site-logo-compact .logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.brand-compact {
    display: flex !important;
    flex-direction: column;
    line-height: 1;
}

.brand-initials {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
}

.brand-sub {
    font-size: 0.625rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 3px;
    margin-top: 2px;
}

/* Navigation Menu - FORCE HORIZONTAL ON DESKTOP */
.main-navigation {
    flex: 1;
    display: flex !important;
    justify-content: center !important;
}

#primary-menu,
.nav-menu {
    display: flex !important;
    flex-direction: row !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2rem !important;
}

.nav-menu li {
    margin: 0 !important;
    display: inline-block !important;
}

.nav-menu a {
    color: white !important;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0 !important;
    transition: color 0.2s ease;
    display: block;
}

.nav-menu a:hover {
    color: #60a5fa !important;
}

.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    color: #60a5fa !important;
}

/* Mobile Menu Toggle - HIDDEN ON DESKTOP */
.menu-toggle {
    display: none !important;
}

.menu-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-icon span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.menu-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* User Actions */
.header-actions {
    flex-shrink: 0;
    display: flex !important;
    align-items: center !important;
    gap: 1rem;
}

.user-menu {
    display: flex !important;
    align-items: center !important;
    gap: 1rem;
}

.welcome-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
}

.logout-link,
.login-link {
    color: white !important;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
}

.logout-link:hover,
.login-link:hover {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none !important;
}

.register-link {
    color: white !important;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: #667eea;
    transition: all 0.2s ease;
}

.register-link:hover {
    background: #764ba2;
    text-decoration: none !important;
}

.auth-links {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem;
}

/* Membership Status Bar */
.membership-status-bar {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    font-size: 0.75rem;
}

.membership-status-bar .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.membership-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.level-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.upgrade-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.upgrade-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Header - MOBILE ONLY */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap !important;
        padding: 0.75rem 1rem;
    }
    
    .menu-toggle {
        display: flex !important;
        background: transparent;
        border: none;
        color: white;
        cursor: pointer;
        padding: 0.5rem;
        align-items: center;
        gap: 0.5rem;
        order: 3;
    }
    
    .site-branding {
        order: 1;
    }
    
    .header-actions {
        order: 2;
    }
    
    .main-navigation {
        order: 4;
        width: 100%;
        margin-top: 1rem;
        justify-content: flex-start !important;
    }
    
    #primary-menu,
    .nav-menu {
        display: none !important;
        flex-direction: column !important;
        width: 100%;
        gap: 0 !important;
    }
    
    #primary-menu.active,
    .nav-menu.active {
        display: flex !important;
    }
    
    .nav-menu li {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: block !important;
    }
    
    .nav-menu a {
        padding: 0.75rem 0 !important;
    }
    
    .welcome-text {
        display: none;
    }
}

/* WordPress Admin Bar Compatibility */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* ========================================================================
   MAIN CONTENT AREA
   ======================================================================== */

.site-content {
    min-height: calc(100vh - 140px);
}

/* Minimal Container - No Width Restrictions */
.tdf-theme-container {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Page Content - No Container Restrictions */
.tdf-content,
.entry-content,
.post-content,
.page-content {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ========================================================================
   FOOTER
   ======================================================================== */

.site-footer,
.tdf-footer {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    padding: 2rem 0;
    margin-top: 3rem;
}

.tdf-footer-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    color: #6b7280;
}

.tdf-footer-inner p {
    margin: 0;
    font-size: 0.875rem;
}

/* ========================================================================
   TYPOGRAPHY
   ======================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 1rem 0;
    color: #1e293b;
}

h1 { font-size: 2.5rem; }
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: 0 0 1rem 0;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* ========================================================================
   WORDPRESS ALIGNMENT CLASSES
   ======================================================================== */

.alignleft {
    float: left;
    margin: 0 1rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1rem;
}

.aligncenter {
    display: block;
    margin: 0 auto 1rem auto;
}

.alignwide {
    width: 100%;
    max-width: none;
}

.alignfull {
    width: 100vw;
    max-width: none;
    margin-left: calc(-100vw / 2 + 100% / 2);
    margin-right: calc(-100vw / 2 + 100% / 2);
}

/* WordPress Blocks Support */
.wp-block-group {
    margin-bottom: 1rem;
}

/* ========================================================================
   ACCESSIBILITY
   ======================================================================== */

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

/* Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100000;
}

.skip-link:focus {
    top: 0;
}

/* ========================================================================
   RESPONSIVE DESIGN
   ======================================================================== */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .tdf-footer-inner {
        padding: 0 1rem;
    }
}

/* ========================================================================
   VERSION HISTORY
   ======================================================================== */

/*
 * v1.1.1 - September 29, 2025 - Sean Shepley
 * - Added !important flags to force horizontal menu layout on desktop
 * - Fixed menu displaying in mobile format on desktop
 * - Improved CSS specificity to override WordPress defaults
 * 
 * v1.1.0 - September 29, 2025 - Sean Shepley
 * - Complete header CSS rewrite to match header.php structure
 * - Added consistent navigation styling across all pages
 * - Added mobile responsive menu
 * - Added membership status bar styling
 * - Fixed class name mismatches (.site-header vs .tdf-header)
 * - Improved accessibility with skip links
 * - Added user menu and authentication link styling
 * 
 * v1.0.0 - September 27, 2025 - Sean Shepley
 * - Initial release
 */
