/* New Header CSS - Extracted from production (21/03/2026)
   Used by: views/includes/new_header.php
   Replaces: plugins/menu/menu.css (old dark navbar)
*/

:root {
    --primary: #357a1a;
    --primary-light: #a8e063;
    --primary-dark: #3d8a1e;
    --text: #3F3F3F;
    --bg: #f8f9fa;
    --bg-light: #f0f7eb;
    --card: #ffffff;
    --footer: #2c2c2c;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 16px;
    --transition: 0.3s ease;
}

/* READING PROGRESS BAR */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, #357a1a, #a8e063); z-index: 10000; }

/* SKIP LINK */
.skip-link { position: absolute; top: -100%; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 12px 24px; border-radius: 0 0 8px 8px; z-index: 100001; font-weight: 700; transition: top 0.3s ease; }
.skip-link:focus { top: 0; }

/* TOP PANEL */
.top-panel { background: #f0f7eb; padding: 8px 0; overflow: hidden; }
.top-panel-inner { display: flex; justify-content: center; align-items: center; gap: 0; max-width: 900px; margin: 0 auto; }
.top-panel-link { flex: 1; text-align: center; padding: 14px 24px; font-size: 1.1rem; font-weight: 700; color: #3F3F3F; text-decoration: none; position: relative; transition: color 0.3s ease, background 0.3s ease; border-left: 1px solid #e0e0e0; }
.top-panel-link:last-child { border-left: none; }
.top-panel-link::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 3px; background: var(--primary); border-radius: 2px; transition: width 0.3s ease; }
.top-panel-link:hover { color: var(--primary); background: rgba(79,166,39,0.05); }
.top-panel-link:hover::after { width: 60%; }
.top-panel-link i { margin-left: 8px; font-size: 0.9rem; }

/* NAVBAR */
.navbar { background: #fff; box-shadow: 0 2px 20px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 1000; overflow: visible; }
.navbar-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: flex-start; padding: 8px 20px; gap: 10px; box-sizing: border-box; }
.logo-wrapper { flex-shrink: 0; z-index: 1001; margin-top: -83px; margin-bottom: -60px; margin-right: -5px; transition: margin-top 0.3s ease, margin-bottom 0.3s ease; }
.navbar.scrolled .logo-wrapper { margin-top: -17px; margin-bottom: -139px; }
.logo-img { height: 142px; width: auto; object-fit: contain; transition: transform 0.3s ease; }
.logo-img:hover { transform: scale(1.05); }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-link { color: var(--text); text-decoration: none; font-weight: 600; padding: 8px 16px; border-radius: 8px; transition: background 0.3s ease, color 0.3s ease; font-size: 0.95rem; white-space: nowrap; }
.nav-link:hover { background: var(--bg-light); color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.btn-register { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 25px; background: transparent; color: #357a1a; border: 2px solid #357a1a; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.3s; text-decoration: none; white-space: nowrap; }
.btn-register:hover { background: #357a1a; color: #fff; }
.btn-login { background: linear-gradient(135deg, #357a1a, #a8e063); color: #fff; padding: 10px 24px; border-radius: 25px; text-decoration: none; font-weight: 700; transition: transform 0.3s ease, box-shadow 0.3s ease; font-size: 0.95rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79,166,39,0.35); }
.theme-toggle { background: none; border: 2px solid var(--primary); border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--primary); transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease; position: relative; }
.theme-toggle:hover { background: var(--primary); color: #fff; }

/* USER BAR */
.user-bar { padding: 4px 0 8px; border-top: none; }
.user-bar-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; padding: 0 264px 0 20px; gap: 10px; direction: rtl; position: relative; }
.user-bar-inner .btn-login { margin-left: 281px; }
.user-bar .user-greeting { font-size: 14px; color: var(--primary); font-weight: 700; white-space: nowrap; }
.user-bar .user-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background 0.2s; border: none; cursor: pointer; }
.user-btn.green { background: #e8f5e9; color: #2e7d32; }
.user-btn.green:hover { background: #c8e6c9; }
.user-btn.blue { background: #e3f2fd; color: #1565c0; }
.user-btn.blue:hover { background: #bbdefb; }
.user-btn.logout { background: #fce4ec; color: #c62828; }
.user-btn.logout:hover { background: #ffcdd2; }
.user-bar .user-settings { background: none; border: 2px solid var(--primary); border-radius: 50%; width: 32px; min-width: 32px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--primary); transition: background 0.3s, color 0.3s; position: absolute; left: 42px; top: 50%; transform: translateY(-50%); z-index: 1; }
.user-bar .user-settings:hover { background: var(--primary); color: #fff; }

/* Variation Dropdown */
.variation-dropdown { display: none; position: absolute; top: 50px; left: 0; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.2); min-width: 240px; z-index: 10001; overflow: hidden; }
.variation-dropdown.open { display: block; }
.variation-dropdown a { display: block; padding: 10px 16px; color: #333; text-decoration: none; font-size: 14px; border-bottom: 1px solid #f0f0f0; transition: background 0.2s; }
.variation-dropdown a:hover { background: #f0f7eb; color: var(--primary); }
.variation-dropdown a:last-child { border-bottom: none; }
.variation-dropdown .vd-header { padding: 12px 16px; font-weight: bold; color: var(--primary); background: #f8f9fa; font-size: 13px; }
.user-bar .user-settings + .user-btn { position: absolute !important; left: -95px; top: 50%; transform: translateY(-50%); z-index: 1; }

/* Nav Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; right: 0; background: #fff; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.15); min-width: 180px; z-index: 10002; overflow: hidden; border: 1px solid #e9ecef; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 10px 18px; color: #333; text-decoration: none; font-size: 14px; font-weight: 500; border-bottom: 1px solid #f0f0f0; transition: background 0.2s, color 0.2s; white-space: nowrap; }
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { background: #f0f7eb; color: var(--primary); }

/* MOBILE OVERRIDES (body.is-mobile) - JS-injected class */
body.is-mobile .logo-wrapper {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
body.is-mobile .logo-img {
    height: 80px !important;
}
body.is-mobile .nav-links {
    display: none !important;
}
body.is-mobile .nav-links.mobile-open {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998 !important;
    background: rgba(34,34,34,0.97) !important;
    padding-top: 60px !important;
    align-items: center !important;
    overflow-y: auto;
}
body.is-mobile .nav-links.mobile-open .nav-link {
    white-space: normal !important;
    font-size: 18px !important;
    padding: 16px 20px !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    width: 100%;
    text-align: center;
}
body.is-mobile .nav-actions {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
body.is-mobile .top-panel-link {
    font-size: 0.85rem;
    padding: 10px 12px;
}

/* DARK MODE */
body.dark-mode { --bg: #1a1a2e; --bg-light: #16213e; --card: #1f2937; --text: #e0e0e0; --footer: #0f0f1a; }
body.dark-mode .navbar { background: #1f2937 !important; }
body.dark-mode .top-panel { background: #16213e !important; }
