/* arrgus.css — shared styles for ARRGUS */
*, *::before, *::after { box-sizing: border-box; }

/* ── THEME VARIABLES ── */
:root {
    --bg:               #f4f4f4;
    --surface:          #ffffff;
    --surface-alt:      #f8fafc;
    --text:             #333333;
    --text-muted:       #555555;
    --text-light:       #64748b;
    --accent:           #007bff;
    --accent-dark:      #0056b3;
    --nav-bg:           #0069d9;
    --header-bg:        #007bff;
    --footer-bg:        #007bff;
    --border:           #dde3ec;
    --shadow:           rgba(0,0,0,0.10);
    --shadow-hover:     rgba(0,0,0,0.18);
    --link-card-bg:     #e9f0fb;
    --link-card-border: #c4d4ec;
    --link-card-hover:  #d0e0f8;
    --orange:           #f97316;
    --hf-heading:       #1a3c6d;
}

[data-theme="dark"] {
    --bg:               #0d1117;
    --surface:          #161b22;
    --surface-alt:      #1c2128;
    --text:             #e6edf3;
    --text-muted:       #adbac7;
    --text-light:       #768390;
    --accent:           #58a6ff;
    --accent-dark:      #79b8ff;
    --nav-bg:           #161b22;
    --header-bg:        #0a2d5e;
    --footer-bg:        #161b22;
    --border:           #30363d;
    --shadow:           rgba(0,0,0,0.40);
    --shadow-hover:     rgba(0,0,0,0.60);
    --link-card-bg:     #1c2128;
    --link-card-border: #30363d;
    --link-card-hover:  #22272e;
    --orange:           #fb923c;
    --hf-heading:       #79b8ff;
}

html { background-color: var(--bg); }

body {
    font-family: 'Segoe UI', system-ui, Roboto, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: transparent;
    color: var(--text);
    transition: background-color 0.2s, color 0.2s;
}

/* ── HEADER ── */
header {
    background-color: var(--header-bg);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    padding: 0.7rem 1.5rem;
    transition: background-color 0.2s;
}
header img {
    width: 120px; height: auto;
    border-radius: 6px;
    flex-shrink: 0;
    order: -1;
    display: block;
    margin: 0;
}
header h1 { margin: 0; font-size: 1.3rem; text-align: left; line-height: 1.2; }
header .subtitle { margin: 0.2rem 0 0; opacity: 0.85; font-size: 0.88rem; }
.header-text { display: flex; flex-direction: column; }
.org-name { font-size: 0.95rem; opacity: 0.82; line-height: 1.3; font-weight: 400; }

/* ── NAV ── */
nav {
    background-color: var(--nav-bg);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    transition: background-color 0.2s;
}
nav ul {
    list-style: none; padding: 0; margin: 0;
    display: flex; justify-content: center; flex-wrap: wrap;
}
nav a {
    color: white; text-decoration: none; font-weight: 600;
    padding: 0.65rem 1.1rem; display: inline-block;
    transition: background 0.2s; font-size: 0.95rem;
}
nav a:hover, nav a.active { background: rgba(255,255,255,0.18); text-decoration: none; }

/* ── THEME TOGGLE ── */
.theme-toggle {
    appearance: none; background: none;
    border: 1px solid rgba(255,255,255,0.35); border-radius: 4px;
    color: rgba(255,255,255,0.85); cursor: pointer;
    font-size: 1rem; padding: 0.3rem 0.65rem;
    margin: 0.3rem 0.6rem 0.3rem 2rem; transition: color 0.2s, border-color 0.2s; line-height: 1;
}
.theme-toggle:hover { color: #fff; border-color: rgba(255,255,255,0.75); }

/* ── CONTENT ── */
main {
    max-width: 1100px; margin: 2rem auto; padding: 0 1rem;
}
section {
    background-color: var(--surface);
    padding: 1rem; margin-bottom: 1.25rem;
    border-radius: 8px; box-shadow: 0 2px 4px var(--shadow);
    transition: background-color 0.2s;
}
section h2 {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.35rem; margin: 0 0 0.6rem;
}
h2 { color: var(--accent); }
h3 { color: var(--text); }
ul { padding-left: 1.5rem; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; }

/* ── FOOTER ── */
footer {
    text-align: center; padding: 1.25rem 1rem;
    background-color: var(--footer-bg); color: white;
    margin-top: 2rem; transition: background-color 0.2s;
}
footer p { margin: 0.3rem 0; }
.footer-copyright { font-size: 0.82rem; color: rgba(255,255,255,0.6); }
footer a { color: rgba(255,255,255,0.92); text-decoration: underline; }
footer a:hover { color: white; }

/* ── MEMBERS PAGE ── */
.content { max-width: 1100px; margin: 2rem auto; padding: 0 1rem; }
.intro { text-align: center; margin-bottom: 2rem; font-size: 1.05rem; color: var(--text-muted); }
.members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.1rem; list-style: none; padding: 0; margin: 0;
}
.member-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; padding: 1.1rem; transition: all 0.15s ease;
    text-decoration: none; color: inherit; display: flex;
    flex-direction: column; justify-content: center; min-height: 7.5rem;
    box-shadow: 0 1px 3px var(--shadow);
}
.member-card:hover {
    border-color: var(--accent); transform: translateY(-3px);
    box-shadow: 0 6px 14px var(--shadow-hover); color: inherit;
}
.callsign { color: var(--accent); font-weight: 700; font-size: 1.08rem; display: block; margin-bottom: 0.25rem; }
.name     { font-weight: 600; color: var(--text); display: block; }
.notes    { color: var(--text-light); font-size: 0.88rem; margin-top: 0.2rem; display: block; }
.highlight { color: var(--accent); font-weight: 600; }

