/* =========================================================
   KALNA SPUĻĻU DĪĶI
   Jaunumu un galerijas lapu kopīgie stili
   ========================================================= */


/* =========================================================
   1. PAMATA STILI
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background: #f5f1e7;
    color: #123e35;

    font-family: "DM Sans", Arial, sans-serif;
}


/* Kopīgais ievads, ko izmanto arī galerijas lapa */

.hub-hero {
    max-width: 1380px;
    margin: 0 auto;
    padding: 78px 6% 52px;
}

.hub-hero > span {
    color: #b88409;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hub-hero h1 {
    margin: 10px 0 18px;

    font-family: "Playfair Display", Georgia, serif;
    font-size: 68px;
    line-height: 1.08;
}

.hub-hero p {
    max-width: 720px;
    margin: 0;

    color: #687a74;

    font-size: 18px;
    line-height: 1.7;
}


/* =========================================================
   2. JAUNUMU LAPAS IEVADS
   ========================================================= */

.news-page .hub-hero {
    max-width: 920px;
    margin: 0 auto;
    padding: 76px 24px 46px;

    text-align: center;
}

.news-page .hub-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    color: #ad7d05;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    line-height: 1.4;
}

.news-page .hub-eyebrow::before,
.news-page .hub-eyebrow::after {
    content: "";

    width: 36px;
    height: 1px;

    background: #d7aa2c;
}

