/* ================================================
   APP PAGE SHARED STYLES
   Nav, footer, theme toggle – used by all app pages
   ================================================ */

/* CSS Variables – Light Mode */
:root {
    --bg-primary:     #ffffff;
    --bg-secondary:   #f5f5f7;
    --text-primary:   #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted:     #757575;
    --border-color:   #d2d2d7;
    --accent-color:   #f05820;
    --accent-hover:   #f06828;
    --badge-shadow:   rgba(232, 93, 4, 0.15);
    --shadow-color:   rgba(0, 0, 0, 0.08);
}

/* CSS Variables – Dark Mode */
[data-theme="dark"] {
    --bg-primary:     #0d0d0d;
    --bg-secondary:   #1a1a1a;
    --text-primary:   #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-muted:     #909090;
    --border-color:   #3d3d3d;
    --accent-color:   #ff7b45;
    --accent-hover:   #ff8c5a;
    --badge-shadow:   rgba(255, 123, 69, 0.25);
    --shadow-color:   rgba(0, 0, 0, 0.3);
}

/* Body override: disable centering from styles.css if inherited */
body.home-body {
    display: block;
    padding: 0;
    align-items: unset;
    justify-content: unset;
}

/* ================================================
   SITE NAV
   ================================================ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-nav.scrolled {
    box-shadow: 0 1px 24px var(--shadow-color);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo-img {
    height: 42px;
    width: auto;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    filter: none !important;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ================================================
   PILL SWITCHER (lang + theme)
   ================================================ */

.pill-switcher {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 50px;
    padding: 4px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.pill-switcher:hover {
    box-shadow: 0 4px 16px var(--shadow-color);
}

/* Language Switcher
   Two rules:
   1) Fix position:fixed conflict from old embedded CSS (specificity 20)
   2) Restore pill appearance that #1 would have killed (specificity 30) */

.nav-controls .language-switcher {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
    backdrop-filter: none;
    font-size: 13px;
    font-weight: 600;
}

.nav-controls .language-switcher.pill-switcher {
    background: var(--bg-secondary);
    border-radius: 50px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.nav-controls .language-switcher a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 50px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    background: transparent;
    font-weight: 600;
}

.nav-controls .language-switcher a:hover {
    color: var(--text-primary);
    background: transparent;
}

.nav-controls .language-switcher a.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--accent-color) 0%, #f7931e 100%) !important;
    box-shadow: 0 2px 8px var(--badge-shadow);
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.theme-toggle .moon-icon {
    position: absolute;
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

/* ================================================
   FOOTER
   ================================================ */

.footer-home {
    padding: 56px 24px 40px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    transition: border-color 0.3s ease;
}

.footer-home p {
    color: var(--text-muted);
}

.footer-home .footer-links {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.footer-home .footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 4px;
    transition: color 0.2s ease;
}

.footer-home .footer-links a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.footer-home .footer-links span {
    color: var(--border-color);
}

.footer-home .cookie-notice {
    margin-top: 20px;
    font-size: 11px;
    color: var(--text-muted);
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
}
