* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    background: #f4f6f8;
    color: #333;
    margin: 0;
    padding: 0;
}
main, .main-content {
    background: #f4f6f8;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
}
header {
    background: #ffffff;
    color: #333;
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(44,62,80,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    border: none;
}

header .logo {
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
}

nav {
    width: auto;
    background: transparent;
    margin: 0;
    padding: 0;
    box-shadow: none;
    position: static;
}
nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 32px;
    flex-wrap: nowrap !important;
}
nav ul li {
    margin: 0;
}
nav ul li a, .dropbtn, .dropdown-content a {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: #ffffff !important;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  padding: 8px 12px;
}
nav ul li a:hover, .dropdown-content a:hover, .dropbtn:hover {
    color: #2563eb !important;
    background: transparent;
}
@media (max-width: 700px) {
    nav ul { flex-direction: column; gap: 0; }
    nav ul li a { padding: 12px 0; font-size: 1rem; color: #ffffff !important; }
}
@media (max-width: 500px) {
  header { padding: 6px 10px; }
  .header-logo { width: 35px; height: 35px; }
  .region, .province { font-size: 0.6rem; }
  .municipality { font-size: 0.85rem; }
  nav ul li a, .dropbtn {
    font-size: 0.85rem !important;
    padding: 6px 4px !important;
  }
  nav ul {
    gap: 8px !important;
  }
}

/* Section fade-in animation */
section {
    padding: 48px 20px;
    max-width: 1200px;
    margin: 36px auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.06);
    position: relative;
}

/* Override for hero sections to remove spacing */
section.hero,
.welcome-hero-section {
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}
section.hero {
    background: none;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    max-width: none;
}
/* Hero Section */
.hero {
    width: 50%;
    min-height: 520px;
    margin: 0;
    padding: 0;
    position: relative;
    background: url("test.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    border-radius: 0;
    background-color: red;
}




.hero-overlay {
    width: 100%;
    text-align: center;
    padding: 120px 0 120px 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100%;
}
.hero h1 {
    color: #eaeaea;
    font-size: 3rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 2px 4px 12px #222, 0 2px 8px #000;
    margin: 0;
    padding: 0;
}
.hero p {
    font-size: 1.3rem;
    margin-bottom: 32px;
}
.cta-btn {
    display: inline-block;
    background: #9b916c;
    color: #2c3e50;
    padding: 14px 36px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(44,62,80,0.08);
    transition: background 0.3s, color 0.3s, transform 0.2s;
}
.cta-btn:hover {
    background: #fff;
    color: #9b916c;
    transform: translateY(-2px) scale(1.04);
}

/* Section Headings */
section h2 {
    font-size: 2.4rem;
    color: #058c27;
    margin-bottom: 8px;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
    position: relative;
}


/* Social Icons */
.social-icons {
    margin-top: 18px;
}
.social-icons a {
    display: inline-block;
    margin: 0 10px;
    font-size: 2rem;
    color: #2c3e50;
    background: #9b916c;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    transition: background 0.3s, color 0.3s, transform 0.2s;
}
.social-icons a:hover {
    background: #2c3e50;
    color: #9b916c;
    transform: scale(1.1);
}
.social-icons svg {
    vertical-align: middle;
    display: inline-block;
}

footer {
    background: #058c27;
    color: #9b916c;
    text-align: center;
    padding: 36px 10px 18px 10px;
    font-size: 1.05rem;
    border-top: 4px solid #fff;
}
.footer-nav {
    color: #fff !important;
}
.footer-nav a {
    color: #fff !important;
    text-decoration: none;
    font-weight: bold;
    margin: 0 8px;
    font-size: 1.1rem;
    transition: color 0.2s;
}
.footer-nav a:hover {
    color: #ffd600;
    text-decoration: underline;
}
.footer-nav {
    /* Make separators white */
}
.footer-nav a + span, .footer-nav span {
    color: #fff !important;
}
.footer-copy {
    color: #fff;
    font-size: 0.98rem;
    margin-top: 8px;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 0;
    padding-left: 0;
    flex: 1;
}
.header-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.header-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: contain;
  margin-bottom: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(44,62,80,0.10);
}
.header-titles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.region, .province {
    color: #666666;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.region {
    margin-bottom: 0px;
}
.province {
    margin-bottom: 0px;
}
.municipality {
    color: #2563eb;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin-top: 0px;
    text-transform: uppercase;
}
.town-seal {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(44,62,80,0.10);
    object-fit: cover;
}

.carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 32px 0 0 0;
}
.carousel-track {
    width: 340px;
    height: 220px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.10);
    background: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 1;
    pointer-events: none;
}
.carousel-img.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}
.carousel-btn {
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(44,62,80,0.10);
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-btn:hover {
    background: #9b916c;
    color: #2c3e50;
    transform: scale(1.08);
}

/* Responsive Design */
@media (max-width: 700px) {
    .hero { min-height: 220px; }
    .hero-overlay { padding: 60px 0; }
    .hero h1 { font-size: 1.5rem; }
    section { padding: 24px 8px; }
    nav ul { flex-direction: column; gap: 0; }
    nav ul li { margin: 8px 0; }
    .carousel-track { width: 98vw; height: 160px; }
    .carousel { gap: 4px; }
    header { padding: 8px 12px; }
    .header-flex { flex-direction: row; align-items: center; padding-left: 0; gap: 10px; }
    .header-logo { width: 40px; height: 40px; }
    .header-titles { align-items: flex-start; }
    .region, .province { font-size: 0.65rem; }
    .municipality { font-size: 0.95rem; }
}

.testimonials {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}
.testimonial-card {
    background: #fffbe6;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.08);
    padding: 28px 22px;
    max-width: 320px;
    min-width: 220px;
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 1.08rem;
    position: relative;
}
.testimonial-card:before {
    content: '“';
    font-size: 2.5rem;
    color: #aca27b;
    position: absolute;
    top: 10px; left: 16px;
    opacity: 0.3;
}
.testimonial-author {
    margin-top: 18px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 1rem;
    align-self: flex-end;
}
@media (max-width: 900px) {
    .testimonials { flex-direction: column; align-items: center; }
    .testimonial-card { max-width: 98vw; }
}

.services-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    margin-top: 36px;
}
.service-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.08);
    padding: 32px 24px 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 220px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.service-card:hover {
    box-shadow: 0 6px 24px rgba(44,62,80,0.16);
    transform: translateY(-4px) scale(1.02);
}
.service-icon {
    font-size: 2.5rem;
    margin-bottom: 18px;
}
.service-title {
    color: #058c27;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 10px;
}
.service-desc {
    color: #444;
    font-size: 1rem;
    line-height: 1.5;
}
.section-sub {
    text-align: center;
    color: #444;
    font-size: 1.1rem;
    margin-bottom: 36px;
}
.tourism-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 24px;
    justify-content: center;
    justify-items: center;
    align-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}
.tourism-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.08);
    padding: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    transition: box-shadow 0.2s, transform 0.2s;
    width: 100%;
    max-width: 400px;
}
.tourism-card:hover {
    box-shadow: 0 6px 24px rgba(44,62,80,0.16);
    transform: translateY(-4px) scale(1.02);
}
.tourism-img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    margin-bottom: 18px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.tourism-title {
    color: #058c27;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
}
.tourism-desc {
    color: #444;
    font-size: 1rem;
    text-align: center;
    padding: 0 18px;
}

.contact-flex {
    display: flex;
    gap: 36px;
    margin-top: 36px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.contact-info {
    flex: 1 1 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.08);
    padding: 32px 24px;
    font-size: 1.05rem;
    color: #222;
}
.contact-info h3 {
    color: #058c27;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 18px;
}
.contact-info a {
    color: #058c27;
    text-decoration: underline;
    font-weight: bold;
}
.contact-map {
    flex: 2 1 420px;
    min-width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.08);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 900px) {
    .contact-flex { flex-direction: column; gap: 18px; }
    .contact-map, .contact-info { width: 100%; min-width: 0; }
}

.about-flex {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 36px;
    flex-wrap: wrap;
}
.about-img-col {
    flex: 1 1 340px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.about-img {
    width: 450px;
    height: 500px;
    border-radius: 50px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.10);
    object-fit: cover;
    display: block;
}
.about-content-col {
    flex: 2 1 420px;
    min-width: 320px;
    color: #222;
    font-size: 1.08rem;
}
.about-green {
    color: #058c27;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 12px;
    margin-top: 18px;
}
.about-list {
    margin-top: 18px;
    margin-bottom: 0;
    padding-left: 22px;
}
.about-list li {
    margin-bottom: 10px;
    line-height: 1.6;
}
@media (max-width: 900px) {
    .about-flex { flex-direction: column; gap: 18px; }
    .about-img { max-width: 98vw; width: 100%; height: 220px; }
    .about-content-col { min-width: 0; }
    .about-green { font-size: 1.3rem; }
}

