/* CSS basics */
body {
  background-color: rgb(159, 147, 134);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.6;
  padding: 24px;
}


h1 {
  font-family:Roboto;
  font-size: 60px;
  color:rgb(0, 0, 0);
  text-shadow: 0px -4px 0px rgb(95, 95, 95);
  text-decoration: underline rgb(206, 206, 206);
  text-transform: uppercase;
}

.h1per {
  font-family:Roboto;
  font-size: 60px;
  color:rgb(255, 255, 255);
  text-shadow: 0px -4px 0px rgb(161, 161, 161);
  text-decoration: underline rgb(33, 255, 21);
  text-transform: uppercase;
}


h2 {
  font-size: 40px;
  font-family:Roboto;
  color:black;
}

h3 {
  font-size: 26px;
  font-family:Roboto;
  color:rgb(47, 47, 47);
}

p {
  font-family:Roboto; 
  color: darkslategrey;font-size: 22px;
}

.p1 {
  font-family:Roboto;
  color: #6455a4; 
  font-size: 14px;
}
 /* End of CSS basics */

/* Duck logo bottom right overlay */
.duck-logo {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 170px;
  height: auto;
  z-index: 10000;
  opacity: 0.85;
  pointer-events: none;
}

/* End duck logo */

  /* Index.html Header */
.IndexHeader {
  min-height: 200px;
  display: flex;
  justify-content: flex-start;
  gap: 30px;
}

.Index-Header1 {
  flex-basis: 200px;
  flex-grow: 1;
}

.Index-Header2 {
  flex-basis: 400px;
  flex-grow: 2;
}
 /* Index.html Header end */

 /* Index body sections */
.Index-Body1 {
  margin-top: 20px;
  margin-bottom: 20px;
}

.Index-Body2 {
  margin-top: 20px;
  margin-bottom: 20px;
}

.Index-Body3 {
  margin-top: 20px;
  margin-bottom: 20px;
}

 /* Index footer */
.Index-Footer {
  gap: 10px;
  margin-top: 40px;
  text-align: center;
  color: #555555;
}

.Download-Page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 20px;
}
.Wallpaper-page {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.Wallpaper-page img {
  width: 300px;
  height: 200px;
  gap: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

@media (min-width: 769px) {
  .Wallpaper-page img:hover {
    transform: scale(2);
    box-shadow: 0 16px 16px rgba(0,0,0,0.3);
  }
}

.biglink {
  display: flex;
  font-family: Roboto, Arial, sans-serif;
  font-size: 28px;
  color: #bcd146;
  text-decoration: underline;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  justify-content: center;
  
}


.Perms {
  font-family: Roboto, Arial, sans-serif;
  font-size: 18px;
  color: #b1b57c;
  max-width: 600px;
  text-align: left;
}

/* Flexbox Photo Gallery: Displays images in a responsive, wrapping row layout with spacing and center alignment */
.photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 40px 0;
}

.gallery-title {
  text-align: center;
  font-family: Roboto, Arial, sans-serif;
  font-size: 36px;
  color: #333333;
  margin-bottom: 20px;
}

.photo-gallery img {
  width: 220px;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.2s;
  cursor: zoom-in;
}

.photo-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.732);
}

/* Flexbox Video Gallery: Similar layout for videos */
.video-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 40px 0;
}

.video-gallery video {
  width: 320px;
  height: 240px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}

.video-gallery video:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.732);
}

/* Button Style */
.btn,
.bird-collection-btn,
.home-btn {
  font-family: Roboto, Arial, sans-serif;
  font-size: 22px; /* px fallback is fine across browsers */
  /* Background fallbacks and vendor gradients */
  background-color: navy; /* solid fallback */
  background-image: -webkit-gradient(linear, left top, right top, from(navy), to(darkblue));
  background-image: -webkit-linear-gradient(left, navy 0%, darkblue 100%);
  background-image: -moz-linear-gradient(left, navy 0%, darkblue 100%);
  background-image: -o-linear-gradient(left, navy 0%, darkblue 100%);
  background-image: linear-gradient(90deg, navy 0%, darkblue 100%); /* keep standard last */
  color: #fddcaa;
  border: 2px solid black;
  border-radius: 20px;
  padding: 12px 28px;
  margin: 32px auto 0 auto;
  max-width: 300px;
  display: block;
  text-align: center;
  -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  -moz-box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-transition: background 0.2s, -webkit-transform 0.2s, box-shadow 0.2s;
  -moz-transition: background 0.2s, -moz-transform 0.2s, box-shadow 0.2s;
  -o-transition: background 0.2s, -o-transform 0.2s, box-shadow 0.2s;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

/* Hover/focus styles for buttons */
.btn:hover,
.bird-collection-btn:hover,
.home-btn:hover {
  background-color: #0a1440;
  background-image: -webkit-gradient(linear, left top, right top, from(navy), to(blue));
  background-image: -webkit-linear-gradient(left, navy 0%, blue 100%);
  background-image: -moz-linear-gradient(left, navy 0%, blue 100%);
  background-image: -o-linear-gradient(left, navy 0%, blue 100%);
  background-image: linear-gradient(90deg, navy 0%, blue 100%); /* standard last */
  -webkit-transform: translateZ(0) scale(1.03);
  -moz-transform: scale(1.03);
  -ms-transform: scale(1.03);
  -o-transform: scale(1.03);
  transform: scale(1.03);
  -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  -moz-box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.btn:focus-visible,
.bird-collection-btn:focus-visible,
.home-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.9), 0 0 0 6px rgba(179, 152, 107, 0.7);
}

