﻿/* ========================================================= */
/* ROOT – BOOTSTRAP / CRAFTO OVERRIDES                        */
/* ========================================================= */

:root {
    --bs-primary: var(--base-color); /* Crafto green energy */
    --bs-primary-rgb: 105, 191, 107;
    --bs-secondary: #2A6F80;
    --bs-secondary-rgb: 42, 111, 128;
    --bs-link-color: var(--bs-primary);
    --bs-link-hover-color: #55a65a;
    /* Nav pills */
    --bs-nav-pills-link-active-bg: var(--bs-primary);
    --bs-nav-pills-link-active-color: #fff;
    /* Buttons – primary */
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: rgba(var(--bs-primary-rgb), 0.85);
    --bs-btn-hover-border-color: rgba(var(--bs-primary-rgb), 0.85);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: rgba(var(--bs-primary-rgb), 0.75);
    --bs-btn-active-border-color: rgba(var(--bs-primary-rgb), 0.75);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: rgba(var(--bs-primary-rgb), 0.45);
    --bs-btn-disabled-border-color: rgba(var(--bs-primary-rgb), 0.45);
}

/* ========================================================= */
/* GLOBAL – SOFT BUTTON SYSTEM (CRAFTO OVERRIDE)             */
/* ========================================================= */

.py-70px { padding-top: 70px; padding-bottom: 70px;}
.py-80px { padding-top: 80px; padding-bottom: 80px;}
.py-90px { padding-top: 90px; padding-bottom: 90px;}

