@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

/* ── Globālie pamata stili ── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --olive: #808000;
    --olive-dark: #6d6d00;
    --olive-light: #a0a020;
    --bg: #f6f6f4;
    --card: #ffffff;
    --text: #2a2a2a;
    --muted: #666;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(128,128,0,0.15);
    --radius: 16px;
    --radius-sm: 10px;
}

html { 
    scroll-behavior: smooth; 
}

body {
    font-family: 'Poppins', 'Source Sans 3', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 10px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

/* ── Virsraksts un jaunā josla ── */
#header {
    background: linear-gradient(135deg, #606000 0%, #4a4a00 100%);
    color: white;
    padding: 35px 20px 25px 20px;
    border-radius: 0 0 12px 12px;
    display: flex;
    flex-direction: column;   
    align-items: center;      
    justify-content: center;
    position: relative;
    overflow: hidden;
    gap: 20px;                
}

#header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='300' height='200' viewBox='0 0 300 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='240' cy='100' rx='140' ry='90' fill='rgba(255,255,255,0.04)'/%3E%3Cellipse cx='60' cy='40' rx='80' ry='60' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E") right center / cover no-repeat;
    pointer-events: none;
}

.header-text { position: relative; z-index: 1; }
.header-text h1 {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-text p {
    font-size: 1rem;
    opacity: 0.85;
    margin-top: 6px;
    font-weight: 400;
}

.header-illustration {
    flex-shrink: 0;
    width: 130px;
    opacity: 0.92;
    position: relative;
    z-index: 1;
}

@media (max-width: 600px) {
    .header-illustration { display: none; }
    #header { padding: 28px 20px; }
}

#link {
    color: grey;
    text-align: center;
    font-size: 1.5rem;
}

/* ── JAUNĀ NAVIGĀCIJA (main-nav) ── */
nav.main-nav {
    background: white;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 2px solid #f0f0e8;
}

nav.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;          
    justify-content: center;  
    gap: 8px;                 
}

nav.main-nav li {
    display: inline-block;
}

nav.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: #444 !important;
    background-color: transparent !important;
    border-radius: 6px;
    border: none !important;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: none !important;
    transform: none !important;
}

nav.main-nav a i {
    font-size: 0.85rem;
    opacity: 0.7;
}

nav.main-nav a:hover,
nav.main-nav a.active {
    background: rgba(128,128,0,0.1) !important;
    color: var(--olive) !important;
}

nav.main-nav a.highlight {
    color: var(--olive) !important;
    font-weight: 600;
}

/* ── VECĀ NAVIGĀCIJA (Ar sārtajām/pelēkajām pogām un špikerpogu) ── */
nav:not(.main-nav) {
    background: transparent;  
    width: 100%;
    display: flex;
    justify-content: center;  
    flex-wrap: wrap;          /* Ļauj elementiem pārlēkt jaunā rindā */
    gap: 8px;
    margin: 15px 0;
}

nav:not(.main-nav) ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;          
    justify-content: center;  
    gap: 8px;                 
    width: 100%;              /* Izstiepj sarakstu, lai centrēšana strādātu */
}

/* Šīs ir parastās vecā stila izvēlnes pogas */
nav:not(.main-nav) a:not(.spiker-btn) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important; 
    background-color: rgba(255, 255, 255, 0.12); 
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.25s ease;
    white-space: nowrap;
}

nav:not(.main-nav) a:not(.spiker-btn):hover {
    background-color: #808000 !important; 
    color: #ffffff !important;            
    transform: translateY(-2px);          
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ── CRITICAL FIX: ŠPIKERPOGAS CENTRĒŠANA ── */
/* Piespiežam saitei ieņemt visu rindu un nocentrēties flex konteinerā */
nav:not(.main-nav) a.spiker-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #6b7c45 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
    transition: background 0.2s, transform 0.2s;
    
    /* Šis nomet pogu jaunā rindā un nocentrē flex struktūrā */
    flex-basis: 100%;          
    max-width: fit-content;    
    margin: 15px auto !important; 
    transform: none !important;
}