.news-page .hub-hero h1 {
    margin: 15px 0 13px;

    color: #073f34;

    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(44px, 6vw, 70px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.02;
}

.news-page .hub-hero p {
    max-width: 680px;
    margin: 0 auto;

    color: #687a74;

    font-size: 17px;
    line-height: 1.65;
}


/* =========================================================
   3. JAUNUMU REŽĢIS
   Abām kartītēm ir vienāds izmērs un vizuālais svars.
   ========================================================= */

.news-page .news-grid {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto 26px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.news-page .news-item {
    min-width: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid rgba(7, 63, 52, .12);
    border-radius: 22px;

    background: #fff;

    box-shadow: 0 18px 48px rgba(7, 49, 40, .08);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.news-page .news-item:hover {
    border-color: rgba(190, 143, 24, .34);

    box-shadow: 0 24px 60px rgba(7, 49, 40, .13);

    transform: translateY(-4px);
}


/* =========================================================
   4. KARTĪŠU ATTĒLI
   ========================================================= */

.news-page .news-item-media {
    position: relative;

    height: 320px;
    flex: 0 0 320px;

    overflow: hidden;

    background: #073f34;
}

.news-page .news-item-media--photo > img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    transition: transform .55s cubic-bezier(.2, .7, .2, 1);
}

.news-page .news-item:hover .news-item-media--photo > img {
    transform: scale(1.045);
}


/*
 * Afišas attēls sākotnēji ir telefona ekrānuzņēmums.
 * Fonā veidojam maigu, izpludinātu slāni, bet centrā ar
 * .poster-crop parādām tikai pašu afišu bez telefona malām.
 */

.news-page .news-item-media--poster::before {
    content: "";

    position: absolute;
    inset: -28px;

    background:
        linear-gradient(rgba(3, 39, 32, .44), rgba(3, 39, 32, .68)),
        url("../images/ngt-bernu-makskeresanas-svetki.jpg") center 42% / cover;

    filter: blur(16px);
    opacity: .82;

    transform: scale(1.08);
}

.news-page .poster-crop {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;

    aspect-ratio: 709 / 1186;

    overflow: hidden;

    background: #07120f;

    box-shadow: 0 0 35px rgba(0, 0, 0, .32);

    transform: translateX(-50%);
}

.news-page .poster-crop img {
    position: absolute;
    top: -15.5%;
    left: 0;

    width: 100%;
    height: auto;

    display: block;
}


/* Kategorijas un datuma atzīmes */

.news-page .news-category,
.news-page .news-date {
    position: absolute;
    z-index: 3;
    top: 18px;

    padding: 8px 11px;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;

    box-shadow: 0 8px 25px rgba(0, 0, 0, .16);
}

.news-page .news-category {
    left: 18px;

    background: rgba(4, 49, 40, .9);
    color: #fff;

    backdrop-filter: blur(8px);
}

.news-page .news-date {
    right: 18px;

    background: #f0c33c;
    color: #073f34;
}


/* =========================================================
   5. KARTĪŠU SATURS
   ========================================================= */

.news-page .news-item-copy {
    flex: 1;

    display: flex;
    flex-direction: column;

    padding: 29px 30px 30px;
}

.news-page .news-item-copy h2 {
    margin: 0 0 12px;

    color: #073f34;

    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(27px, 2.4vw, 35px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.12;
}

.news-page .news-item-copy > p {
    margin: 0 0 23px;

    color: #687a74;

    font-size: 15px;
    line-height: 1.65;
}


/* Datuma, laika un piedāvājuma fakti */

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

    margin: auto 0 22px;
}

.news-page .news-facts > span {
    min-width: 0;
    min-height: 66px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 11px 12px;

    border: 1px solid #e5dfd2;
    border-radius: 11px;

    background: #faf8f2;
}

.news-page .news-facts b,
.news-page .news-facts small {
    display: block;
}

.news-page .news-facts b {
    overflow-wrap: anywhere;

    color: #073f34;

    font-size: 13px;
    line-height: 1.25;
}

.news-page .news-facts small {
    margin-top: 4px;

    color: #81908b;

    font-size: 10px;
    line-height: 1.25;
}


/* Kartītes darbības saite */

.news-page .news-item-link {
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding-top: 17px;

    border-top: 1px solid rgba(7, 63, 52, .11);

    color: #073f34;

    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.news-page .news-item-link i {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: #f0c33c;
    color: #073f34;

    font-size: 17px;
    font-style: normal;

    transition: transform .2s ease;
}

.news-page .news-item-link:hover i {
    transform: translateX(3px);
}

.news-page .news-item-link:focus-visible {
    border-radius: 5px;

    outline: 3px solid rgba(240, 195, 60, .62);
    outline-offset: 4px;
}


/* =========================================================
   6. LOMU GALERIJAS FOTO JOSLA
   ========================================================= */

.news-page .hub-link--photo {
    position: relative;
    isolation: isolate;

    width: min(1180px, calc(100% - 48px));
    min-height: 250px;
    margin: 0 auto 76px;

    display: flex;
    align-items: center;
    gap: 40px;

    padding: 42px 46px;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 22px;

    background: #073f34;
    color: #fff;

    box-shadow: 0 20px 55px rgba(7, 49, 40, .16);
}

.news-page .hub-link--photo::after {
    content: "";

    position: absolute;
    z-index: -1;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(3, 40, 33, .96) 0%,
            rgba(3, 40, 33, .86) 40%,
            rgba(3, 40, 33, .38) 72%,
            rgba(3, 40, 33, .2) 100%
        );
}

.news-page .hub-link-image {
    position: absolute;
    z-index: -2;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center 52%;

    transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.news-page .hub-link--photo:hover .hub-link-image {
    transform: scale(1.035);
}

.news-page .hub-link-copy {
    max-width: 610px;
    margin-right: auto;
}

.news-page .hub-link-copy > span {
    color: #f0c33c;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .17em;
    line-height: 1.4;
}

.news-page .hub-link-copy h2 {
    margin: 7px 0 9px;

    color: #fff;

    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(31px, 3.8vw, 44px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.08;
}

.news-page .hub-link-copy p {
    max-width: 540px;
    margin: 0;

    color: rgba(255, 255, 255, .76);

    font-size: 14px;
    line-height: 1.6;
}

.news-page .hub-link-button {
    min-height: 54px;
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    padding: 0 21px;

    border-radius: 10px;

    background: #f0c33c;
    color: #073f34;

    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);

    font-size: 14px;
    font-weight: 800;
    text-decoration: none;

    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.news-page .hub-link-button i {
    font-size: 18px;
    font-style: normal;
}

.news-page .hub-link-button:hover {
    background: #ffd45a;

    box-shadow: 0 16px 34px rgba(0, 0, 0, .24);

    transform: translateY(-2px);
}

.news-page .hub-link-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}


/* =========================================================
   7. GALERIJAS LAPAS STILI
   Šie stili saglabāti, jo content-hub.css izmanto arī galerija.
   ========================================================= */

.gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 28px;
}

.gallery-tabs a {
    padding: 11px 20px;

    border: 1px solid #c9d0cc;
    border-radius: 999px;

    color: #0b493d;

    font-weight: 800;
    text-decoration: none;
}

.gallery-tabs a.active {
    background: #0b493d;
    color: #fff;
}

.photo-grid {
    max-width: 1260px;
    margin: 0 auto 55px;
    padding: 0 5%;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 300px;
    gap: 16px;
}

.photo-grid figure {
    position: relative;

    margin: 0;

    overflow: hidden;

    border-radius: 18px;

    background: #ddd;
}

.photo-grid figure.wide {
    grid-column: span 2;
}

.photo-grid img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.photo-grid figcaption {
    position: absolute;
    left: 15px;
    bottom: 15px;

    padding: 9px 12px;

    border-radius: 8px;

    background: rgba(7, 63, 52, .91);
    color: #fff;

    font-weight: 700;
}

.gallery-note {
    max-width: 1130px;
    margin: 0 auto 70px;
    padding: 24px 28px;

    border-top: 1px solid #d7d2c6;

    color: #61736e;
}


/* =========================================================
   8. RESPONSIVE — PLANŠETES
   ========================================================= */

@media (max-width: 900px) {

    .hub-hero h1 {
        font-size: 50px;
    }

    .news-page .news-grid {
        width: min(720px, calc(100% - 36px));

        grid-template-columns: 1fr;
    }

    .news-page .hub-link--photo {
        width: min(720px, calc(100% - 36px));

        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
    }

    .news-page .hub-link--photo::after {
        background:
            linear-gradient(
                90deg,
                rgba(3, 40, 33, .96) 0%,
                rgba(3, 40, 33, .79) 62%,
                rgba(3, 40, 33, .45) 100%
            );
    }

    .photo-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 280px;
    }

    .photo-grid figure.wide {
        grid-column: auto;
    }
}


/* =========================================================
   9. RESPONSIVE — TELEFONI
   ========================================================= */

@media (max-width: 620px) {

    .hub-hero {
        padding: 50px 18px 34px;
    }

    .hub-hero h1 {
        font-size: 39px;
    }

    .hub-hero p {
        font-size: 15px;
    }

    .news-page .hub-hero {
        padding: 50px 18px 34px;
    }

    .news-page .hub-eyebrow {
        font-size: 10px;
        letter-spacing: .13em;
    }

    .news-page .hub-eyebrow::before,
    .news-page .hub-eyebrow::after {
        width: 22px;
    }

    .news-page .hub-hero h1 {
        font-size: 39px;
    }

    .news-page .hub-hero p {
        font-size: 15px;
    }

    .news-page .news-grid {
        width: calc(100% - 28px);
        gap: 15px;
    }

    .news-page .news-item {
        border-radius: 18px;
    }

    .news-page .news-item-media {
        height: 250px;
        flex-basis: 250px;
    }

    .news-page .news-category,
    .news-page .news-date {
        top: 12px;

        padding: 7px 9px;

        font-size: 9px;
    }

    .news-page .news-category {
        left: 12px;
    }

    .news-page .news-date {
        right: 12px;
    }

    .news-page .news-item-copy {
        padding: 23px 20px 22px;
    }

    .news-page .news-item-copy h2 {
        font-size: 28px;
    }

    .news-page .news-facts {
        grid-template-columns: 1fr;
    }

    .news-page .news-facts > span {
        min-height: 54px;
    }

    .news-page .hub-link--photo {
        width: calc(100% - 28px);
        min-height: 330px;
        margin-bottom: 46px;
        padding: 30px 23px 24px;

        justify-content: flex-end;

        border-radius: 18px;
    }

    .news-page .hub-link--photo::after {
        background:
            linear-gradient(
                180deg,
                rgba(3, 40, 33, .2) 0%,
                rgba(3, 40, 33, .68) 42%,
                rgba(3, 40, 33, .97) 100%
            );
    }

    .news-page .hub-link-image {
        object-position: 58% center;
    }

    .news-page .hub-link-button {
        width: 100%;
    }
}


/* =========================================================
   10. SAMAZINĀTA KUSTĪBA
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .news-page .news-item,
    .news-page .news-item-media--photo > img,
    .news-page .news-item-link i,
    .news-page .hub-link-image,
    .news-page .hub-link-button {
        transition: none;
    }
}
