* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary-color: #005792;
  --secondary-color: #00bbf0;
  --accent-color: #fdb44b;
  --dark-color: #333;
  --light-color: #f4f9ff;
  --text-color: #444;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
}

body {
  background-color: #f0f5ff;
  color: var(--text-color);
  position: relative;

}

.header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  position: fixed;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px;
}

.logo a {
  color: white;            
  text-decoration: none;  
}

.logo a:visited {
  color: white;           
}

.logo a:hover {
  color: #e0e0e0;       
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.sidebar {
  position: fixed;
  left: -280px;
  top: 0;
  height: 100%;
  width: 280px;
  background-color: white;
  display: flex;
  flex-direction: column;
  padding-top: 70px;
  transition: left 0.3s ease;
  z-index: 990;
  box-shadow: var(--shadow);
}

.sidebar.active {
  left: 0;
}

.sidebar-header {
  color: var(--primary-color);
  font-size: 24px;
  margin: 15px 0;
  text-align: center;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

.sidebar a {
  color: var(--dark-color);
  text-decoration: none;
  padding: 15px 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
  border-left: 4px solid transparent;
}

.sidebar a:hover, .sidebar a.active {
  background-color: rgba(0, 87, 146, 0.1);
  border-left: 4px solid var(--primary-color);
  color: var(--primary-color);
}

.sidebar a i {
  width: 24px;
  text-align: center;
}

.toggle-btn {
  background-color: transparent;
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.main-content {
  padding: 90px 20px 40px;
  transition: margin-left 0.3s ease;
  min-height: 100vh;
}

.sidebar.active ~ .main-content {
  margin-left: 280px;
}

.hero {
  background: linear-gradient(rgba(0, 87, 146, 0.8), rgba(0, 187, 240, 0.8)), url('images/hero-bg.jpg') center/cover;
  color: white;
  padding: 60px 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 20px;
}

.btn {
  background-color: var(--accent-color);
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-block;
  margin-top: 15px;
  text-decoration: none;
}

.btn:hover {
  background-color: #f09819;
  transform: translateY(-2px);
}

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.service-card {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-card p {
  color: var(--text-color);
  line-height: 1.5;
}

.announcements {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.announcement-slider-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 15px;
  background: #f4f9ff;
}

/* Adjust the height to be portrait-like */
.announcement-slider {
  display: flex;
  transition: transform 0.5s ease;
  height: 600px; /* ⬆️ increase for portrait orientation */
}

/* Each slide */
.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image styling */
.slide img {
  width: auto;           /* keep natural aspect */
  height: 100%;          /* fill vertical space */
  object-fit: contain;   /* show full image, no crop */
  border-radius: 10px;
  background-color: #fff;
}

/* Optional: darker overlay for text visibility */
.slide-content {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 15px;
  border-radius: 0 0 10px 10px;
}

.slide-content h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: bold;
}

.slide-content p {
  margin: 5px 0 0;
  font-size: 0.95rem;
}


.slider-nav {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.slider-dot.active {
  background: white;
  transform: scale(1.2);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.5);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 10;
}

.arrow-prev {
  left: 10px;
}

.arrow-next {
  right: 10px;
}

.officials {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.officials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.official-card {
  text-align: center;
}

.official-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  border: 3px solid var(--secondary-color);
}

.official-name {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 5px;
}

.official-position {
  color: var(--secondary-color);
  font-size: 0.9rem;
}

footer {
  background: var(--dark-color);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: left;
}

.footer-section h3 {
  color: var(--accent-color);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.contact-info div {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.copyright {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Viewer Modal */
.viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.viewer.hidden {
  display: none;
}

.viewer img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255,255,255,0.2);
  object-fit: contain;
}

.arrow {
  position: absolute;
  top: 50%;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  user-select: none;
  transform: translateY(-50%);
  padding: 10px;
}

.arrow.left { left: 40px; }
.arrow.right { right: 40px; }

.close-btn {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  user-select: none;
}


@media (max-width: 992px) {
  .sidebar.active ~ .main-content {
    margin-left: 0;
  }
  
  .sidebar.active {
    left: 0;
    width: 100%;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0.8rem 1rem;
  }
  
  .logo h1 {
    font-size: 1.2rem;
  }
  
  .logo img {
    height: 30px;
  }
  
  .hero {
    padding: 40px 20px;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .announcement-slider-container {
    height: 300px;
  }
  
  .officials-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 70px 15px 30px;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .announcement-slider-container {
    height: 250px;
  }
  
  .slide-content h3 {
    font-size: 1.2rem;
  }
  
  .officials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.chat-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chat-head {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  position: relative;
}

.chat-head:hover {
  transform: scale(1.05);
}

.chat-head::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 15px;
  height: 15px;
  background-color: #4CAF50;
  border-radius: 50%;
  border: 2px solid white;
}

.chat-head-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-box {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 450px;
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.chat-box.active {
  transform: scale(1);
  opacity: 1;
}

.chat-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-title {
  font-weight: 600;
  font-size: 16px;
}

.close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  line-height: 1.5;
  font-size: 14px;
}

.message.user {
  align-self: flex-end;
  background-color: var(--secondary-color);
  color: white;
  border-bottom-right-radius: 5px;
}

.message.bot {
  align-self: flex-start;
  background-color: #f1f1f1;
  color: var(--dark-color);
  border-bottom-left-radius: 5px;
}

.message-content {
  margin-bottom: 5px;
}

.message-time {
  font-size: 10px;
  opacity: 0.7;
  text-align: right;
}

.chat-input-container {
  padding: 15px;
  display: flex;
  gap: 10px;
  background-color: #f8f8f8;
  border-top: 1px solid #eee;
}

.chat-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  transition: border 0.3s;
}

.chat-input:focus {
  border-color: var(--secondary-color);
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.send-btn:hover {
  background-color: var(--secondary-color);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

@keyframes messageAppear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message {
  animation: messageAppear 0.3s ease;
}

@media (max-width: 576px) {
  .chat-box {
    width: calc(100vw - 60px);
    right: 0;
    bottom: 80px;
    height: 400px;
  }
  
  .chat-head {
    width: 50px;
    height: 50px;
  }
}