/* ==========================================================
   RESPONSIVITĀTES LABOJUMS: box-sizing reset (KRITISKI!)
   Bez šī padding pieskaitās platumam virs konteinera platuma
   un izraisa horizontālu overflow mobilajās ierīcēs.
   ========================================================== */
.dubai-tour-container,
.dubai-tour-container *,
.dubai-tour-container *::before,
.dubai-tour-container *::after {
    box-sizing: border-box;
}

:root {
    --main-color: #e8b75b;
    --main-dark: #c79a3e;
    --text-color: #333;
    --bg-light: #f9f4e8;
    --tab-bg: #fff;
}

/* Base Container */
.dubai-tour-container {
    width: 100%;
    max-width: 100%;
    min-width: 0; /* LABOJUMS: bez šī flex/grid vecākelements var atteikties sarauties, izstiepjot visu bloku ārpus redzamā apgabala */
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.dubai-tab-container {
    width: 100%;
    min-width: 0; /* LABOJUMS: tas pats iemesls */
    background-color: #fff;
    border-radius: 8px;
}

/* Navigation */
.dubai-tab-navigation {
    display: flex;
    align-items: flex-end;
    width: 100%;
    min-width: 0; /* LABOJUMS: tas pats iemesls - garantē, ka RITINĀŠANA notiek šeit, nevis viss bloks izstiepjas */
    gap: 4px; /* GLĪTĀK: neliela atstarpe starp cilnēm, nevis tās saskaras */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* gluda ritināšana iOS */
    scrollbar-width: none;
    -ms-overflow-style: none;
    background-color: var(--bg-light); /* GLĪTĀK: izmanto jau definēto, iepriekš neizmantoto mainīgo kā "sliedes" fonu */
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 8px 8px 0;
    border-radius: 8px 8px 0 0;
}

.dubai-tab-navigation::-webkit-scrollbar {
    display: none;
}

.dubai-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* LABOJUMS: garantē, ka pogas nekad nesaspiežas, tikai ritina */
    width: 80px; /* LABOJUMS: FIKSĒTS platums (nevis min-width), lai visas cilnes būtu VIENĀDA izmēra neatkarīgi no teksta garuma */
    height: 70px;
    padding: 6px 4px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    position: relative;
    white-space: normal; /* LABOJUMS: bija "nowrap" - tieši tas lika pogām izstiepties platākām, ja teksts nesatilpa */
    text-align: center;
    color: #777;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.dubai-tab-btn:hover {
    background-color: rgba(232, 183, 91, 0.15);
    color: var(--main-color);
    transform: translateY(-2px); /* GLĪTĀK: taustāma "pacelšanās" uz hover */
}

.dubai-tab-btn.dubai-active {
    color: var(--main-color);
    font-weight: bold;
    background-color: #fff; /* GLĪTĀK: aktīvā cilne "izceļas" pret krēmaino sliedi */
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); /* GLĪTĀK: viegla pacēluma ēna */
}

.dubai-tab-btn.dubai-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background-color: var(--main-color);
    border-radius: 3px;
    transform: scaleX(0);
    transform-origin: center;
    animation: tabIndicatorGrow 0.3s ease forwards; /* GLĪTĀK: svītra mīksti "izaug", nevis uzreiz uzlecas */
}

@keyframes tabIndicatorGrow {
    to {
        transform: scaleX(1);
    }
}

.dubai-tab-btn:focus-visible {
    outline: 2px solid var(--main-color); /* GLĪTĀK: redzams fokuss tastatūras lietotājiem */
    outline-offset: -2px;
}

.day-number {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 2px;
    width: 100%;
    text-align: center;
}

.day-label {
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.02em; /* GLĪTĀK: neliela atstarpe burtos labākai lasāmībai mazā izmērā */
    width: 100%;
    text-align: center;
}

/* Content Area */
.dubai-tab-content {
    padding: 25px 20px;
    width: 100%;
    border-top: 1px solid #f0f0f0; /* GLĪTĀK: smalka robeža, kas atdala saturu no cilņu sliedes */
}

.dubai-tab-pane {
    display: none;
}

.dubai-tab-pane.dubai-active {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

.day-title {
    display: block; /* LABOJUMS: bija "flex" + "flex-wrap:wrap", kas lika ikonai un tekstam katram pāriet savā rindā */
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
    color: #333;
    font-size: 20px;
    font-weight: bold;
    overflow-wrap: break-word;
}

.day-title::after {
    content: "";
    display: table;
    clear: both; /* clearfix - lai apakšējā apmale (border-bottom) korekti aptver arī peldošo ikonu */
}

.day-title .icon {
    float: left !important; /* !important kā drošība pret tēmas h2 noklusējuma stiliem */
    display: block !important;
    margin-right: 10px;
    font-size: 24px;
    line-height: 1.3;
}

.day-title .icon img.emoji {
    float: none !important; /* WordPress core emoji CSS dažreiz uzspiež savu display/vertical-align - šis nodrošina, ka tas neizjauc float uz vecāka span */
    vertical-align: middle !important;
}

.schedule-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eaeaea;
    width: 100%;
}

