/* Kopīgie vietnes stili: navigācija, kartītes, formas un pielāgojums telefonam. */
/*
 * Tirzas pamatskola — publiskās mājaslapas stils.
 * Klases nosauktas pēc sadaļu nozīmes;
bez smaga CSS ietvara.
 * Mobilajā ierīcē izkārtojums mainās ar media queries.
 */
:root {
    --ink:#173e34;
    --ink2:#243c35;
    --muted:#62716b;
    --sand:#f8f7f1;
    --cream:#eeeee4;
    --line:#e2e7df;
    --white:#fff;
    --gold:#d5a340;
    --shadow:0 16px 48px rgba(30,60,45,.09);
    --radius:24px
}

* {
    box-sizing:border-box
}

html {
    scroll-behavior:smooth
}

body {
    margin:0;
    font-family:'DM Sans',Arial,sans-serif;
    color:var(--ink2);
    background:#fffefa;
    font-size:16px;
    line-height:1.65
}

a {
    color:inherit;
    text-decoration:none
}

img {
    max-width:100%;
    display:block
}

button,input,select,textarea {
    font:inherit
}

button {
    cursor:pointer
}

a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
    outline:3px solid #d6a334;
    outline-offset:3px
}

.container {
    width:min(1220px,calc(100% - 64px));
    margin-inline:auto
}

.skip-link {
    position:absolute;
    top:-80px;
    left:20px;
    background:var(--ink);
    color:white;
    padding:10px;
    z-index:999
}

.skip-link:focus {
    top:12px
}

.eyebrow {
    display:inline-block;
    color:#416355;
    letter-spacing:.15em;
    font-weight:750;
    font-size:12px;
    text-transform:uppercase
}

.site-header {
    height:94px;
    background:#fffdf9;
    position:relative;
    z-index:20;
    border-bottom:1px solid #ecefe8
}

.header-inner {
    height:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px
}

.brand,.footer-brand {
    display:inline-flex;
    align-items:center;
    gap:13px;
    color:var(--ink);
    flex-shrink:0
}

.brand-title,.footer-brand>span:last-child {
    font-family:'Libre Baskerville',Georgia,serif;
    font-size:19px;
    line-height:1.15;
    font-weight:700;
    letter-spacing:-.03em
}

.logo-img {
    width:56px;
    height:56px;
    object-fit:contain
}

.brand:not(:has(.logo-img)) .brand-title {
    padding-left:15px;
    border-left:4px solid #d2aa62
}

.logo-mark {
    display:none
}

.site-nav {
    display:flex;
    align-items:center;
    gap:22px;
    white-space:nowrap
}

.site-nav>a {
    font-size:13px;
    font-weight:700;
    transition:color .2s
}

.site-nav>a:hover,.site-nav>a.active {
    color:#bc8a32
}

.site-nav>a.active:not(.nav-eklasse) {
    box-shadow:0 3px 0 var(--gold);
    padding-block:34px 31px
}

.site-nav .nav-eklasse {
    background:var(--ink);
    color:white;
    padding:10px 17px;
    border-radius:50px
}

.site-nav .nav-eklasse:hover {
    color:white;
    background:#2f6551
}

.nav-toggle {
    display:none;
    background:none;
    border:0;
    padding:8px
}

.nav-toggle span {
    display:block;
    width:25px;
    height:2px;
    background:var(--ink);
    margin:5px 0
}

