/* GLD App Styles - PHP version */

/* === Fonts === */
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* === Base === */
#gld-app {
    font-family: 'Poppins', Arial, sans-serif;
    color: #222;
    -webkit-font-smoothing: antialiased;
}

#gld-app *, #gld-app *::before, #gld-app *::after {
    box-sizing: border-box;
    font-family: 'Poppins', Arial, sans-serif !important;
}

/* === Weather Widget === */
#gld-app .gld-weather {
    display: block;
    width: 800px;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow: 0 5px 12px rgba(0,0,0,0.16) !important;
    padding: 20px;
    background: #fff;
    text-align: center;
    text-decoration: none !important;
    color: inherit !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#gld-app .gld-weather:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.16) !important;
    color: inherit !important;
    text-decoration: none !important;
}

.gld-weather__date {
    font-weight: 600;
    font-size: 22px;
    margin-bottom: 8px;
}

.gld-weather__main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: -10px;
    margin-top: 30px;
}

.gld-weather__temp {
    font-size: 32px;
    font-weight: 500;
}

.gld-weather__sun {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

.gld-weather__sun-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gld-weather__sun-item span {
    font-size: 14px;
}

/* === Tab Bar === */
#gld-app .gld-tab-bar {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5em;
    width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#gld-app .gld-tab-btn,
#gld-app .gld-tab-btn:hover,
#gld-app .gld-tab-btn:focus,
#gld-app .gld-tab-btn:active {
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 400;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 1.2em;
    color: #222 !important;
    cursor: pointer;
    padding: 0.5em 1em !important;
    flex: 1;
    transition: font-weight 0.15s;
    outline: none !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: normal !important;
    min-height: auto !important;
}

#gld-app .gld-tab-btn--active,
#gld-app .gld-tab-btn--active:hover,
#gld-app .gld-tab-btn--active:focus {
    font-weight: 700;
    color: black !important;
}

/* Mobile tab bar */
#gld-app .gld-tab-bar--mobile {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background: #fff;
    border-top: 1px solid #eee !important;
    padding: 0.5em 0;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
    width: 100%;
    gap: 0;
    margin: 0;
}

/* === Tab Content === */
.gld-tab-content--hidden {
    display: none !important;
}

.gld-tab-padding {
    padding-bottom: 0;
}

/* === List Container === */
.gld-list {
    width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* === Section Headings === */
.gld-section-heading {
    font-size: 1.7rem;
}

/* === Card Heading === */
.gld-card-heading {
    font-size: 1.4rem;
    line-height: 1.4 !important;
    margin-bottom: 0.2rem;
    margin-top: 0;
}

/* === Card === */
.gld-card-wrapper {
    position: relative;
    margin-bottom: 40px;
}

.gld-card {
    width: 100%;
    display: flex;
    flex-direction: row;
    border-radius: 16px;
    box-shadow: 0 5px 12px rgba(0,0,0,0.16) !important;
    background: #fff;
    overflow: hidden;
    border: 1px solid #eee;
    min-height: 180px;
    position: relative;
    align-items: stretch;
    cursor: pointer;
    transition: box-shadow 0.18s, transform 0.18s;
    text-decoration: none;
    color: inherit;
}

.gld-card:hover,
.gld-card:focus {
    box-shadow: 0 8px 24px rgba(0,0,0,0.16) !important;
    transform: translateY(-3px) scale(1.018);
    outline: none;
}

.gld-card__image {
    width: 240px;
    height: 240px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background-color: #eee;
    flex-shrink: 0;
}

.gld-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gld-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #fff;
    color: #1b5e20;
    font-weight: 600;
    font-size: 16px;
    border-radius: 6px;
    padding: 4px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    z-index: 2;
}

.gld-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding-left: 30px;
    padding-right: 30px;
}

.gld-card__content h3 {
    line-height: 1.2;
}

.gld-card__date-info {
    font-size: 1.1em;
    color: #444;
    margin-bottom: 6px;
    margin-top: 2px;
}

.gld-card__time {
    font-size: 1em;
    color: #222;
    margin-top: 2px;
}

.gld-card__location {
    font-size: 1em;
    margin-top: 2px;
}

/* === Favorite Button === */
#gld-app .gld-favorite-btn,
#gld-app .gld-favorite-btn:hover,
#gld-app .gld-favorite-btn:focus,
#gld-app .gld-favorite-btn:active {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    position: absolute;
    right: 24px;
    bottom: 24px;
    cursor: pointer;
    padding: 0 !important;
    z-index: 3;
    line-height: 1;
    outline: none !important;
    box-shadow: none !important;
    min-height: auto !important;
}

