/*
Theme Name: Guitarist Theme
Theme URI: https://jamestheguitarist.com-inspired
Author: AI Assistant
Description: Mobile-friendly theme with David Libre typography and centered layouts.
Version: 1.3
License: GNU General Public License v2 or later
Text Domain: guitarist-theme
*/

/* 1. FONT INTEGRATION */
@import url('https://googleapis.com');

/* 2. GLOBAL RESET & BASE STYLES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'David Libre', serif;
    background-color: #ffffff;
    color: #075299;
    line-height: 1.6;
    padding: 15px;
}

/* 3. TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: 'David Libre', serif;
    color: #075299;
    margin-bottom: 15px;
    font-weight: 700;
    word-wrap: break-word;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }

a {
    color: #075299;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 4. LAYOUT CONTAINER */
.site-container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* 5. ROCK-SOLID HEADER CENTERING FIX */
.site-header, 
header.site-header {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important; /* Stack elements vertically */
    align-items: center !important;    /* Force absolute horizontal centering */
    justify-content: center !important;
    text-align: center !important;
    border-bottom: 2px solid #075299;
    padding-bottom: 20px;
    margin-bottom: 30px;
    float: none !important;            /* Eliminate legacy structural layouts */
    clear: both !important;
}

/* Force headings and text boxes to abandon left-alignment overrides */
.site-header h1,
.site-header h1 a,
.site-header p,
.site-header .site-description {
    display: inline-block !important;
    width: auto !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}

/* Force the navigation menu container inside the header to center */
.site-header .main-navigation,
nav.main-navigation {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-top: 20px !important;
}

/* Align navigation links seamlessly on mobile devices */
.main-navigation ul {
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important; 
    align-items: center !important;   
    justify-content: center !important;
    gap: 10px;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.main-navigation a {
    font-weight: 500;
    font-size: 1.2rem;
    display: block;
    padding: 8px 0;
}

/* 6. MAIN CONTENT AREA (MOBILE FIRST) */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.content-area {
    width: 100%;
}

/* Prevent embedded images/videos from breaking mobile screen edges */
.post-entry img, 
.post-entry video, 
.post-entry iframe {
    max-width: 100%;
    height: auto;
}

/* 7. SIDEBAR & CATEGORIES (MOBILE FIRST) */
.sidebar-area {
    width: 100%;
    border-top: 1px solid #075299;
    padding-top: 20px;
}

.widget {
    margin-bottom: 25px;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 6px 0;
}

/* 8. FOOTER STYLES */
.site-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 2px solid #075299;
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================================
   9. DESKTOP RESPONSIVE ALIGNMENT (768px and wider)
   ========================================================== */
@media (min-width: 768px) {
    body { padding: 30px; }
    h1 { font-size: 2.5rem; }
    
    /* Keep navigation horizontal but explicitly locked to center */
    .main-navigation ul {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 25px;
    }
    
    .main-navigation a { padding: 0; }
    
    /* Change main layout block to beautiful side-by-side columns */
    .main-content {
        flex-direction: row;
        gap: 40px;
    }
    
    .content-area { flex: 3; }
    
    .sidebar-area {
        flex: 1;
        border-top: none;
        border-left: 1px solid #075299;
        padding-top: 0;
        padding-left: 20px;
    }
}
