/* Shared header and navigation styles */

/* ========================================
   GLOBAL RESETS & BASE STYLES
   ======================================== */

@font-face {
    font-family: 'BrunoAceSC';
    src: url('fonts/BrunoAceSC-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: white;
    background: #000000;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Standard page main content (with header offset) */
main {
    margin-top: 140px;
    padding: 60px 0;
}

/* Article-style page main content (narrower, more top padding) */
main.article-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 200px 30px 60px;
}

/* ========================================
   HEADER & NAVIGATION (injected by shared-header.js)
   ======================================== */

/* Mobile Content Menu Strategy: 'icons-only' or 'dropdown' */
:root {
    --mobile-content-strategy: 'icons-only';
}

header {
    background: #000000;
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    text-decoration: none;
}

.app-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

h1 {
    font-family: 'BrunoAceSC', sans-serif;
    color: #FFA500;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin: 0;
}

nav {
    display: flex;
    gap: 25px;
}

nav a {
    color: #DCAB6B;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

nav a:hover {
    color: #FFA500;
}

nav a.active {
    color: #ffffff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================
   SECONDARY MENU - Content Links
   ======================================== */

.brainwave-link {
    position: fixed;
    width: 100%;
    top: 90px;
    z-index: 999;
    background: #000000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.brainwave-link-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    padding-top: 12px;
    padding-bottom: 12px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.brainwave-link a {
    color: #DCAB6B;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(220, 171, 107, 0.08);
    border: 1px solid rgba(220, 171, 107, 0.2);
}

.brainwave-link a img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.brainwave-link a:hover {
    color: #FFA500;
    background: rgba(255, 165, 0, 0.12);
    border-color: rgba(255, 165, 0, 0.3);
}

.brainwave-link a.active {
    color: #ffffff;
    background: rgba(255, 165, 0, 0.15);
    border-color: rgba(255, 165, 0, 0.4);
}

/* ========================================
   PAGE TITLE & CONTENT SECTIONS
   ======================================== */

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #e6e6e6;
    text-align: center;
}

.intro {
    font-size: 18px;
    color: #e6e6e6;
    line-height: 1.8;
    margin-bottom: 60px;
}

.section {
    margin-bottom: 60px;
}

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #e6e6e6;
    margin-bottom: 20px;
}

.section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #DCAB6B;
    margin: 30px 0 15px;
}

.section p {
    font-size: 1.05rem;
    font-weight: 300;
    margin-bottom: 15px;
    line-height: 1.8;
}

.section ul, .section ol {
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.8;
    margin-left: 30px;
    margin-bottom: 20px;
}

.section li {
    font-size: 1.05rem;
    font-weight: 300;
    margin-bottom: 10px;
    line-height: 1.8;
}

/* ========================================
   ARTICLE TYPOGRAPHY (research & sleep pages)
   ======================================== */

.article-layout h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    color: #e6e6e6;
    margin-bottom: 40px;
    font-weight: 700;
    line-height: 1.3;
}

/* ========================================
   APP FOOTER (shared across content pages)
   ======================================== */

.app-footer {
    text-align: center;
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid rgba(220, 171, 107, 0.2);
}

.app-footer-title {
    font-family: 'BrunoAceSC', sans-serif;
    color: #FFA500;
    font-size: 2rem;
    margin-bottom: 20px;
}

.app-footer .app-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(255, 165, 0, 0.3);
    margin-bottom: 20px;
}

.app-footer .app-store-badge {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.app-footer .app-store-badge:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.app-footer .app-store-badge img {
    height: 60px;
    width: auto;
    display: block;
    max-width: 200px;
}

/* ========================================
   SITE FOOTER (index.html)
   ======================================== */

footer {
    background: rgba(0,0,0,0.8);
    padding: 40px 30px;
    text-align: center;
    margin-top: 80px;
}

footer p {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

footer a {
    color: #FFA500;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #FFD700;
}

/* ========================================
   REFERENCE SECTION
   ======================================== */

.reference {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(220, 171, 107, 0.2);
}

.reference a {
    color: #DCAB6B;
    text-decoration: none;
}

.reference a:hover {
    color: #FFA500;
    text-decoration: underline;
}

/* ========================================
   MOBILE STYLES
   ======================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0,0,0,0.95);
        flex-direction: column;
        padding: 20px 30px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        align-items: flex-end;
    }
    
    nav.active {
        display: flex;
    }
    
    /* Page title & section responsive */
    .page-title {
        font-size: 2rem;
    }
    
    .section h2 {
        font-size: 1.6rem;
    }
    
    .section h3 {
        font-size: 1.3rem;
    }
    
    .section p, .section li {
        font-size: 1rem;
    }
    
    /* Article responsive */
    .article-layout h2 {
        font-size: 28px;
    }
    
    .intro {
        font-size: 16px;
    }

    /* Strategy 1: Icons Only (default) - keeps content menu horizontal */
    body:not(.mobile-dropdown) .brainwave-link-content a span {
        display: none;
    }
    
    body:not(.mobile-dropdown) .brainwave-link-content a {
        padding: 12px 12px;
        min-width: auto;
    }
    
    /* Strategy 2: Dropdown - content menu becomes dropdown */
    body.mobile-dropdown .brainwave-link {
        position: relative;
    }
    
    body.mobile-dropdown .brainwave-link-content {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #000000;
        padding: 10px 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        z-index: 998;
    }
    
    body.mobile-dropdown .brainwave-link-content.active {
        display: flex;
    }
    
    body.mobile-dropdown .brainwave-link-content a {
        justify-content: flex-start;
        width: 100%;
    }
}
