/* =========================================================
   TUKUMA STĀSTI — KOPĪGIE STILI
   Stabils fons datoros, planšetēs un tālruņos
   ========================================================= */

/* Pamati */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    margin: 0;
    padding: 0;
    background-color: #d5dcda;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    position: relative;
    z-index: 0;
    isolation: isolate;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    color: #344238;
    background: transparent;
    font-family: "BioRhyme", Georgia, serif;
    line-height: 1.65;
    overscroll-behavior-y: none;
}

/*
   Fons ir body pseidoelements, tāpēc tas darbojas VISĀS lapās.
   Netiek izmantots background-attachment: fixed, 100dvh,
   transform, translate3d vai backdrop-filter.
*/
body::before {
    content: "";
    position: fixed;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    z-index: -1;
    pointer-events: none;
    background-color: #d5dcda;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.16),
            rgba(255, 255, 255, 0.16)
        ),
        url("Tukuma-fons.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Navigācija */
.navbar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1100;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1rem 2rem;
    color: #4a6c50;
    background-color: #c7d3d7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.navbar-logo {
    flex-shrink: 0;
    color: #4a6c50;
    font-family: "BioRhyme", Georgia, serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.navbar-logo:hover,
.navbar-logo:focus-visible {
    color: #5b8363;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar-menu a {
    display: inline-block;
    padding: 0.55rem 0.9rem;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    background-color: #4a6c50;
    border: 2px solid #4a6c50;
    border-radius: 8px;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.navbar-menu a:hover,
.navbar-menu a:focus-visible {
    color: #ffffff;
    background-color: #5b8363;
    border-color: #5b8363;
    transform: translateY(-1px);
}

.navbar-menu a[aria-current="page"] {
    color: #ffffff;
    background-color: #31573a;
    border-color: #31573a;
}

.navbar-menu .nav-highlight {
    color: #ffffff;
    background-color: #4a6c50;
    border-color: #4a6c50;
}

.navbar-menu .nav-highlight:hover,
.navbar-menu .nav-highlight:focus-visible {
    color: #ffffff;
    background-color: #5b8363;
    border-color: #5b8363;
}

.navbar-menu .nav-highlight[aria-current="page"] {
    color: #ffffff;
    background-color: #31573a;
    border-color: #31573a;
}

/* Mobilās izvēlnes poga */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.45rem;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    touch-action: manipulation;
}

.hamburger span {
    display: block;
    width: 27px;
    height: 3px;
    background-color: #4a6c50;
    border-radius: 2px;
}

/* Galvenais saturs */
.page-main {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    padding: clamp(2rem, 6vw, 5rem) 1rem 7rem;
}

.info-card {
    width: 100%;
    display: flex;
    justify-content: center;
}

.card {
    width: min(900px, 100%);
    padding: clamp(1.5rem, 4vw, 2.75rem);
    background-color: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(74, 108, 80, 0.2);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.card h1,
.card h2 {
    color: #4a6c50;
    font-weight: 700;
    line-height: 1.25;
}

.card h1 {
    margin: 0 0 1.6rem;
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
}

.card h2 {
    margin: 2rem 0 1rem;
    font-size: clamp(1.4rem, 4vw, 2rem);
}

.card p {
    margin: 0 0 1.25rem;
    color: #3f4942;
    font-size: clamp(1rem, 2vw, 1.12rem);
    overflow-wrap: anywhere;
}

.card p:last-child {
    margin-bottom: 0;
}

/* Literāro maršrutu elementi */
.notice {
    margin-bottom: 1.75rem;
    padding: 0.95rem 1.1rem;
    color: #395640;
    font-weight: 700;
    text-align: center;
    background-color: #dce5e2;
    border-left: 5px solid #4a6c50;
    border-radius: 8px;
}

.route-buttons {
    display: grid;
    gap: 0.9rem;
    margin-top: 2rem;
}

.card-button {
    display: block;
    width: 100%;
    padding: 0.9rem 1.25rem;
    color: #ffffff;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    background-color: #4a6c50;
    border-radius: 9px;
    box-shadow: 0 4px 10px rgba(34, 66, 42, 0.18);
}

.card-button:hover,
.card-button:focus-visible {
    background-color: #5b8363;
}

.content-list {
    margin: 0.5rem 0 1.5rem 1.4rem;
    padding: 0;
}

.content-list li {
    margin-bottom: 0.85rem;
    padding-left: 0.3rem;
    color: #3f4942;
    font-size: clamp(1rem, 2vw, 1.12rem);
    overflow-wrap: anywhere;
}

/* Kājene — bez transformācijas, lai mobilajā nerastos mirgošana */
.footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1200;
    padding: 1rem;
    color: #efefef;
    text-align: center;
    background-color: rgba(125, 132, 138, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.footer.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.footer-content p {
    margin: 0.18rem 0;
    font-size: 0.88rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.45);
}

.footer-trigger {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1198;
    height: 30px;
    background: transparent;
    cursor: pointer;
}

.footer-indicator {
    position: fixed;
    bottom: 6px;
    left: 50%;
    z-index: 1201;
    width: 52px;
    height: 4px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.85);
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0.9;
    transform: translateX(-50%);
    touch-action: manipulation;
}

.footer-indicator:hover,
.footer-indicator:focus-visible {
    width: 82px;
    opacity: 1;
}

/* Planšetes un tālruņi */
@media (max-width: 900px) {
    .navbar {
        gap: 1rem;
        padding: 0.9rem 1.1rem;
    }

    .hamburger {
        display: flex;
    }

    .navbar-menu {
        position: absolute;
        top: 100%;
        right: 0.75rem;
        display: none;
        width: min(320px, calc(100vw - 1.5rem));
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        padding: 1rem;
        background-color: #c7d3d7;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
        -webkit-overflow-scrolling: touch;
    }

    .navbar-menu.active {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-menu a {
        width: 100%;
        padding: 0.72rem 0.8rem;
        text-align: center;
    }

    .page-main {
        padding-top: 2rem;
    }
}

@media (max-width: 520px) {
    .navbar-logo {
        font-size: 1.35rem;
    }

    .page-main {
        padding: 1.25rem 0.7rem 6.5rem;
    }

    .card {
        padding: 1.3rem 1rem;
        border-radius: 12px;
        box-shadow: 0 7px 22px rgba(0, 0, 0, 0.16);
    }

    .card h1 {
        margin-bottom: 1.25rem;
        font-size: 2rem;
    }

    .card h2 {
        margin-top: 1.6rem;
        font-size: 1.35rem;
    }

    .content-list {
        margin-left: 1.15rem;
    }

    .footer {
        padding: 0.75rem 0.6rem;
    }

    .footer-content p {
        font-size: 0.76rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}