/* Kinetic Slideshow Plugin Styles */

/* CSS Reset for slideshow wrapper */
.kinetic-slideshow-fullscreen,
.kinetic-slideshow-fullscreen * {
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: baseline;
}

.kinetic-slideshow-fullscreen article,
.kinetic-slideshow-fullscreen aside,
.kinetic-slideshow-fullscreen details,
.kinetic-slideshow-fullscreen figcaption,
.kinetic-slideshow-fullscreen figure,
.kinetic-slideshow-fullscreen footer,
.kinetic-slideshow-fullscreen header,
.kinetic-slideshow-fullscreen hgroup,
.kinetic-slideshow-fullscreen menu,
.kinetic-slideshow-fullscreen nav,
.kinetic-slideshow-fullscreen section {
    display: block;
}

.kinetic-slideshow-fullscreen {
    line-height: 1;
}

.kinetic-slideshow-fullscreen ol,
.kinetic-slideshow-fullscreen ul {
    list-style: none;
}

.kinetic-slideshow-fullscreen blockquote,
.kinetic-slideshow-fullscreen q {
    quotes: none;
}

.kinetic-slideshow-fullscreen blockquote:before,
.kinetic-slideshow-fullscreen blockquote:after,
.kinetic-slideshow-fullscreen q:before,
.kinetic-slideshow-fullscreen q:after {
    content: '';
    content: none;
}

.kinetic-slideshow-fullscreen table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Hide body scroll when slideshow is active */
html:has(.kinetic-slideshow-fullscreen),
body:has(.kinetic-slideshow-fullscreen) {
    overflow: hidden !important;
    height: 100% !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Main fullscreen wrapper */
.kinetic-slideshow-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: #404042;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Respect WordPress admin bar */
.admin-bar .kinetic-slideshow-fullscreen {
    top: 32px;
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .kinetic-slideshow-fullscreen {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

/* Slideshow overlay respects admin bar */
.admin-bar .slideshow {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .slideshow {
        top: 46px;
    }
}

/* Headings */
.kinetic-slideshow-fullscreen h1,
.kinetic-slideshow-fullscreen h2,
.kinetic-slideshow-fullscreen h3,
.kinetic-slideshow-fullscreen h4,
.kinetic-slideshow-fullscreen h5,
.kinetic-slideshow-fullscreen h6 {
    color: #C4C4C4;
}

/* Header */
.main-header {
    background: #1fb5e5;
    padding: 25px;
    text-align: center;
    color: white;
}

.kinetic-logo img {
    height: 80px;
}

.kinetic-logo a {
    display: inline-block;
}

/* Slideshow overlay */
.slideshow {
    background: black;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    justify-content: center;
    flex-direction: column;
    z-index: 1000000;
}

.slideshow > div {
    padding: 50px 25px 25px 25px;
    text-align: center;
    height: calc(100vh - 50px);
    max-height: calc(100vh - 50px);
    display: flex;
    flex-direction: column;
}

.slideshow.active {
    opacity: 1;
    pointer-events: all;
}

/* Slideshow list */
.slideshow-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 50px;
    padding-top: 0px;
    max-width: 80em;
    margin: 0 auto;
}

.slideshow-link {
    font-size: 25px;
    display: inline-flex;
    padding: 40px;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    color: #D6D6D6;
    font-family: sans-serif;
    cursor: pointer;
    margin: 20px 20px;
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

.slideshow-link:before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: '';
    background: #6B6B6B;
    z-index: -2;
}

.slideshow-link:after {
    transition: 0.2s;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: '';
    background: #828282;
    z-index: -1;
    transform: translateY(100%);
}

.slideshow-link:hover:after {
    transform: none;
}

/* Title */
.title {
    font-family: 'Oswald', sans-serif;
    text-align: center;
    margin: 50px auto;
    font-size: 40px;
    font-family: sans-serif;
    font-weight: 100;
}

/* SlidesJS Pagination */
.slidesjs-pagination {
    font-family: sans-serif;
    font-size: 24px;
    text-align: center;
    float: right;
    width: 100%;
}

.slidesjs-pagination li {
    margin: 8px;
    display: inline-block;
    overflow: hidden;
    position: relative;
}

.slidesjs-pagination li:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    transition: transform 0.2s;
    transform: translateY(100%);
    pointer-events: none;
    opacity: 0.2;
}

.slidesjs-pagination li:hover:after {
    transform: none;
}

.slidesjs-pagination li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px;
}