.officials-banner {
    width: 100%;
    background: #058c27;
    color: #fff;
    padding: 36px 0 24px 0;
    box-shadow: 0 2px 8px rgba(44,62,80,0.08);
    margin-bottom: 0;
}
.officials-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 0 32px;
}
.officials-banner-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}
.officials-banner h1 {
    font-size: 2.6rem;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #fff;
    letter-spacing: 1px;
}
.officials-years {
    font-size: 1.3rem;
    color: #fff;
    font-weight: 500;
    margin-bottom: 0;
}
.officials-banner-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(44,62,80,0.10);
    object-fit: cover;
    margin-left: 24px;
}
@media (max-width: 700px) {
    .officials-banner-content { flex-direction: column; align-items: flex-start; gap: 18px; padding: 0 10px; }
    .officials-banner-logo { margin-left: 0; }
    .officials-banner h1 { font-size: 1.5rem; }
    .officials-years { font-size: 1rem; }
}

.officials-section {
    padding: 32px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.officials-title {
    text-align: center;
    color: #158c27;
    font-size: 2.2rem;
    font-weight: bold;
    margin: 48px 0 32px 0;
}
.officials-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    justify-content: center;
    align-items: center;
    margin: 0 auto 32px auto;
    max-width: 1200px;
}
.officials-cards--center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    margin: 0 auto 32px auto;
    max-width: 1200px;
}
@media (max-width: 1200px) {
    .officials-cards { 
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        max-width: 800px;
    }
}
@media (max-width: 700px) {
    .officials-cards { 
        grid-template-columns: 1fr; 
        gap: 18px;
        justify-items: center;
        max-width: 400px;
    }
    .official-card { max-width: 98vw; }
    .officials-title { font-size: 1.3rem; }
}
.official-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.10);
    padding: 32px 32px 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 280px;
    max-width: 340px;
    flex: 1 1 280px;
    transition: box-shadow 0.2s, transform 0.2s;
    text-align: center;
}
.official-card:hover {
    box-shadow: 0 6px 24px rgba(44,62,80,0.16);
    transform: translateY(-4px) scale(1.02);
}
.official-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #158c27;
    margin-bottom: 18px;
    background: #f4f6f8;
}
.official-info {
    text-align: center;
}
.official-name {
    color: #158c27;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 6px;
}
.official-role {
    color: #444;
    font-size: 1rem;
    font-weight: 500;
}
.official-barangay {
    color: inherit;
    font-size: 0.95rem;
    font-weight: bold;
}
@media (max-width: 900px) {
    .officials-cards { 
        flex-direction: column; 
        gap: 18px;
        align-items: center;
        max-width: 600px;
    }
    .official-card { max-width: 98vw; }
    .officials-title { font-size: 1.3rem; }
}

/* Dropdown Menu for Officials */
.dropdown {
    position: relative;
}
.dropbtn {
    cursor: pointer;
}
.dropdown-content {
    display: none;
    position: absolute;
    background: #ffffff;
    min-width: 170px;
    box-shadow: 0 4px 12px rgba(44,62,80,0.15);
    z-index: 10;
    margin-top: 0.5rem;
    border-radius: 6px;
    padding: 8px 0;
    border: 1px solid #e5e7eb;
}
.dropdown-content a {
  color: #ffffff;
  font-weight: 500;
  padding: 12px 18px;
  text-decoration: none;
  display: block;
  transition: background 0.2s, color 0.2s;
  border-radius: 0;
}
.dropdown-content a:hover {
    background: #f3f4f6;
    color: #2563eb;
}
.dropdown:hover .dropdown-content {
    display: block;
}
.dropdown:hover > .dropbtn,
.dropdown:focus-within > .dropbtn {
    background: transparent;
}
.dropdown.open .dropdown-content {
    display: block !important;
}