.home-hero {
    position:relative;
    overflow:hidden;
    background:linear-gradient(125deg,#f0f1e5 0%,#f8f8f1 56%,#f3f2e9 100%);
    padding:56px 0 91px
}

.hero-decoration {
    position:absolute;
    left:-9%;
    bottom:-160px;
    width:480px;
    height:480px;
    border-radius:50%;
    border:95px solid #e7ebdc;
    opacity:.35
}

.hero-layout {
    display:grid;
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
    align-items:center;
    gap:4%;
    position:relative
}

.hero-content {
    padding:20px 0 40px;
    z-index:1
}

.hero-content h1,.page-hero h1,.article-head h1 {
    font-family:'Libre Baskerville',Georgia,serif;
    font-size:clamp(36px,4.25vw,66px);
    line-height:1.15;
    letter-spacing:-.055em;
    color:var(--ink);
    margin:22px 0 23px;
    max-width:620px
}

.hero-content p {
    font-family:Georgia,serif;
    font-size:clamp(20px,2vw,26px);
    line-height:1.45;
    color:#354b40;
    max-width:490px;
    margin:0 0 30px
}

.button-group {
    display:flex;
    gap:12px;
    flex-wrap:wrap
}

.btn {
    min-height:46px;
    border:1px solid var(--ink);
    padding:12px 22px;
    border-radius:100px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:15px;
    font-size:14px;
    font-weight:700;
    transition:background .18s,transform .18s,box-shadow .18s
}

.btn:hover {
    transform:translateY(-2px);
    box-shadow:0 10px 24px #173e3420
}

.btn-primary {
    background:#255540;
    color:white;
    border-color:#255540
}

.btn-primary:hover {
    background:#173e34
}

.btn-secondary {
    background:transparent;
    color:var(--ink)
}

.btn-secondary:hover {
    background:#fff
}

.btn-light {
    background:#fff;
    color:var(--ink);
    border-color:#fff
}

.hero-foot {
    margin-top:40px;
    font-size:12px;
    font-weight:650;
    letter-spacing:.025em;
    color:#667d6d
}

.hero-dot {
    display:inline-block;
    width:8px;
    height:8px;
    border-radius:50%;
    background:#d5a340;
    margin-right:7px
}

.hero-visual {
    position:relative;
    height:480px;
    min-height:350px;
    border-radius:140px 24px 24px 24px;
    overflow:hidden;
    box-shadow:0 24px 70px #233c321c;
    background:#d7dfd0
}

.hero-visual img {
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:50% 50%
}

.photo-label {
    position:absolute;
    bottom:20px;
    left:20px;
    background:#fffef6e8;
    backdrop-filter:blur(10px);
    padding:10px 18px;
    border-radius:50px;
    font-size:12px;
    font-weight:750;
    color:var(--ink)
}

.photo-label span {
    color:var(--gold);
    margin:0 6px
}

.quicklinks {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    position:relative;
    margin-top:-53px;
    background:#fff;
    border-radius:22px;
    box-shadow:0 18px 60px #1c392b18;
    z-index:3;
    overflow:hidden
}

.quicklinks>a {
    display:flex;
    align-items:center;
    gap:14px;
    padding:22px 21px;
    min-height:101px;
    border-right:1px solid #e9eee7;
    transition:background .2s
}

.quicklinks>a:last-child {
    border-right:0
}

.quicklinks>a:hover {
    background:#f5f7f0
}

.quick-icon {
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    flex-shrink:0;
    background:#f0f5f0;
    border-radius:50%;
    font-size:23px;
    color:var(--ink)
}

.quicklinks b {
    font-size:14px
}

.quick-arrow {
    margin-left:auto;
    color:var(--ink)
}

.content-section {
    padding-top:80px;
    padding-bottom:80px
}

.section-title-row {
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:20px;
    margin-bottom:27px
}

.section-title-row h2,.feature h2,.two-column h2,.closing-banner h2,.contact-card h2,.contact-side h2 {
    font-family:'Libre Baskerville',Georgia,serif;
    line-height:1.27;
    letter-spacing:-.04em;
    color:var(--ink)
}

.section-title-row h2 {
    font-size:clamp(29px,3vw,42px);
    margin:6px 0
}

.text-link,.read-more,.back-link {
    color:var(--ink);
    font-weight:750;
    font-size:13px
}

.text-link:hover,.read-more:hover,.back-link:hover {
    text-decoration:underline
}

.text-link span,.read-more span {
    margin-left:8px
}

.news-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:22px
}

.news-card {
    background:#fff;
    border:1px solid #eceee9;
    border-radius:22px;
    overflow:hidden;
    box-shadow:0 12px 34px #283f3310;
    display:flex;
    flex-direction:column;
    transition:transform .22s,box-shadow .22s
}

.news-card:hover {
    transform:translateY(-4px);
    box-shadow:var(--shadow)
}

.card-image {
    height:218px;
    position:relative;
    display:block;
    background:#e3e9df;
    overflow:hidden
}

.card-image img {
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .35s
}

.news-card:hover .card-image img {
    transform:scale(1.05)
}

.image-caption {
    position:absolute;
    bottom:10px;
    right:12px;
    background:#fffdf7db;
    padding:3px 9px;
    border-radius:100px;
    color:#405c4f;
    font-size:10px
}

.card-content {
    padding:23px 24px 25px;
    display:flex;
    flex:1;
    flex-direction:column
}