.slidesjs-pagination .active {
    color: grey;
}

/* SlidesJS Navigation */
.slidesjs-navigation {
    font-family: sans-serif;
    font-size: 24px;
    color: white;
    text-decoration: none;
    padding: 15px;
    position: relative;
    overflow: hidden;
    margin: 10px 20px;
}

.slidesjs-navigation:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    transition: transform 0.2s;
    transform: translateY(100%);
    pointer-events: none;
    opacity: 0.2;
}

.slidesjs-navigation:hover:after {
    transform: none;
}

.slidesjs-previous {
    position: absolute;
    left: 0;
}

.slidesjs-next {
    position: absolute;
    right: 0;
}

.slidesjs-play,
.slidesjs-stop {
    display: inline-block;
    clear: both;
    text-align: center;
}

.slides {
    display: none !important;
}

/* Close button */
.close-slideshow {
    position: absolute;
    top: 0;
    right: 0;
    color: #ADADAD;
    font-size: 28px;
    z-index: 50;
    opacity: 0.8;
    cursor: pointer;
    padding: 15px;
    background: black;
    text-align: center;
}

/* Slide elements */
.slidesjs-slide {
    width: 100%;
    height: 100%;
}

.slidesjs-slide img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
}

/* Loading spinner */
.loading {
    position: absolute;
    z-index: 1000001;
    background: black;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.loading.active {
    opacity: 1;
    pointer-events: all;
}

.loading:after {
    display: block;
    height: 200px;
    width: 200px;
    padding: 50px;
    border-right: 2px solid #1fb5e5;
    background: black;
    animation: spin 0.5s linear infinite;
    border-radius: 100%;
    content: '';
}

@keyframes spin {
    from {
        transform: none;
    }
    to {
        transform: rotate(360deg);
    }
}

/* Caption */
.caption {
    color: white;
    font-weight: bold;
    font-family: sans-serif;
    font-size: 20px;
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
}

/* All-slides container */
.all-slides {
    position: relative;
    overflow: visible;
}

/* Constrain SlidesJS container to available space */
.all-slides .slidesjs-container {
    overflow: visible !important;
    max-height: calc(100vh - 250px) !important;
}

.all-slides .slidesjs-control {
    overflow: visible !important;
    max-height: calc(100vh - 250px) !important;
}

/* Slide elements */
.all-slides .slidesjs-slide {
    width: 100%;
    height: 100%;
}

/* Image sizing - scale to fit within container while maintaining aspect ratio */
.all-slides .slidesjs-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Controls wrapper - stacked rows */
.all-slides .slidesjs-controls {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    width: 100%;
}

/* Navigation row - space between */
.all-slides .slidesjs-nav-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 10%;
    box-sizing: border-box;
}

/* Navigation and play/stop buttons */
.all-slides .slidesjs-previous,
.all-slides .slidesjs-next,
.all-slides .slidesjs-play,
.all-slides .slidesjs-stop {
    position: relative;
    float: none;
    display: inline-flex;
    align-items: center;
    margin: 0;
}

/* Pagination on its own row */
.all-slides .slidesjs-pagination {
    position: static;
    float: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 0 0 0;
    margin: 0;
}

/* Play/Stop buttons */
.all-slides .slidesjs-play,
.all-slides .slidesjs-stop {
    clear: none;
}

/* Hidden state for controls - press 'h' to toggle */
.all-slides .slidesjs-controls.hidden {
    display: none;
}

/* When controls are hidden, expand slideshow to use full available space */
.all-slides:has(.slidesjs-controls.hidden) .slidesjs-container {
    max-height: calc(100vh - 100px) !important;
}

.all-slides:has(.slidesjs-controls.hidden) .slidesjs-control {
    max-height: calc(100vh - 100px) !important;
}
