/* ==========================================================================
   Orbital Theme - App Sidebar Navigation Layout
   ========================================================================== */

:root {
    --sidebar-width: 250px;
    --sidebar-bg: #ffffff;
    --sidebar-border: #f1f2f6;
    --color-primary-purple: #7c3aed;
    --color-primary-purple-hover: #6d28d9;
    --color-purple-light: #f5f3ff;
    --color-purple-active: #ede9fe;
    --color-text-dark: #1f2937;
    --color-text-muted: #6b7280;
    --color-text-light: #9ca3af;
    --radius-pill: 12px;
    --radius-btn: 10px;
}

/* Site Layout Wrapper */
.app-site-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    background-color: #ffffff;
    position: relative;
    box-sizing: border-box;
}

/* Main Content Area 100% Full Width */
.app-main-wrapper {
    flex: 1 1 0%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    box-sizing: border-box;
}

.app-main-wrapper > main.site-main,
.app-main-wrapper > .site-main,
.app-main-wrapper #content {
    flex: 1 0 auto;
    width: 100% !important;
    max-width: 100% !important;
}

/* Full-width content container inside App Layout */
.app-main-wrapper .container,
.app-main-wrapper .container-fluid,
.app-main-wrapper #content-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 1.5rem 2.5rem !important;
    box-sizing: border-box !important;
}

.app-main-wrapper .entry-content {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
}

.app-main-wrapper .flex-fluid {
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}
.app-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 16px 24px 20px;
    box-sizing: border-box;
    z-index: 1000;
    overflow-y: auto;
    scrollbar-width: thin;
}

.app-sidebar::-webkit-scrollbar {
    width: 5px;
}
.app-sidebar::-webkit-scrollbar-thumb {
    background-color: #e5e7eb;
    border-radius: 10px;
}

/* Sidebar Brand / Logo */
.app-sidebar .sidebar-brand {
    margin-bottom: 28px;
    padding: 0 4px;
}

.app-sidebar .sidebar-brand a {
    display: inline-block;
    text-decoration: none;
    line-height: 1.25;
}

.app-sidebar .sidebar-brand .brand-text {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-primary-purple);
    font-family: inherit;
}

.app-sidebar .sidebar-brand .brand-text span {
    color: #0284c7;
    display: block;
}

.app-sidebar .sidebar-brand img,
.app-sidebar .sidebar-brand .custom-logo,
.app-sidebar .sidebar-brand a img {
    max-width: 100%;
    width: auto;
    max-height: 80px;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Sidebar Section Title (e.g. MENÚ) */
.sidebar-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin: 0 0 12px 6px;
    user-select: none;
}

/* Navigation List */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-menu > li {
    margin: 0;
    padding: 0;
    width: 100%;
    list-style: none;
}

.sidebar-menu > li > a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: var(--radius-pill);
    transition: all 0.18s ease-in-out;
    background: transparent;
    line-height: 1.4;
}

.sidebar-menu > li > a:hover {
    background-color: #f8fafc;
    color: var(--color-text-dark);
}

/* Active State */
.sidebar-menu > li.current-menu-item > a,
.sidebar-menu > li.current_page_item > a,
.sidebar-menu > li.current-menu-ancestor > a,
.sidebar-menu > li.active > a {
    background-color: var(--color-purple-active);
    color: var(--color-primary-purple);
    font-weight: 700;
}

/* Submenu Dropdown in Sidebar */
.sidebar-menu .sub-menu {
    list-style: none;
    margin: 4px 0 6px 14px;
    padding: 0 0 0 10px;
    border-left: 2px solid #f1f2f6;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-menu .sub-menu li a {
    display: block;
    padding: 6px 10px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.sidebar-menu .sub-menu li a:hover {
    color: var(--color-primary-purple);
    background-color: var(--color-purple-light);
}

.sidebar-menu .sub-menu li.current-menu-item a {
    color: var(--color-primary-purple);
    font-weight: 700;
}

/* Action Button: + CREAR */
.sidebar-action-wrap {
    margin-top: 12px;
    padding: 0 2px;
}

.btn-sidebar-create {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--color-primary-purple);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.94rem;
    padding: 12px 20px;
    border-radius: var(--radius-btn);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
    transition: all 0.2s ease-in-out;
    width: 100%;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: center;
}

