* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #285ef7 0%, #1c6a9e 100%);
    color: #fff;
    overflow: hidden;
    height: 100vh;
    font-size: 16px; /* Base font size for rem calculations */
}

#kiosk-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Status bar */
#status-bar {
    background: rgba(0, 0, 0, 0.3);
    padding: 1vh 2vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(1rem, 1.5vh, 1.5rem);
    font-weight: 300;
}

/* Main slideshow */
#slideshow {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4vh 5vw;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.slide > * {
    position: relative;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Animate background image with subtle Ken Burns effect (random) */
.slide.active.animate-zoom {
    animation: kenBurnsZoom 25s ease-in-out;
}

/* Multiple animation variants for variety */
@keyframes kenBurnsZoom {
    0% {
        background-size: cover;
        background-position: center center;
    }
    50% {
        background-size: 108% 108%;
        background-position: center center;
    }
    100% {
        background-size: cover;
        background-position: center center;
    }
}

.slide.active.animate-zoom:nth-child(2n) {
    animation: kenBurnsPanRight 25s ease-in-out;
}

@keyframes kenBurnsPanRight {
    0% {
        background-position: 45% center;
    }
    100% {
        background-position: 55% center;
    }
}

.slide.active.animate-zoom:nth-child(3n) {
    animation: kenBurnsPanLeft 25s ease-in-out;
}

@keyframes kenBurnsPanLeft {
    0% {
        background-position: 55% center;
    }
    100% {
        background-position: 45% center;
    }
}

.slide.active.animate-zoom:nth-child(5n) {
    animation: kenBurnsPanUp 25s ease-in-out;
}

@keyframes kenBurnsPanUp {
    0% {
        background-position: center 55%;
    }
    100% {
        background-position: center 45%;
    }
}

/* Business ad slides - Louisville Red accent */
.slide.business::before {
    background: linear-gradient(135deg, rgba(170, 8, 35, 0.9) 0%, rgba(199, 32, 21, 0.9) 100%);
}

.slide.business .business-logo {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.slide.business h2 {
    font-size: clamp(2.2rem, 4.5vh, 4rem);
    font-weight: 600;
    margin-bottom: 2vh;
}

.slide.business .business-tagline {
    font-size: clamp(1.4rem, 2.8vh, 2.5rem);
    font-weight: 300;
    margin-bottom: 2vh;
}

.slide.business .business-address {
    font-size: clamp(1.2rem, 2.4vh, 2.2rem);
    font-weight: 400;
    margin-bottom: 1vh;
    opacity: 0.95;
}

.slide.business .business-phone {
    font-size: clamp(1.1rem, 2.2vh, 2rem);
    font-weight: 300;
    margin-bottom: 2vh;
    opacity: 0.9;
}

.slide.business .business-cta {
    font-size: clamp(1.3rem, 2.5vh, 2.2rem);
    font-weight: 400;
    margin-top: 1vh;
    padding: 2vh 3vw;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Town fact slides - Light Louisville Blue */
.slide.fact::before {
    background: linear-gradient(135deg, rgba(99, 138, 249, 0.9) 0%, rgba(40, 94, 247, 0.9) 100%);
}

.slide.fact .fact-icon {
    font-size: 4rem;
    margin-bottom: 30px;
}

.slide.fact h2 {
    font-size: clamp(2rem, 4vh, 3.5rem);
    font-weight: 600;
    margin-bottom: 3vh;
}

.slide.fact .fact-content {
    font-size: clamp(1.5rem, 3vh, 2.8rem);
    font-weight: 300;
    max-width: clamp(600px, 65vw, 1100px);
    line-height: 1.5;
}

/* Major event slides - Louisville Blue */
.slide.major-event::before {
    background: linear-gradient(135deg, rgba(40, 94, 247, 0.9) 0%, rgba(28, 106, 158, 0.9) 100%);
}

.slide.major-event h2 {
    font-size: clamp(2.5rem, 5vh, 4.5rem);
    font-weight: 700;
    margin-bottom: 2vh;
    line-height: 1.2;
}

.slide.major-event .event-details {
    font-size: clamp(1.5rem, 3vh, 2.8rem);
    font-weight: 300;
    margin-bottom: 1.5vh;
}

.slide.major-event .event-description {
    font-size: clamp(1.2rem, 2.5vh, 2rem);
    font-weight: 300;
    max-width: clamp(600px, 60vw, 1000px);
    line-height: 1.4;
    margin-top: 2vh;
}

/* Event image - smaller than default */
.slide.major-event .primary-image-container {
    width: clamp(400px, 45vw, 900px);
    height: clamp(250px, 30vh, 500px);
    margin-bottom: 4vh;
}

/* Event content layout - QR code + text */
.event-content {
    display: flex;
    gap: clamp(30px, 4vw, 80px);
    align-items: flex-start;
    width: 100%;
    max-width: clamp(600px, 80vw, 1400px);
}

/* Event text - right column */
.event-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.event-text h2 {
    text-align: left;
    width: 100%;
}

/* Daily events slide - Lighter Louisville Blue */
.slide.daily-events::before {
    background: linear-gradient(135deg, rgba(99, 138, 249, 0.9) 0%, rgba(40, 94, 247, 0.9) 100%);
}

.slide.daily-events h2 {
    font-size: clamp(2.5rem, 5vh, 4rem);
    font-weight: 700;
    margin-bottom: 3vh;
}

.slide.daily-events .daily-events-list {
    display: flex;
    flex-direction: column;
    gap: 2vh;
    max-width: clamp(700px, 70vw, 1200px);
    margin: 0 auto;
}

.slide.daily-events .daily-event-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2vw;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 2vh 3vw;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.slide.daily-events .daily-event-time {
    font-size: clamp(1.8rem, 3.5vh, 3rem);
    font-weight: 600;
    white-space: nowrap;
}

.slide.daily-events .daily-event-info {
    display: flex;
    flex-direction: column;
    gap: 0.5vh;
}

.slide.daily-events .daily-event-title {
    font-size: clamp(1.5rem, 3vh, 2.5rem);
    font-weight: 500;
    line-height: 1.3;
}

.slide.daily-events .daily-event-location {
    font-size: clamp(1.2rem, 2.3vh, 2rem);
    font-weight: 300;
    opacity: 0.9;
}

.slide.daily-events .daily-events-empty {
    font-size: clamp(1.5rem, 3vh, 2.5rem);
    font-weight: 300;
    opacity: 0.8;
}

/* Image slides */
.slide.image {
    padding: 0;
}

/* Add overlay for image slides to match other slide treatments */
.slide.image::before {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(60, 60, 60, 0.9) 100%);
}

.slide.image .image-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: grid;
    grid-template-rows: 2fr 1fr;
}

