/* Remove all modal-related styles */

/* Prevent horizontal scrolling on the entire page */
body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Hero section */
.hero {
  height: 400px;
  background-image: url('../assets/images/people.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  margin-bottom: 40px; /* Add some spacing after the hero section */
  animation: heroAnimation 20s ease-in-out infinite;
  overflow: hidden;
}

@keyframes heroAnimation {
  0% {
    background-size: 100%;
    background-position: center;
  }
  50% {
    background-size: 110%;
    background-position: center 45%;
  }
  100% {
    background-size: 100%;
    background-position: center;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: white;
  padding: 20px;
  animation: floatingAnimation 3s ease-in-out infinite;
}

.hero-overlay h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: white; /* Explicitly set text color */
}

.hero-overlay p {
  font-size: 1.2rem;
  max-width: 700px;
  margin-bottom: 20px;
  color: white; /* Explicitly set text color */
}

/* About Main Content */
.about-main {
  padding: 50px 0;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  margin-bottom: 50px;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-image {
  flex: 1;
  min-width: 300px;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-title {
  margin-bottom: 20px;
}

.section-title h2 {
  font-size: 32px;
  color: #000000;
  position: relative;
  padding-bottom: 12px;
}

.section-title h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background-color: #581845;
}

.section-title.center {
  text-align: center;
}

.section-title.center h2::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Mission and Vision Section */
.vision-mission {
  background-color: #fff; /* White background only for mission-vision */
  padding: 60px 0;
}

.vm-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.vm-card {
  flex: 1;
  min-width: 300px;
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  animation: floatingAnimation 4s ease-in-out infinite;
}

.vm-card.vision {
  border-top: 4px solid #7338A0;
}

.vm-card.mission {
  border-top: 4px solid #581845;
}

/* Core Values Section */
.core-values {
  padding: 60px 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.value-item {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(115, 56, 160, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.value-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(115, 56, 160, 0.2);
}

.value-icon {
  width: 70px;
  height: 70px;
  background-color: rgba(115, 56, 160, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.value-icon img {
  width: 40px;
  height: 40px;
}

.value-item h3 {
  color: #7338A0;
  margin-bottom: 15px;
}

.cta-button:hover {
  background-color: #c1272d;
}

.about-barangay {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
}

.content-section {
  flex: 2;
  padding-right: 30px;
}

.sidebar {
  flex: 1;
  min-width: 300px;
}

.section {
  margin-bottom: 40px;
}

.section p {
  text-align: justify;
}

h2 {
  color: #333;
  font-size: 22px;
  margin-bottom: 15px;
}

.barangay-logo {
  display: block;
  margin: 0 auto 20px;
  max-width: 100%;
}

.summary-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.summary-header {
  background-color: #7338A0;
  color: white;
  padding: 10px 15px;
  font-size: 18px;
  font-weight: bold;
}

.summary-body {
  padding: 15px;
}

.summary-row {
  display: flex;
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-label {
  flex: 1;
  font-weight: bold;
  color: #555;
}

.summary-value {
  flex: 2;
  color: #333;
}

/* Address Map Section */
.address-map {
  padding: 60px 0;
  text-align: center;
  width: 100%;
  background-color: transparent; /* Remove white background */
}

.address-map h2 {
  font-size: 32px;
  color: #000000;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 12px;
  text-align: center;
}

.address-map h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 60px;
  height: 3px;
  background-color: #581845;
  transform: translateX(-50%);
}

.map-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.map-container iframe {
  width: 100%;
  height: 450px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: none;
}

/* Responsive adjustments for map */
@media (max-width: 768px) {
  .address-map {
    padding: 40px 0;
  }
  
  .map-container iframe {
    height: 350px;
  }
}

@media (max-width: 480px) {
  .map-container iframe {
    height: 300px;
  }
  
  .address-map h2 {
    font-size: 24px;
  }
}

/* Barangay Officials Section */
.officials-section {
  padding: 110px 0; /* more vertical space to avoid clipping */
  background-color: #f8f9fa;
  overflow: hidden; /* Prevent horizontal overflow */
  max-width: 100vw;
}

.officials-section .section-title p {
  color: #666;
  margin-top: 10px;
  font-size: 18px;
}

/* Ensure container doesn't overflow */
.officials-section .container {
  max-width: 100%;
  overflow: hidden;
}

/* Carousel */
.officials-carousel {
  position: relative;
  margin-top: 40px;
  padding: 0 96px; /* more space for arrows and edge fade */
  max-width: 100%;
  overflow: hidden; /* Prevent carousel from causing horizontal scroll */
}

/* Soft edge fade masks to avoid harsh cutoffs */
.officials-carousel::before,
.officials-carousel::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 170px; /* wider mask for smoother edge */
  z-index: 2;
  pointer-events: none;
}
.officials-carousel::before {
  left: 0;
  background: linear-gradient(
    90deg,
    rgba(248,249,250,1) 0%,
    rgba(248,249,250,0.92) 20%,
    rgba(248,249,250,0.65) 48%,
    rgba(248,249,250,0.32) 76%,
    rgba(248,249,250,0) 100%
  );
}
.officials-carousel::after {
  right: 0;
  background: linear-gradient(
    270deg,
    rgba(248,249,250,1) 0%,
    rgba(248,249,250,0.92) 20%,
    rgba(248,249,250,0.65) 48%,
    rgba(248,249,250,0.32) 76%,
    rgba(248,249,250,0) 100%
  );
}

.carousel-viewport {
  overflow: hidden; /* Changed from visible to hidden to prevent horizontal scroll */
  perspective: 1200px;
  padding-top: 10px; /* small buffer inside viewport */
  padding-bottom: 50px;
  position: relative; /* Ensure proper containment */
}

.carousel-track {
  position: relative;
  height: 560px; /* larger area ensures no vertical clipping */
  padding-top: 60px; /* extra room so shadows don't look cut */
  padding-bottom: 60px; /* extra room so shadows don't look cut */
}

.carousel-slide {
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateX(0) translateZ(-140px) scale(0.9);
  transition: none; /* disable animation to prevent ghosting */
  will-change: transform, opacity, filter;
}

/* Enable smooth slide/transform transitions only while animating */
.is-animating .carousel-slide {
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 420ms ease-out, filter 420ms ease-out;
}

/* Dota-style positions: center focus with flanking angled cards */
.carousel-slide.pos-0 { /* center */
  opacity: 1;
  transform: translateX(0) translateZ(0) scale(1);
  z-index: 5;
  filter: saturate(1) contrast(1.02);
}
.carousel-slide.pos-1 { /* right */
  opacity: 0.85;
  transform: translateX(38%) rotateY(-12deg) translateZ(-100px) scale(0.92);
  z-index: 4;
  filter: saturate(0.95);
}
.carousel-slide.pos--1 { /* left */
  opacity: 0.85;
  transform: translateX(-38%) rotateY(12deg) translateZ(-100px) scale(0.92);
  z-index: 4;
  filter: saturate(0.95);
}
.carousel-slide.pos-2 { /* far right */
  opacity: 0.45;
  transform: translateX(70%) rotateY(-16deg) translateZ(-160px) scale(0.84);
  z-index: 3;
  filter: saturate(0.85) blur(0.2px);
}
.carousel-slide.pos--2 { /* far left */
  opacity: 0.45;
  transform: translateX(-70%) rotateY(16deg) translateZ(-160px) scale(0.84);
  z-index: 3;
  filter: saturate(0.85) blur(0.2px);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #7338A0;
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(115,56,160,0.16), 0 3px 8px rgba(0,0,0,0.06);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  z-index: 3; /* above edge fades */
}

.carousel-btn:hover { 
  background:#581845; 
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 12px 30px rgba(115,56,160,0.22), 0 3px 8px rgba(0,0,0,0.08);
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.official-card {
  text-align: center;
  padding: 44px 34px 40px 34px; /* extra top/bottom to prevent image clipping */
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 12px rgba(0, 0, 0, 0.06);
  outline: 1px solid rgba(0,0,0,0.03); /* subtle edge to avoid cut look */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 480px; /* smaller card to avoid clipping */
}

/* Center glow similar to hero pick highlight */
.carousel-slide.pos-0 .official-card {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16), 0 4px 14px rgba(0, 0, 0, 0.08);
}

.official-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16), 0 2px 10px rgba(0, 0, 0, 0.06);
}

.official-image {
  width: 220px; /* reduced image size */
  height: 220px;
  margin: 0 auto 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid #7338A0;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.12)); /* separate from card edge */
}

.official-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.official-card h3 {
  color: #333;
  font-size: 22px;
  margin-bottom: 5px;
}

.official-card .position {
  color: #7338A0;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  /* Hero Section Mobile */
  .hero {
    height: 300px;
    animation: none !important;
    background-attachment: scroll !important;
  }

  .hero-overlay {
    padding: 15px;
    animation: none !important;
  }

  .hero-overlay h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .hero-overlay p {
    font-size: 1rem;
    max-width: 90%;
    line-height: 1.5;
  }

  .officials-carousel { padding: 0 48px; }
  .carousel-track { height: 440px; }

  .official-image {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  /* Hero Section Small Mobile */
  .hero {
    height: 250px;
    animation: none !important;
    background-attachment: scroll !important;
  }

  .hero-overlay {
    padding: 10px;
    animation: none !important;
  }

  .hero-overlay h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    line-height: 1.3;
  }

  .hero-overlay p {
    font-size: 0.9rem;
    max-width: 95%;
    line-height: 1.4;
    margin-bottom: 15px;
  }

  .officials-carousel { padding: 0 44px; }
  .carousel-track { height: 380px; }

  .official-image {
    width: 160px;
    height: 160px;
  }

  .official-card h3 {
    font-size: 18px;
  }

  .official-card .position {
    font-size: 14px;
  }
}

/* Very small devices (320px and down) */
@media (max-width: 320px) {
  /* Hero Section Extra Small Mobile */
  .hero {
    height: 220px;
  }

  .hero-overlay h2 {
    font-size: 1.3rem;
    margin-bottom: 6px;
  }

  .hero-overlay p {
    font-size: 0.85rem;
    line-height: 1.3;
  }
}

/* Add these styles for the map placeholder */
.map-placeholder {
  width: 100%;
  height: 450px;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 1.2rem;
  border-radius: 8px;
}

/* Ensure the iframe maintains the same dimensions */
.map-container iframe {
  width: 100%;
  height: 450px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: none;
}


/* Update the header-right container to match homepage */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto; /* This will push the buttons to the right */
}

/* Ensure proper spacing between buttons */
.logreg-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Forgot Password Modal Styles */
#forgotPasswordModal.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  overflow: auto;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
}

#forgotPasswordModal .modal-content.modal-card {
  max-width: 420px;
  width: 95%;
  margin: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(12,77,162,0.13);
  padding: 0 0 2.5rem 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#forgotPasswordModal .modal-card-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 2rem auto 0.5rem auto;
  display: block;
  border-radius: 50%;
  background: #f4f8fb;
}

