/* General Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  color: #333333;
}

/* === Header === */
.header {
  width: 100%;
  background: linear-gradient(135deg, #0080bf 50%, #003d7a 80%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 30px;
  box-shadow: 0 8px 32px rgba(0, 128, 191, 0.2);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
}

.center-section {
  text-align: center;
}

.logo {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.4;
}

.info-item a {
  color: #ffffff;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-item a:hover {
  opacity: 0.9;
}

.icon {
  width: 20px;
  height: 20px;
}

/* === Back Button === */
.back-button-container {
  width: 100%;
  padding: 20px 30px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  display: flex;
  align-items: center;
}

.back-button-container button {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, #0080bf 0%, #003d7a 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 20px rgba(0, 128, 191, 0.25);
  letter-spacing: 0.5px;
}

.back-button-container button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 128, 191, 0.4);
}

.back-button-container button:active {
  transform: translateY(-1px);
}

/* === Flipbook Container === */
#container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 30px 20px;
  gap: 15px;
  overflow: hidden;
  transition: transform 0.5s ease-in-out;
}

/* === Flipbook === */
#album {
  width: 100%;
  max-width: 900px;
  height: 600px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin: 20px 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 128, 191, 0.2);
}

/* Pages inside Flipbook */
#album > div {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
}

.page img,
.page video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* Video Styling */
.video-page {
  border-radius: 12px;
}

/* Hide download button + context menu on videos */
video::-webkit-media-controls-download-button {
  display: none !important;
}

video::-internal-media-controls-download-button {
  display: none !important;
}

video::-webkit-media-controls-enclosure {
  overflow: hidden;
}

/* === Navigation Buttons === */
.button {
  width: 50px;
  height: 80px;
  font-size: 18px;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #0080bf 0%, #003d7a 100%);
  color: white;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 20px rgba(0, 128, 191, 0.25);
  flex-shrink: 0;
  font-weight: 600;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 128, 191, 0.4);
}

.button:active {
  transform: translateY(-1px);
}

#prev {
  margin-left: 10px;
}

#next {
  margin-right: 10px;
}

/* === Bottom Navigation === */
#bottom-nav {
  display: flex;
  justify-content: center;
  margin: 30px auto;
  gap: 20px;
  flex-wrap: wrap;
  padding: 0 20px;
}

#first,
#last {
  width: 120px;
  height: 50px;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
}

/* === Branding Corner === */
.branding-corner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.branding-corner:hover {
  opacity: 1;
  transform: scale(1.1);
}

.branding-corner img {
  width: 100px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.branding-corner a {
  text-decoration: none;
  display: block;
}

/* === Responsive Design === */
@media (max-width: 1200px) {
  .header {
    padding: 15px 20px;
  }

  .logo {
    height: 70px;
  }

  #album {
    height: 550px;
    max-width: 850px;
  }

  .button {
    width: 45px;
    height: 70px;
    font-size: 16px;
  }
}

@media (max-width: 1024px) {
  #album {
    height: 520px;
    max-width: 800px;
  }

  .button {
    width: 40px;
    height: 65px;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    padding: 15px 20px;
  }

  .center-section {
    order: -1;
  }

  .logo {
    height: 65px;
  }

  .info-item {
    font-size: 14px;
  }

  #container {
    flex-direction: column;
    gap: 20px;
    padding: 20px 10px;
  }

  #album {
    height: 450px;
    max-width: 100%;
    max-width: 600px;
  }

  .button {
    width: 40px;
    height: 60px;
    font-size: 14px;
  }

  #bottom-nav {
    margin: 20px auto;
    gap: 15px;
  }

  #first,
  #last {
    width: 100px;
    height: 45px;
    font-size: 12px;
  }

  .branding-corner img {
    width: 80px;
  }
}

@media (max-width: 600px) {
  .back-button-container {
    padding: 15px 20px;
  }

  .back-button-container button {
    padding: 10px 20px;
    font-size: 14px;
  }

  #album {
    height: 380px;
    max-width: 100%;
    margin: 15px 0;
  }

  #container {
    padding: 15px;
  }

  .button {
    width: 35px;
    height: 55px;
    font-size: 12px;
  }

  #first,
  #last {
    width: 90px;
    height: 40px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .info-item {
    font-size: 12px;
  }

  .logo {
    height: 60px;
  }

  #album {
    height: 320px;
    max-width: 100%;
  }

  #container {
    padding: 10px;
    gap: 10px;
  }

  .button {
    width: 30px;
    height: 50px;
    font-size: 11px;
    padding: 0;
  }

  #prev,
  #next {
    margin: 0 5px;
  }

  #bottom-nav {
    margin: 15px auto;
    gap: 10px;
  }

  #first,
  #last {
    width: 75px;
    height: 35px;
    font-size: 10px;
  }

  .branding-corner img {
    width: 70px;
  }
}

@media (max-width: 414px) {
  #album {
    height: 300px;
  }

  .button {
    width: 28px;
    height: 48px;
  }
}

@media (max-width: 390px) {
  #album {
    height: 280px;
  }

  .button {
    width: 25px;
    height: 45px;
    font-size: 10px;
  }

  #first,
  #last {
    width: 65px;
    height: 32px;
    font-size: 9px;
  }

  .branding-corner img {
    width: 60px;
  }
}

@media (max-width: 344px) {
  #album {
    height: 250px;
  }

  .button {
    width: 24px;
    height: 42px;
  }

  #first,
  #last {
    width: 60px;
    height: 30px;
    font-size: 8px;
  }
}

@media (max-width: 288px) {
  .header {
    padding: 10px;
  }

  .info-item {
    font-size: 10px;
  }

  .logo {
    height: 50px;
  }

  #album {
    height: 220px;
    margin-top: 10px;
  }

  #container {
    padding: 8px;
    gap: 8px;
  }

  .button {
    width: 22px;
    height: 40px;
    font-size: 9px;
  }

  #first,
  #last {
    width: 55px;
    height: 28px;
    font-size: 7px;
  }

  .branding-corner img {
    width: 50px;
  }
}