.card-meta {
    display:flex;
    gap:12px;
    justify-content:space-between;
    color:#6a766d;
    font-size:11px
}

.card-meta span {
    color:#3e6853
}

.news-card h3 {
    font-family:'Libre Baskerville',Georgia,serif;
    font-size:20px;
    line-height:1.35;
    letter-spacing:-.03em;
    margin:13px 0 9px;
    color:var(--ink)
}

.news-card h3 a:hover {
    text-decoration:underline
}

.news-card p {
    font-size:13px;
    line-height:1.67;
    margin:0 0 22px;
    color:#536058;
    flex:1
}

.news-card .read-more {
    margin-top:auto
}

.features {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:22px;
    padding-bottom:80px
}

.feature {
    position:relative;
    min-height:325px;
    background:#eaf0e5;
    border-radius:32px;
    overflow:hidden;
    display:flex;
    align-items:center
}

.feature:nth-child(2) {
    background:#eaece1
}

.feature-copy {
    position:relative;
    z-index:2;
    width:62%;
    padding:32px 0 32px 34px
}

.feature h2 {
    font-size:clamp(23px,2.2vw,32px);
    margin:8px 0 12px
}

.feature p {
    font-size:14px;
    line-height:1.65;
    margin:0 0 19px
}

.feature .btn {
    padding:10px 17px;
    min-height:42px
}

.feature>img {
    position:absolute;
    top:0;
    right:0;
    height:100%;
    width:43%;
    object-fit:cover;
    clip-path:ellipse(90% 72% at 100% 50%)
}

.closing-banner {
    background:#214c3a;
    color:#fff;
    border-radius:35px;
    padding:55px 8%;
    text-align:center;
    margin-bottom:80px
}

.closing-banner h2 {
    color:#fff;
    font-size:clamp(27px,3.4vw,42px);
    max-width:750px;
    margin:8px auto 24px
}

.closing-banner .eyebrow {
    color:#e2c591
}

.site-footer {
    background:#163f32;
    color:white;
    padding:60px 0 0
}

.footer-inner {
    display:grid;
    grid-template-columns:1.35fr 1fr 1fr .85fr;
    gap:45px
}

.footer-brand {
    color:white;
    margin-bottom:15px
}

.footer-brand>span:last-child {
    font-size:19px
}

.site-footer p,.site-footer a {
    font-size:13px;
    line-height:1.75;
    color:#dce6df
}

.site-footer a {
    display:block;
    margin-bottom:6px
}

.site-footer a:hover {
    text-decoration:underline;
    color:white
}

.site-footer h3 {
    margin:6px 0 16px;
    font-size:13px;
    color:#fff
}

.footer-bottom {
    border-top:1px solid #416352;
    margin-top:50px;
    padding:19px 0;
    display:flex;
    justify-content:space-between;
    gap:20px;
    color:#cfdfd3;
    font-size:12px
}

.footer-bottom a {
    display:inline
}

.page-hero {
    background:#edf1e7;
    padding:80px 0 70px;
    position:relative;
    overflow:hidden
}

.page-hero::after {
    content:'';
    position:absolute;
    right:-90px;
    top:-180px;
    width:550px;
    height:550px;
    border:85px solid #dfe8d8;
    border-radius:50%;
    opacity:.55
}

.page-hero .container {
    position:relative;
    z-index:1
}

.page-hero h1 {
    font-size:clamp(39px,5vw,62px);
    margin:12px 0
}

.page-hero p {
    font-size:18px;
    color:#627066;
    max-width:720px;
    margin:0
}

.two-column {
    display:grid;
    grid-template-columns:1fr .94fr;
    gap:70px;
    align-items:center
}

.two-column h2 {
    font-size:clamp(28px,3vw,41px);
    margin-top:0
}

.two-column h3 {
    font-size:18px;
    color:var(--ink)
}

.two-column p {
    color:#55665c
}

.lead {
    font-size:18px
}

.rounded-photo {
    height:440px;
    background:#e9ebdf;
    border-radius:40px 40px 120px 40px;
    overflow:hidden
}

.rounded-photo img {
    width:100%;
    height:100%;
    object-fit:cover
}

.info-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:22px
}

.info-card {
    padding:33px;
    border:1px solid #e5ece3;
    border-radius:24px;
    background:#fff;
    transition:transform .2s
}

.info-link:hover {
    transform:translateY(-4px);
    box-shadow:var(--shadow)
}

.info-icon {
    font-size:30px;
    color:#35664c;
    font-weight:750
}