#forgotPasswordModal .modal-card-title {
  margin: 0.5rem 0 0 0;
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  color: #000000;
}

#forgotPasswordModal .modal-card-subtitle {
  margin: 0 0 1.5rem 0;
  color: #000000;
  font-size: 1.05rem;
  text-align: center;
}

#forgotPasswordModal .form-group {
  width: 90%;
  margin: 0 auto 1rem auto;
  display: flex;
  flex-direction: column;
}

#forgotPasswordModal .form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
  color: #7338A0;
}

#forgotPasswordModal .form-group input {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1.5px solid #7338A0;
  font-size: 1rem;
  background: #f4f8fb;
  color: #222;
}

#forgotPasswordModal .form-group input:focus {
  outline: none;
  border-color: #581845;
  box-shadow: 0 0 0 2px rgba(115, 56, 160, 0.1);
}

#forgotPasswordModal .submit-button,
#forgotPasswordModal .modal-green-btn {
  width: 90%;
  margin: 0 auto 0.5rem auto;
  display: block;
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  background: #7338A0;
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}

#forgotPasswordModal .submit-button:hover,
#forgotPasswordModal .modal-green-btn:hover {
  background: #581845;
}

#forgotPasswordModal .switch-prompt {
  margin-top: 1rem;
  font-size: 1rem;
  text-align: center;
}

#forgotPasswordModal .switch-prompt a {
  color: #7338A0;
  text-decoration: none;
  font-weight: 500;
}

#forgotPasswordModal .switch-prompt a:hover {
  text-decoration: underline;
  color: #581845;
}

#forgotPasswordModal .close-button {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 1.7rem;
  color: #7338A0;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  text-decoration: none;
}

#forgotPasswordModal .close-button:hover {
  color: #581845;
}

#forgotPasswordMsg.notification {
  display: none;
  margin: 1rem auto 0 auto;
  width: 90%;
  background: rgba(115, 56, 160, 0.1);
  color: #7338A0;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  text-align: center;
  font-size: 1rem;
}

#forgotPasswordMsg.notification.active {
  display: block;
}

/* Fix modal logo size and layout for login/forgot password modal */
.modal-card-image {
  width: 100px !important;
  height: 100px !important;
  object-fit: contain !important;
  margin: 2rem auto 0.5rem auto !important;
  display: block !important;
  border-radius: 50% !important;
  background: #f4f8fb !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
