/* style.css - Aleksandra Caka Muzejs */

/* =========================================
   1. VARIABLES & SETUP
   ========================================= */
:root {
    --color-brand-beige: #c2b08b;
    --color-bg-dark: #111111;
    --color-hero-bg: #a69470;
    --color-sand: #e3dac9;
    --color-gold: #b59f73;
    --color-topbar: #b59f7f;
    --color-award-beige: #ebe5d8;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* =========================================
   2. BASE RESETS
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--color-bg-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    transition: all 0.15s ease;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-bg-dark);
    outline-offset: 2px;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    font-style: italic;
    vertical-align: middle;
}

/* =========================================
   3. CONTAINERS
   ========================================= */
.container-custom {
    width: 100%;
    max-width: 1400px;
    margin-right: auto;
    margin-left: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 992px) {
    .container-custom {
        padding-left: 5rem;
        padding-right: 5rem;
    }
}

/* =========================================
   4. HEADER & NAVIGATION
   ========================================= */
.bg-topbar {
    background-color: var(--color-topbar);
}

.header-solid {
    background-color: var(--color-hero-bg);
    position: relative;
    z-index: 30;
}

.topbar-text {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 300;
    opacity: 0.95;
}

.btn-lang {
    font-size: 12px;
    color: white;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.logo-img {
    height: 76px;
    width: auto;
    display: block;
}

/* Nav Links */
.nav-link-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 18px;
    color: white;
    border: 1px solid transparent;
    opacity: 0.9;
    transition: all 0.2s;
}

.nav-link-custom:hover {
    border-color: rgba(255, 255, 255, 0.75);
    opacity: 1;
    color: white;
}

.nav-link-custom.active {
    border-color: transparent;
    opacity: 1;
    color: white;
}

.nav-link-custom.font-bold {
    font-weight: 700;
}

/* Dropdown Menu */
.nav-item-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-item-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
    z-index: 50;
}

.dropdown-menu-custom {
    background-color: var(--color-topbar);
    border-radius: 14px;
    padding: 6px 0;
    min-width: 240px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    will-change: transform, opacity;
    z-index: 100;
}

