/* Hardware akceleracija za animacije */
.event-title a,
.btn-buy,
.btn-more,
.next-month-link,
.filter-toggle-icon {
    will-change: transform;
}

/* Završi animacije */
.event-title a:not(:hover),
.btn-buy:not(:hover),
.btn-more:not(:hover),
.next-month-link:not(:hover) {
    will-change: auto;
}

/* Timetable Page Styles - Refactored */

/* Wrapper i Container */
.timetable-wrapper {
    background: #fff;
    padding: 0;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

@supports (min-height: 100dvh) {
    .timetable-wrapper {
        min-height: 100dvh;
    }
}

/* iOS Safari fix za body */
body {
    -webkit-overflow-scrolling: touch;
}

.timetable-content {
    padding-bottom: 40px;
}

.timetable-single-container {
    max-width: 1570px;
    margin: 0 auto;
    padding: 0 90px;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.timetable-header {
    padding-top: 190px;
}

.timetable-title {
    font-size: 80px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 50px;
}

/* Filter */
.timetable-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 60px;
}

.filter-categories {
    display: flex;
    gap: 42px;
    margin-right: 20px;
}

/* ===== FILTER BUTTON BASE ===== */
.filter-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
    font-weight: 600 !important;
    color: #000 !important;
    font-family: "Barlow", sans-serif !important;
    text-decoration: none !important;
    outline: none !important;
}

/* ===== UNDERLINE (osnova) ===== */
.filter-btn::after {
    content: "";
    position: absolute;
    bottom: 0; /* pozicija linije ispod teksta */
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #000;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s ease-out;
}

/* ===== HOVER ANIMACIJA ===== */
.filter-btn:hover::after {
    transform: scaleX(1);
}

/* ===== AKTIVNI GUMB ===== */
.filter-btn.active::after {
    transform: scaleX(1);
}



.filter-search {
    position: relative;
    width: 250px;
    margin-right: 20px;
}

.filter-search input {
    padding: 8px 40px 8px 15px;
    border: none;
    border-bottom: 1px solid #000 !important;
    width: 100%;
    font-size: 16px;
    background: transparent !important;
    outline: none;
    box-shadow: none !important;
}

.filter-search input:focus {
    border-bottom-color: #c5c5c5 !important;
}

.filter-search::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url('../img/search.svg');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}





/* Mjeseci */
.month-section {
    margin-bottom: 40px;
    display: none;
}

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 30px;
}

.month-title,
.next-month-link {
    font-family: 'Brule', sans-serif;
    font-size: 40px;
    font-weight: 600;
    margin: 0;
}

.next-month-link .next-month-arrow {
    font-family: 'Barlow', sans-serif !important;
    font-weight: 600; /* po želji tanje/deblje */
    margin-left: 5px;
}


.next-month-link {
    color: #000;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.next-month-link:hover {
    transform: scale(1.05);
}

/* GLAVNI EVENT LAYOUT - 4 kolone s flexbox */
.event-item {
    display: flex;
    gap: 22px;
    padding: 60px 0;
    border-bottom: 1px solid #000;
    position: relative;
    align-items: stretch;
}

.event-item.hidden {
    display: none;
}

/* Fade animacija za filter */
.timetable-content {
    transition: opacity 0.25s ease-out;
}

.timetable-content.filtering {
    opacity: 0;
}

.events-list {
    transition: opacity 0.25s ease-out;
}

