:root {
  --primary: #3F704D;
  --accent: #C2A878;
  --text: #4A4A4A;
  --bg: #FAF8F1;
  --muted: #6E6E6E;
  --custom-white: #fff;
}

/* ==========================================================================
   GLOBAL RESPONSIVE RESET & BOX SIZING
   ========================================================================== */
* {
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  font-family: 'Segoe UI', Roboto, Arial, sans-serif; 
}

html, body { 
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden; /* Prevents unwanted horizontal scrolling on mobile */
  background: var(--bg); 
  color: var(--text); 
  line-height: 1.6; 
}

/* Responsive Containers */
.container, .container-fluid { 
  width: 100% !important;
  max-width: 1200px; 
  margin: 0 auto; 
  padding-left: 15px !important; 
  padding-right: 15px !important;
}

img, video {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   NAVBAR & HAMBURGER MENU
   ========================================================================== */
nav.navbar, 
.navbar {
  background-color: #2b4725 !important;
  width: 100%;
}

.bg-custom-green {
  background-color: #2b4725 !important;
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.navbar .navbar-toggler-icon {
  filter: invert(1);
}

.navbar .navbar-toggler {
  border: none !important;
  outline: none !important;
}

.navbar .navbar-collapse {
  background-color: #2b4725;
  padding: 15px 20px;
  border-radius: 12px;
  margin-top: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .custom-nav-item {
  color: #ffffff !important;
  font-weight: 500;
  padding: 12px 16px !important;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.navbar .custom-nav-item:hover,
.navbar .custom-nav-item:focus {
  background-color: rgba(255, 255, 255, 0.12);
  color: #c2a878 !important;
  padding-left: 22px !important;
}

.btn-download-apk {
  background-color: #198754;
  color: #ffffff !important;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  text-align: center;
  display: block;
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.btn-download-apk:hover {
  background-color: #146c43;
}

.site-logo-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  padding: 15px 0;
  width: 100%;
}

.site-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* ==========================================================================
   HERO HEADER & SLIDESHOW
   ========================================================================== */
.site-header {
  position: relative;
  text-align: center;
  padding: 90px 20px 80px;
  min-height: 350px;
  color: #fff;
  overflow: hidden;
  width: 100%;
}

.site-header .container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.header-slideshow {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

.header-slideshow .slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: fade 18s infinite;
}

.header-slideshow .slide:nth-child(1) { animation-delay: 0s; }
.header-slideshow .slide:nth-child(2) { animation-delay: 6s; }
.header-slideshow .slide:nth-child(3) { animation-delay: 12s; }

@keyframes fade {
  0% { opacity: 0; }
  8% { opacity: 1; }
  33% { opacity: 1; }
  41% { opacity: 0; }
  100% { opacity: 0; }
}

.header-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(#4C8053, #3F704D, #1B5E20);
  opacity: 0.35;
  z-index: 1;
}

.site-header h1 { 
  font-size: clamp(28px, 5vw, 48px); /* Fluid typography */
  margin-bottom: 16px; 
}

.site-header p { 
  font-size: clamp(14px, 2.5vw, 20px); 
  margin-bottom: 24px; 
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.btn.primary, .btn.secondary { 
  background: transparent; 
  border: 2px solid #fff; 
  color: #fff; 
}

.btn.primary:hover, .btn.secondary:hover { 
  background: #b89c60;
}

/* ==========================================================================
   CAROUSELS & SCREENSHOTS
   ========================================================================== */
.screenshots-section, .lakes-section {
  margin: 40px auto;
  text-align: center;
  width: 100%;
}

.section-title {
  font-size: clamp(22px, 4vw, 28px);
  color: var(--primary);
  margin-bottom: 25px;
  font-weight: 700;
}

.screenshots-carousel {
  padding: 20px 0 50px !important;
  width: 100%;
  margin: 0 auto;
}

.screenshot-card {
  background: #f0f0f0;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  height: 100%;
  width: 100%;
}

.screenshot-card img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 10px;
}

.slide-caption {
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #234d20;
}

.lake-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  background-color: #2b4725;
  width: 100%;
}

.lake-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.lake-name {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(27, 53, 24, 0.95));
  color: #ffffff;
  padding: 20px 10px 10px;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
}

.lakes-carousel .swiper-button-prev,
.lakes-carousel .swiper-button-next {
  z-index: 25 !important;
  color: #ffffff !important;
  cursor: pointer !important;
}


/* ==========================================================================
   FEATURES SECTION
   ========================================================================== */
.features-section {
  background-color: var(--bg);
  padding: 40px 0;
  width: 100%;
}

.feature-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 24px 20px;
  border: 1px solid rgba(43, 71, 37, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.feature-icon-wrapper {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #2b4725 0%, #3F704D 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(43, 71, 37, 0.25);
  margin-bottom: 15px;
}

/* ==========================================================================
   DEMO VIDEO, LAKES SHOWCASE & DOWNLOADS BADGE
   ========================================================================== */
.lakes-video-section, 
.demo-section, 
.downloads-section {
  margin: 40px auto;
  text-align: center;
  width: 100%;
}

.video-frame {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.video-frame video {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

.download-badge-card {
  background: #ffffff;
  border: 1px solid rgba(43, 71, 37, 0.15);
  border-radius: 20px;
  padding: 25px 20px;
  max-width: 320px;
  margin: 0 auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}


/* ==========================================================================
   HISTORY PORTAL & BARANGAY DASHBOARD
   ========================================================================== */
.history-portal-section {
  padding: 10px 0;
  margin: 10px 0;
  width: 100%;
}

.history-pic-btn {
  position: relative;
  display: block;
  width: 100%;
  height: 140px;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background-color: #222; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-bottom: 15px;
}

.history-pic-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(45%);
}

.history-pic-btn span {
  position: absolute;
  bottom: 15px; left: 15px; right: 15px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.95);
  text-align: left;
}

.history-display-window {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  margin-top: 25px;
  width: 100%;
}

.hidden { 
  display: none !important; 
}

.close-history-btn {
  position: absolute;
  top: 15px; right: 15px;
  background: #d9534f;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.brgy-sidebar {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #ffffff;
  max-height: 350px;
  overflow-y: auto;
  width: 100%;
}

.brgy-list-btn {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  background: #ffffff;
  color: #333333;
  border: none;
  border-bottom: 1px solid #edf2f7;
  font-size: 14px;
  cursor: pointer;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer { 
  background: #2b4725; 
  text-align: center; 
  padding: 24px 20px; 
  color: #ffffff; 
  font-size: 14px; 
  width: 100%;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES FOR ALL SCREEN SIZES
   ========================================================================== */

/* Laptops & Tablets (Up to 992px) */
@media (max-width: 992px) {
  .site-header { padding: 60px 20px 50px; }
  .video-frame video { height: 350px; }
}

/* Tablets & Mobile Phones (Up to 768px) */
@media (max-width: 768px) {
  .site-logo-title {
    flex-direction: column;
    text-align: center;
  }
  
  .btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
  }

  .lake-card img {
    height: 200px;
  }

  .video-frame video {
    height: 260px;
  }

  .history-pic-btn {
    height: 120px;
  }

  .history-display-window {
    padding: 15px;
  }

  .brgy-sidebar {
    max-height: 220px;
    margin-bottom: 20px;
  }
}

/* Small Mobile Phones (Up to 480px) */
@media (max-width: 480px) {
  .site-header { padding: 40px 15px; }
  .lake-card img { height: 170px; }
  .video-frame video { height: 200px; }
  .btn { padding: 10px 16px; font-size: 14px; }
  .history-pic-btn { height: 100px; }
  .history-pic-btn span { font-size: 13px; }
}