.info-card h2 {
    font-family:'Libre Baskerville',Georgia,serif;
    font-size:24px;
    color:var(--ink);
    line-height:1.3
}

.info-card p {
    font-size:14px;
    color:#617067
}

.info-card b,.info-card a {
    color:#23553c;
    font-size:14px
}

.source-note {
    font-size:12px;
    color:#68736d;
    margin-top:30px
}

.source-note a {
    text-decoration:underline
}

.news-search {
    display:flex;
    align-items:end;
    gap:13px;
    margin-bottom:28px;
    flex-wrap:wrap
}

.news-search label {
    display:none
}

.news-search input,.news-search select {
    background:#fff;
    border:1px solid #dbe4db;
    border-radius:14px;
    padding:13px 16px;
    min-height:50px
}

.news-search input {
    flex:1;
    min-width:200px
}

.category-tabs {
    display:flex;
    gap:9px;
    flex-wrap:wrap;
    margin-bottom:25px
}

.category-tabs a {
    border:1px solid #d5e1d5;
    border-radius:50px;
    padding:8px 17px;
    font-size:13px;
    font-weight:650
}

.category-tabs a.selected,.category-tabs a:hover {
    background:var(--ink);
    color:white
}

.document-list {
    border:1px solid #e0e8dd;
    border-radius:20px;
    overflow:hidden
}

.document-row {
    display:flex;
    align-items:center;
    gap:22px;
    padding:23px;
    border-bottom:1px solid #e4eae2
}

.document-row:last-child {
    border-bottom:0
}

.document-row:hover {
    background:#f3f6f1
}

.doc-icon {
    color:white;
    background:#315c4a;
    font-size:12px;
    font-weight:800;
    border-radius:10px;
    padding:12px
}

.document-row b {
    display:block;
    font-size:16px
}

.document-row small {
    display:block;
    color:#77877b
}

.doc-arrow {
    margin-left:auto;
    color:#235440
}

.empty-state {
    padding:45px;
    background:#f1f4ed;
    border:1px dashed #bfcfbd;
    border-radius:24px;
    color:#5b6b61
}

.empty-state a {
    text-decoration:underline
}

.contact-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:65px
}

.contact-card,.contact-side {
    padding:20px
}

.contact-card h2,.contact-side h2 {
    font-size:32px
}

.contact-card p {
    line-height:1.9
}

.contact-card a:not(.btn) {
    text-decoration:underline
}

.contact-side img {
    width:100%;
    height:300px;
    object-fit:cover;
    border-radius:26px
}

.article-layout {
    max-width:850px;
    padding-top:55px;
    padding-bottom:100px
}

.article-head h1 {
    font-size:clamp(34px,4vw,52px)
}

.article-cover {
    width:100%;
    max-height:510px;
    object-fit:cover;
    border-radius:24px
}

.article-layout figure {
    margin:25px 0
}

.article-layout figcaption {
    color:#87918b;
    font-size:12px;
    margin-top:8px
}

.article-text {
    font-size:18px;
    line-height:1.88;
    white-space:normal
}

.article-source {
    margin-top:35px
}

.article-source a {
    text-decoration:underline;
    color:#23563f
}

.readable {
    max-width:850px
}

@media(max-width:1150px) {
    .site-nav {
        gap:13px
    }
    .site-nav>a {
        font-size:12px
    }
    .brand-title {
        font-size:17px
    }
    .hero-visual {
        height:420px
    }
    .feature-copy {
        width:66%
    }
    .feature>img {
        width:38%
    }
}

