/* ============================================================
   BORGIALAND ABENTEUER - MODERN HOMEPAGE
   Independent homepage styling.
   Existing TravianZ functionality is kept in index.php.
   ============================================================ */

:root {
    --bg: #10110f;
    --bg-soft: #181914;
    --panel: #22231e;
    --panel-light: #2c2d26;
    --paper: #eee5ce;
    --paper-dark: #d3c39f;
    --ink: #302b20;
    --muted: #a7a18f;
    --gold: #d7a84d;
    --gold-light: #f0ca72;
    --green: #6d9f3b;
    --green-light: #8fc25a;
    --red: #9f3d32;
    --line: rgba(215,168,77,.28);
    --shadow: 0 18px 50px rgba(0,0,0,.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body.borgia-home {
    background:
        radial-gradient(circle at 50% 0%, rgba(105,129,71,.15), transparent 32rem),
        var(--bg);
    color: #eee;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

.borgia-home a {
    color: inherit;
    text-decoration: none;
}

.site-shell {
    min-height: 100vh;
    overflow: hidden;
}

/* ------------------------------------------------------------
   TOPBAR
   ------------------------------------------------------------ */

.topbar {
    position: absolute;
    z-index: 100;
    top: 30px;
    left: 0;
    width: 100%;
    background: linear-gradient(
        to bottom,
        rgba(12,13,11,.90),
        rgba(12,13,11,.62)
    );
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(215,168,77,.24);
    backdrop-filter: blur(7px);
}

.topbar-inner {
    width: min(1240px, calc(100% - 40px));
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
    min-width: 235px;
}

.brand-small {
    color: #b9b39f;
    font-size: 9px;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.brand-title {
    color: #f1d18a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #000;
}

.brand-subtitle {
    color: #e8e0cb;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-top: 5px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    padding: 10px 14px;
    color: #ded9ca;
    font-size: 13px;
    transition: .2s ease;
    border: 1px solid transparent;
}

.main-nav a:hover {
    color: #fff;
    border-color: rgba(215,168,77,.25);
    background: rgba(255,255,255,.04);
}

.main-nav .nav-register {
    color: #1d2117;
    background: linear-gradient(#f2ca73, #bd8731);
    border-color: #f4d48d;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,.25);
}

.main-nav .nav-register:hover {
    color: #171812;
    background: linear-gradient(#ffe099, #d49a3c);
}

.main-nav .nav-login {
    border-color: rgba(255,255,255,.20);
}

/* language bar */

.language-bar {
    position: absolute;
    z-index: 120;
    top: 0;
    right: 0;
    height: 30px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    background: rgba(8,9,8,.82);
    border-left: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(215,168,77,.18);
}

#flags {
    font-size: 11px;
}

/* ------------------------------------------------------------
   HERO
   ------------------------------------------------------------ */

.hero {
    position: relative;
    min-height: 690px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    /* BorgiaLand hero artwork */
    background:
        linear-gradient(
            to bottom,
            rgba(0,0,0,.04) 0%,
            rgba(0,0,0,.02) 42%,
            rgba(8,10,7,.78) 100%
        ),
        url("images/borgialand-hero.jpg") center top / cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(0,0,0,.18), transparent 28%, transparent 72%, rgba(0,0,0,.18)),
        radial-gradient(ellipse at center, transparent 20%, rgba(0,0,0,.16) 100%);
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 10%, rgba(0,0,0,.20) 75%),
        linear-gradient(to bottom, rgba(0,0,0,.20), transparent 35%, rgba(0,0,0,.72));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(820px, calc(100% - 40px));
    margin-top: 127px;
    transform: translateY(-5px);
}

.hero-kicker {
    color: #ead39b;
    font-size: 11px;
    letter-spacing: 5px;
    font-weight: bold;
    text-shadow: 0 2px 8px #000;
}

.hero h1 {
    margin: 14px 0 10px;
    color: #f6ead0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(58px, 8vw, 98px);
    font-weight: normal;
    line-height: .85;
    text-shadow:
        0 3px 0 rgba(0,0,0,.45),
        0 10px 35px rgba(0,0,0,.8);
}

.hero h1 strong {
    color: #d9aa4f;
    font-size: .53em;
    letter-spacing: 9px;
    text-transform: uppercase;
}

.hero-logo {
    display: block;
    width: min(760px, 92%);
    height: auto;
    margin: 0 auto 22px;
    object-fit: contain;
    filter:
        drop-shadow(0 10px 18px rgba(0,0,0,.55))
        drop-shadow(0 2px 3px rgba(0,0,0,.70));
}

.hero-text {
    max-width: 600px;
    margin: 30px auto;
    color: #eee9db;
    font-size: 17px;
    text-shadow: 0 2px 8px #000;
}

.hero-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 235px;
    padding: 13px 25px 12px;
    color: #2b2315;
    background: linear-gradient(#f3cd78, #b87926);
    border: 1px solid #f8df9f;
    border-radius: 4px;
    box-shadow:
        0 5px 0 rgba(69,43,11,.55),
        0 14px 35px rgba(0,0,0,.38);
    transition: transform .18s ease, filter .18s ease;
}

.hero-button:hover {
    color: #1c170e;
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.button-main {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: bold;
}

.button-sub {
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hero-note {
    margin-top: 16px;
    color: #c5bea9;
    font-size: 11px;
    letter-spacing: 1px;
}

.hero-scroll {
    position: absolute;
    z-index: 3;
    bottom: 15px;
    left: 50%;
    color: rgba(255,255,255,.55);
    font-size: 30px;
}

/* ------------------------------------------------------------
   STATS
   ------------------------------------------------------------ */

.stats-strip {
    position: relative;
    z-index: 10;
    background: #181914;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid rgba(215,168,77,.16);
    box-shadow: 0 12px 35px rgba(0,0,0,.25);
}

.stats-inner {
    width: min(1180px, calc(100% - 40px));
    min-height: 112px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1.7fr;
    align-items: center;
}

.stat {
    min-height: 65px;
    padding: 0 25px;
    border-right: 1px solid rgba(255,255,255,.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.stat-value {
    color: #f0d08b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    line-height: 1;
}

.stat-label {
    color: #8f8b7b;
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-top: 5px;
    text-transform: uppercase;
}

.online-dot {
    width: 7px;
    height: 7px;
    position: absolute;
    top: 3px;
    left: 13px;
    border-radius: 50%;
    background: #79bd45;
    box-shadow: 0 0 9px #79bd45;
}

.stat-description {
    padding-left: 40px;
    display: flex;
    flex-direction: column;
}

.stat-description strong {
    color: #e9e1ce;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
}

.stat-description span {
    color: #888574;
    font-size: 12px;
}

/* ------------------------------------------------------------
   MAIN
   ------------------------------------------------------------ */

.main-content {
    background:
        radial-gradient(circle at 50% 0%, rgba(117,135,79,.08), transparent 35rem),
        var(--bg);
}

.intro-section,
.features-section,
.media-section,
.final-cta {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.intro-section {
    padding: 90px 0 70px;
}

.section-heading {
    text-align: center;
    margin-bottom: 45px;
}

.section-heading.compact {
    margin-bottom: 30px;
}

.eyebrow {
    color: #b8924d;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.section-heading h2,
.panel-heading h2,
.final-cta h2 {
    margin: 7px 0 10px;
    color: #eee5d1;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    font-weight: normal;
}

.heading-line {
    display: block;
    width: 55px;
    height: 2px;
    margin: 15px auto 0;
    background: var(--gold);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 70px;
    align-items: center;
}

.intro-text {
    color: #b5b1a2;
    font-size: 15px;
}

.intro-text .lead {
    color: #e0dbc9;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    line-height: 1.55;
}

.text-button {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
    padding-bottom: 5px;
    color: #d9b05b;
    border-bottom: 1px solid #80602c;
    font-weight: bold;
}

.text-button:hover {
    color: #f3d489;
}

.tribe-cards {
    display: grid;
    gap: 12px;
}

.tribe-card {
    min-height: 80px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #24251f, #191a16);
    border: 1px solid rgba(215,168,77,.18);
    border-left: 3px solid var(--gold);
    box-shadow: 0 10px 25px rgba(0,0,0,.20);
}

.tribe-card strong {
    display: block;
    color: #e8e0cd;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
}

.tribe-card small {
    color: #858273;
    font-size: 11px;
}

.tribe-icon {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(215,168,77,.45);
    border-radius: 50%;
    color: #d6ae5a;
    font-family: Georgia, serif;
    font-size: 21px;
}

/* ------------------------------------------------------------
   FEATURES
   ------------------------------------------------------------ */

.features-section {
    padding: 20px 0 80px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    min-height: 190px;
    padding: 28px;
    position: relative;
    background: linear-gradient(145deg, #25261f, #191a16);
    border: 1px solid rgba(215,168,77,.15);
}

.feature-number {
    color: rgba(215,168,77,.38);
    font-family: Georgia, serif;
    font-size: 42px;
    line-height: 1;
}

.feature-card h3 {
    color: #e8e0cd;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    margin: 12px 0 7px;
}

.feature-card p {
    color: #8e8b7e;
    font-size: 13px;
    margin: 0;
}

/* ------------------------------------------------------------
   MEDIA
   ------------------------------------------------------------ */

.media-section {
    padding: 10px 0 85px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel {
    background: #20211c;
    border: 1px solid rgba(215,168,77,.17);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-heading {
    min-height: 86px;
    padding: 22px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, #2b2c25, #22231e);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.panel-heading h2 {
    font-size: 23px;
    margin: 4px 0 0;
}

.gallery-controls {
    display: flex;
    gap: 7px;
}

.gallery-controls a,
.screenshot-overlay .navi {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #d5c8a8;
    background: #171813;
    border: 1px solid rgba(215,168,77,.25);
    font-size: 24px;
}

.gallery-controls a:hover,
.screenshot-overlay .navi:hover {
    color: #fff;
    border-color: var(--gold);
}

#screenshots_preview {
    padding: 22px;
    overflow: hidden;
}

#screenshot_list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#screenshot_list li {
    margin: 0;
}

#screenshot_list img {
    display: block;
    width: 100%;
    height: 92px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.12);
    transition: transform .2s ease, filter .2s ease;
}

#screenshot_list img:hover {
    transform: scale(1.03);
    filter: brightness(1.15);
}

.news-content {
    min-height: 170px;
    padding: 20px 25px;
    color: #aaa697;
}

.news-content h4 {
    color: #e2d7bd;
    font-family: Georgia, serif;
    margin: 0 0 4px;
}

.news-content p {
    margin: 0 0 14px;
}

.news-content .date {
    color: #827f72;
    font-size: 11px;
}

/* ------------------------------------------------------------
   CTA
   ------------------------------------------------------------ */

.final-cta {
    position: relative;
    margin-bottom: 80px;
    padding: 85px 30px;
    text-align: center;
    background:
        linear-gradient(rgba(20,23,17,.78), rgba(20,23,17,.90)),
        radial-gradient(circle at center, #65764f, #222d21 60%, #151914);
    border: 1px solid rgba(215,168,77,.24);
    box-shadow: var(--shadow);
}

.final-cta h2 {
    font-size: 42px;
}

.final-cta p {
    color: #aaa797;
    margin: 0 auto 25px;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */

.site-footer {
    background: #0b0c0a;
    border-top: 1px solid rgba(215,168,77,.16);
}

.footer-inner {
    width: min(1180px, calc(100% - 40px));
    min-height: 150px;
    margin: 0 auto;
    padding: 35px 0;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-brand strong {
    color: #d8b365;
    font-family: Georgia, serif;
    font-size: 23px;
}

.footer-brand span {
    color: #777468;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 15px;
}

.footer-links a {
    color: #777468;
    font-size: 11px;
}

.footer-links a:hover {
    color: #d8b365;
}

.footer-copy {
    grid-column: 1 / -1;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,.05);
    color: #55544e;
    font-size: 10px;
    text-align: right;
}

/* ------------------------------------------------------------
   OVERLAYS
   ------------------------------------------------------------ */

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.overlay .mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(4px);
}

.overlay_content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(500px, calc(100% - 30px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    transform: translate(-50%, -50%);
    background: #20211c;
    border: 1px solid rgba(215,168,77,.40);
    box-shadow: 0 30px 80px rgba(0,0,0,.70);
}

.overlay-close {
    position: absolute;
    z-index: 3;
    top: 13px;
    right: 16px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #c7b994;
    font-size: 25px;
}

.overlay-title {
    padding: 30px 30px 10px;
    text-align: center;
}

.overlay-title h2,
.overlay-title h3 {
    margin: 5px 0 0;
    color: #eee5d1;
    font-family: Georgia, serif;
    font-size: 27px;
    font-weight: normal;
}

.world_list {
    list-style: none;
    margin: 0;
    padding: 25px;
}

.world_list li {
    min-height: 64px;
    position: relative;
    background-position: left center;
    background-size: cover;
    border: 1px solid rgba(255,255,255,.12);
}

.world_list li img.w_button {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.world_list li div {
    position: absolute;
    z-index: 3;
    color: #fff;
    text-shadow: 0 1px 4px #000;
}

.world_list .label_players { left: 235px; top: 14px; }
.world_list .label_online { left: 235px; top: 33px; }
.world_list .players { right: 20px; top: 14px; color: #f0d08b; }
.world_list .online { right: 20px; top: 33px; color: #9bc76e; }

.screenshot-overlay {
    width: min(900px, calc(100% - 30px));
    padding-bottom: 30px;
    text-align: center;
}

.screenshot-overlay .screenshot_view {
    padding: 0 30px 20px;
}

.screenshot-overlay #screen_view {
    display: block;
    max-width: 100%;
    max-height: 62vh;
    margin: 0 auto;
    border: 1px solid rgba(255,255,255,.15);
}

.screenshot-overlay #screen_desc {
    max-width: 700px;
    margin: 15px auto 0;
    color: #aaa697;
    font-size: 13px;
}

.screenshot-overlay .navi {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.screenshot-overlay .navi.prev {
    left: 15px;
}

.screenshot-overlay .navi.next {
    right: 15px;
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 900px) {

    .topbar-inner {
        min-height: 70px;
    }

    .brand {
        min-width: 0;
    }

    .brand-title {
        font-size: 25px;
    }

    .main-nav a {
        padding: 8px 8px;
        font-size: 11px;
    }

    .stats-inner {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-description {
        display: none;
    }

    .intro-grid,
    .media-section {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {

    .topbar {
        position: relative;
        top: 0;
    }

    .language-bar {
        position: absolute;
        top: 0;
        right: 0;
    }

    .topbar-inner {
        width: calc(100% - 25px);
        padding-top: 30px;
        padding-bottom: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .brand {
        align-items: center;
        text-align: center;
    }

    .main-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        margin-top: 20px;
    }

    .hero h1 {
        font-size: 58px;
    }

    .hero-logo {
        width: min(560px, 94%);
        margin-bottom: 18px;
    }

    .hero-text {
        font-size: 14px;
    }

    .stats-inner {
        width: 100%;
    }

    .stat {
        padding: 15px 5px;
        text-align: center;
        align-items: center;
    }

    .stat-value {
        font-size: 23px;
    }

    .online-dot {
        display: none;
    }

    .intro-section,
    .features-section,
    .media-section,
    .final-cta {
        width: calc(100% - 25px);
    }

    .intro-section {
        padding-top: 65px;
    }

    .section-heading h2 {
        font-size: 27px;
    }

    .intro-grid {
        gap: 35px;
    }

    .final-cta h2 {
        font-size: 31px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-copy {
        text-align: center;
    }

    #screenshot_list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {

    .main-nav {
        gap: 0;
    }

    .main-nav a {
        padding: 7px 5px;
        font-size: 10px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero h1 strong {
        letter-spacing: 5px;
    }

    .stats-inner {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
        font-size: 8px;
        letter-spacing: .5px;
    }

    #screenshot_list img {
        height: 80px;
    }
}