/*
Theme Name: Christ P2P
Theme URI: https://christp2p.com
Author: Jason Eugene Garrison
Author URI: https://christit.com
Description: The official, highly optimized custom theme for Christ P2P. Features built-in PeerTube integration, cinematic video templates, and GracePress module support.
Version: 1.3.0
License: GPLv2 or later
Text Domain: christp2p
*/

body {
    background-color: #f1f5f9;
    color: #334155;
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
}

a { 
    color: #0284c7; 
    text-decoration: none; 
    transition: color 0.2s;
}
a:hover {
    color: #0369a1;
}

/* ==========================================================================
   ORIGINAL HEADER & NAVIGATION
   ========================================================================== */
.site-header { 
    background: #0f172a; 
    color: white; 
    padding: 2rem 5%; 
    text-align: center; 
    margin-bottom: 2rem; 
}
.site-header .custom-logo {
    max-width: 250px;
    height: auto;
}
.main-navigation {
    margin-top: 20px;
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 8px;
    display: inline-block;
}
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.main-navigation li a {
    color: #e2e8f0;
    font-weight: 600;
    padding: 5px 10px;
}
.main-navigation li a:hover,
.main-navigation li.current-menu-item a {
    color: #38bdf8;
}

/* ==========================================================================
   ORIGINAL FLEXBOX GRID & MEDIA
   ========================================================================== */
.site-wrapper { 
    display: flex; 
    flex-wrap: wrap; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    gap: 40px; 
}
.site-main { 
    flex: 1 1 65%; 
} 
.site-sidebar { 
    flex: 1 1 25%; 
    background: #ffffff; 
    padding: 25px; 
    border-radius: 12px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
    align-self: start; 
}

@media (max-width: 768px) {
    .site-wrapper { flex-direction: column; }
    .site-main, .site-sidebar { flex: 1 1 100%; }
}

/* Responsive Video Embeds for PeerTube/YouTube */
.entry-content iframe,
.entry-content object,
.entry-content embed {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* ==========================================================================
   DYNAMIC CUSTOMIZER STYLES
   ========================================================================== */

/* Global Sidebar Toggle */
.layout-no-sidebar .site-sidebar { 
    display: none !important; 
}
.layout-no-sidebar .site-main { 
    flex: 1 1 100% !important; 
    max-width: 100% !important; 
}

/* Left Sidebar Header Layout */
@media (min-width: 992px) {
    .layout-header-left body { 
        display: flex; 
        flex-direction: row; 
        min-height: 100vh; 
    }
    .layout-header-left .site-header { 
        width: 280px; 
        height: 100vh; 
        position: fixed; 
        top: 0; 
        left: 0; 
        display: flex; 
        flex-direction: column; 
        padding: 40px 30px; 
        margin: 0; 
        overflow-y: auto; 
        text-align: left; 
        box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    }
    .layout-header-left .site-header .custom-logo {
        max-width: 180px;
        margin-bottom: 20px;
    }
    .layout-header-left .main-navigation { 
        width: 100%; 
        background: transparent; 
        padding: 0; 
        margin-top: 30px; 
    }
    .layout-header-left .main-navigation ul { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 15px; 
    }
    .layout-header-left .main-navigation li a {
        padding: 5px 0;
        font-size: 1.1rem;
        display: block;
    }
    .layout-header-left .site-wrapper { 
        margin-left: 280px; 
        padding: 40px; 
        flex-grow: 1; 
        max-width: calc(100% - 280px); 
    }
    .layout-header-left .site-footer-widgets, 
    .layout-header-left .site-colophon { 
        margin-left: 280px; 
    }
}

/* Footer Grid Engine */
.site-footer-widgets { 
    background: #1e293b; 
    color: #cbd5e1; 
    padding: 60px 5%; 
    margin-top: 60px;
}
.site-footer-widgets a {
    color: #38bdf8;
}
.site-footer-widgets a:hover {
    color: #bae6fd;
}
.footer-grid { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: grid; 
    gap: 40px; 
}
.columns-1 .footer-grid { grid-template-columns: 1fr; }
.columns-2 .footer-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.columns-3 .footer-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.columns-4 .footer-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.site-colophon { 
    text-align: center; 
    padding: 20px; 
    background: #0f172a; 
    color: #94a3b8; 
    font-size: 0.9rem;
}
.site-colophon p {
    margin: 0;
}