nav:not(.main-nav) a.spiker-btn:hover {
    background-color: #556135 !important;
    transform: translateY(-2px) !important;
}

/* Ja poga ir ielikta iekš <li> elementa */
nav:not(.main-nav) li:has(.spiker-btn) {
    flex-basis: 100%;
    display: flex;
    justify-content: center;
}

/* ── Galvenais satura apgabals ── */
.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* ── Meklēt ── */
.search-section {
    background: white;
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.search-label {
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.search-form {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.search-form input, #searchInput {
    flex: 1;
    padding: 12px 18px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#searchInput {
    width: 200px;
    padding: 5px;
}

.search-form input:focus {
    outline: none;
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(128,128,0,0.1);
    background: white;
}

.search-form input::placeholder { color: #aaa; }

.btn-search, button {
    background: var(--olive);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

button {
    padding: 5px;
}

.btn-search:hover {
    background: var(--olive-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(128,128,0,0.3);
}

/* ── Informācijas kartīte ── */
.info-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.info-card-icon {
    font-size: 3rem;
    flex-shrink: 0;
    line-height: 1;
}

.info-card-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--olive);
    font-weight: 600;
    margin-bottom: 8px;
}

.info-card-body p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.info-card-body p:last-child { margin-bottom: 0; }
.thanks-links a {
    color: var(--olive);
    text-decoration: none;
    font-weight: 500;
}
.thanks-links a:hover { text-decoration: underline; }

/* ── Režģis un Kartītes (PILNĪBĀ CENTRĒTS UN RESPONSĪVS) ── */
.cards-grid, #productWrapper {
    display: flex !important;          /* Mainām grid uz flex, lai vieglāk vadītu centrēšanu */
    flex-wrap: wrap !important;        /* Ļaujam pogām pārlūzt jaunā rindā uz mazākiem ekrāniem */
    justify-content: center !important; /* CENTRĒ POGAS HORIZONTĀLI */
    align-items: center !important;    /* CENTRĒ POGAS VERTIKĀLI */
    gap: 16px !important;
    margin: 20px auto 35px auto !important; /* auto sānos centrē pašu bloku */
    padding: 0 !important;
    width: 100% !important;
}

/* Katras pogas izmēra kontrole, lai tās neizstieptos un būtu simetriskas */
.item-card, .itemWrapper {
    flex: 1 1 260px !important;       /* Pogas minimālais platums ir 260px, bet tās var vienmērīgi augt */
    max-width: 320px !important;       /* Neļauj pogām izstiepties pārāk milzīgām datora ekrānā */
    background: white !important;
    border-radius: var(--radius, 12px) !important;
    text-decoration: none !important;
    color: #000000 !important;
    box-shadow: var(--shadow) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1.5px solid #e2e8f0 !important;
    display: block !important;
    height: auto !important;
}

/* Mobilo telefonu ekrāniem (pogas ieņem pilnu platumu un smuki centrējas) */
@media (max-width: 480px) {
    .item-card, .itemWrapper {
        max-width: 100% !important;   /* Telefonā pa visu platumu */
        flex: 1 1 100% !important;
    }
}
.item-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px 22px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1.5px solid transparent;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(128,128,0, 0.15);
    background: #ffffff;
}

.item-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f4f4ec; 
    color: var(--olive); 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px; 
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.item-card:hover .item-card-icon {
    background: var(--olive);
    color: white; 
}

.item-card-body { flex: 1; }
.item-card-body h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
}

.item-card-body .date {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 2px;
}

