/**
 * Compass Virtual Airlines — Grav Theme CSS
 * ==========================================
 * compass-virtual/css/compass.css
 *
 * Design tokens:
 *   Wordmark:   Athelas Bold 56px, #FFFDF9
 *   Primary:    #6d97a8  (teal)
 *   Dark:       #4a7a8a  (dark teal)
 *   Light:      #e8f0f3  (light teal)
 *   Gold:       #c8962e  (accent)
 *   Background: #f2f4f5
 *
 * Adobe Fonts: https://use.typekit.net/pxa4kmb.css
 * Community:
 *   Discord:    https://discord.gg/k99egsnMF
 *   Facebook:   https://www.facebook.com/CompassVirtual
 *   TeamSpeak:  ts3.virtualflyers.online
 */

/* ============================================================
   CSS VARIABLES
   ============================================================ */

:root {
    --cv-teal:        #6d97a8;
    --cv-teal-dark:   #4a7a8a;
    --cv-teal-light:  #e8f0f3;
    --cv-wordmark:    #FFFDF9;
    --cv-grey-dark:   #4a4f5a;
    --cv-grey-mid:    #8a9099;
    --cv-grey-light:  #f2f4f5;
    --cv-gold:        #c8962e;
    --cv-gold-dark:   #b07820;
    --cv-white:       #ffffff;
    --cv-black:       #1a1a1a;
    --cv-danger:      #cc3300;
    --cv-success:     #2a7a40;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background: var(--cv-grey-light);
    color: var(--cv-black);
}

a { color: var(--cv-teal-dark); text-decoration: none; }
a:hover { color: var(--cv-gold); }

h1, h2, h3, h4, h5, h6 {
    color: var(--cv-teal-dark);
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 12px;
}

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

img { max-width: 100%; height: auto; }

/* ============================================================
   TOPBAR
   ============================================================ */

.cv-topbar {
    background: var(--cv-teal);
    padding: 4px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgba(255,255,255,0.8);
}

.cv-topbar-links { display: flex; gap: 0; }
.cv-topbar-links a {
    color: rgba(255,255,255,0.8);
    font-size: 11px;
    text-decoration: none;
    margin-left: 14px;
    transition: color 0.15s;
}
.cv-topbar-links a:hover { color: white; }

/* ============================================================
   HEADER
   ============================================================ */

.cv-header {
    background: var(--cv-teal);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--cv-gold);
}

.cv-wordmark {
    font-family: 'athelas', Georgia, serif;
    font-weight: 700;
    font-size: 56px;
    color: var(--cv-wordmark);
    letter-spacing: 10px;
    text-transform: uppercase;
    line-height: 1;
    text-decoration: none;
    transition: opacity 0.15s;
}
.cv-wordmark:hover { color: var(--cv-wordmark); opacity: 0.9; }

.cv-header-right { text-align: right; }