/* Kolona 1 - Datum */
.event-date {
    flex: 0 0 110px;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.day-name {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: -7px;
    margin-bottom: 0px;
    letter-spacing: 0.5px;
}

.day-number {
    font-family: 'Brule', sans-serif;
    font-size: 90px;
    font-weight: 600;
    line-height: 0.9;
    margin-top: 10px;
}

.concert-icon {
    width: 50px;
    height: 60px;
    margin-top: auto;
}

/* Kolona 2 - Slika */
.event-image {
    flex: 0 0 320px;
    min-height: 220px;
    position: relative;
    overflow: hidden;
}

.event-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Kolona 3 - Info */
.event-info {
    flex: 1;
    padding: 0 20px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.event-note {
    font-size: 16px;
    color: #000;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
    margin-top: -4px;
}

.event-title {
    font-family: 'Brule', sans-serif;
    font-size: 48px;
    font-weight: 600;
    margin: 0 0 15px;
    line-height: 1.1;
    margin-top: -4px;
}

.event-title a {
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s ease;
    display: inline-block;
}

.event-title a:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.event-intro {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 60px;
    color: #000;
}

.event-actions {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-top: auto;
    margin-bottom: 0;
}

.btn-buy, .btn-more, .btn-sold, .btn-otkazano, .badge {
    display: inline-block;
    padding: 10px 20px !important;
    text-decoration: none;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase;
    font-family: inherit;
    transition: transform 0.3s
ease;
    border: 2px solid !important;
    text-align: center;
    white-space: nowrap;
    min-width: 140px !important;
    min-height: 52px;
    text-align: center !important;
}

/* Specifični stilovi za svaki tip */
.btn-buy {
    background: #CA162B;
    color: white;
    border-color: #CA162B;
    border: 2px solid #CA162B !important;

}

.btn-buy:hover {
    background: #CA162B;
    color: white;
    transform: scale(1.05);
}

.btn-more {
    background: white;
    color: #000;
    border-color: #000;
}

.btn-more:hover {
    background: white;
    color: #000;
    transform: scale(1.05);
}

.btn-sold {
    background: #000;
    color: white;
    border-color: #000;
    cursor: default;
    border: 2px solid #000 !important;
}

.btn-otkazano {
    background: #000;
    border: 2px solid #000;
    color: white;
    cursor: default;
    font-weight: 700;
    display: inline-block;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    font-family: inherit;
    text-align: center;
    white-space: nowrap;
    animation: colorFlip 0.8s infinite;
    border: 2px solid #000 !important;
}

@keyframes colorFlip {
    0%, 50% {
        background: #000;
        color: white;
        border-color: #000;
    }
    51%, 100% {
        background: white;
        color: #000;
        border-color: #000;
    }
}





.badge {
    background: #000;
    color: white;
    border-color: #000;
    cursor: default;
}

/* Kolona 4 - Vrijeme s 2 reda */
.event-time {
    flex: 0 0 274px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
    align-items: flex-end;
    align-self: stretch;
    min-height: 0;
}

/* Gornji dio - vrijeme i badges */
.event-time-top {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
    width: 100%;
    margin-top: -10px;
}

.time-duration-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.time {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
}

.time.highlighted {
    color: #CA162B;
    font-weight: 600;
}

.duration {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 600;
}

.duration-icon {
    width: 15px;
    height: 15px;
}

.event-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

/* Donji dio - guest ikona */
.guest-icon {
    width: 90px;
    height: auto;
}

/* Mobile elementi - sakrij na desktopu */
.event-title-mobile,
.guest-icon.mobile-only,
.filter-toggle {
    display: none;
}

/* Sticky month header - iOS optimiziran */
.month-header-fixed {
    position: fixed;
    position: -webkit-sticky;
    left: 0;
    right: 0;
    z-index: 998;
    display: none;

    /* iOS optimizacije */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    -webkit-overflow-scrolling: touch;
}

/* Mobile specific adjustment za prazninu */
@media (max-width: 769px) {
    .month-header-fixed {
        top: 55px !important; /* Smanjena vrijednost za mobile */
    }
}

/* iOS Safari specific */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 769px) {
        .month-header-fixed {
            top: 50px !important; /* Još manja vrijednost za iOS */
        }
    }
}




.month-header-fixed.active {
    display: block;
}





.month-header-fixed .month-header-inner {
    max-width: 1570px;
    margin: 0 auto;
    padding: 20px 90px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    background: #fff;

}