.item-card-arrow {
    color: #ccc;
    font-size: 1.1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.item-card:hover .item-card-arrow {
    color: var(--olive);
    transform: translateX(3px);
}

/* ── Vecais/Jaunais kartīšu stils (itemWrapper) ── */
.itemWrapper {
    padding: 0.75rem;
    display: block;          
    text-decoration: none;   
    color: #333333;          
}

.itemWrapper:link,
.itemWrapper:visited,
.itemWrapper:hover,
.itemWrapper:active {
    text-decoration: none;
}

.itemContent {
    border: 2px dotted grey;
    padding: 0.5rem;
    background-color: #eee;
    height: 100%;
    border-radius: calc(0.8rem + 0.5rem);
    display: flex;
    justify-content: center; 
    align-items: center;     
    gap: 15px;
    transition: background-color 0.2s ease;
}

.itemWrapper:hover .itemContent {
    background-color: #e2e2df;
    cursor: pointer;
}

.itemContent h3 {
    color: #333333;
    text-align: center;      
    font-weight: bold;
    font-size: 1rem;
    background-color: transparent;
    margin: 0;
}

.imageWrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.8rem;
    background-color: #eee;
}

.imageWrapper {
    height: 5rem;
    background-color: #eee;
}

.itemContent div {
    background-color: #eee;
}

.itemContent div p {
    background-color: #eee;
    text-align: center;
    font-size: 0.7rem;
}

/* ── Tabula ── */
table, th, td {
    border: 1px solid #ddd;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th {
    background-color: grey;
    color: black;
    padding: 10px;
    text-align: left;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

td {
    padding: 8px;
}

/* ── Reklāma ── */
.partner-links-section { /* bijušais .ads-section */
    background: white;
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.ads-section h3 {
    color: var(--olive);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ads-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    list-style: none;
    counter-reset: ad-counter;
}

@media (max-width: 600px) {
    .ads-grid { grid-template-columns: 1fr; }
}

.ads-grid li {
    counter-increment: ad-counter;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #555;
    padding: 10px 14px;
    background: #fafaf5;
    border-radius: 8px;
}

.ads-grid li::before {
    content: counter(ad-counter) ".";
    color: var(--olive);
    font-weight: 700;
    flex-shrink: 0;
    min-width: 20px;
}

.ads-grid li a {
    color: var(--olive);
    font-weight: 600;
    text-decoration: none;
}
.ads-grid li a:hover { text-decoration: underline; }

/* ── Darbību pogas ── */
.action-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 36px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-action.primary {
    background: var(--olive);
    color: white;
    box-shadow: 0 4px 14px rgba(128,128,0,0.3);
}

.btn-action.primary:hover {
    background: var(--olive-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(128,128,0,0.35);
}

.btn-action.secondary {
    background: white;
    color: var(--olive);
    border: 2px solid var(--olive);
    box-shadow: var(--shadow);
}

.btn-action.secondary:hover {
    background: rgba(128,128,0,0.06);
    transform: translateY(-2px);
}

.custom-button {
    background-color: #BC8F8F; 
    border: none;
    color: white; 
    padding: 12px 16px;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    width: auto;
    display: block; 
    margin: 0 auto; 
    border-radius: 0.6rem;
    cursor: pointer; 
}

.button-container {
    display: flex;
    justify-content: space-between;
}

.button-item {
    flex: 1;
    margin: 0 10px;
}

#submitBtn {
    background-color: #BC8F8F;
    color: white;
    padding: 10px 20px;
    font-size: 18px;
}

.btn {
    background: none;
    color: #808000;
    font-size: 0.85rem;
    width: auto;
    height: auto;
    border-radius: 0;
    padding: 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid #808000;
    text-decoration: none;
}
.btn:hover { opacity: 0.7; }

/* ── Pop-up vai dialoga logs ── */
.popup-container {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.popup-container.open {
    display: flex;
}

.popup-box {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    position: relative;
    animation: popIn 0.25s ease;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.popup-box h3 {
    font-family: 'Lora', serif;
    color: var(--olive);
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.popup-box p, .popup-box li {
    color: #555;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.popup-box ul { padding-left: 0; list-style: none; }
.popup-box li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0e8;
    display: flex;
    gap: 8px;
}
.popup-box li::before { content: '→'; color: var(--olive); flex-shrink: 0; }
.popup-box li a, .popup-box p a {
    color: var(--olive);
    text-decoration: none;
    font-weight: 500;
}
.popup-box li a:hover { text-decoration: underline; }

.close-btn {
    position: absolute;
    background-color: #BC8F8F; 
    top: 16px;
    right: 20px;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: 0.5px;
}
.close-btn:hover { background: #e8e8e8; color: #333; }

#popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    width: 480px;
    background: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    z-index: 1100;
    max-height: 90vh;
    overflow-y: auto;
}

#popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1099;
    backdrop-filter: blur(3px);
}

#popup h3 {
    font-family: 'Lora', serif;
    color: var(--olive);
    margin-bottom: 14px;
    font-size: 1.15rem;
}
#popup p { color: #555; font-size: 0.95rem; margin-bottom: 10px; }
#popup a {
    color: var(--olive);
    text-decoration: none;
    font-weight: 500;
}
#popup a:hover { text-decoration: underline; }

.popup-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-popup-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    background: #f5f5ee;
    color: #555;
    transition: all 0.2s;
    cursor: pointer;
    font-family: inherit;
    border: none;
}
.btn-popup-link:hover { background: #efefe5; color: #333; }

#closePopup {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--olive);
    color: white;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
#closePopup:hover { background: var(--olive-dark); }

/* ── Kalendārs un Lapas saturs (Grid) ── */
.separator {
    margin: 0 170px; 
}

.dark-red-link {
    color: #BC8F8F;
}

#pageContent {
    display: grid;
    background-color: #eee;
}

#contentWrapper {
    grid-area: content;
    text-align: center;
}