.cv-tagline {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cv-header-links {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

.cv-header-links a {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border: 0.5px solid rgba(255,255,255,0.5);
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}
.cv-header-links a:hover { background: rgba(255,255,255,0.15); color: white; }

.cv-btn-execu {
    background: var(--cv-gold) !important;
    color: white !important;
    border-color: var(--cv-gold) !important;
    font-weight: 500 !important;
}
.cv-btn-execu:hover { background: var(--cv-gold-dark) !important; border-color: var(--cv-gold-dark) !important; }

/* ============================================================
   NAVIGATION
   ============================================================ */

.cv-nav {
    background: var(--cv-teal-dark);
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
}

.cv-nav a {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    padding: 11px 14px;
    text-decoration: none;
    font-weight: 500;
    display: block;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.cv-nav a:hover,
.cv-nav a.active {
    color: white;
    background: rgba(255,255,255,0.1);
    border-bottom-color: var(--cv-gold);
}

.cv-nav-join {
    background: var(--cv-gold) !important;
    color: white !important;
    margin-left: 8px;
    border-radius: 4px;
    border-bottom: 2px solid transparent !important;
}
.cv-nav-join:hover { background: var(--cv-gold-dark) !important; }

.cv-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */

.cv-breadcrumb {
    background: var(--cv-teal-light);
    padding: 6px 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    border-bottom: 0.5px solid rgba(109,151,168,0.2);
    flex-wrap: wrap;
}
.cv-breadcrumb a { color: var(--cv-teal-dark); }
.cv-breadcrumb a:hover { color: var(--cv-gold); }
.cv-breadcrumb-sep { color: var(--cv-grey-mid); }
.cv-breadcrumb-current { color: var(--cv-teal-dark); font-weight: 500; }

/* ============================================================
   HERO — Homepage
   ============================================================ */

.cv-hero {
    background: var(--cv-teal-dark);
    padding: 48px 24px;
    position: relative;
    overflow: hidden;
}

.cv-hero-inner { max-width: 600px; position: relative; z-index: 2; }

.cv-hero h1 {
    color: white;
    font-size: 26px;
    font-weight: 400;
    margin: 0 0 10px;
    letter-spacing: 0.5px;
}

.cv-hero p {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin: 0 0 20px;
    line-height: 1.7;
}

.cv-hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.cv-btn-gold {
    background: var(--cv-gold);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    display: inline-block;
}
.cv-btn-gold:hover { background: var(--cv-gold-dark); color: white; }

.cv-btn-outline {
    background: transparent;
    color: white;
    border: 1.5px solid rgba(255,255,255,0.5);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    display: inline-block;
}
.cv-btn-outline:hover { background: rgba(255,255,255,0.1); color: white; }

/* ============================================================
   SECTION HERO
   ============================================================ */

.cv-section-hero {
    background: var(--cv-teal-dark);
    padding: 28px 24px;
    border-bottom: 3px solid var(--cv-gold);
}

.cv-section-hero h1 {
    color: white;
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 4px;
    letter-spacing: 0.5px;
}

.cv-section-hero p {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    margin: 0;
}

.cv-section-icon {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.8;
}

/* ============================================================
   DISCORD BAR
   ============================================================ */

.cv-discord-bar {
    background: #404eed;
    padding: 6px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: white;
    flex-wrap: wrap;
}
.cv-discord-bar a { color: white; font-weight: 500; text-decoration: underline; }
.cv-discord-bar svg { flex-shrink: 0; }

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

.cv-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
}

.cv-layout-two-col {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 20px;
    align-items: start;
}

.cv-main-content { min-width: 0; }

/* ============================================================
   PAGE CONTENT
   ============================================================ */

.cv-page-content {
    background: var(--cv-white);
    border-radius: 8px;
    border: 0.5px solid #dde0e4;
    padding: 24px;
    margin-bottom: 16px;
}

.cv-page-content h1 { font-size: 22px; border-bottom: 2px solid var(--cv-gold); padding-bottom: 10px; margin-bottom: 16px; display: inline-block; }
.cv-page-content h2 { font-size: 18px; margin-top: 24px; }
.cv-page-content h3 { font-size: 15px; }
.cv-page-content ul, .cv-page-content ol { padding-left: 20px; margin-bottom: 12px; }
.cv-page-content li { margin-bottom: 4px; }
.cv-page-content table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.cv-page-content th { background: var(--cv-teal-light); padding: 8px 12px; text-align: left; font-size: 12px; font-weight: 500; color: var(--cv-teal-dark); border-bottom: 0.5px solid rgba(109,151,168,0.2); }
.cv-page-content td { padding: 8px 12px; border-bottom: 0.5px solid #eef0f3; }
.cv-page-content tr:hover td { background: var(--cv-teal-light); }
.cv-page-content a { color: var(--cv-teal-dark); }
.cv-page-content a:hover { color: var(--cv-gold); }

/* ============================================================
   HOMEPAGE CARDS
   ============================================================ */

.cv-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.cv-card {
    background: var(--cv-white);
    border-radius: 8px;
    border: 0.5px solid #dde0e4;
    padding: 16px;
    transition: box-shadow 0.15s;
}
.cv-card:hover { box-shadow: 0 2px 8px rgba(109,151,168,0.15); }

.cv-card-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.cv-card h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--cv-teal-dark);
    margin: 0 0 6px;
}

.cv-card p {
    font-size: 12px;
    color: var(--cv-grey-mid);
    margin: 0 0 10px;
    line-height: 1.5;
}

.cv-card a {
    font-size: 12px;
    color: var(--cv-gold);
    text-decoration: none;
    font-weight: 500;
}

/* ============================================================
   WELCOME SECTION
   ============================================================ */

.cv-welcome {
    background: var(--cv-white);
    border-radius: 8px;
    border: 0.5px solid #dde0e4;
    padding: 20px;
    margin-bottom: 16px;
}

.cv-welcome h2 {
    font-size: 16px;
    font-weight: 500;
    color: var(--cv-teal-dark);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--cv-gold);
    display: inline-block;
}

.cv-welcome p {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    margin: 0 0 10px;
}

/* ============================================================
   DIVISION CARDS
   ============================================================ */

.cv-divs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.cv-div {
    background: var(--cv-white);
    border-radius: 8px;
    border: 0.5px solid #dde0e4;
    padding: 16px;
    border-top: 3px solid var(--cv-teal);
}

.cv-div--execu { border-top-color: var(--cv-gold); }

.cv-div h3 { font-size: 14px; font-weight: 500; margin: 0 0 6px; }
.cv-div p { font-size: 12px; color: var(--cv-grey-mid); margin: 0 0 10px; line-height: 1.5; }
.cv-div a { font-size: 12px; color: var(--cv-gold); font-weight: 500; }

/* ============================================================
   SECTION CARDS (section landing pages)
   ============================================================ */

.cv-section-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.cv-section-card {
    background: var(--cv-white);
    border-radius: 8px;
    border: 0.5px solid #dde0e4;
    padding: 18px;
    text-decoration: none;
    display: block;
    border-left: 3px solid var(--cv-teal);
    transition: box-shadow 0.15s, border-left-color 0.15s;
}
.cv-section-card:hover { box-shadow: 0 2px 10px rgba(109,151,168,0.15); border-left-color: var(--cv-gold); }