@media(max-width:920px) {
    .container {
        width:min(100% - 40px,1220px)
    }
    .site-header {
        height:75px
    }
    .brand-title {
        font-size:18px
    }
    .nav-toggle {
        display:block
    }
    .site-nav {
        display:none;
        position:absolute;
        top:75px;
        left:0;
        right:0;
        background:#fff;
        padding:13px 20px 26px;
        box-shadow:0 22px 25px #182f261a;
        flex-direction:column;
        align-items:stretch;
        gap:0;
        white-space:normal
    }
    .site-nav.is-open {
        display:flex
    }
    .site-nav>a,.site-nav>a.active:not(.nav-eklasse) {
        padding:12px 10px;
        box-shadow:none;
        font-size:15px
    }
    .site-nav .nav-eklasse {
        margin-top:11px;
        text-align:center
    }
    .hero-layout {
        grid-template-columns:1fr 1fr;
        gap:20px
    }
    .hero-content h1 {
        font-size:clamp(32px,4.4vw,48px)
    }
    .hero-visual {
        height:390px;
        border-top-left-radius:95px
    }
    .quicklinks>a {
        padding:15px;
        gap:8px
    }
    .quick-icon {
        width:38px;
        height:38px;
        font-size:20px
    }
    .quicklinks b {
        font-size:12px
    }
    .news-grid {
        gap:13px
    }
    .card-image {
        height:168px
    }
    .card-content {
        padding:18px
    }
    .news-card h3 {
        font-size:17px
    }
    .features {
        grid-template-columns:1fr
    }
    .feature {
        min-height:285px
    }
    .feature-copy {
        width:59%
    }
    .feature>img {
        width:47%
    }
    .footer-inner {
        grid-template-columns:repeat(2,1fr)
    }
    .info-grid {
        grid-template-columns:repeat(2,1fr)
    }
}

@media(max-width:650px) {
    .container {
        width:calc(100% - 32px)
    }
    .site-header {
        height:70px
    }
    .site-nav {
        top:70px
    }
    .brand-title {
        font-size:17px
    }
    .logo-img {
        width:42px;
        height:42px
    }
    .home-hero {
        padding:34px 0 85px
    }
    .hero-layout {
        grid-template-columns:1fr
    }
    .hero-content {
        padding:0 0 6px
    }
    .hero-content h1 {
        font-size:clamp(34px,9vw,45px);
        margin:16px 0
    }
    .hero-content p {
        font-size:19px;
        margin-bottom:24px
    }
    .hero-foot {
        display:none
    }
    .hero-visual {
        height:265px;
        border-radius:70px 18px 18px 18px;
        margin-top:15px
    }
    .photo-label {
        bottom:12px;
        left:12px
    }
    .quicklinks {
        grid-template-columns:repeat(2,minmax(0,1fr));
        margin-top:-56px;
        border-radius:17px
    }
    .quicklinks>a {
        min-height:78px;
        padding:13px;
        border-right:1px solid #e9eee7;
        border-bottom:1px solid #e9eee7
    }
    .quicklinks>a:nth-child(even) {
        border-right:0
    }
    .quicklinks>a:nth-child(n+3) {
        border-bottom:0
    }
    .quick-icon {
        width:32px;
        height:32px;
        font-size:17px
    }
    .quicklinks b {
        font-size:11px
    }
    .quick-arrow {
        font-size:11px
    }
    .content-section {
        padding-top:56px;
        padding-bottom:55px
    }
    .section-title-row {
        align-items:start;
        flex-direction:column;
        gap:4px
    }
    .section-title-row h2 {
        font-size:32px
    }
    .news-grid {
        grid-template-columns:1fr;
        gap:18px
    }
    .card-image {
        height:205px
    }
    .card-content {
        padding:20px
    }
    .news-card h3 {
        font-size:20px
    }
    .features {
        padding-bottom:55px;
        gap:17px
    }
    .feature {
        min-height:320px
    }
    .feature-copy {
        width:70%;
        padding:26px 0 26px 22px
    }
    .feature>img {
        width:42%;
        opacity:.7
    }
    .feature h2 {
        font-size:24px
    }
    .feature p {
        font-size:13px
    }
    .feature .btn {
        font-size:12px
    }
    .closing-banner {
        padding:37px 20px;
        margin-bottom:60px;
        border-radius:24px
    }
    .footer-inner {
        grid-template-columns:1fr 1fr;
        gap:24px
    }
    .footer-inner>div:first-child {
        grid-column:span 2
    }
    .footer-bottom {
        flex-direction:column;
        gap:5px
    }
    .page-hero {
        padding:53px 0
    }
    .page-hero h1 {
        font-size:41px
    }
    .two-column,.contact-grid {
        grid-template-columns:1fr;
        gap:32px
    }
    .rounded-photo {
        height:300px;
        border-radius:26px 26px 80px 26px
    }
    .info-grid {
        grid-template-columns:1fr
    }
    .info-card {
        padding:24px
    }
    .article-text {
        font-size:16px
    }
    .news-search {
        flex-direction:column;
        align-items:stretch
    }
    .news-search input,.news-search select {
        width:100%
    }
}

@media(prefers-reduced-motion:reduce) {
    *,*:before,*:after {
        scroll-behavior:auto!important;
        transition:none!important;
        animation:none!important
    }
}
