/*
Theme Name: Beach Volleyball Club
Theme URI: https://example.com/beach-volleyball-club-theme/
Author: AI Engineer
Author URI: https://example.com/
Description: A clean and modern theme for a beach volleyball club, featuring a fixed sidebar and a minimalist design.
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: beach-volleyball-club
Tags: custom-menu, one-column, left-sidebar, accessibility-ready
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 Core Layout & Structure
2.0 Mobile Header
3.0 Typography
4.0 Sidebar Components
5.0 Main Content Components
6.0 Utilities & Responsive Design
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 Core Layout & Structure
--------------------------------------------------------------*/
body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
        sans-serif;
    color: #3d4f5c;
    background-color: #f8f9fa;
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

.site-container {
    display: flex;
}

.site-sidebar {
    width: 280px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: #ffffff;
    padding: 40px;
    overflow-y: auto;
    box-sizing: border-box;
    border-right: 1px solid #e9ecef;
}

.main-content-area {
    margin-left: 280px;
    width: calc(100% - 280px);
    padding: 50px 60px;
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex-grow: 1;
}

/*--------------------------------------------------------------
2.0 Mobile Header
--------------------------------------------------------------*/
.mobile-header {
    display: none; /* Hidden on desktop */
}

.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    color: #2c3e50;
}

.custom-mobile-logo {
    max-height: 60px;
    width: auto;
    height: auto;
    display: block;
}

/*--------------------------------------------------------------
3.0 Typography
--------------------------------------------------------------*/
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #2c3e50;
    font-weight: 600;
}

.entry-title {
    font-size: 36px;
    margin-bottom: 20px;
}

a {
    color: #43419b;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/*--------------------------------------------------------------
4.0 Sidebar Components
--------------------------------------------------------------*/
.desktop-logo .site-logo {
    margin-bottom: 50px;
}

.site-logo img {
    max-width: 100%;
    height: auto;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin-bottom: 15px;
}

.main-navigation a {
    text-decoration: none;
    color: #5a6a78;
    font-size: 16px;
    font-weight: 500;
}

.main-navigation a:hover {
    color: #2c3e50;
}

.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
    color: #1a252f;
    font-weight: 600;
}

.main-navigation .sub-menu {
    margin-left: 15px;
    padding-left: 10px;
    margin-top: 15px;
    display: none;
}

.main-navigation .current-menu-ancestor > .sub-menu {
    display: block;
}

/*--------------------------------------------------------------
5.0 Main Content Components
--------------------------------------------------------------*/
.entry-content {
    max-width: 800px;
    margin: 0 auto;
}

.child-pages-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.child-pages-list li {
    margin-bottom: 15px;
}

.child-pages-list a {
    display: block;
    padding: 15px 20px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: #2c3e50;
    font-weight: 500;
    transition: all 0.2s ease;
}

.child-pages-list a:hover {
    background-color: #f8f9fa;
    border-color: #43419b;
    text-decoration: none;
    transform: translateX(5px);
}

img.wp-post-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.post-thumbnail {
    text-align: center;
}

.site-footer {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    padding: 30px 0;
    margin-top: auto;
    border-top: 1px solid #e9ecef;
}

.site-footer a {
    color: #43419b;
}

/*--------------------------------------------------------------
6.0 Utilities & Responsive Design
--------------------------------------------------------------*/
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Full Width Template Styles */
body.page-template-page-full-width .main-content-area {
    margin-left: 280px;
    width: calc(100% - 280px);
    padding: 0;
    max-width: none;
}

body.page-template-page-full-width .site-main {
    max-width: 100%;
}

body.page-template-page-full-width .full-width-content {
    max-width: 100%;
    margin: 0;
}

body.page-template-page-full-width .full-width-content iframe,
body.page-template-page-full-width .full-width-content video,
body.page-template-page-full-width .full-width-content embed {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.page-template-page-full-width .full-width-thumbnail {
    margin: 0;
    width: 100%;
}

body.page-template-page-full-width .full-width-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* WordPress video and embed blocks in full width */
body.page-template-page-full-width .wp-block-embed,
body.page-template-page-full-width .wp-block-video {
    margin: 0;
    max-width: 100%;
}

body.page-template-page-full-width .wp-block-embed__wrapper {
    max-width: 100%;
}

body.page-template-page-full-width .wp-block-embed iframe,
body.page-template-page-full-width .wp-block-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.page-template-page-full-width .site-footer {
    border-top: 1px solid #e9ecef;
    padding: 30px 60px;
}

/* Full Height Class */
.full-height {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.height-80 {
    min-height: 80vh;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

body.page-template-page-full-width .full-height iframe,
body.page-template-page-full-width .full-height video,
body.page-template-page-full-width .full-height embed {
    flex: 1;
    width: 100%;
    height: 100%;
}

/* Wide Template Styles */
body.page-template-page-wide .main-content-area {
    padding: 50px 60px;
}

body.page-template-page-wide .wide-content {
    max-width: 1200px;
    margin: 0 auto;
}

body.page-template-page-wide .wide-thumbnail {
    max-width: 1200px;
    margin: 0 auto 20px;
    text-align: center;
}

body.page-template-page-wide .wide-thumbnail img {
    width: 100%;
    height: auto;
}

@media (max-width: 1024px) {
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 15px;
        background-color: #fff;
        border-bottom: 1px solid #e9ecef;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1001;
        box-sizing: border-box;
        min-height: 70px;
    }

    /* Adjust for WordPress admin bar */
    .admin-bar .mobile-header {
        top: 46px;
    }

    @media (min-width: 782px) {
        .admin-bar .mobile-header {
            top: 32px;
        }
    }

    .mobile-menu-toggle {
        order: 1;
    }

    .mobile-logo {
        order: 2;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .mobile-logo .custom-logo {
        max-height: 60px; /* Constrain the height of the mobile logo */
        width: auto;
    }

    .mobile-header-spacer {
        order: 3;
        width: 24px; /* Same width as hamburger to balance layout */
    }

    .desktop-logo {
        display: none; /* Hide the big logo in the flyout menu */
    }

    .site-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
        padding-top: 110px;
    }

    .site-sidebar.is-open {
        transform: translateX(0);
    }

    /* Adjust sidebar for admin bar */
    .admin-bar .site-sidebar {
        padding-top: 156px;
    }

    .main-content-area {
        margin-left: 0;
        width: 100%;
        padding: 90px 20px 20px 20px; /* Add top padding to clear the fixed mobile header */
    }

    /* Adjust content for admin bar */
    .admin-bar .main-content-area {
        padding-top: 136px;
    }

    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .overlay.is-open {
        display: block;
    }

    body.page-template-page-full-width .main-content-area {
        padding: 0;
        width: 100%;
        margin-left: 0;
    }

    body.page-template-page-full-width .overlay {
        display: none !important;
    }

    /* Wide Template Mobile Adjustments */
    body.page-template-page-wide .main-content-area {
        padding: 90px 10px 20px 10px;
    }

    body.page-template-page-wide .wide-content {
        padding: 0 5px;
    }

    /* Adjust for admin bar */
    .admin-bar.page-template-page-wide .main-content-area {
        padding-top: 136px;
    }
}
