/*
Theme Name: 	BuddyBoss Child
Theme URI: 		https://www.buddyboss.com/
Description: 	A child theme of BuddyBoss Theme. To ensure easy updates, make your own edits in this theme.
Author: 		BuddyBoss.com
Author URI: 	https://www.buddyboss.com/
License: 		GNU General Public License v3 or later
License URI: 	http://www.gnu.org/licenses/gpl-3.0.html
Template: 		buddyboss-theme
Version: 		1.0.1
*/

/* --- Design System Aura 2027 (Global) --- */
:root {
    --petrolio: #0f5665;
    --petrolio-dark: #0a3d4a;
    --petrolio-light: #e3f4f6;
    --oro: #D4AF37;
    --oro-dark: #b8962e;
    --sabbia: #FDF8F3;
    --bianco-puro: #ffffff;
    --testo-scuro: #1E2132;
    --testo-muted: #53616A;
    --bordo: rgba(15, 86, 101, 0.12);
}

/* --- Typography Sovereignty (v5.0) ---
   Outfit & Instrument Serif caricati localmente per garantire privacy e sovranità.
*/

/* Outfit - Pesi Principali */
@font-face {
    font-family: 'Outfit';
    src: url('/wp-content/uploads/2026/03/Outfit-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('/wp-content/uploads/2026/03/Outfit-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('/wp-content/uploads/2026/03/Outfit-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('/wp-content/uploads/2026/03/Outfit-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('/wp-content/uploads/2026/03/Outfit-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* Instrument Serif - Eleganza e Autorità */
@font-face {
    font-family: 'Instrument Serif';
    src: url('/wp-content/uploads/2026/03/InstrumentSerif-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Instrument Serif';
    src: url('/wp-content/uploads/2026/03/InstrumentSerif-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* Utility Base per l'Aura Style */
body {
    font-family: 'Outfit', sans-serif;
}

/* 1. Grandi Titoli Editoriali (Unico H1 e Titoli di Sezione) */
h1, .page-title, .dmc-serif-large {
    font-family: 'Instrument Serif', serif !important;
    font-weight: 400 !important;
    letter-spacing: 0.01em !important;
    line-height: 1.25 !important;
    -webkit-font-smoothing: antialiased;
}

/* Titolo Articolo Singolo (Massimo impatto editoriale) */
.single .entry-title {
    font-family: 'Instrument Serif', serif !important;
    font-weight: 400 !important;
    font-size: 3.5rem !important; /* Molto grande per visibilità hairlines */
    line-height: 1.1 !important;
}

/* 2. Titoli Griglia e Funzionali (Grid News, Directory Membri/Gruppi) 
   EVOLUZIONE v5.1: Usiamo Instrument Serif per un look più editoriale anche nella griglia */
.archive .entry-title, 
.blog .entry-title,
.bb-grid .entry-title,
.directory.members .item-title, 
.directory.groups .item-title {
    font-family: 'Instrument Serif', serif !important;
    font-weight: 400 !important;
    font-size: 1.8rem !important; /* Dimensione bilanciata per griglia */
    letter-spacing: 0.01em !important;
    line-height: 1.2 !important;
}

/* 3. FIX ARTICOLI SUGGERITI (Bottom of Single Post) 
   Riduciamo la dimensione perché "entry-title" di default è enorme */
.bb-related-posts .entry-title,
.related-posts .entry-title,
.upsell-posts .entry-title {
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    font-family: 'Outfit', sans-serif !important; /* Outfit per distinzione funzionale */
    line-height: 1.3 !important;
}


/* --- Tutor LMS Dashboard: Surgical Visibility Fix --- */
/* Corregge il testo nero su sfondo scuro quando la tab è selezionata nel dashboard */
.tutor-dashboard-menu-item.active .tutor-dashboard-menu-item-text,
.tutor-dashboard-menu-item.active .tutor-dashboard-menu-item-icon {
    color: #ffffff !important;
}

/* ============================================================ */
/* AURA 2027: STABILIZZAZIONE HEADER & GLOBAL FIXES            */
/* ============================================================ */





/* ============================================================ */
/* SIDEBAR CUSTOM STYLING - AURA MAJESTIC HOOKS                */
/* ============================================================ */

.dmc-sidebar-aura-hook {
    margin: 20px 0;
    padding: 0;
}

.dmc-sidebar-box {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(15, 86, 101, 0.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

.dmc-sidebar-box:hover {
    transform: translateY(-3px);
}

.dmc-sidebar-aura-trigger {
    background: #11333D;
    color: #fff;
    border: 1px solid rgba(212, 143, 79, 0.3);
}

.dmc-sidebar-title {
    font-family: 'Instrument Serif', serif;
    font-size: 24px;
    color: #d48f4f !important;
    margin-bottom: 8px;
    font-weight: 400;
    line-height: 1.1;
}

.dmc-sidebar-title-dark {
    font-family: 'Instrument Serif', serif;
    font-size: 24px;
    color: #0f5665 !important;
    margin-bottom: 12px;
    font-weight: 400;
    line-height: 1.1;
}

.dmc-sidebar-text {
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255,255,255,0.7);
    margin-bottom: 15px;
}


/* --- BetterDocs Aura Majestic Style --- */
.betterdocs-wrapper.betterdocs-single-wrapper {
    background-color: #ffffff !important;
}

/* ============================================================ */
/* AURA 2027: HEADER & BUDDYPANEL SYNC (RESTORATION v7.5)      */
/* ============================================================ */

/* 1. LAYER 1: PARENT RESET (No Clipping) */
html, body, #page, .site, .site-content, #content {
    overflow: visible !important;
}

/* 2. LAYER 2: HEADER SOVEREIGNTY (Fixed & Fullscreen) - BLINDATURA v9.0 */
html body #masthead, 
html body .site-header,
html body .site-header--bb,
html body header.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    z-index: 500 !important; /* LIVELLO 2: Sotto la sidebar, sopra il contenuto */
    background-color: #ffffff !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05) !important;
    margin: 0 !important;
    overflow: visible !important; 
}

/* 4. LAYER 4: BUDDYPANEL ALIGNMENT (Sidebar Sync) - BLINDATURA v9.0 */
html body #buddypanel.buddypanel,
html body .buddypanel {
    position: fixed !important;
    top: 70px !important; /* LOCK: Sempre sotto l'altezza dell'header */
    left: 0 !important;
    z-index: 400 !important; /* Sotto l'header masthead */
    height: calc(100vh - 70px) !important;
    margin: 0 !important;
}

/* Adjust for Admin Bar */
.admin-bar body #masthead, 
.admin-bar body .site-header {
    top: 32px !important;
}

html.admin-bar body #buddypanel.buddypanel,
html.admin-bar body .buddypanel {
    top: 102px !important; /* 32px admin bar + 70px header */
    height: calc(100vh - 102px) !important; 
}

/* Submenu visibility reinforcement v8.0 */
.bb-sub-menu, 
.sub-menu,
.primary-menu ul,
#primary-navbar ul {
    z-index: 510 !important; /* Sopra l'header ma sotto WP Admin Bar */
}

/* Mobile Admin Bar adjustments */
@media screen and (max-width: 782px) {
    .admin-bar #masthead, .admin-bar .site-header { top: 46px !important; }
    .admin-bar #buddypanel.buddypanel { top: 46px !important; height: calc(100vh - 46px) !important; }
}
