@charset "UTF-8";
/*  JavaScript 7th Edition
    Chapter 5
    Chapter Case

    Filename: styles.css
*/

/* apply a natural box layout model to all elements */
* {
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
}

/* reset rules */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
   margin: 0;
   padding: 0;
   border: 0;
   font-size: 100%;
   font: inherit;
   vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
   display: block;
}

body {
   line-height: 1;
   width: 1000px;
   background: white;
   margin: 0 auto;
   font-family: Arial, Helvetica, sans-serif; 
}

ol, ul {
   list-style: none;
}

/* article styles */
article {
   width: 100%;
   height: 300px;
   margin: 0 auto;
}

article > h1 {
   font-size: 3.8em;
   text-align: center;
   color: ivory;
   text-shadow: 2px 2px 10px black;
   font-family: Baskerville, "Palatino Linotype", Palatino, "Century Schoolbook L", "Times New Roman", "serif";
   margin: 5px 0 20px 0;
}

article > p {
   font-size: 1.5em;
   line-height: 2;
}

article > ul {
   list-style-type: disc;
   font-size: 1.2em;
   line-height: 2;
   padding-left: 20px;
   padding-bottom: 40px;
   border-bottom: 3px solid gray;
}

/* Slideshow Gallery Styles */
#gallery {
   text-align: center;
   margin: 0 auto;
   max-width: 1000px;
   position: relative;
}

#galleryTitle {
   font-size: 2.5em;
   margin-bottom: 10px;
   color: #333;
}

#slideCounter {
   font-size: 1.2em;
   margin-bottom: 15px;
   color: #666;
}

#leftBox, #rightBox, #playPause {
   display: inline-block;
   font-size: 2em;
   margin: 0 15px;
   cursor: pointer;
   color: #ee1010;
   -webkit-user-select: none; /* Safari support */
   user-select: none;
   position: absolute;
}

#leftBox { left: 0; top: 150px; }
#rightBox { right: 0; top: 150px; }
#playPause { top: 260px; left: 50%; transform: translateX(-50%); font-size: 2.2em; text-shadow: 3px 3px 20px black; filter: grayscale(1); }

#playPause:hover { filter: grayscale(0.6) hue-rotate(120deg); }

#slideBox {
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 5px;
   flex-wrap: nowrap;
   overflow-x: auto;
   padding: 0px 0;
}

#slideBox img {
   width: 150px;
   height: auto;
   border: 2px solid #ccc;
   border-radius: 8px;
   cursor: pointer;
   transition: transform 0.3s ease, opacity 0.3s ease;
   opacity: 0.9;
   margin: 0 5px;
}

#slideBox img:hover {
   transform: scale(1.05);
   opacity: 1;
}

/* Modal Styles */
#activeModal {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.8);
   display: flex;
   justify-content: center;
   align-items: center;
   z-index: 9999;
}

#activeModal figure {
   color: white;
   text-align: center;
}

#activeModal img {
   max-width: 90%;
   max-height: 80vh;
   border-radius: 5px;
}

#activeModal figcaption {
   margin-top: 10px;
   font-size: 1.2em;
}

#modalClose {
   position: absolute;
   top: 20px;
   right: 30px;
   font-size: 40px;
   color: white;
   cursor: pointer;
}

#modalClose:hover {
   color: #ccc;
}