/* iOS specific fix */
@supports (-webkit-touch-callout: none) {
    .month-header-fixed {
        position: fixed !important;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

/* Months progress dots */
.months-progress {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 997;
}

.month-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.month-dot.active {
    background: #CA162B;
    transform: scale(1.5);
}

.month-dot:hover {
    background: #000;
}

/* Poruka za prazne rezultate */
.no-results-message {
    text-align: center;
    padding: 10px 20px 160px 20px;
    font-size: 18px;
    color: #000;
    margin-top: 40px;
}

.no-results-message strong {
    font-weight: 700;
}

/* RESPONSIVE STILOVI */

/* Large desktop */
@media (max-width: 1300px) {
    .timetable-single-container {
        padding: 0 70px;
    }

    .event-item {
        gap: 25px;
    }

    .event-image {
        flex: 0 0 240px;
    }

    .month-header-fixed .month-header-inner {
        padding: 20px 70px;
    }
}

/* Medium desktop */
@media (max-width: 1200px) {
    .time-duration-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .time {
        width: 100%;
    }

    /* Duration container */
    .duration {
        width: 100%;
        display: block !important;
        text-align: right !important;
    }

    /* Sakrij originalnu ikonu */
    .duration-icon {
        display: none !important;
    }

    /* Duration tekst sa pseudo elementom */
    .duration span {
        position: relative !important;
        display: inline !important;
        padding-left: 25px !important; /* 15px ikona + 10px gap */
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }

    /* IKONA kao pseudo element - uvijek 10px lijevo od teksta */
    .duration span::before {
        content: '' !important;
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 15px !important;
        height: 15px !important;
        background-image: url('../img/trajanje.svg') !important;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
    }
}

@media (max-width: 1160px) {
    .event-item {
        gap: 20px;
    }

    .event-date {
        flex: 0 0 100px;
    }

    .event-image {
        flex: 0 0 220px;
        height: 200px;
    }

    .event-time {
        flex: 0 0 160px;
    }

    .event-title {
        font-size: 36px;
    }

    .day-number {
        font-size: 70px;
    }

    .guest-icon {
        width: 80px;
    }
}

/* Tablet */
@media (max-width: 999px) {
    .timetable-single-container {
        padding: 0 40px;
    }

    .timetable-header {
        padding-top: 60px;
    }

    .timetable-title {
        font-size: 48px;
    }

    .event-item {
        gap: 15px;
        padding: 50px 0;
    }

    .event-date {
        flex: 0 0 90px;
    }

    .event-image {
        flex: 0 0 180px;
        height: 180px;
    }

    .event-info {
        padding: 0 10px;
    }

    .event-time {
        flex: 0 0 140px;
    }

    .event-title {
        font-size: 32px;
    }

    .day-number {
        font-size: 60px;
    }

    .time {
        font-size: 18px;
    }

    .guest-icon {
        width: 75px;
    }

    .month-header-fixed {
        top: 70px !important;
    }

    .month-header-fixed .month-header-inner {
        padding: 15px 30px;
    }
}

/* Small tablet */
@media (max-width: 890px) {
    .timetable-single-container {
        padding: 0 35px;
    }

    .filter-categories {
        gap: 20px;
    }

    .event-item {
        gap: 12px;
        padding: 45px 0;
    }

    .event-date {
        flex: 0 0 80px;
    }

    .event-image {
        flex: 0 0 160px;
        height: 160px;
    }

    .event-time {
        flex: 0 0 120px;
    }

    .event-title {
        font-size: 28px;
    }

    .day-number {
        font-size: 55px;
    }

    .event-intro {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .btn-buy,
    .btn-more,
    .btn-sold,
    .btn-otkazano,
    .badge {
        padding: 6px 15px;
        font-size: 12px;
    }


    .time-duration-row {
        gap: 10px;
    }

    .guest-icon {
        width: 65px;
    }
}

@media (min-width: 780px) and (max-width: 1000px) {
    .time-duration-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .time, .duration {
        width: 100%;
    }
}




/* Mobile - prelazak na mobilni layout */
@media (max-width: 769px) {
    .timetable-single-container {
        padding: 0 22px;
    }

    .filter-btn {
        padding-bottom: 5px;
    }

    .day-name {
        margin-top: -2px;
        margin-bottom: 5px;
    }

    .timetable-header {
        padding-top: 50px;
    }

    .timetable-title {
        font-size: 40px;
        margin-bottom: 10px;
        margin-top: 40px;
    }

    /* Filter toggle */
    .filter-toggle {
        display: block;
        text-align: right;
        font-weight: 700;
        font-size: 16px;
        cursor: pointer;
        padding: 15px 0;
        margin-bottom: 20px;
        text-decoration: underline;
    }

    .event-title a {
        font-size: 36px;
    }

    .filter-toggle-icon {
        display: inline-block;
        margin-right: 10px;
        transition: transform 0.3s ease;
    }

    .filter-toggle.active .filter-toggle-icon {
        transform: rotate(180deg);
    }

    /* Filter na mobitelu */
    .timetable-filter {
        display: none;
        flex-direction: column;
        gap: 20px;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .timetable-filter.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .filter-categories {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        gap: 10px 30px;
    }

    .filter-search {
        width: 80%;
    }

    /* Mjeseci */
    .month-title,
    .next-month-link {
        font-size: 24px;
    }

    .month-header {
        margin-bottom: 20px;
    }

    /* Mobilni layout - grid */
    .event-item {
        display: grid;
        grid-template-areas:
            "date time"
            "title title"
            "image image"
            "info info";
        grid-template-columns: 1fr auto;
        gap: 20px;
        padding: 50px 0;
    }

    /* Prikaži mobilne elemente */
    .event-title-mobile {
        display: block;
        grid-area: title;
        margin: 10px 0px -4px 0px;
    }

    .event-title-mobile .event-title {
        font-size: 40px;
        margin: 0;
    }

    /* Sakrij desktop naslov */
    .event-title.desktop-only {
        display: none;
    }

    /* Datum */
    .event-date {
        grid-area: date;
        flex-direction: column;
        align-items: flex-start;
        gap: 0px;
    }

    .day-number {
        font-size: 50px;
        order: 2;
        margin-top: -5px;
        margin-bottom: 20px;
    }

    .day-name {
        order: 1;
    }

    .concert-icon {
        order: 3;
        margin-top: 0px;
        margin-bottom: 20px;
        margin-left: 0;
    }

    /* Vrijeme */
    .event-time {
        grid-area: time;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }

    .event-time-top {
        align-items: flex-end;
    }

    /* ISPRAVAK - Time duration row */
    .time-duration-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 10px !important;
        margin-top: 8px;
    }

    /* NOVO RJEŠENJE - Duration container */
    .duration {
        display: block !important;
        text-align: right !important;
        max-width: 122px !important;
    }

    /* Sakrij originalnu ikonu */
    .duration-icon {
        display: none !important;
    }

    /* NOVO - Duration tekst sa pseudo elementom */
    .duration span {
        position: relative !important;
        display: inline !important;
        padding-left: 25px !important; /* 15px ikona + 10px gap */
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }

    /* IKONA kao pseudo element - uvijek 10px lijevo od teksta */
    .duration span::before {
        content: '' !important;
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 15px !important;
        height: 15px !important;
        background-image: url('../img/trajanje.svg') !important;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
    }

    .time {
        flex-shrink: 0 !important;
    }

    /* Slika */
    .event-image {
        grid-area: image;
        width: 100%;
        height: 200px;
    }

    /* Info */
    .event-info {
        grid-area: info;
        padding: 0;
    }

    .event-title {
        font-size: 32px;
    }

    .event-intro {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .btn-buy,
    .btn-more,
    .btn-sold,
    .btn-otkazano,
    .badge {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Guest ikona na mobitelu */
    .guest-icon.mobile-only {
        display: block;
        position: absolute;
        top: 55px;
        left: 50%;
        transform: translateX(-50%);
        width: 62px;
        height: 62px;
    }

    .guest-icon.desktop-only {
        display: none;
    }

    .month-header-fixed .month-header-inner {
        padding: 15px 20px;
        margin-top: -13px;
    }

    .no-results-message {
        padding: 10px 10px 60px 10px;
        font-size: 16px;
        margin-top: 30px;
    }
}



@media only screen and (max-width: 999px) {

.concert-icon {
    width: 32px;
    height: 38px;
}
}




.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 769px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }
}