.slide.image .image-container > img {
    grid-row: 1;
    justify-self: center;
    align-self: center;
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.slide.image .image-info {
    grid-row: 2;
    justify-self: center;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 2vh 4vw;
    text-align: center;
    max-width: 80%;
    border-radius: 10px;
}

.slide.image .image-title {
    font-size: clamp(1.5rem, 3vh, 2.8rem);
    font-weight: 600;
    margin-bottom: 1vh;
}

.slide.image .image-caption {
    font-size: clamp(1.1rem, 2.2vh, 2rem);
    font-weight: 300;
    opacity: 0.9;
}

.slide.image .image-placeholder {
    width: 80%;
    height: 60vh;
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.slide.image .placeholder-text {
    font-size: 2rem;
    opacity: 0.5;
}

/* Primary image - positioned above text, scaled for screen - 50% bigger */
.primary-image-container {
    position: relative;
    width: clamp(600px, 67.5vw, 1350px);
    height: clamp(375px, 45vh, 750px);
    margin: 0 auto 6vh auto;
    z-index: 1;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.primary-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Business image wrapper - contains both primary image and map overlay - 50% bigger */
.business-image-wrapper {
    position: relative;
    width: clamp(600px, 67.5vw, 1350px);
    height: clamp(375px, 45vh, 750px);
    margin: 0 auto 6vh auto;
}

/* Adjust primary image within business wrapper */
.business-image-wrapper .primary-image-container {
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Map overlay - bottom right corner - 50% size, 10% offset */
.map-overlay {
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 50%;
    height: 50%;
    z-index: 2;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
    border: 3px solid rgba(255, 255, 255, 0.9);
}

.map-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center center;
}

/* Animate map zoom when slide becomes active */
.slide.active .map-overlay img {
    animation: mapZoomIn 10s ease-in-out forwards;
}

@keyframes mapZoomIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.8);
    }
}

/* Business content - QR code and text in columns */
.business-content {
    display: flex;
    gap: 3vw;
    align-items: flex-start;
    width: 100%;
    max-width: clamp(600px, 80vw, 1400px);
}

/* QR code section - left column (1/3 width) */
.qr-section {
    flex: 0 0 auto;
    width: clamp(150px, 20vw, 300px);
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
    border: 3px solid rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-section img {
    width: 100%;
    height: auto;
    display: block;
}

.qr-label {
    font-size: clamp(0.8rem, 1.5vh, 1.2rem);
    font-weight: 600;
    color: #000;
    margin-top: 10px;
    text-align: center;
}

/* Business text - right column (2/3 width) */
.business-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.business-text h2 {
    text-align: left;
    width: 100%;
}

.business-text .business-cta {
    align-self: flex-start;
}

/* Loading state */
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    z-index: 10;
}

#loading.hidden {
    display: none;
}

/* Pause indicator */
#pause-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

#pause-indicator.hidden {
    display: none;
}

#pause-indicator svg {
    display: block;
}

/* Responsive sizing handled by clamp() functions above */
/* All content scales fluidly based on viewport dimensions */
/* Optimized for 1080p (1920x1080) but works on all screen sizes */