#gld-app .gld-favorite-btn .gld-heart-filled {
    display: none;
}

#gld-app .gld-favorite-btn.is-favorite .gld-heart-outlined {
    display: none;
}

#gld-app .gld-favorite-btn.is-favorite .gld-heart-filled {
    display: inline;
}

/* === Favorites Empty === */
.gld-favorites-empty {
    text-align: center;
    color: #888;
    padding: 2em 1em;
    font-size: 1.1em;
}

/* === Responsive === */
@media (max-width: 600px) {
    #gld-app {
        padding-left: 16px;
        padding-right: 16px;
    }

    .gld-weather {
        max-width: 100%;
        margin: 0;
    }

    .gld-list {
        max-width: 100%;
        margin: 0;
    }

    .gld-tab-bar:not(.gld-tab-bar--mobile) {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .gld-tab-padding {
        padding-bottom: 60px;
    }

    .gld-card {
        flex-direction: column;
        border-radius: 16px;
        box-shadow: 0 5px 12px rgba(0,0,0,0.16) !important;
        background: #fff;
    }

    .gld-card__image {
        width: 100%;
        height: auto;
    }

    .gld-card__img {
        height: auto;
        width: 100%;
        max-height: 50vw;
        object-fit: cover;
        border-radius: 0;
        display: block;
    }

    .gld-card__content {
        padding: 18px 16px 12px 16px;
    }

    .gld-card-heading {
        line-height: 1.5 !important;
    }

    #gld-app .gld-favorite-btn {
        right: 16px;
        bottom: 16px;
    }
}

/* Existing card widths from App.css */
@media screen and (min-width: 600px) {
    .gld-location-event-card, .gld-related-event-card {
        width: 380px !important;
    }
}

/* ==============================
   Detail Page
   ============================== */

/* --- Design Tokens --- */
:root {
    --gld-radius-sm: 8px;
    --gld-radius-md: 12px;
    --gld-radius-lg: 16px;
    --gld-radius-xl: 24px;
    --gld-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --gld-shadow-hover: 0 8px 24px rgba(0,0,0,0.14);
    --gld-section-gap: 40px;
    --gld-transition: 0.2s ease;
}

/* --- Section Spacing --- */
.gld-detail-section {
    margin-top: var(--gld-section-gap);
}

/* --- Countdown --- */
.gld-countdown-outer {
    background: #045ebf;
    padding: 24px 0;
    box-sizing: border-box;
    border-radius: var(--gld-radius-xl);
    box-shadow: var(--gld-shadow-md);
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.gld-countdown-wrapper {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gld-countdown-label {
    color: #fff;
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 12px;
}

.gld-countdown-row {
    display: flex;
    gap: 48px;
    justify-content: center;
    align-items: baseline;
    width: 100%;
}

.gld-countdown-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gld-countdown-days,
.gld-countdown-hours,
.gld-countdown-minutes,
.gld-countdown-seconds {
    font-size: 48px;
    font-weight: 400;
    color: #fff;
    line-height: 1;
    min-width: 64px;
}

.gld-countdown-unit {
    color: #fff;
    font-size: 14px;
    margin-top: 6px;
}

.gld-countdown-sep {
    color: #fff;
    font-size: 48px;
    font-weight: 400;
    line-height: 1;
    display: inline;
    align-self: baseline;
}

@media (max-width: 900px) {
    .gld-countdown-outer {
        padding: 5vw 2vw;
    }
    .gld-countdown-label { font-size: 3vw; }
    .gld-countdown-days,
    .gld-countdown-hours,
    .gld-countdown-minutes,
    .gld-countdown-seconds { font-size: 7vw; min-width: auto; }
    .gld-countdown-sep { font-size: 7vw; }
    .gld-countdown-unit { font-size: 2vw; }
    .gld-countdown-row { gap: 4vw; }
}

@media (max-width: 600px) {
    .gld-countdown-outer {
        padding: 8vw 2vw;
    }
    .gld-countdown-label { font-size: 4vw; }
    .gld-countdown-row { gap: 2vw; }
    .gld-countdown-days,
    .gld-countdown-hours,
    .gld-countdown-minutes,
    .gld-countdown-seconds { font-size: 9vw; }
    .gld-countdown-sep { font-size: 9vw; }
    .gld-countdown-unit { font-size: 2.5vw; }
}

/* --- Future Dates --- */
.gld-detail-dates {
    margin: 1.5em 0 2em 0;
}

.gld-detail-dates__next {
    padding: 1em 0;
    border-bottom: 2px solid #111;
    font-size: 1.6em;
    font-weight: 700;
    color: #111;
}

.gld-detail-dates__item {
    padding: 0.7em 0;
    border-bottom: 1px solid #e5e7eb;
}

.gld-detail-dates__more-label {
    font-size: 1.1em;
    font-weight: 600;
    margin: 1.5em 0 0.5em 0;
}

.gld-detail-dates__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 100%;
    flex-wrap: wrap;
}

.gld-detail-dates__name {
    font-style: italic;
}

.gld-detail-dates__weekday {
    font-weight: 600;
}

.gld-detail-dates__time {
    color: #222;
    font-size: 0.95em;
}

/* --- Shared Outline Button --- */
.gld-detail-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    color: #111;
    border: 1.5px solid #111;
    border-radius: var(--gld-radius-sm);
    font-weight: 600;
    text-decoration: none;
    font-size: 1em;
    cursor: pointer;
    transition: background var(--gld-transition), color var(--gld-transition), transform var(--gld-transition), box-shadow var(--gld-transition);
}

