/* =============================================
   REPUBLIC OF LABRADORIA — Main Stylesheet
   ============================================= */

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

:root {
    --navy:   #002147;
    --navy2:  #003366;
    --gold:   #c8a84b;
    --gold2:  #f0d070;
    --white:  #ffffff;
    --light:  #f4f6f8;
    --mid:    #ebebeb;
    --text:   #212121;
    --muted:  #444444;
    --red:    #7a0000;
}

body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--text); background: var(--white); font-size: 16px; line-height: 1.6; }

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- NOTICE TAB (fixed top-left) ---- */
#notice-tab {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    background: var(--red);
    color: var(--gold2);
    font-family: Arial, sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px 4px 8px;
    text-decoration: none;
    border-bottom-right-radius: 4px;
    border-right: 1px solid rgba(200,168,75,0.4);
    border-bottom: 1px solid rgba(200,168,75,0.4);
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
#notice-tab:hover {
    background: #a00000;
    color: #fff;
    text-decoration: none;
}

/* ---- ALERT BANNER ---- */
.alert-banner { background: var(--red); color: var(--white); border-bottom: 3px solid var(--gold); padding: 14px 24px; }
.alert-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: flex-start; gap: 14px; }
.alert-icon { font-size: 1.4rem; flex-shrink: 0; color: var(--gold2); margin-top: 2px; }
.alert-banner strong { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1.5px; display: block; margin-bottom: 4px; color: var(--gold2); }
.alert-banner p { font-size: 0.83rem; line-height: 1.65; color: #f5ede8; margin: 0; }

/* ---- HEADER ---- */
.site-header { background: var(--navy); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 900; }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 68px; }
.header-brand { display: flex; align-items: center; gap: 14px; }
.coat-of-arms { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; object-position: center; flex-shrink: 0; }
.header-brand span { color: var(--white); font-size: 1.05rem; font-weight: 700; letter-spacing: 0.5px; }
.header-brand span em { color: var(--gold); font-style: normal; }