#banners {
    background-color: #BEC1C1;
    grid-area: banners;
}

#productWrapper {
    display: grid;
}

#secondNavigation {
    background-color: #BEC1C1;
    grid-area: navigation;
    display: inline-block;
    padding: 0.5rem;
    text-decoration: none;
    font-size: 1rem;
    color: grey;
    border: 2px dotted grey;
}

/* 1. MOBILIE TELEFONI (no 0px līdz 400px) - Pamata režīms */
#pageContent {
    display: grid;
    grid-template-columns: 100%;
    grid-template-areas: 
        "banners" 
        "navigation" 
        "content";
}
#productWrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* 2. PLANŠETDATORI (no 401px līdz 899px) */
@media all and (min-width: 401px) and (max-width: 899px) {
    #pageContent {
        grid-template-columns: 30% 70%;
        grid-template-areas: 
            "banners banners" 
            "navigation content";
    }
    #productWrapper {
        grid-template-columns: 1fr 1fr; /* Pogas 2 rindās */
    }
}

/* 3. LIELIE EKRĀNI / DATORI (no 900px uz augšu) */
@media all and (min-width: 900px) {
    #pageContent {
        grid-template-columns: 20% auto 15%;
        grid-template-areas: "navigation content banners";
    }
    #productWrapper {
        grid-template-columns: 1fr 1fr 1fr; /* Pogas 3 rindās */
    }
}

/* ── Savērst un izvērst ── */
.twist {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.twist-toggle {
    cursor: pointer;
    background-color: #f9f9f9;
    padding: 10px;
    margin-bottom: 5px;
}

.twist-toggle.open + .twist-content {
    max-height: 1000px; 
}

.twist-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

/* ── Meklēšanas rezultāti ── */
#searchResultsContainer {
    margin-top: 20px;
    padding: 10px;
    border-top: 2px solid #ccc;
}

#searchResultsContainer div {
    background-color: #f9f9f9;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

#searchResultsContainer div:hover {
    background-color: #eef5ff;
}

#searchResultsContainer a {
    font-size: 18px;
    font-weight: bold;
    color: #0066cc;
    text-decoration: none;
}

#searchResultsContainer a:hover {
    text-decoration: underline;
    color: #004999;
}