/* vsi "light / white" gumbi */
.btn-light,
.btn-white,
.btn.btn-light,
.btn.btn-white {
    background: #ffffff;
    color: #1f3d2b;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    box-shadow: none;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

    /* HOVER – brez temnenja */
    .btn-light:hover,
    .btn-light:focus,
    .btn-white:hover,
    .btn-white:focus {
        background: rgba(255, 255, 255, 0.92);
        color: #1f3d2b;
        border-color: #ffffff;
        transform: translateY(-1px);
        box-shadow: none;
    }

    /* ACTIVE */
    .btn-light:active,
    .btn-white:active {
        background: rgba(255, 255, 255, 0.85);
        transform: translateY(0);
    }

    /* odstranimo Crafto pseudo animacije */
    .btn-light::before,
    .btn-light::after,
    .btn-white::before,
    .btn-white::after {
        display: none !important;
    }

.btn-outline-light {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    font-weight: 600;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

    /* HOVER – soft, brez temnenja */
    .btn-outline-light:hover,
    .btn-outline-light:focus {
        background: rgba(255, 255, 255, 0.15);
        color: #ffffff;
        border-color: #ffffff;
        transform: translateY(-1px);
        box-shadow: none;
    }

    /* ACTIVE */
    .btn-outline-light:active {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(0);
    }

    /* odstrani Crafto pseudo-element animacije */
    .btn-outline-light::before,
    .btn-outline-light::after {
        display: none !important;
    }

/* ========================================================= */
/* HEADER                                                    */
/* ========================================================= */

header .navbar {
    z-index: 2000;
}

header .navbar-brand img {
    max-height: 48px;
}

/* ========================================================= */
/* HERO LAYOUT                                               */
/* ========================================================= */

.home-hero {
    min-height: 800px;
    transition: all 0.3s ease;
}

/* Desktop hero height */
@media (min-width: 768px) {
    .home-hero {
        min-height: unset;
        height: calc(100vh - 96px);
    }
}

/* ========================================================= */
/* HERO SEARCH – INPUT                                       */
/* ========================================================= */

.home-hero-search {
    width: 100%;
    max-width: 720px;
}


/* Input group = pill */
.hero-search-input-group {
    display: flex;
    align-items: center;
    height: 80px;
    padding: 0 32px;
    background-color: #ffffff;
    border-radius: 999px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Icon inside input */
.hero-search-icon {
    font-size: 24px;
    color: #777;
    margin-right: 16px;
    flex-shrink: 0;
}

/* Actual input */
.hero-search-input {
    padding: 12px 0px;
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent;
    font-size: 22px;
    font-weight: 500;
    color: #333;
}

    .hero-search-input::placeholder {
        color: #999;
        font-style: italic;
    }

/* Focus state – subtle, not aggressive */
.hero-search-input-group:focus-within {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ========================================================= */
/* HERO SEARCH – MOBILE                                      */
/* ========================================================= */

@media (max-width: 767px) {
    .hero-search-input-group {
        height: 64px;
        padding: 0 24px;
    }

    .hero-search-icon {
        font-size: 22px;
        margin-right: 12px;
    }

    .hero-search-input {
        font-size: 18px;
    }
}

/* =============================== */
/* HERO SEARCH STATE – DEFAULT     */
/* =============================== */

.hero-search-state {
    display: none;
}

/* =============================== */
/* HERO SEARCH STATE – ACTIVE      */
/* =============================== */

.home-hero.search-active .hero-default-state,
.home-hero.search-active a.btn,
.home-hero.search-active p {
    display: none;
}

.home-hero.search-active .hero-search-state {
    display: block;
    margin-top: 30px;
}

/* Input naj se pomakne gor */
@media (min-width: 992px) {
    .home-hero.search-active .home-hero-search {
        margin-top: 0;
    }
}

@media (max-width: 991px) {
    .home-hero.search-active .home-hero-search {
        margin-top: 0;
    }
}

.hero-search-results-title {
    font-size: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
    padding-bottom: 8px;
}

.hero-search-results ul {
    margin: 0;
    padding: 0;
}

.hero-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 4px;
    font-size: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background 0.15s ease, padding-left 0.15s ease;
}

    .hero-search-item:last-child {
        border-bottom: none;
    }

    /* levi del */
    .hero-search-item .item-left {
        display: flex;
        align-items: center;
        gap: 14px;
    }

        .hero-search-item .item-left i {
            font-size: 18px;
            opacity: 0.85;
        }

    /* desna puščica */
    .hero-search-item .item-right i {
        font-size: 16px;
        opacity: 0.6;
        transition: transform 0.15s ease, opacity 0.15s ease;
    }

    /* hover – zelo pomemben občutek */
    .hero-search-item:hover {
        background: rgba(255, 255, 255, 0.08);
        padding-left: 12px;
    }

        .hero-search-item:hover .item-right i {
            transform: translateX(4px);
            opacity: 0.9;
        }

/* container za rezultate */
.hero-search-results {
    width: 100%;
    max-width: 720px; /* ENAKO kot input */
}

    /* seznam */
    .hero-search-results ul {
        margin: 0;
        padding: 0;
    }


/* nikoli center-align v rezultatih */
.hero-search-results {
    text-align: left;
}

/* cel item */
.hero-search-item {
    align-items: center;
}

    /* levi del mora biti fleksibilen */
    .hero-search-item .item-left {
        display: flex;
        align-items: center;
        gap: 14px;
        flex: 1;
        min-width: 0; /* KLJUČNO za ellipsis */
    }

        /* ikona naj se ne krči */
        .hero-search-item .item-left i {
            flex-shrink: 0;
        }

        /* tekst – vedno 1 vrstica */
        .hero-search-item .item-left span {
            display: block;
            min-width: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

    /* desna puščica naj ne vpliva na širino */
    .hero-search-item .item-right {
        flex-shrink: 0;
        margin-left: 12px;
    }


/* ========================================================= */
/* MOBILE SEARCH MODE – FULLSCREEN SEARCH                    */
/* ========================================================= */

@media (max-width: 991px) {

    /* ko je iskanje aktivno, hero zavzame cel viewport */
    .home-hero.search-active {
        height: 100vh;
        min-height: 100vh;
    }

        /* skrij zemljevid */
        .home-hero.search-active .col-lg-6.order-lg-2,
        .home-hero.search-active #map-container {
            display: none !important;
        }

        /* levi (zeleni) del naj gre čisto do vrha */
        .home-hero.search-active .col-lg-6.order-lg-1 {
            width: 100%;
            max-width: 100%;
            flex: 0 0 100%;
        }

    /* odstrani top-space-margin vpliv headerja */
    .home-hero.search-active {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

        /* vsebina naj se poravna na vrh */
        .home-hero.search-active
        .col-lg-6.order-lg-1 > .d-flex {
            justify-content: flex-start;
            padding-top: 24px;
        }
}


/* ========================================================= */
/* HERO SEARCH – CLEAR / CANCEL BUTTON (FIXED)               */
/* ========================================================= */

.hero-search-clear {
    /* reset button look (Crafto / Bootstrap override) */
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    /* layout */
    padding: 0;
    margin-left: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* icon look */
    color: #777;
    font-size: 20px;
    cursor: pointer;
    /* HARD HIDE BY DEFAULT */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* smooth appear */
    transition: opacity 0.15s ease, color 0.15s ease;
}

/* show clear button only when searching */
.home-hero.search-active .hero-search-clear {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.hero-search-clear:hover {
    color: #333;
}



/* ========================================================= */
/* ADDRESS SELECTED STATE                                    */
/* ========================================================= */

.hero-address-selected-state {
    display: none;
    width: 100%;
    max-width: 720px;
}

/* aktivno stanje */
.home-hero.address-selected .hero-address-selected-state {
    display: block;
}

/* skrij search rezultate in input v tem stanju */
.home-hero.address-selected .hero-search-state,
.home-hero.address-selected .home-hero-search {
    display: none;
}

/* izbrani naslov */
.selected-address {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 500;
}

    .selected-address i {
        opacity: 0.8;
    }

.change-address {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

/* placeholder kartice (za zdaj samo vizualni blok) */
.placeholder-card {
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.08);
}

    .placeholder-card.primary {
        background: rgba(255,255,255,0.18);
        font-weight: 600;
    }

    .placeholder-card.muted {
        opacity: 0.6;
    }
/* skrij default hero elemente */
.home-hero.address-selected .hero-default-state,
.home-hero.address-selected .home-hero-use-location {
    display: none !important;
}

/* ========================================================= */
/* ADDRESS SELECTED – MOBILE TUNING                          */
/* ========================================================= */

@media (max-width: 767px) {

    .selected-address {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    /* naslov – ena vrstica, ellipsis */
    #selected-address-text {
        flex: 1;
        min-width: 0; /* NUJNO za ellipsis */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* gumb "spremeni" – samo ikona */
    .change-address {
        flex-shrink: 0;
        background: none;
        border: none;
        padding: 6px;
        color: rgba(255,255,255,0.8);
        font-size: 16px;
        cursor: pointer;
    }

        .change-address:hover {
            color: #fff;
        }
}

/* ========================================================= */
/* SELECTED ADDRESS BLOCK                                    */
/* ========================================================= */

.selected-address-block {
    width: 100%;
    max-width: 720px;
    margin-bottom: 20px;
}

/* header: label + action */
.selected-address-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

/* label – miren, tematski */
.selected-address-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
}

/* gumb Spremeni */
.change-address {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    text-decoration: underline;
}

    .change-address:hover {
        color: #ffffff;
    }

/* vrednost naslova */
.selected-address-value {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 500;
}

    /* ikona */
    .selected-address-value i {
        font-size: 16px;
        opacity: 0.8;
        flex-shrink: 0;
    }

/* naslov – 1 vrstica + ellipsis */
#selected-address-text {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-address-value {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* <-- KLJUČNO */
    gap: 10px;
    width: 100%;
    text-align: left; /* <-- za vsak slučaj */
}

    /* ikona naj ostane fiksna */
    .selected-address-value i {
        flex-shrink: 0;
    }

/* tekst naslova */
#selected-address-text {
    flex: 1; /* <-- zasede ves preostanek */
    min-width: 0; /* <-- NUJNO za ellipsis v flexu */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}


.postajalisce-card {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    background: rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 14px;
    gap: 16px;
}
.postajalisce-primary {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.25);
}
.postajalisce-content {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 16px;
}

.postajalisce-text {
    min-width: 0; /* KRITIČNO */
    flex: 1 1 auto;
}

.postajalisce-label {
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 4px;
}
.postajalisce-name {
    font-size: 20px;
    font-weight: 600;
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.postajalisce-meta {
    font-weight: 400;
    opacity: 0.8;
}
.postajalisce-select {
    font-size: 16px;
    flex-shrink: 0;
    font-weight: 600;
    border-radius: 999px;
    padding: 6px 16px;
}
.postajalisce-thumb {
    width: 64px;
    flex-shrink: 0;
    display: none;
}

    .postajalisce-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 10px;
    }
@media (min-width: 992px) {
    .postajalisce-thumb {
        display: block;
    }
}
@media (max-width: 767px) {
    .postajalisce-content {
        flex-direction: column;
        align-items: stretch; /* pomembno */
    }

    .postajalisce-select {
        margin-top: 12px;
        width: 100%;
        align-self: stretch;
    }
}
.postajalisce-primary {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
}
.postajalisce-alternative {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding-top: 14px;
    padding-bottom: 14px;
}
    .postajalisce-alternative .postajalisce-label {
        opacity: 0.55;
        font-weight: 500;
    }
    .postajalisce-alternative .postajalisce-name {
        opacity: 0.8;
        font-weight: 500;
    }

/* skupni container za tekst v kartici */
.postajalisce-text {
    min-width: 0; /* KRITIČNO za ellipsis v flex layoutih */
}

/* ime postajališča – ENA VRSTICA */
.postajalisce-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: left;
}



/* ========================================================= */
/* GLOBAL DETAIL PANEL                                       */
/* ========================================================= */

.detail-panel {
    position: fixed;
    inset: 0;
    z-index: 5000;
    pointer-events: none;
}

    .detail-panel.is-open {
        pointer-events: auto;
    }

.detail-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.detail-panel.is-open .detail-panel-backdrop {
    opacity: 1;
}

.detail-panel-content {
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    width: 420px;
    max-width: 100%;
    height: 100%;
    background: #0f3f24;
    color: #fff;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.detail-panel.is-open .detail-panel-content {
    transform: translateX(0);
}

@media (max-width: 767px) {
    .detail-panel-content {
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        height: 100%;
        transform: translateY(100%);
    }

    .detail-panel.is-open .detail-panel-content {
        transform: translateY(0);
    }
}



/* ========================================================= */
/* DETAIL PANEL – CONTENT                                    */
/* ========================================================= */
.detail-panel-content {
    width: 42%; /* prej 420 → zdaj bolj “hero” širina */
    max-width: 100%;
}
@media (max-width: 767px) {
    .detail-panel-content {
        width: 100%;
    }
}
.detail-panel-body {
    padding: 24px 28px 40px; /* več zraka spodaj */
    overflow-y: auto;
    flex: 1;
}
.detail-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.detail-panel-eyebrow {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 4px;
}

.detail-panel-subtitle {
    font-size: 14px;
    opacity: 0.8;
}

.detail-panel-close {
    background: transparent;
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.75;
}

    .detail-panel-close:hover {
        background: rgba(255,255,255,0.1);
        opacity: 1;
    }

/* sections */

.detail-section {
    margin-bottom: 28px;
}

    .detail-section h3 {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 12px;
    }

/* timetable */

.detail-timetable {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timetable-block {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 16px;
}

.timetable-label {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.85;
    margin-bottom: 8px;
}

.timetable-times {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

    .timetable-times span {
        background: rgba(255,255,255,0.15);
        border-radius: 999px;
        padding: 6px 14px;
        font-size: 15px;
        font-weight: 600;
    }

/* notes */

.detail-notes {
    padding-left: 18px;
    margin: 0;
}

    .detail-notes li {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 8px;
        opacity: 0.9;
    }

/* image */

.detail-image img {
    width: 100%;
    border-radius: 14px;
    display: block;
}




/* HOME SECTION 1 */
/* ===== Steps list (awards-style) ===== */

/* ===== Steps list – upgraded ===== */

.steps-desc-div {
    padding-right: 30px;
}

.steps-list {
    border-top: 1px solid rgba(0,0,0,0.08);
}

.steps-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 26px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* številka v krogu */
.steps-badge {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* tekst */
.steps-main {
    flex: 1;
    min-width: 0;
}

.steps-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1f2d2a; /* bolj kontrastno */
}

.steps-desc {
    font-size: 15.5px;
    line-height: 1.5;
    color: rgba(0,0,0,0.75);
}

/* ikona desno */
.steps-icon {
    width: 36px;
    flex: 0 0 36px;
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
    color: var(--bs-primary);
    opacity: 0.65;
}

/* hover – zelo subtilen */
.steps-item:hover .steps-badge {
    background: rgba(var(--bs-primary-rgb), 0.18);
}

.steps-item:hover .steps-icon {
    opacity: 1;
}

/* mobile */
@media (max-width: 767px) {
    .steps-item {
        gap: 16px;
        padding: 20px 0;
    }

    .steps-title {
        font-size: 17px;
    }

    .steps-desc {
        font-size: 14.5px;
    }

    .steps-icon {
        display: none;
    }
}



/* ===== Alerts ===== */

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.alert-item {
    display: flex;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 12px;
    background: #fff;
    border-left: 4px solid transparent;
}

.alert-warning {
    border-left-color: #f1b84c;
}

.alert-info {
    border-left-color: var(--bs-primary);
}

.alert-icon {
    font-size: 22px;
    opacity: 0.9;
    padding-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #1f2d2a;
}

.alert-text {
    font-size: 15px;
    line-height: 1.5;
    opacity: 0.8;
}

/* ===== Empty state ===== */

.alert-empty-state {
    padding: 40px 20px;
}

.alert-empty-icon {
    font-size: 36px;
    color: var(--bs-primary);
    opacity: 0.6;
}