/* ── OFFICERS PAGE ── */
.officer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.officer-card {
    background: var(--surface-alt); border: 1px solid var(--border);
    border-radius: 8px; padding: 1.25rem; transition: all 0.2s ease;
}
.officer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px var(--shadow-hover); border-color: var(--accent);
}
.role    { font-weight: 700; color: var(--accent); font-size: 1.05rem; margin-bottom: 0.3rem; display: block; }
.emeritus { font-style: italic; color: var(--text-light); }
.officer-grid .callsign {
    color: var(--orange); font-weight: 600; margin-left: 0.3rem;
    font-size: inherit; display: inline; margin-bottom: 0;
}
.officer-grid .callsign a { color: var(--orange); text-decoration: none; }
.officer-grid .callsign a:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.btn {
    display: inline-block; background: var(--accent); color: white;
    font-weight: 600; text-decoration: none; padding: 0.65rem 1.6rem;
    border-radius: 6px; transition: background 0.2s, transform 0.2s;
}
.btn:hover { background: var(--accent-dark); color: white; transform: translateY(-2px); }
.btn-center { text-align: center; margin-top: 1.5rem; }

/* ── BYLAWS PAGE ── */
.pdf-viewer { width: 100%; height: 85vh; }
.pdf-viewer embed { width: 100%; height: 100%; border: 1px solid var(--border); border-radius: 8px; }
.pdf-fallback-link { text-align: center; margin-top: 1rem; }

/* ── HOST FILES PAGE ── */
.links { list-style: none; padding: 0 0 0 1rem; max-width: 800px; }
.links li { margin: 1.2rem 0; }
.links a {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--link-card-bg);
    padding: 4px 10px; text-decoration: none; font-weight: bold;
    display: inline-block; border-radius: 3px;
    border: 1px solid var(--link-card-border);
    color: var(--accent); transition: all 0.2s;
}
.links a:hover { background-color: var(--link-card-hover); transform: translateX(4px); color: var(--accent); }
.download-section { background: var(--surface-alt); padding: 1.5rem; border-radius: 6px; transition: background-color 0.2s; }

/* ── HF ARCHIVE PAGE ── */
.container {
    max-width: 800px; margin: 40px auto; padding: 30px;
    background-color: var(--surface); border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow); transition: background-color 0.2s;
}
.container h1 {
    font-size: 2.1rem; margin-top: 0; color: var(--hf-heading);
    border-bottom: 2px solid var(--border); padding-bottom: 12px;
}
.container p { font-size: 1.1rem; margin: 1.4em 0; }
.legacy-section { margin-top: 2.5em; padding-top: 1.8em; border-top: 1px solid var(--border); }
.download-links a { display: block; margin: 0.9em 0; font-size: 1.15rem; }
.signature { margin-top: 3em; font-style: italic; color: var(--text-muted); text-align: center; font-size: 1.05rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    header h1 { font-size: 1.2rem; }
    main { padding: 0 0.75rem; }
    .theme-toggle { margin: 0.3rem 0.75rem; }
}
@media (max-width: 600px) { .content { padding: 0 0.75rem; } }

/* ── RADIO WAVE BACKGROUND ── */
#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
header, nav, main, footer, .container, .content { position: relative; z-index: 1; }