/* Welcome Hero Section */
.welcome-hero-section {
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  position: relative !important;
  top: 0 !important;
}
.welcome-hero-bg {
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
  width: 100vw;
  height: 80vh;
  background: url('welcome-bg.png') center center / cover no-repeat !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  top: 0 !important;
  left: 0 !important;
}
.welcome-hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  z-index: 1;
}
.welcome-hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.welcome-hero-title {
  color: #ffffff;
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 2px 4px 12px #222, 0 2px 8px #000;
  margin: 0;
  padding: 0;
  text-transform: uppercase;
}
@media (max-width: 700px) {
  .welcome-hero-bg { height: 220px; min-height: 120px; }
  .welcome-hero-title { font-size: 1.5rem; }
}

/* Stats Section */
.stats-section {
  background: #fff;
  padding: 48px 0;
  width: 100vw;
  margin: 0 auto;
}
.stats-cards {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.stat-card {
  background: transparent;
  color: #058c27;
  flex: 1 1 220px;
  min-width: 220px;
  max-width: 320px;
  text-align: center;
  padding: 32px 18px 28px 18px;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(44,62,80,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.stat-icon {
  font-size: 2.8rem;
  color: #ff5722;
  margin-bottom: 18px;
}
.stat-value {
  font-size: 2.6rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: #058c27;
}
.stat-label {
  font-size: 1.1rem;
  color: #444;
}
.stats-title {
  color: #058c27;
  font-size: 1.2rem !important;
  font-weight: bold;
  text-align: center;
  margin-bottom: 32px;
  letter-spacing: 1px;
}
@media (max-width: 900px) {
  .stats-cards {
    flex-direction: column;
    gap: 18px;
    align-items: center;
  }
  .stat-card {
    max-width: 98vw;
  }
}

@media (max-width: 9000px) {
  nav ul { flex-direction: row !important; gap: 32px !important; }
  nav ul li { margin: 0 !important; }
  .header-flex { flex-direction: row !important; align-items: center !important; padding-left: 0 !important; }
  .header-titles { align-items: flex-start !important; }
  .about-flex { flex-direction: row !important; gap: 40px !important; }
  .about-img { width: 450px !important; height: 500px !important; }
  .about-green { font-size: 2rem !important; }
  .testimonials { flex-direction: row !important; align-items: center !important; }
  .testimonial-card { max-width: 320px !important; }
  .tourism-cards { 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important; 
    justify-content: center !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .contact-flex { flex-direction: row !important; gap: 36px !important; }
  .contact-map, .contact-info { width: auto !important; min-width: 320px !important; }
  .officials-cards { grid-template-columns: repeat(4, 1fr) !important; gap: 32px !important; }
  .official-card { max-width: 340px !important; }
  .welcome-hero-bg { 
    height: 80vh !important; 
    background: url('welcome-bg.png') center center / cover no-repeat !important;
  }
  .welcome-hero-title { font-size: 3rem !important; }
  section { padding: 48px 20px !important; }
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 3px;
  margin: 3px 0;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
@media (max-width: 700px) {
  .hamburger {
    display: flex;
    position: absolute;
    top: 28px;
    right: 18px;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    background: #ffffff;
    z-index: 150;
    box-shadow: 0 2px 8px rgba(44,62,80,0.10);
    border-radius: 0 0 12px 12px;
    border: 1px solid #e5e7eb;
  }
  .nav-menu.open {
    display: block;
  }
  .nav-menu ul {
    flex-direction: column !important;
    gap: 0 !important;
    align-items: flex-start !important;
    padding: 12px 0;
  }
  .nav-menu ul li {
    width: 100%;
    margin: 0 !important;
  }
  .nav-menu ul li a, .nav-menu .dropbtn {
    display: block;
    width: 100%;
    padding: 14px 24px !important;
    font-size: 1.1rem !important;
    text-align: left;
    border-radius: 0;
    color: #333333 !important;
  }
  .dropdown-content {
    position: static;
    box-shadow: none;
    background: #f9fafb;
    border-radius: 0 0 6px 6px;
    min-width: 0;
    width: 100%;
    padding: 0;
    border: 1px solid #e5e7eb;
  }
  .dropdown-content a {
  padding: 12px 36px !important;
  font-size: 1rem !important;
  color: #ffffff !important;
}
}
@media (min-width: 701px) {
  .nav-menu {
    display: block !important;
    position: static;
    background: none;
    box-shadow: none;
  }
  .nav-menu ul {
    flex-direction: row !important;
    gap: 32px !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .hamburger {
    display: none !important;
  }
}

/* Force two columns for Sangguniang Bayan members */
.sangguniang-bayan-section .officials-cards {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 18px !important;
}
@media (max-width: 600px) {
  .sangguniang-bayan-section .officials-cards {
    grid-template-columns: 1fr !important;
  }
}

/* FINAL OVERRIDE: Always two columns for Sangguniang Bayan members except on very small screens */
@media (max-width: 400px) {
  .sangguniang-bayan-section .officials-cards {
    grid-template-columns: 1fr !important;
  }
}
@media (min-width: 401px) {
  .sangguniang-bayan-section .officials-cards {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px !important;
  }
}

@media (max-width: 700px) {
  body, .main-content {
    overflow-x: hidden !important;
  }
  .sangguniang-bayan-section .officials-cards {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 8px !important;
    padding: 0 !important;
  }
  .sangguniang-bayan-section .official-card {
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 16px 6px 12px 6px !important;
    box-sizing: border-box !important;
  }
}

/* FINAL FIX: Prevent grid overflow and name cut-off for Sangguniang Bayan members */
html, body, .main-content, .officials-section, .sangguniang-bayan-section {
  width: 100vw !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}
.sangguniang-bayan-section .officials-cards {
  width: 96vw !important;
  max-width: 96vw !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  justify-items: center !important;
}
.sangguniang-bayan-section .official-card {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  word-break: break-word !important;
  white-space: normal !important;
  text-align: center !important;
  margin: 0 !important;
}
.sangguniang-bayan-section .official-name {
  word-break: break-word !important;
  white-space: normal !important;
  text-align: center !important;
  margin: 0 auto !important;
}
@media (max-width: 700px) {
  .sangguniang-bayan-section .officials-cards {
    width: 100vw !important;
    max-width: 100vw !important;
    gap: 4px !important;
    padding: 0 2vw !important;
  }
  .sangguniang-bayan-section .official-card {
    font-size: 0.95rem !important;
    padding: 8px 2px 8px 2px !important;
  }
  .sangguniang-bayan-section .official-name {
    font-size: 1rem !important;
    line-height: 1.1 !important;
    word-break: break-word !important;
    white-space: normal !important;
  }
}

.federated-officers-cards .officials-cards {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 18px !important;
  width: 96vw !important;
  max-width: 96vw !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  justify-items: center !important;
}
@media (max-width: 600px) {
  .federated-officers-cards .officials-cards {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  section, .main-content {
    padding: 12px 2vw !important;
    max-width: 100vw !important;
  }
  .header-logo {
    width: 56px !important;
    height: 56px !important;
  }
  .header-titles, .officials-banner-text {
    font-size: 0.95rem !important;
    align-items: center !important;
  }
  .officials-banner-logo {
    width: 60px !important;
    height: 60px !important;
  }
  .about-flex, .contact-flex, .testimonials {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  .about-img {
    width: 100% !important;
    height: auto !important;
    border-radius: 18px !important;
  }
  .services-cards, .tourism-cards, .officials-cards, .federated-officers-cards .officials-cards {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  .service-card, .tourism-card, .official-card {
    width: 98vw !important;
    max-width: 98vw !important;
    margin: 0 auto 12px auto !important;
    box-sizing: border-box !important;
    font-size: 0.98rem !important;
  }
  .tourism-img, .official-img {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 8px auto !important;
  }
  .footer-nav {
    flex-direction: column !important;
    font-size: 0.95rem !important;
    gap: 4px !important;
  }
  section h2, .stats-title, .about-green, .officials-title {
    font-size: 1.2rem !important;
    margin-bottom: 6px !important;
  }
  .stat-card {
    padding: 12px 2px !important;
    font-size: 0.95rem !important;
  }
}

/* Blue and White Theme Override */
header, nav, .footer-nav, footer {
  background: #2563eb !important;
  color: #fff !important;
}
nav ul li a, .dropbtn, .dropdown-content a {
  color: #fff !important;
  background: #2563eb !important;
}
nav ul li a:hover, .dropdown-content a:hover, .dropbtn:hover {
  color: #2563eb !important;
  background: #fff !important;
}
section, .main-content {
  background: #fff !important;
  color: #222 !important;
}
section h2, .about-green, .officials-title, .stats-title {
  color: #2563eb !important;
}
.cta-btn {
  background: #2563eb !important;
  color: #fff !important;
}
.cta-btn:hover {
  background: #fff !important;
  color: #2563eb !important;
  border: 1px solid #2563eb !important;
}
.official-img, .officials-banner-logo {
  border-color: #2563eb !important;
}
.officials-banner, .officials-banner-content {
  background: #2563eb !important;
}
.officials-banner h1, .officials-years {
  color: #fff !important;
}
.officials-title, .official-name {
  color: #1e40af !important;
}
.footer-copy {
  color: #fff !important;
}

.region, .province, .municipality {
  color: #fff !important;
}

@media (max-width: 700px) {
  .header-flex {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-left: 0 !important;
    gap: 12px !important;
  }
  .header-logo {
    width: 48px !important;
    height: 48px !important;
    margin-right: 10px !important;
    margin-bottom: 0 !important;
  }
  .header-titles {
    align-items: flex-start !important;
    text-align: left !important;
    margin: 0 !important;
  }
}

@media (max-width: 600px) {
  .tourism-img {
    width: 100% !important;
    max-width: 90vw !important;
    height: auto !important;
    border-radius: 12px !important;
    margin: 0 auto 8px auto !important;
    display: block !important;
  }
  .official-img {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 8px auto !important;
    display: block !important;
  }
}

.about-green, .service-title, .tourism-title, .stat-value, .stat-label, .stat-icon, .municipality, .officials-title, .official-name, .footer-nav a:hover {
  color: #2563eb !important;
}

header .municipality {
  color: #fff !important;
}

.contact-info h3, .contact-info a, .contact-info b, .contact-info strong {
  color: #2563eb !important;
}

#testimonials, #testimonials h2, .testimonials {
  text-align: center !important;
  justify-content: center !important;
  align-items: center !important;
}
.testimonial-card {
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 700px) {
  .officials-banner {
    padding: 40px 0 24px 0 !important;
    margin-top: 0 !important;
  }
  .officials-banner-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 0 15px !important;
    margin-top: 0 !important;
  }
  .officials-banner-logo {
    width: 50px !important;
    height: 50px !important;
    margin-right: 12px !important;
    margin-bottom: 0 !important;
  }
  .officials-banner-text {
    text-align: left !important;
    align-items: flex-start !important;
    margin: 0 !important;
  }
  .officials-banner h1 {
    font-size: 1.4rem !important;
    margin-bottom: 4px !important;
  }
  .officials-years {
    font-size: 0.95rem !important;
  }
}

html, body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.officials-banner {
  margin-top: 0 !important;
  padding: 48px 0 24px 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: relative !important;
}

@keyframes amazingGlow {
  0% {
    transform: scale(1);
    text-shadow: 
      0 0 5px #fff,
      0 0 10px #fff,
      0 0 15px #2563eb,
      0 0 20px #2563eb,
      0 0 25px #2563eb;
    color: #2563eb;
  }
  25% {
    transform: scale(1.05);
    text-shadow: 
      0 0 5px #fff,
      0 0 10px #fff,
      0 0 15px #1e40af,
      0 0 20px #1e40af,
      0 0 25px #1e40af;
    color: #1e40af;
  }
  50% {
    transform: scale(1.1);
    text-shadow: 
      0 0 5px #fff,
      0 0 10px #fff,
      0 0 15px #3b82f6,
      0 0 20px #3b82f6,
      0 0 25px #3b82f6;
    color: #3b82f6;
  }
  75% {
    transform: scale(1.05);
    text-shadow: 
      0 0 5px #fff,
      0 0 10px #fff,
      0 0 15px #1d4ed8,
      0 0 20px #1d4ed8,
      0 0 25px #1d4ed8;
    color: #1d4ed8;
  }
  100% {
    transform: scale(1);
    text-shadow: 
      0 0 5px #fff,
      0 0 10px #fff,
      0 0 15px #2563eb,
      0 0 20px #2563eb,
      0 0 25px #2563eb;
    color: #2563eb;
  }
}
.welcome-hero-title {
  animation: amazingGlow 3s ease-in-out infinite;
  font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif !important;
  font-weight: 300 !important;
  letter-spacing: 4px !important;
  font-size: 3.5rem !important;
  line-height: 1.2 !important;
}

/* ===== MOBILE-FIRST RESPONSIVE DESIGN ===== */

/* Base Mobile Improvements */
@media (max-width: 768px) {
  /* Typography & Spacing */
  body {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }
  
  /* Sticky Header */
  header {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
  }
  
  /* Main Content Padding for Fixed Header */
  .main-content {
    padding-top: 80px !important;
  }
  
  /* Enhanced Navigation */
  .hamburger {
    width: 32px !important;
    height: 32px !important;
    top: 18px !important;
    right: 15px !important;
  }
  
  .nav-menu {
    top: 100% !important;
    border-radius: 0 0 15px 15px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
  }
  
  .nav-menu ul li a, .nav-menu .dropbtn {
  color: #ffffff !important;
  padding: 16px 20px !important;
  font-size: 18px !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}
  
  /* Hero Section Mobile Optimization */
  .welcome-hero-section {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
  }
  
  .welcome-hero-title {
    font-size: 2.5rem !important;
    letter-spacing: 2px !important;
    text-align: center !important;
    padding: 0 20px !important;
  }
  
  /* Section Improvements */
  section {
    padding: 40px 20px !important;
    margin: 20px auto !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
  }
  
  section h2 {
    font-size: 2rem !important;
    margin-bottom: 20px !important;
    text-align: center !important;
  }
  
  /* Card Layout Improvements */
  .services-cards, .tourism-cards {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 0 15px !important;
    justify-content: center !important;
    justify-items: center !important;
    align-items: center !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .service-card, .tourism-card {
    padding: 30px 20px !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  }
  
  .service-card:hover, .tourism-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
  }
  
  /* Image Improvements */
  .tourism-img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
  }
  
  .about-img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    border-radius: 15px !important;
  }
  
  /* Contact Section */
  .contact-flex {
    flex-direction: column !important;
    gap: 25px !important;
  }
  
  .contact-info, .contact-map {
    width: 100% !important;
    padding: 25px 20px !important;
    border-radius: 15px !important;
  }
  
  /* Footer */
  footer {
    padding: 30px 20px !important;
    margin-top: 40px !important;
  }
  
  .footer-nav {
    flex-direction: column !important;
    gap: 10px !important;
    font-size: 16px !important;
  }
  
  /* Officials Cards */
  .officials-cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
  }
  
  .official-card {
    padding: 25px 20px !important;
    border-radius: 15px !important;
    text-align: center !important;
  }
  
  .official-img {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 15px auto !important;
  }
  
  /* Stats Section */
  .stats-cards {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
  }
  
  .stat-card {
    padding: 20px 15px !important;
    border-radius: 15px !important;
  }
  
  .stat-value {
    font-size: 2rem !important;
  }
  
  /* Testimonials */
  .testimonials {
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  .testimonial-card {
    padding: 25px 20px !important;
    border-radius: 15px !important;
    margin: 0 !important;
  }
}

/* Tablet Improvements */
@media (min-width: 769px) and (max-width: 1024px) {
  .services-cards, .tourism-cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .officials-cards {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  .stats-cards {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* Desktop Enhancements */
@media (min-width: 1025px) {
  .services-cards {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  .tourism-cards {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  .officials-cards {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  
  /* Hover Effects for Desktop */
  .service-card:hover, .tourism-card:hover, .official-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15) !important;
  }
}

/* Touch-Friendly Improvements */
@media (hover: none) and (pointer: coarse) {
  .service-card, .tourism-card, .official-card {
    cursor: pointer !important;
  }
  
  .service-card:active, .tourism-card:active, .official-card:active {
    transform: scale(0.98) !important;
  }
}

/* Performance Optimizations */
.welcome-hero-bg {
  will-change: transform !important;
  backface-visibility: hidden !important;
}

/* Loading States */
.service-card, .tourism-card, .official-card {
  animation: fadeInUp 0.6s ease-out forwards !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  .welcome-hero-title {
    animation: none !important;
  }
  
  .service-card, .tourism-card, .official-card {
    animation: none !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .service-card, .tourism-card, .official-card {
    border: 2px solid #2563eb !important;
  }
  
  .welcome-hero-title {
    text-shadow: 2px 2px 4px #000 !important;
  }
}

/* Back to Home Button */
.back-home-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.back-home-btn:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

/* Mobile Responsive for Back Button */
@media (max-width: 768px) {
  .back-home-container {
    padding: 0 15px;
  }
}