#searchResultsContainer p {
    font-size: 14px;
    color: #333;
    margin-top: 8px;
}

/* ── Kājene un Pseido klases ── */
#footer {
    background-color: #C0C0C0;
    border-top: 2px solid #f0f0e8;
    padding: 36px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    color: grey;
    font-size: 1.2rem;
    text-align: center;
}

@media (max-width: 640px) {
    #footer { grid-template-columns: 1fr; padding: 28px 20px; }
}

.footer-contact i { color: var(--olive); margin-right: 6px; }
.footer-contact a {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}
.footer-contact a:hover { color: var(--olive); }
.footer-legal {
    color: var(--olive);
    font-weight: 600;
    margin-top: 8px;
}
.footer-meta { color: #999; font-size: 0.82rem; margin-top: 6px; }

#date-info {
    font-size: 0.85rem;
    color: var(--muted);
    padding: 0 2px;
}

.section-divider {
    border: none;
    border-top: 2px solid #eeede5;
    margin: 8px 0 28px;
}

/* Saišu pseidoklases */
a:not(nav a):link { color: grey; }
a:not(nav a):visited { color: grey; }
a:not(nav a):hover { color: #808000; }
a:active { color: #808080; }

p.note:hover {
    background-color: red;
    color: white;
}

/* ── Termiņu kalkulatora sekcijas stili ── */
.kalkulators-sekcija {
    width: 100%;
    max-width: 850px;
    margin: 24px auto;
    box-sizing: border-box;
}

.kalkulators-ietvars {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
    background-color: #ffffff;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.kalkulatora-bloks {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
}

.kalkulatora-bloks label {
    font-family: system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.kalkulatora-bloks select,
.kalkulatora-bloks input[type="text"] {
    font-family: system-ui, sans-serif;
    font-size: 15px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
    background-color: #fff;
    color: #1e293b;
}

.kalkulatora-bloks select:focus,
.kalkulatora-bloks input[type="text"]:focus {
    border-color: #3b82f6;
    outline: none;
}

.kalkulatora-bloks .rezultata-ievade {
    background-color: #f8fafc;
    font-weight: 600;
    color: #556b2f;
    cursor: default;
}

/* Brīdinājumu bloks — aizņem visu platumu zem trim laukiem */
.bridinajums-bloks {
    width: 100%;
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 4px;
}

.brid-rinda {
    font-family: system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
    border-left-width: 3px;
    border-left-style: solid;
}

/* Sarkans — brīvdiena/svētki */
.brid-sarkans {
    background-color: #fff1f2;
    color: #be123c;
    border-left-color: #be123c;
}

/* Dzeltens — nākamā darba diena vai informatīvs */
.brid-dzeltens {
    background-color: #fefce8;
    color: #854d0e;
    border-left-color: #ca8a04;
}

/* Zils — iepriekšējā darba diena */
.brid-zils {
    background-color: #eff6ff;
    color: #1d4ed8;
    border-left-color: #3b82f6;
}

/* Pelēks — labojamā vieta */
.brid-peleks {
    background-color: #f8fafc;
    color: #64748b;
    border-left-color: #94a3b8;
    font-weight: 500;
}

.flatpickr-calendar {
    font-family: system-ui, sans-serif !important;
}

@media (max-width: 600px) {
    .kalkulators-ietvars {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}


/* ── Akordeons saistītajos .html ── */
    /* Nosaukums */
#header {
    background-color: var(--olive);
    color: white;
    font-size: 24px;
    font-weight: bold;
    padding: 15px 20px;
    margin-bottom: 20px;
}

h3 {
    cursor: pointer;
    background-color: var(--card, #ffffff);
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: background-color 0.2s ease, border-color 0.2s ease;

    /* Novietojam elementus rindā vienu otram blakus */
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

h3:hover {
    background-color: #f0f0f0;
    border-color: var(--olive);
}

    /* Aktīva (atvērta) virsraksta stils */
h3.active-header {
    background-color: #eaeaea !important;
    border-color: #555 !important;
}

    /* KRUSTIŅŠ PIRMS TEKSTA */
h3::before {
    content: '➕';
    font-size: 14px;
    font-weight: bold;
    color: #64748b;
    margin-right: 12px; /* Atstarpe starp krustiņu un virsraksta tekstu */
    display: inline-block;
    transition: color 0.2s ease;
}

  /* KAD SADAĻA IR ATVĒRTA: Krustiņš pārvēršas par mīnusu */
h3.active-header::before {
    content: '－';   /* Mīnusa simbols, kad vaļā */
    color: var(--olive);  /* Atvērtā stāvoklī iekrāsojam olīvzaļu */
}

   /* Sākotnēji visi akordeona teksti ir aizvērti */
.twist {
    display: none;
    padding: 15px;
    background-color: var(--card, #ffffff);
    border: 1px solid #cbd5e1;
    border-top: none;
    border-radius: 0 0 6px 6px;
    margin-top: -10px;
    margin-bottom: 20px;
}

  twist ul {
    padding-left: 25px;
    margin-bottom: 15px;
  }


/* Virsrakstu rāmji un pārskatāmība */
h3 {
    cursor: pointer;
    background-color: var(--card);
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Efekts, kad uzbrauc ar peli uz virsraksta */
h3:hover {
    background-color: #f0f0f0;
    border-color: var(--olive);
}

/* Kad sadaļa ir atvērta, rāmja krāsa mainās */
h3.open {
    background-color: #eaeaea !important;
    border-color: #555 !important;
}

/* SĀKOTNĒJI: Paslēpjam saturu drošā veidā, izmantojot max-height un overflow */
.twist {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out; /* Nodrošina plūstošu atvēršanos */
    padding: 0 15px;
}

/* KAD H3 IR ATBĒRTS: palielinām max-height, lai teksts parādītos */
h3.open + .twist {
    max-height: 2000px; /* Pietiekami liels skaitlis, lai ietilptu garāks teksts */
    padding: 10px 15px 20px 15px; /* Pievienojam glītus attālumus tekstam */
}    



 /* ====== SĀKUMLAPAS POGU / KARTĪŠU STILI (PĀRRAKSTA VECOS STILUS) ====== */
#productWrapper {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 15px !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.itemWrapper {
    text-decoration: none !important;
    color: #000000 !important;
    display: block !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
    height: auto !important;
    float: none !important;
    width: auto !important;
}

.itemWrapper:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    border-color: var(--olive, #808000) !important;
}

.itemContent {
    padding: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 15px !important;
    box-sizing: border-box !important;
}

.button-text {
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #000000 !important;
    margin: 0 !important;
    text-align: left !important;
}


 /* ====== GOOGLE TRANSLATOR ====== */

.translate-widget {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 10;
}

/* Nomaina Google noklusējuma izskatu, lai derētu pie zaļās galvenes */
.translate-widget .goog-te-gadget-simple {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 8px;
    padding: 6px 10px;
    font-family: 'Source Sans 3', sans-serif;
}
.translate-widget .goog-te-gadget-simple span,
.translate-widget .goog-te-gadget-simple a {
    color: #fff !important;
}

/* Paslēpj Google augšējo joslu, kas pārbīda lapu */
.skiptranslate iframe.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }


/* Attēlu (jpg, png) palielināšana un aizvēršana */
.sikbilde {
  width: 100px;          /* ikonas izmērs */
  max-width: 100%;
  cursor: zoom-in;
  vertical-align: middle;
}

#lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: rgba(0, 0, 0, .9);
}
#lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightbox img {
  width: 95vw;
  height: 95vh;
  object-fit: contain;   /* saglabā proporcijas, ietilpst ekrānā */
}
#aizvert {
  position: fixed;
  top: 12px;
  right: 16px;
  font-size: 2.5rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
}