.btn-sidebar-create:hover {
    background: var(--color-primary-purple-hover);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}

.btn-sidebar-create:active {
    transform: translateY(0);
}

.btn-sidebar-create .btn-icon {
    font-size: 1rem;
    line-height: 1;
}

/* Main Content Area Header Compact Styling */
.app-main-wrapper .default-header {
    padding: 1.5rem 2.5rem 0.25rem 2.5rem !important;
    max-width: 100%;
}

.app-main-wrapper .default-header .container {
    padding: 0 !important;
}

.app-main-wrapper .default-header .category,
.app-main-wrapper .default-header .meta,
.app-main-wrapper .default-header .posted-on,
.app-main-wrapper .default-header .byline {
    display: none !important;
}

.app-main-wrapper .default-header .title,
.app-main-wrapper h1.title,
.app-main-wrapper .site-main h1 {
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 0 !important;
    margin-bottom: 0.35rem !important;
    line-height: 1.25;
}

.app-main-wrapper .default-header .subtitle {
    font-size: 1.05rem;
    color: #6b7280;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Compact Content Spacing */
.app-main-wrapper #content-wrapper {
    padding-top: 0.75rem !important;
}

.app-main-wrapper .entry-content > p:first-child,
.app-main-wrapper .entry-content > p:first-of-type {
    margin-top: 0 !important;
}

.app-main-wrapper .entry-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Hide date, category, excerpt, author and read more on cards */
.entry-item .entry-date,
.entry-item .entry-category,
.entry-item .entry-author,
.entry-item .entry-meta,
.entry-item .entry-excerpt,
.entry-item .entry-read-more,
.entry-item a.read-more,
.entry-item a.more-link {
    display: none !important;
}

/* Hide Featured Thumbnail on Pages & Single Content */
.post-thumbnail,
.site-thumbnail,
.entry-content > .post-thumbnail,
.entry-content > .site-thumbnail,
.site-main .post-thumbnail {
    display: none !important;
}

/* Mobile Topbar and Drawer Handling */
.app-mobile-topbar {
    display: none;
}

.sidebar-close-btn {
    display: none;
}

.app-sidebar-overlay {
    display: none;
}

/* Responsive Media Queries (< 1024px) */
@media screen and (max-width: 1023px) {
    .app-site-layout {
        flex-direction: column;
    }

    .app-mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
        background: #ffffff;
        border-bottom: 1px solid var(--sidebar-border);
        position: sticky;
        top: 0;
        z-index: 999;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    }

    .app-mobile-topbar .mobile-brand a {
        font-size: 1.18rem;
        font-weight: 800;
        color: var(--color-primary-purple);
        text-decoration: none;
    }

    .app-mobile-topbar .mobile-brand img {
        max-height: 40px;
        width: auto;
    }

    .mobile-nav-toggle {
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        outline: none;
    }

    .mobile-nav-toggle span {
        display: block;
        width: 22px;
        height: 2.5px;
        background-color: var(--color-text-dark);
        border-radius: 2px;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .app-sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        z-index: 10000;
        box-shadow: 6px 0 25px rgba(0, 0, 0, 0.15);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: #ffffff;
    }

    .app-sidebar.is-open {
        left: 0;
    }

    .sidebar-close-btn {
        display: block;
        align-self: flex-end;
        background: none;
        border: none;
        font-size: 1.6rem;
        color: var(--color-text-light);
        cursor: pointer;
        padding: 4px 8px;
        margin-bottom: 10px;
        line-height: 1;
    }

    .sidebar-close-btn:hover {
        color: var(--color-text-dark);
    }

    .app-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        backdrop-filter: blur(2px);
    }

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

    .app-main-wrapper .container,
    .app-main-wrapper #content-wrapper {
        padding: 1rem !important;
    }
}