@media (min-width: 992px) {
    .nav-item-dropdown:hover .dropdown-menu-custom {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.dropdown-link-custom {
    display: block;
    padding: 4px 24px;
    color: rgba(0, 0, 0, 0.55);
    font-size: 18px;
    font-weight: 300;
    border: none;
    transition: color 0.2s ease;
}

.dropdown-link-custom:hover {
    background-color: transparent;
    color: #000000;
    border: none;
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    min-height: 100vh;
    background-color: var(--color-hero-bg);
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right center;
    z-index: 0;
    pointer-events: none;
}

.hero-text-stable {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-badge {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 18px;
    font-weight: 100;
    color: #000000;
    margin-bottom: 15px;
    display: block;
}

.hero-date {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    color: #000000;
    margin-bottom: 20px;
    letter-spacing: .01em;
}

.hero-title {
    font-size: 48px;
    line-height: 1.05;
    font-weight: 100;
    color: #000000;
    margin-top: 0;
    margin-bottom: 30px;
    min-height: 100px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 34px;
    border: 3px solid rgba(255, 255, 255, 0.85);
    background: transparent;
    color: white;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: .01em;
    transition: all 0.2s;
}

.hero-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-1px);
    color: white;
}

/* =========================================
   KARUSEĻA STILI (Bultiņas un Rimbulīši)
   ========================================= */

.carousel-indicators.hero-dots {
    margin-bottom: 0;
}

.carousel-indicators.hero-dots button[data-bs-target] {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #ffffff;
    margin-right: 12px;
    margin-left: 0;
    border: none;
    border-top: 0;
    border-bottom: 0;
    opacity: 0.55;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

/* Aktīvais rimbulītis */
.carousel-indicators.hero-dots button.active[data-bs-target] {
    opacity: 1;
}

/* Bultiņas datoram */
.hero-nav-btn {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.hero-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
    opacity: 1;
}

/* Bultiņu novietojums attiecībā pret tekstu */
.carousel-control-prev.hero-nav-btn {
    left: -70px;
}

.carousel-control-next.hero-nav-btn {
    right: -70px;
}


/* =========================================
   RESPONSIVE HERO (Mobilais & Planšetes)
   ========================================= */

@media (max-width: 768px) {
    .hero-bg-image {
        object-fit: cover;
        object-position: center right;
        opacity: 0.3;
    }

    .hero-text-stable {
        justify-content: flex-start !important;
        margin-top: 10px;
    }

    .hero-title {
        font-size: 32px;
        word-wrap: break-word;
        hyphens: auto;
        line-height: 1.2;
    }

    .hero-date {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .hero-badge {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .hero-nav-btn {
        top: auto;
        bottom: 0;
        /* Nolaižam pašā apakšā */
        transform: none;
        /* Noņemam vertikālo centrēšanu */
        width: 44px;
        height: 44px;
        background-color: rgba(255, 255, 255, 0.15);
    }

    .carousel-control-prev.hero-nav-btn {
        left: auto;
        right: 55px;
    }

    .carousel-control-next.hero-nav-btn {
        right: 0;
    }
}

/* =========================================
   6. MOBILE OVERLAY & SUBMENU
   ========================================= */
.nav-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 0.75rem;
    width: 46px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
}

.nav-overlay {
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 20000 !important;
}

.nav-overlay-inner {
    background-color: var(--color-gold);
}

.nav-mobile-link {
    display: flex;
    width: 100%;
    padding: 16px 18px;
    border-radius: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    text-align: left;
}

.nav-mobile-link:hover {
    border-color: rgba(255, 255, 255, 0.75);
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
}

.mobile-submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-submenu-toggle svg {
    transition: transform 0.2s ease;
}

.mobile-submenu {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-submenu.show {
    display: flex;
}

.mobile-sublink {
    display: block;
    padding: 12px 16px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    border-radius: 10px;
    border-left: 4px solid transparent;
}

.mobile-sublink:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-left-color: white;
    color: white;
}

/* =========================================
   7. CONTENT & NEWS
   ========================================= */
.section-content,
.section-news {
    background-color: white;
    padding-top: 70px;
    padding-bottom: 90px;
}

.page-title {
    font-size: 36px;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 3rem;
    color: var(--color-bg-dark);
}

.news-heading {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 30px;
    color: var(--color-bg-dark);
}

.news-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-img-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-content {
    background-color: var(--color-sand);
    padding: 26px;
    min-height: 250px;
}

.news-tag {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 14px;
    font-weight: 300;
    margin-bottom: 10px;
}

.news-date {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.025em;
    margin-bottom: 14px;
}

.news-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
}

.news-img-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #f5f5f5;
    overflow: hidden;
    position: relative;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.news-card:hover .news-img {
    transform: scale(1.03);
}

.ratio img {
    object-fit: cover;
    background-color: #f8f9fa;
}

/* =========================================
   8. FOOTER
   ========================================= */
.footer-main {
    background-color: var(--color-sand);
    color: var(--color-bg-dark);
    padding-top: 70px;
    padding-bottom: 70px;
}

.footer-bottom {
    background-color: var(--color-gold);
    padding-top: 18px;
    padding-bottom: 18px;
}

.footer-heading {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.footer-text {
    font-size: 16px;
}

.footer-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-label {
    font-weight: 600;
    opacity: 0.7;
}

.footer-link {
    color: white;
    font-size: 14px;
    opacity: 0.85;
}

.footer-link:hover,
.footer-link.opacity-100 {
    opacity: 1;
    color: white;
}

/* =========================================
   9. UTILITY HELPERS
   ========================================= */
.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.opacity-90 {
    opacity: 0.9;
}

.opacity-100 {
    opacity: 1;
}

.opacity-60 {
    opacity: 0.6;
}

.link-underline-brand {
    text-decoration: underline;
    text-decoration-color: var(--color-gold) !important;
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
    color: var(--color-bg-dark);
    transition: text-decoration-color 0.2s ease;
}

.link-underline-brand:hover {
    text-decoration-color: var(--color-bg-dark) !important;
    color: var(--color-bg-dark);
}

/* =========================================
   10. AWARD WINNERS - SPLIT BACKGROUND
   ========================================= */
@media (min-width: 992px) {
    .bg-split-section {
        background: linear-gradient(to right, #ffffff 50%, var(--color-award-beige) 50%) !important;
        position: relative;
    }

    .col-split-bg {
        background-color: transparent !important;
    }
}

@media (max-width: 991px) {
    .bg-split-section {
        background: #ffffff;
    }

    /* Pārspējam Bootstrap .col-12 ar specifiskāku selektoru */
    .row .col-right-beige {
        background-color: var(--color-award-beige);
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        /* Matemātiski izplešam pa visu ekrānu */
        width: calc(100% + 3rem);
        flex: 0 0 calc(100% + 3rem);
        max-width: unset;
        /* Atjaunojam iekšējās malas saturam */
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* =========================================
   11. ACCESSIBILITY
   ========================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================
   12. MOBILE MENU & RESPONSIVE OVERRIDES
   ========================================= */
@media (max-width: 991px) {
    header .container-custom {
        position: relative;
        min-height: 60px;
        padding-top: 10px !important;
    }

    .nav-toggle,
    .nav-close {
        position: absolute !important;
        top: 10px !important;
        right: 24px !important;
        margin: 0 !important;
        z-index: 200;
        width: 44px;
        height: 44px;
    }

    .nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        font-size: 28px;
        line-height: 1;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.55);
        border-radius: 0.75rem;
        color: white;
    }

    body.nav-open .nav-toggle {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .brand,
    .brand.mt-4 {
        margin-top: -5px !important;
        margin-left: 20px !important;
        position: relative;
        z-index: 105;
        width: max-content;
    }

    .logo-img {
        height: 40px;
        width: auto;
    }

    .nav-mobile {
        margin-top: 80px !important;
        padding-left: 15px;
        padding-right: 15px;
        text-align: left;
    }
}

/* =========================================
   13. GLOBAL TYPOGRAPHY SYSTEM
   (Aizstāj individuālos stilus katrā lapā)
   ========================================= */

/* LIELIE VIRSRAKSTI (H1) */
/* Izmantot: Vēstures lapa, Pieteikuma veidlapa, u.c. */
.heading-primary {
    font-size: 40px;
    line-height: 1.1;
    text-transform: uppercase;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--color-bg-dark);
}

/* VIDĒJIE VIRSRAKSTI (H2, Sarakstu virsraksti) */
/* Izmantot: Balvu ieguvēju saraksta virsraksti */
.heading-secondary {
    font-size: 28px;
    line-height: 1.2;
    text-transform: uppercase;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--color-bg-dark);
}

/* MAZIE VIRSRAKSTI / DATUMI */
.text-highlight {
    font-size: 24px;
    letter-spacing: -0.025em;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-bg-dark);
}

/* PAMATTEKSTS (Lielais) */
/* Izmantot: Ievada tekstiem, aprakstiem */
.text-body-large {
    font-size: 20px;
    line-height: 1.6;
    font-weight: 300;
    color: #4a4a4a;
    /* Nedaudz pelēcīgāks, lai vieglāk lasīt */
}

/* KATEGORIJAS BIRKAS */
.text-category {
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

/* SAITE: Epasts un mazas saites */
.link-email {
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    color: var(--color-bg-dark);
    font-weight: 500;
}

/* --- MOBILĀ OPTIMIZĀCIJA VISAI SISTĒMAI --- */
@media (max-width: 768px) {
    .heading-primary {
        font-size: 28px;
    }

    .heading-secondary {
        font-size: 24px;
    }

    .text-highlight {
        font-size: 20px;
    }

    .text-body-large {
        font-size: 16px;
    }

    .text-category {
        font-size: 12px;
    }
}

/* =========================================
   14. ANIMATIONS & HOVER EFFECTS
   (Jaunā sadaļa priekš Pasākumu lapas)
   ========================================= */

/* Attēla Zoom efekts */
.img-hover-wrap {
    display: block;
    overflow: hidden;
    /* Nogriež bildes malas, kad tā palielinās */
    border-radius: 4px;
    /* Neliels noapaļojums */
}

.img-hover-zoom {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-hover-wrap:hover .img-hover-zoom {
    transform: scale(1.05);
    /* Palielinājums par 5% */
}

/* Teksta apakšsvītras animācija */
.hover-underline-animation {
    display: inline-block;
    position: relative;
    color: var(--color-bg-dark);
    /* Melns teksts */
    text-decoration: none;
}

.hover-underline-animation::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-gold);
    /* Zelta krāsas līnija */
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.hover-underline-animation:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.hover-underline-animation:hover {
    color: var(--color-bg-dark);
    /* Teksts paliek melns */
}