/* ---- NAV ---- */
nav { background: var(--navy2); border-bottom: 2px solid var(--gold); }
nav ul { max-width: 1200px; margin: 0 auto; list-style: none; display: flex; flex-wrap: nowrap; padding: 0 12px; overflow-x: auto; }
nav ul li a { display: block; color: #e0e8f0; text-decoration: none; padding: 10px 11px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; transition: background 0.18s, color 0.18s; white-space: nowrap; }
nav ul li a:hover, nav ul li a.active { background: var(--gold); color: var(--navy); text-decoration: none; }

/* ---- HERO ---- */
.hero { background: linear-gradient(135deg, var(--navy) 0%, #004080 100%); color: var(--white); padding: 80px 24px 70px; text-align: center; border-bottom: 4px solid var(--gold); }
.hero-seal { margin: 0 auto 28px; width: 180px; height: 180px; border-radius: 50%; border: 5px solid var(--gold); object-fit: cover; object-position: center; box-shadow: 0 8px 40px rgba(0,0,0,0.4); display: block; }
.hero h1 { font-size: 2.6rem; font-weight: 700; margin-bottom: 14px; letter-spacing: -0.5px; }
.hero p { font-size: 1.05rem; color: #b0c8e0; max-width: 580px; margin: 0 auto 32px; }
.hero-cta { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-block; padding: 13px 30px; font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border-radius: 2px; transition: background 0.2s, color 0.2s, border-color 0.2s; text-decoration: none; }
.btn-primary { background: var(--gold); color: var(--navy); border: 2px solid var(--gold); }
.btn-primary:hover { background: var(--gold2); border-color: var(--gold2); text-decoration: none; }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); text-decoration: none; }

/* ---- SECTIONS ---- */
.section { padding: 64px 24px; }
.section-alt { background: var(--light); }
.section-dark { background: var(--navy); color: var(--white); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 3px; color: var(--gold); margin-bottom: 10px; }
.section-dark .section-label { color: var(--gold2); }
.section h2 { font-size: 1.9rem; font-weight: 700; color: var(--navy); margin-bottom: 14px; }
.section-dark h2 { color: var(--white); }
.section-intro { color: #555555; font-size: 1rem; max-width: 640px; margin-bottom: 40px; }
.section-dark .section-intro { color: #a0b8cc; }
hr.gold-rule { border: none; border-top: 3px solid var(--gold); width: 48px; margin: 16px 0 32px; }

/* ---- WHAT IS LABRADORIA — 4 pillars ---- */
.pillars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.pillar { background: var(--white); border: 1px solid var(--mid); border-top: 4px solid var(--navy); padding: 28px 24px; }
.section-alt .pillar { background: var(--white); }
.pillar-icon { font-size: 2rem; margin-bottom: 14px; }
.pillar h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.pillar p { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }

/* ---- TERRITORY ITEMS ---- */
.territory-rules { margin-top: 0; }
.territory-item { background: var(--white); border: 1px solid var(--mid); border-left: 5px solid var(--navy); padding: 20px 24px; margin-bottom: 14px; display: flex; gap: 18px; align-items: flex-start; transition: border-color 0.2s, box-shadow 0.2s; }
.territory-item:hover { border-left-color: var(--gold); box-shadow: 0 4px 16px rgba(0,33,71,0.09); }
.territory-num { background: var(--navy); color: var(--gold); font-size: 0.78rem; font-weight: 700; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.territory-item h4 { color: var(--navy); margin-bottom: 4px; font-size: 0.97rem; }
.territory-item p { font-size: 0.86rem; line-height: 1.65; color: var(--muted); margin: 0; }
.territory-tag { display: inline-block; background: #eef2f8; border: 1px solid #b0c0d8; color: #3a5278; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 2px 8px; margin-bottom: 6px; border-radius: 2px; }

/* ---- GET INVOLVED ---- */
.involve-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.involve-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(200,168,75,0.3); padding: 28px 24px; }
.involve-card h3 { color: var(--gold2); font-size: 1rem; margin-bottom: 10px; }
.involve-card p { font-size: 0.86rem; color: #a0b8cc; line-height: 1.65; margin-bottom: 18px; }
.involve-card .btn { font-size: 0.78rem; padding: 9px 18px; }

/* ---- NEWS GRID ---- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.news-card { background: var(--white); border: 1px solid var(--mid); border-top: 4px solid var(--navy); padding: 24px; transition: box-shadow 0.2s, transform 0.2s; }
.news-card:hover { box-shadow: 0 6px 20px rgba(0,33,71,0.1); transform: translateY(-2px); }
.news-card .date { font-size: 0.7rem; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.news-card h4 { color: var(--navy); margin-bottom: 8px; font-size: 0.97rem; }
.news-card p { font-size: 0.86rem; line-height: 1.6; color: var(--muted); }
.news-read-more { display: inline-block; margin-top: 40px; font-size: 0.85rem; font-weight: 700; color: var(--navy); border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.news-read-more:hover { color: var(--gold); text-decoration: none; }

/* ---- TERMS OF OFFICE ---- */
.terms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.term-card { background: var(--white); border: 1px solid var(--mid); padding: 24px; border-top: 4px solid var(--gold); }
.term-card .role { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); margin-bottom: 8px; }
.term-card h4 { color: var(--navy); font-size: 1rem; margin-bottom: 8px; }
.term-card p { font-size: 0.86rem; color: var(--muted); line-height: 1.6; }

/* ---- DEPARTMENTS ---- */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.dept-grid a { display: block; background: rgba(255,255,255,0.07); border: 1px solid rgba(200,168,75,0.35); padding: 18px 20px; color: var(--white); transition: background 0.2s; text-decoration: none; }
.dept-grid a:hover { background: var(--gold); color: var(--navy); }
.dept-grid a .ql-title { font-weight: 700; display: block; margin-bottom: 4px; font-size: 0.88rem; }
.dept-grid a .ql-sub { font-size: 0.7rem; color: rgba(255,255,255,0.5); }
.dept-grid a:hover .ql-sub { color: rgba(0,33,71,0.65); }

/* ---- SYMBOLS ---- */
.symbols { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-top: 32px; }
.symbol { text-align: center; }
.symbol img { width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--gold); object-fit: cover; display: block; margin: 0 auto 10px; }
.symbol p { font-size: 0.83rem; color: var(--muted); }

/* ---- FOOTER SEAL ---- */
.seal-footer { text-align: center; margin-bottom: 24px; }
.seal-footer img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; object-position: center; border: 3px solid var(--gold); opacity: 0.9; }

/* ---- FOOTER ---- */
footer { background: #001428; color: #8899aa; padding: 48px 24px 28px; border-top: 3px solid var(--gold); }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer-col h4 { color: var(--white); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px; }
.footer-col p { font-size: 0.82rem; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul li a { color: #8899aa; font-size: 0.82rem; }
.footer-col ul li a:hover { color: var(--gold); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px; text-align: center; font-size: 0.78rem; }
.footer-bottom a { color: var(--gold); }

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.reveal { opacity:0; transform:translateY(16px); transition: opacity 0.35s ease, transform 0.35s ease; will-change: opacity, transform; }
.reveal.visible { opacity:1; transform:translateY(0); will-change: auto; }

/* ===== NAME HIGHLIGHTING ===== */
.name-highlight {
    background: transparent;
    padding: 0;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    color: inherit;
    border-bottom: 2px dashed #DAA520;
    position: relative;
    display: inline-block;
    transition: all 0.2s;
}

.name-highlight:hover {
    border-bottom-style: solid;
}

.name-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #002147;
    border: 1px solid #DAA520;
    border-radius: 3px;
    padding: 8px 0;
    z-index: 1000;
    white-space: nowrap;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0,33,71,0.3);
}

.name-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #002147;
}

.name-highlight:hover .name-tooltip {
    display: block;
}

.name-tooltip-link {
    display: block;
    padding: 6px 16px;
    color: #DAA520;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(218,165,32,0.3);
}

.name-tooltip-link:last-child {
    border-bottom: none;
}

.name-tooltip-link:hover {
    background: #DAA520;
    color: #002147;
    text-decoration: none;
}

.name-highlight-buttons {
    display: inline-flex;
    gap: 6px;
    margin-left: 8px;
    vertical-align: middle;
}

.name-btn {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.2s;
}

.name-btn-office {
    background: var(--navy);
    color: var(--gold);
    border: 1px solid var(--navy);
}

.name-btn-office:hover {
    background: var(--gold);
    color: var(--navy);
}

.name-btn-founders {
    background: var(--gold);
    color: var(--navy);
    border: 1px solid var(--gold);
}

.name-btn-founders:hover {
    background: var(--navy);
    color: var(--gold);
}

/* ---- LANGUAGE SWITCHER ---- */
.lang-switcher {
    display: none; /* auto-detect by IP runs silently; show buttons by removing this line */
    align-items: center;
    gap: 4px;
}
.lang-btn {
    background: transparent;
    border: 1px solid rgba(200,168,75,0.4);
    color: rgba(255,255,255,0.75);
    padding: 4px 9px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
    text-transform: uppercase;
    font-family: inherit;
    line-height: 1;
}
.lang-btn:hover, .lang-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
}
@media (max-width: 600px) {
    .lang-btn { padding: 3px 6px; font-size: 0.62rem; }
}

/* ---- BACK TO TOP ---- */
#back-to-top { position:fixed; bottom:28px; right:28px; background:var(--navy); color:var(--gold); border:2px solid var(--gold); padding:10px 14px; font-size:1.1rem; cursor:pointer; display:none; z-index:999; transition:background 0.2s; }
#back-to-top:hover { background:var(--gold); color:var(--navy); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 2rem; }
}
@media (max-width: 600px) {
    .footer-cols { grid-template-columns: 1fr; }
    .header-brand span { display: none; }
    .hero h1 { font-size: 1.6rem; }
    .hero-seal { width: 130px; height: 130px; }
}