.gld-detail-btn-outline:hover {
    background: #111;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--gld-shadow-md);
}

.gld-detail-btn-outline:hover svg[fill="#111"] {
    fill: #fff;
}

.gld-detail-btn-outline:hover svg[stroke="#111"] {
    stroke: #fff;
}

.gld-detail-btn-calendar {
    margin-left: auto;
}

/* --- Location Link --- */
.gld-detail-location-link {
    display: flex;
    align-items: center;
    min-height: 110px;
    max-width: 440px;
    background: #fff;
    color: #111;
    border-radius: var(--gld-radius-md);
    text-decoration: none;
    box-shadow: var(--gld-shadow-md);
    overflow: hidden;
    font-weight: 600;
    transition: box-shadow var(--gld-transition), transform var(--gld-transition);
}

.gld-detail-location-link:hover {
    box-shadow: var(--gld-shadow-hover);
    transform: translateY(-2px);
}

.gld-detail-location-link__img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--gld-radius-md) 0 0 var(--gld-radius-md);
    display: block;
}

.gld-detail-location-link__title {
    padding: 0 28px;
    font-size: 1.18em;
    line-height: 1.3;
    flex: 1;
}

/* --- Location Events --- */
.gld-detail-location-events {
    margin-top: 48px;
}

.gld-detail-location-events__heading {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 24px 0;
}

/* --- Anfahrt / Route --- */
.gld-detail-route__heading {
    margin: 0 0 0.4em 0;
    font-size: 1.2em;
    font-weight: 700;
}

.gld-detail-route__address {
    margin: 0 0 1em 0;
    color: #222;
    font-size: 1em;
}

.gld-detail-route__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
}

/* --- Event Cards (Related + Location Events) --- */
.gld-detail-event-card {
    background: #fff;
    border-radius: var(--gld-radius-lg);
    box-shadow: var(--gld-shadow-md);
    overflow: hidden;
    border: 1px solid #e5e7eb;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--gld-transition), transform var(--gld-transition);
}

.gld-detail-event-card:hover {
    box-shadow: var(--gld-shadow-hover);
    transform: translateY(-3px);
}

.gld-detail-event-card__img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    aspect-ratio: 3/2;
    display: block;
}

.gld-detail-event-card__body {
    padding: 18px 18px 12px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gld-detail-event-card__title {
    font-size: 1.2em;
    font-weight: 600;
    color: #222;
    text-decoration: none;
}

.gld-detail-event-card__title:hover {
    color: #045ebf;
}

.gld-detail-event-card__meta {
    font-size: 1em;
    color: #444;
    margin: 6px 0 0 0;
}

/* --- Related Events --- */
.gld-detail-related__heading {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 0.7em;
}

.gld-detail-related__grid {
    margin: 0 0 2em 0;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.gld-detail-related__grid .gld-detail-event-card {
    max-width: 420px;
    min-width: 280px;
    flex: 1;
}

/* --- Location Events Grid --- */
.gld-detail-location-events__grid {
    margin: 1.5em 0 2em 0;
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 600px) {
    .gld-detail-section {
        margin-top: 28px;
    }
    .gld-detail-dates__next {
        font-size: 1.3em;
    }
    .gld-detail-related__grid .gld-detail-event-card {
        min-width: 100%;
    }
    .gld-detail-location-events__grid {
        grid-template-columns: 1fr;
    }
    .gld-detail-route__buttons {
        max-width: 100%;
    }
}
