/* Modern font and base styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

html {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background-color: #f8f9fa;
  font-size: 1.08rem;
  color: #222;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  padding-top: 150px; /* Reduced gap for desktop */
}

/* Mobile-specific body padding */
@media (max-width: 768px) {
  body {
    padding-top: 50px; /* 50px gap for mobile */
  }
  
  /* Officials page specific mobile padding */
  body.bg-light {
    padding-top: 50px !important; /* Override for officials page */
  }
}

h1, h2, h5 {
  color: #1a3c6b;
  font-weight: 700;
  letter-spacing: 0.5px;
}

h2 {
  text-align: center;
  margin-bottom: 2rem;
}

section {
  padding-top: 70px;
  padding-bottom: 70px;
}

section:nth-of-type(even) {
  background: #f4f7fb;
}

/* Navigation card sticky and modern */
.nav-card {
  background: #1d4ed8;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.15);
  position: sticky;
  top: 16px;
  z-index: 100;
  margin-bottom: 0;
}

/* Mobile Navigation */
.mobile-nav {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  z-index: 2000;
  padding: 0.1rem 0;
  overflow: visible;
  width: 100%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mobile-nav .navbar-brand {
  color: #198754 !important;
  font-size: 1.2rem;
}

/* Mobile navbar text sizing */
.mobile-nav .region-logo {
  height: 50px !important;
  width: 50px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

.mobile-nav .region-province-municipality .small {
  font-size: 0.65rem !important;
  line-height: 1.1 !important;
  color: #212529 !important;
}

.mobile-nav .region-province-municipality .h6 {
  font-size: 0.8rem !important;
  line-height: 1.2 !important;
  margin-top: 0.1rem !important;
  color: #212529 !important;
}

.mobile-nav .nav-link {
  color: #6c757d !important;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  transition: color 0.2s;
}

/* Override for dropdown menu */
.mobile-nav .navbar-collapse .nav-link {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.8rem !important;
}

.mobile-nav .nav-link:hover {
  color: #198754 !important;
}

.mobile-nav .navbar-collapse {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  max-height: 80vh;
  overflow-y: auto;
  backdrop-filter: blur(10px);
  margin-top: 0.5rem;
}

.mobile-nav .navbar-nav {
  text-align: right;
  width: 100%;
  padding: 0.25rem 0;
}

.mobile-nav .nav-item {
  border-bottom: 1px solid #f8f9fa;
  font-size: 0.8rem;
}

.mobile-nav .nav-item:last-child {
  border-bottom: none;
}

.mobile-nav .nav-link {
  padding: 0.5rem 0.75rem !important;
  color: #6c757d !important;
  font-weight: 500;
  font-size: 0.8rem !important;
  transition: color 0.2s;
}

.mobile-nav .nav-link:hover {
  color: #198754 !important;
  background-color: #f8f9fa;
}

.mobile-nav .dropdown-menu {
  background: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  margin-top: 0.25rem;
}

.mobile-nav .dropdown-toggle::after {
  display: inline-block;
  margin-left: 0.255em;
  vertical-align: 0.255em;
  content: "";
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
}

/* Mobile navbar menu animation */
.mobile-nav .navbar-collapse.show {
  animation: slideInRight 0.3s ease-out;
  display: block !important;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-nav .navbar-toggler {
  border: none;
  padding: 0.1rem 0.3rem;
  width: 24px;
  height: 24px;
}

.mobile-nav .navbar-toggler:focus {
  box-shadow: none;
}

.mobile-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(25, 135, 84, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='1.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 16px;
  height: 16px;
  background-size: 16px 16px;
}

.nav-card .btn, .nav-card .dropdown-toggle {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.25rem 1rem;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.04);
}

.nav-card .btn, .nav-card .dropdown-toggle {
  background: #1d4ed8;
  color: #fff;
  border: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.nav-card .btn:hover, .nav-card .btn:focus, .nav-card .dropdown-toggle:hover, .nav-card .dropdown-toggle:focus {
  background: #1746b1;
  color: #fff;
  box-shadow: 0 4px 16px rgba(30, 64, 175, 0.10);
}

/* Card enhancements */
.card, .card.shadow-sm {
  border: 1.5px solid #1d4ed8;
  border-radius: 1.25rem;
  box-shadow: 0px 8px 12px rgba(30, 64, 175, 0.25);
  transition: all 0.3s cubic-bezier(.4,2,.3,1);
}
.card:hover, .card.shadow-sm:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0px 8px 12px rgba(30, 64, 175, 0.35);
}

.tourism-card img, .card-img-top, .region-logo {
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(30, 64, 175, 0.07);
  object-fit: cover;
}

.tourism-card {
  padding: 1.5rem 1rem;
  background: #fff;
  border-radius: 1.25rem;
}

.tourism-card img {
  width: 300px;
  height: 300px;
  display: block;
  margin: 0 auto 1rem auto;
}

/* Button enhancements */
.btn, .dropdown-toggle {
  border-radius: 999px !important;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.2s;
}

.btn-primary, .btn-outline-primary {
  background: #1d4ed8;
  color: #fff;
  border: none;
}

.btn-outline-primary {
  background: #fff;
  color: #1d4ed8;
  border: 2px solid #1d4ed8;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  background: #1746b1;
  color: #fff;
  border-color: #1746b1;
}

/* Section dividers */
section + section {
  border-top: 1px solid #e3e8f0;
}

/* Animations for sections and cards */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

section, .card, .tourism-card, .officials-card {
  animation: fadeInUp 0.7s cubic-bezier(.4,2,.3,1) both;
}

/* Footer modern look */
footer {
  background: #1a3c6b !important;
  color: #fff !important;
  padding: 2rem 0;
  font-size: 16px;
  letter-spacing: 0.03em;
  border-top-left-radius: 5px;
  height: 50px;
  border-top-right-radius: 5px;
  box-shadow: 0 -2px 12px rgba(30, 64, 175, 0.07);
}

/* Mobile footer font size */
@media (max-width: 768px) {
  footer {
    font-size: 10px;
  }
}

.hero-section {
  position: relative;
  background: url('../background.jpg') center center/cover no-repeat;
  min-height: 400px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  background: rgba(20, 40, 70, 0.55);
  width: 100%;
  height: 100%;
  padding: 60px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.hero-section h1,
.hero-section p {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.nav-card .card-body {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  gap: 0.25rem !important;
}

.region-province-municipality .h5 {
  color: #1d4ed8;
}

.ratio iframe {
  width: 500px;
  height: 300px;
  margin: 0 auto;
  display: block;
}

/* Map container styling */
.map-container {
  width: 100%;
  max-width: 600px;
  height: 400px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

/* Mobile map sizing */
@media (max-width: 767px) {
  .map-container {
    max-width: 100% !important;
    height: 200px !important;
  }
  
  .map-container iframe {
    width: 100% !important;
    height: 200px !important;
    border-radius: 8px !important;
    margin: 0 auto !important;
    display: block !important;
  }
}

/* Officials page floating card effects */
.officials-card {
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: none;
  background: rgba(135,206,235,0.6) !important;
}

.officials-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.officials-card img {
  transition: transform 0.3s ease;
}

.officials-card:hover img {
  transform: scale(1.05);
}

/* Stagger animation for multiple cards */
.officials-card:nth-child(1) { animation-delay: 0.1s; }
.officials-card:nth-child(2) { animation-delay: 0.2s; }
.officials-card:nth-child(3) { animation-delay: 0.3s; }
.officials-card:nth-child(4) { animation-delay: 0.4s; }
.officials-card:nth-child(5) { animation-delay: 0.5s; }
.officials-card:nth-child(6) { animation-delay: 0.6s; }
.officials-card:nth-child(7) { animation-delay: 0.7s; }
.officials-card:nth-child(8) { animation-delay: 0.8s; }
.officials-card:nth-child(9) { animation-delay: 0.9s; }
.officials-card:nth-child(10) { animation-delay: 1.0s; }
.officials-card:nth-child(11) { animation-delay: 1.1s; }
.officials-card:nth-child(12) { animation-delay: 1.2s; }

/* Responsive tweaks */
@media (max-width: 991px) {
  .tourism-card img {
    width: 100%;
    height: 220px;
  }
}
@media (max-width: 767px) {
  section {
    padding-top: 36px;
    padding-bottom: 36px;
  }
  .navbar-brand {
    font-size: 1.2rem;
  }
  .hero-section {
    min-height: 220px;
  }
  .hero-overlay {
    padding: 30px 0;
  }
  .tourism-card img {
    height: 160px;
  }
  .nav-card {
    top: 0;
    margin-bottom: 1rem;
  }
} 

.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: rgba(248, 249, 250, 0.95);
  box-shadow: 0 2px 12px rgba(30, 64, 175, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 100%;
  padding: 0;
  margin: 0;
} 

#home, #about, #services, #tourism, #contact, #officials-2025 {
  scroll-margin-top: 120px;
} 

.sticky-header .container.my-3 {
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}
.sticky-header .container.my-4 {
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
} 

/* Prevent horizontal scrolling on mobile */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }
  
  .container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .row {
    margin-left: 0;
    margin-right: 0;
  }
  
  .col-md-4, .col-md-6, .col-md-12 {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Church image mobile styling */
  .church-image {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    border-radius: 0.375rem 0 0 0.375rem !important;
  }
  
  /* Improve card layout on mobile */
  .card .row.g-0 {
    flex-direction: column;
  }
  
  .card .row.g-0 .col-4,
  .card .row.g-0 .col-8 {
    width: 100% !important;
    flex: 0 0 100% !important;
  }
  
  .card .row.g-0 .col-4 {
    order: 1;
  }
  
  .card .row.g-0 .col-8 {
    order: 2;
  }
  
  .card .row.g-0 .col-4 img {
    border-radius: 0.375rem 0.375rem 0 0 !important;
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
  }
  
  .card .row.g-0 .col-8 .card-body {
    padding: 1rem !important;
  }
}

/* Officials page enhanced card styles */
.officials-card {
  border: 1.5px solid rgba(29, 79, 216, 0.932) !important;
  box-shadow: 0px 6px 12px rgba(30,41,59,0.35) !important;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  transform: translateY(30px);
}

/* Officials page specific styles */
#officials-2025-2028 .sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: rgba(248, 249, 250, 0.95);
  box-shadow: 0 2px 12px rgba(30, 64, 175, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Officials page mobile adjustments */
@media (max-width: 768px) {
  body.bg-light {
    padding-top: 55px !important; /* Minimal gap for officials page */
  }
  
  .bg-light .container.py-1 {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

.officials-card:nth-child(1) { animation-delay: 0.1s; }
.officials-card:nth-child(2) { animation-delay: 0.2s; }
.officials-card:nth-child(3) { animation-delay: 0.3s; }
.officials-card:nth-child(4) { animation-delay: 0.4s; }
.officials-card:nth-child(5) { animation-delay: 0.5s; }
.officials-card:nth-child(6) { animation-delay: 0.6s; }
.officials-card:nth-child(7) { animation-delay: 0.7s; }
.officials-card:nth-child(8) { animation-delay: 0.8s; }
.officials-card:nth-child(9) { animation-delay: 0.9s; }
.officials-card:nth-child(10) { animation-delay: 1.0s; }
.officials-card:nth-child(11) { animation-delay: 1.1s; }
.officials-card:nth-child(12) { animation-delay: 1.2s; }

.officials-card img {
  border: 5px solid rgba(29, 79, 216, 0.932) !important;
}

/* Executive Officers - Blue background */
.executive-card .text-muted {
  background-color: #1d4ed8 !important;
  color: white !important;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* SB Members - Green background */
.sb-member-card .text-muted {
  background-color: #059669 !important;
  color: white !important;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Federated Officers - Purple background */
.federated-card .text-muted {
  background-color: #7c3aed !important;
  color: white !important;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Legislation table styling */
.legislation-table {
  font-size: 0.85rem;
}

.legislation-table th {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
}

.legislation-table td {
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
}

.legislation-table .btn-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.legislation-table .badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
}

/* Legislation cards styling */
.legislation-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.legislation-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
}

.legislation-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #1d4ed8;
}

.legislation-card h6 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.legislation-card p {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.legislation-card small {
  font-size: 0.75rem;
}

.legislation-card a {
  font-size: 0.8rem;
  font-weight: 500;
}

/* PDF Modal styling */
.pdf-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pdf-modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.pdf-modal-header {
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.pdf-modal-header h5 {
  margin: 0;
  color: #1d4ed8;
  font-weight: 600;
}

.pdf-modal-actions {
  display: flex;
  gap: 0.5rem;
}

.pdf-modal-body {
  padding: 0;
  height: calc(90vh - 80px);
}

.pdf-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Make legislation cards clickable */
.legislation-card {
  cursor: pointer;
  user-select: none;
}

.legislation-card:hover {
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.15);
  transform: translateY(-2px);
}

/* Mobile legislation styling */
@media (max-width: 768px) {
  .legislation-header h2 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .legislation-header p {
    font-size: 0.8rem !important;
    margin-bottom: 0 !important;
  }
  
  .legislation-card {
    padding: 0.75rem;
  }
  
  .legislation-card h6 {
    font-size: 0.8rem;
  }
  
  .legislation-card p {
    font-size: 0.75rem;
  }
  
  .legislation-card small {
    font-size: 0.7rem;
  }
  
  .legislation-card a {
    font-size: 0.75rem;
  }
} 