.schedule-time {
    font-weight: bold;
    color: var(--main-color);
    margin-bottom: 8px;
    font-size: 16px;
}

.schedule-details {
    width: 100%;
}

.schedule-details strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 16px;
    overflow-wrap: break-word;
}

.schedule-details p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    overflow-wrap: break-word; /* LABOJUMS: gari vārdi nesaplēš izkārtojumu */
}

.special-highlight {
    margin-top: 15px;
    padding: 20px;
    background-color: rgba(232, 183, 91, 0.1);
    border-top: 3px solid var(--main-color);
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    width: 100%;
}

.special-highlight ul {
    display: inline-block;
    text-align: left;
    padding-left: 0;
    margin-top: 10px;
    list-style-position: inside;
    max-width: 100%;
}

.special-highlight li {
    margin-bottom: 6px;
    overflow-wrap: break-word;
}

.special-highlight .schedule-time {
    margin-bottom: 15px;
    display: block;
}

/* Day Footer */

.day-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.day-footer p {
    color: #444;
    font-size: 15px;
    margin: 0;
    overflow-wrap: break-word;
}

/* Program Container (Price & Services) */
.program-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    width: 100%;
    margin: 20px auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    box-sizing: border-box;
}

.program-title {
    color: #2c3e50;
    text-align: center;
    font-weight: 300;
    margin-bottom: 24px;
    font-size: 1.5em;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.price-highlight {
    color: var(--main-color);
    font-weight: 600;
    overflow-wrap: normal; /* LABOJUMS: atceļ vecāka elementa "break-word", kas lauza vārdus jebkurā vietā */
    word-break: keep-all; /* LABOJUMS: aizliedz pārtraukt vārdu vidū - "Avio+Viesnīca+..." paliek vesels */
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.service-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.bullet {
    width: 8px;
    height: 8px;
    background-color: var(--main-color);
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
    margin-right: 4px;
}

.service-text {
    color: #2c3e50;
    line-height: 1.6;
    font-size: 16px;
    flex: 1;
    text-align: left;
    overflow-wrap: break-word; /* LABOJUMS */
    min-width: 0; /* LABOJUMS: atļauj flex bērnam sarauties zem satura platuma, lai break-word strādātu */
}

.payment-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid var(--main-color);
}

.payment-info p {
    margin: 0;
    font-style: italic;
    color: #555;
    line-height: 1.5;
    overflow-wrap: break-word;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .program-container {
        margin: 10px;
        padding: 20px;
        border-radius: 12px;
    }

    .program-title {
        font-size: 1.3em;
        margin-bottom: 20px;
    }

    .dubai-tab-btn {
        width: 70px;
        height: 60px;
        padding: 8px;
    }

    .day-number {
        font-size: 18px;
    }

    .day-label {
        font-size: 10px;
    }

    .dubai-tab-content {
        padding: 20px 15px;
    }

    .day-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .program-container {
        margin: 5px;
        padding: 16px;
    }

    .dubai-tab-navigation {
        gap: 3px;
        padding: 6px 6px 0;
    }

    .dubai-tab-btn {
        width: 60px;
        height: 55px;
        padding: 6px;
    }

    .day-number {
        font-size: 16px;
    }

    .day-title {
        font-size: 16px;
    }

    .day-title .icon {
        font-size: 20px;
    }

    .service-text {
        font-size: 14px;
    }
}

/* LABOJUMS: jauns breakpoints ļoti šauriem ekrāniem (piem., iPhone SE, 320-375px),
   kas ir kritiski svarīgi 8-9 dienu turēm ar daudzām cilnēm */
@media (max-width: 380px) {
    .dubai-tab-navigation {
        gap: 2px;
    }

    .dubai-tab-btn {
        width: 52px;
        height: 50px;
        padding: 4px;
    }

    .day-number {
        font-size: 14px;
    }

    .day-label {
        font-size: 9px;
    }

    .day-title {
        font-size: 15px;
    }

    .day-title .icon {
        font-size: 18px;
        margin-right: 6px;
    }

    .schedule-time {
        font-size: 14px;
    }

    .schedule-details strong {
        font-size: 14px;
    }

    .schedule-details p,
    .service-text {
        font-size: 13px;
    }

    .program-container {
        padding: 12px;
    }
}