.cv-section-card-icon { font-size: 20px; margin-bottom: 8px; }
.cv-section-card h3 { font-size: 15px; font-weight: 500; color: var(--cv-teal-dark); margin: 0 0 6px; }
.cv-section-card p { font-size: 12px; color: var(--cv-grey-mid); margin: 0 0 10px; line-height: 1.5; }
.cv-section-card-link { font-size: 12px; color: var(--cv-gold); font-weight: 500; }

.cv-section-intro {
    background: var(--cv-white);
    border-radius: 8px;
    border: 0.5px solid #dde0e4;
    padding: 20px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.cv-sidebar { display: flex; flex-direction: column; gap: 12px; }

.cv-sb {
    background: var(--cv-white);
    border-radius: 8px;
    border: 0.5px solid #dde0e4;
    overflow: hidden;
}

.cv-sb h4 {
    font-size: 11px;
    font-weight: 500;
    color: var(--cv-teal-dark);
    margin: 0;
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--cv-teal-light);
    border-bottom: 0.5px solid rgba(109,151,168,0.2);
}

.cv-sb a {
    display: block;
    font-size: 12px;
    color: #555;
    text-decoration: none;
    padding: 6px 12px;
    border-bottom: 0.5px solid #f0f2f3;
    transition: color 0.15s, background 0.15s;
}
.cv-sb a:last-child { border-bottom: none; }
.cv-sb a:hover { color: var(--cv-teal-dark); background: var(--cv-teal-light); }

/* Community links in sidebar */
.cv-sb-community {
    display: flex !important;
    align-items: center;
    gap: 8px;
}
.cv-sb-discord { color: #5865F2 !important; }
.cv-sb-discord:hover { color: #4752c4 !important; }
.cv-sb-facebook { color: #1877F2 !important; }
.cv-sb-facebook:hover { color: #1461c0 !important; }
.cv-sb-forums { color: var(--cv-teal-dark) !important; }
.cv-sb-teamspeak {
    padding: 6px 12px;
    border-bottom: 0.5px solid #f0f2f3;
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--cv-grey-mid) !important;
}
.cv-ts-addr {
    font-family: monospace;
    font-size: 10px;
    color: var(--cv-grey-mid);
    margin-left: auto;
}

/* Online pilots in sidebar */
.cv-pilot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-bottom: 0.5px solid #f0f2f3;
    font-size: 12px;
}
.cv-pilot:last-child { border-bottom: none; }
.cv-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cv-pilot-name { color: #444; font-weight: 500; }
.cv-sb-loading { padding: 8px 12px; font-size: 12px; color: var(--cv-grey-mid); }

/* Travel poster — exactly 145x256px */
.cv-poster-wrap {
    background: var(--cv-grey-dark);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.cv-poster-frame {
    width: 145px;
    height: 256px;
    background: #1a2a35;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-poster-frame img {
    width: 145px;
    height: 256px;
    object-fit: cover;
}

.cv-poster-caption {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-align: center;
}

/* ============================================================
   LIVE TICKER
   ============================================================ */

.cv-ticker {
    background: var(--cv-grey-dark);
    padding: 5px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.cv-ticker-label {
    color: var(--cv-gold);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.cv-ticker-scroll { overflow: hidden; flex: 1; }

.cv-ticker-text {
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    white-space: nowrap;
    animation: cvTick 30s linear infinite;
    display: inline-block;
}

@keyframes cvTick {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

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

.cv-footer { background: var(--cv-teal-dark); }

.cv-footer-inner { padding: 20px 24px 12px; }

.cv-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.cv-footer h5 {
    color: var(--cv-gold);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 8px;
}

.cv-footer a {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    text-decoration: none;
    padding: 2px 0;
    transition: color 0.15s;
}
.cv-footer a:hover { color: white; }

.cv-footer-bottom {
    border-top: 0.5px solid rgba(255,255,255,0.12);
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}
.cv-footer-ts {
    display: block;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    padding: 2px 0;
    font-family: monospace;
}


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

@media (max-width: 900px) {
    .cv-layout-two-col { grid-template-columns: 1fr; }
    .cv-sidebar { order: -1; }
    .cv-footer-grid { grid-template-columns: repeat(2, 1fr); }
    .cv-cards { grid-template-columns: 1fr; }
    .cv-divs { grid-template-columns: 1fr; }
    .cv-section-cards { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .cv-wordmark { font-size: 36px; letter-spacing: 6px; }
    .cv-header { padding: 14px 16px; }
    .cv-nav { padding: 0 12px; }
    .cv-nav a { padding: 10px 10px; font-size: 12px; }
    .cv-nav-toggle { display: block; }
    .cv-topbar { display: none; }
    .cv-container { padding: 14px 16px; }
    .cv-footer-grid { grid-template-columns: 1fr 1fr; }
    .cv-hero { padding: 28px 16px; }
}

/* Mobile nav toggle */
@media (max-width: 600px) {
    .cv-nav { flex-wrap: wrap; }
    .cv-nav a:not(.cv-nav-join) { display: none; }
    .cv-nav.open a { display: block; width: 100%; }
    .cv-nav-toggle { display: block; order: -1; }
}
