/*
Theme Name: FullWidth Admin Theme
Theme URI: https://example.com/
Author: Your Name
Author URI: https://example.com/
Description: A 100% width theme with customizable header and footer widgets.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fullwidth-admin-theme
*/

/* ==========================================================================
   Base Styles & Resets
   ========================================================================== */

   body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333; /* Default text color */
    background-color: #f9f9f9; /* Default background */
}

/* ==========================================================================
   Site Layout
   ========================================================================== */

.site-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures footer sticks to the bottom on short pages */
}

.site-content {
    flex-grow: 1; /* Pushes the footer down */
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ==========================================================================
   Top Header Bar
   ========================================================================== */

.top-header-bar {
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.top-header-left,
.top-header-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.top-header-bar .widget {
    margin-right: 20px;
}
.top-header-bar .widget:last-child {
    margin-right: 0;
}

/* ==========================================================================
   Main Header
   ========================================================================== */

.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

/* --- Site Title Fallback --- */
.site-title {
    margin: 0;
    font-size: 1.8em;
    font-weight: bold;
    line-height: 1.2;
}

.site-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.site-title a:hover,
.site-title a:focus {
    color: #0073aa;
}

/* --- Main Navigation --- */
.main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.main-navigation a:hover,
.main-navigation a:focus {
    background-color: #f0f0f0;
    color: #0073aa;
}


/* ==========================================================================
   Content Area
   ========================================================================== */

/* Basic WordPress content styling */
.site-content h1, .site-content h2, .site-content h3, .site-content h4, .site-content h5, .site-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

.site-content h1 { font-size: 2.5em; }
.site-content h2 { font-size: 2em; }
.site-content h3 { font-size: 1.5em; }

.site-content p {
    margin-bottom: 1.2em;
}

.site-content a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.site-content a:hover,
.site-content a:focus {
    color: #005a87;
    text-decoration: underline;
}

.site-content blockquote {
    margin: 1.5em 0;
    padding: 0.5em 1.5em;
    border-left: 5px solid #ccc;
    background-color: #f9f9f9;
    font-style: italic;
}

.site-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

.site-content th, .site-content td {
    padding: 0.75em;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.site-content th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: #2c2c2c;
    color: #ccc;
}

/* --- Big Footer Widget Area --- */
.footer-widgets {
    padding: 40px 20px;
    display: flex;
    flex-wrap: wrap;
}

.footer-widgets .widget-column {
    padding: 0 15px;
    box-sizing: border-box;
}

/* Column Layouts */
.footer-widgets-columns-1 .widget-column { width: 100%; }
.footer-widgets-columns-2 .widget-column { width: 50%; }
.footer-widgets-columns-3 .widget-column { width: 33.333%; }
.footer-widgets-columns-4 .widget-column { width: 25%; }

.footer-widgets .widget h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2em;
}

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

.footer-widgets ul li {
    margin-bottom: 10px;
}

.footer-widgets a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.footer-widgets a:hover,
.footer-widgets a:focus {
    color: #fff;
}

/* --- Copyright Area --- */
.site-info {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #444;
    font-size: 0.9em;
}

/* ==========================================================================
   Sticky Header
   ========================================================================== */

.sticky-header-enabled .site-header {
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 0;
    z-index: 1000; /* Ensures header stays on top of other content */
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Optional: Add a subtle shadow when the header is sticky for better visual separation */
.sticky-header-enabled .site-header {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ==========================================================================
   Header Layout Container
   ========================================================================== */

   .site-header {
    /* justify-content is now handled by dynamic CSS */
    padding: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.header-inner-container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* Default layout */
    align-items: center;
}

/* ==========================================================================
   Responsive Design (Updates for new layout)
   ========================================================================== */

@media screen and (max-width: 768px) {
    /* Stack header items on mobile */
    .site-header {
        flex-direction: column;
        text-align: center;
    }
    .header-inner-container {
        flex-direction: column;
    }
    .site-header .main-navigation {
        margin-top: 15px;
    }
    
    /* Reset order for mobile stacking */
    .site-logo, .main-navigation {
        order: initial !important;
    }
}

/* ==========================================================================
   Responsive Design (Mobile First)
   ========================================================================== */

@media screen and (max-width: 768px) {
    /* Adjust main content padding */
    .site-content {
        padding: 20px 15px;
    }

    /* Stack main header */
    .site-header {
        flex-direction: column;
        text-align: center;
    }
    .site-header .main-navigation {
        margin-top: 15px;
    }

    /* Stack top header */
    .top-header-bar {
        flex-direction: column;
        text-align: center;
    }
    .top-header-left, .top-header-right {
        width: 100%;
        justify-content: center;
        margin: 5px 0;
    }
    .top-header-bar .widget {
        margin: 5px 10px;
    }

    /* Stack footer columns */
    .footer-widgets .widget-column {
        width: 100%;
        margin-bottom: 30px;
        text-align: center;
    }
}