/* Active press state: Styles applied to button elements when they are actively being pressed or clicked */
.btn:active,
.bird-collection-btn:active,
.home-btn:active {
  -webkit-transform: translateY(1px) scale(0.99);
  -moz-transform: translateY(1px) scale(0.99);
  -ms-transform: translateY(1px) scale(0.99);
  -o-transform: translateY(1px) scale(0.99);
  transform: translateY(1px) scale(0.99);
  -webkit-box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  -moz-box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.home-btn:disabled,
.btn[disabled],
.bird-collection-btn[disabled],
.home-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Weather Button Style */
.weather-btn {
  font-family: Roboto, Arial, sans-serif;
  font-size: 22px;
  /* Weather-themed gradient - sky blue to cloud white */
  background-color: #4a90e2; /* solid fallback */
  background-image: -webkit-gradient(linear, left top, right top, from(#4a90e2), to(#87ceeb));
  background-image: -webkit-linear-gradient(left, #4a90e2 0%, #87ceeb 100%);
  background-image: -moz-linear-gradient(left, #4a90e2 0%, #87ceeb 100%);
  background-image: -o-linear-gradient(left, #4a90e2 0%, #87ceeb 100%);
  background-image: linear-gradient(90deg, #4a90e2 0%, #87ceeb 100%);
  color: white;
  border: 2px solid #2c5aa0;
  border-radius: 4px;
  padding: 12px 28px;
  margin: 20px auto 0 auto;
  max-width: 200px;
  display:  block;
  text-align: center;
  box-shadow: 0 2px 2px rgba(49, 145, 255, 0.805);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-weight: 500;
}

.weather-btn:hover {
  background-image: linear-gradient(90deg, #357abd 0%, #7bb8e8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.weather-btn:active {
  transform: translateY(0px);
  box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}

/* Fullscreen modal overlay */
#fullscreen-modal {
  display: none;            /* toggled to flex via JS */
  position: fixed;
  top: 0;
  left: 0;
  /* Viewport units with pixel fallbacks */
  width: 100%; /* fallback */
  width: 100vw;
  height: 100%; /* fallback */  
  height: 100vh;
  /* Background with rgba fallback */
  background: rgb(0,0,0); /* fallback */
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(2px);
  z-index: 9999;
  /* Flexbox with vendor prefixes and fallback */
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box; 
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -moz-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  /* Gap property fallback - not supported in older browsers */
  gap: 20px;
}

#fullscreen-modal img {
  /* Viewport units with pixel fallbacks */
  max-width: 800px; /* fallback */
  max-width: 60vw;
  max-height: 600px; /* fallback */
  max-height: 90vh;
  /* Border radius with vendor prefixes */
  -webkit-border-radius: 12px;
  -moz-border-radius: 12px;
  border-radius: 12px;
  /* Box shadow with vendor prefixes */
  -webkit-box-shadow: 0 4px 32px rgba(0,0,0,0.5);
  -moz-box-shadow: 0 4px 32px rgba(0,0,0,0.5);
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
  cursor: zoom-out;
  /* Add margin for spacing when gap isn't supported */
  margin-right: 10px;
}

/* Modal info panel */
.modal-info {
  /* Viewport units fallback for older browsers */
  max-width: 400px; /* fallback */
  max-width: 25vw;
  min-width: 280px;
  color: #ffffff;
  background: rgba(0,0,0,0.7);
  /* IE9+ rgba support, older browsers get solid fallback */
  background: rgb(0,0,0); /* fallback */
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  border: 1px solid rgb(255,255,255); /* fallback */
  border: 1px solid rgba(255,255,255,0.2);
  /* Border radius with vendor prefixes */
  -webkit-border-radius: 12px;
  -moz-border-radius: 12px;
  border-radius: 12px;
  padding: 20px;
  font-family: Roboto, Arial, sans-serif;
  /* Backdrop filter with fallback - not supported in IE/old browsers */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  /* Viewport height fallback */
  max-height: 600px; /* fallback */
  max-height: 80vh;
  overflow-y: auto;
  /* Smooth scrolling where supported */
  -webkit-overflow-scrolling: touch;
}

.modal-info h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  color: #fddcaa;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 8px;
}

.modal-info p {
  margin: 8px 0;
  line-height: 1.5;
  font-size: 16px;
  color: #e0e0e0;
}

.modal-info .image-date {
  font-style: italic;
  color: #c0c0c0;
  font-size: 14px;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 8px;
}

/* Modal close button */
.modal-close-btn {
  position: absolute;
  top: 12px;
  /* Background with fallbacks for older browsers */
  background: rgb(0,0,0); /* fallback */
  background: rgba(0,0,0,0.4);
  /* Border with fallbacks */
  border: 1px solid rgb(255,255,255); /* fallback */
  border: 1px solid rgba(255,255,255,0.6);
  color: #ffcaca;
  width: 36px;
  height: 36px;
  /* Border radius with vendor prefixes */
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
  font-size: 24px;
  line-height: 34px;
  text-align: center;
  cursor: pointer;
  /* Remove default button styles for cross-browser consistency */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Ensure font family is consistent */
  font-family: Arial, sans-serif;
  /* Better text centering for cross-browser */
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -moz-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
  /* Background with fallback */
  background: rgb(255,255,255); /* fallback */
  background: rgba(255,255,255,0.15);
  outline: none;
}

/* Spinner */
.modal-spinner {
  position: absolute;
  /* Center using compatible positioning (inset not supported in older browsers) */
  top: 50%;
  left: 50%;
  /* Transform with vendor prefixes */
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  /* Border with rgba fallback */
  border: 4px solid rgba(255,255,255,0.35);
  border: 4px solid rgb(200,200,200); /* fallback */
  border: 4px solid rgba(255,255,255,0.35);
  border-top-color: #ffffff;
  /* Border radius with vendor prefixes */
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
  /* Animation with vendor prefixes */
  -webkit-animation: spin 1s linear infinite;
  -moz-animation: spin 1s linear infinite;
  -o-animation: spin 1s linear infinite;
  animation: spin 1s linear infinite;
  z-index: 2;
  pointer-events: none;
}

/* Smaller spinner for thumbnails */
.thumb-spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

/* Wrapper for thumbnails to anchor spinner overlay */
.photo-gallery .img-wrap {
  position: relative;
  display: inline-block;
}

/* Keyframes with vendor prefixes for cross-browser compatibility */
@-webkit-keyframes spin {
  from { -webkit-transform: rotate(0deg); }
  to { -webkit-transform: rotate(360deg); }
}

@-moz-keyframes spin {
  from { -moz-transform: rotate(0deg); }
  to { -moz-transform: rotate(360deg); }
}

@-o-keyframes spin {
  from { -o-transform: rotate(0deg); }
  to { -o-transform: rotate(360deg); }
}

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

/* Hide duck logo on mobile */
@media (max-width: 800px) {
  .duck-logo {
    display: none !important;
  }
}

/* Responsive styles for phones */
@media (max-width: 600px) {
  body {
    font-size: 20px;
    line-height: 1.6;
    padding: 12px;
  }

  /* Stack modal content vertically on mobile */
  #fullscreen-modal {
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 12px;
  }

  #fullscreen-modal img {
    max-width: 90%; /* fallback */
    max-width: 90vw;
    max-height: 300px; /* fallback */
    max-height: 50vh;
    margin-bottom: 10px;
  }

  .modal-info {
    max-width: 85%; /* fallback */
    max-width: 85vw;
    min-width: auto;
    max-height: 180px; /* fallback */
    max-height: 35vh;
    padding: 15px;
    font-size: 14px;
  }

  .modal-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .modal-info p {
    font-size: 14px;
    line-height: 1.4;
    margin: 6px 0;
  }

  .modal-info .image-date {
    font-size: 12px;
    margin-top: 12px;
  }

  h1 {
    font-size: 40px;
    line-height: 1.2;
    text-align: left;
    margin-bottom: 12px;
  }

  h2 {
    font-size: 24px;
    line-height: 1.35;
    text-align: left;
    margin-bottom: 12px;
  }

  p {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 12px;
  }

  .IndexHeader {
    flex-direction: column;
    gap: 12px;
    min-height: auto;
  }

  .btn,
  .bird-collection-btn,
  .home-btn {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 20px auto 0 auto;
    padding: 16px 0;
    font-size: 20px;
  }

  .duck-logo {
    width: 110px;
    right: 12px;
    bottom: 12px;
    opacity: 0.9;
  }
}

@media (max-width: 768px) {
  .button-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 30px 20px;
  }
  
  .modern-btn {
    padding: 18px;
  }
  
  .btn-icon {
    font-size: 32px;
    margin-right: 15px;
  }
  
  .btn-text strong {
    font-size: 16px;
  }
  
  .btn-text small {
    font-size: 13px;
  }
  
  .TRL-Section {
    margin: 20px;
    padding: 20px;
  }
  
  .TRL-Header h2 {
    font-size: 24px;
  }
  
  .feature-item {
    flex-direction: column;
    text-align: center;
  }
  
  .feature-icon {
    margin-right: 0;
    margin-bottom: 10px;
  }
}