* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f6f9;
  color: #2f495e;
}

/* CONTAINER GRID */
.container {
  display: grid;
  grid-template-columns: 190px 1fr;
  grid-template-rows: 60px 1fr;
  grid-template-areas:
    "header header"
    "sidebar main";
  height: 100vh;
}

/* HEADER */
.headerSection {
  grid-area: header;
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: #6f2111;
  height: 60px;
  padding: 0 20px;
  color: #f4f6f9;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.headerLogo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #5a2015;
}

.brgyName {
  font-size: 16px;
  font-weight: 600;
}
.brgyLocation {
  font-size: 12px;
  color: #c7d3dd;
}

/* SIDEBAR */
.sidebar {
  grid-area: sidebar;
  background: #36414f;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 190px;
  padding-top: 80px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.navAlign {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.navBtn {
  width: 100%;
  height: 45px;
  background: #36414f;
  border: none;
  border-left: 5px solid transparent;
  color: #f4f6f9;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  padding-left: 15px;
}
.navBtn:hover {
  background-color: #404b59;
  transform: scale(1.03);
}
.navBtn.active {
  border-left: 5px solid #445469;
  background-color: #404b59;
}

/* MAIN CONTENT */
.mainContent {
  grid-area: main;
  margin-top: 10px;
  margin-left: 0;
  overflow-y: auto;
  padding: 5px 15px;
}

/* SUB HEADER */
.subHeader {
  width: 100%;
  background-color: white;
  border-bottom: 1px solid #dfe5ea;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pageTitle {
  font-size: 16px;
  font-weight: 600;
  color: #2f495e;
}
.systemName {
  font-size: 13px;
  color: #6c7a86;
}

/* PAGE WRAPPER */
.pageWrapper {
  width: 100%;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.pageWrapper h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 5px;
}

.pageWrapper h3 {
  font-size: 18px;
  margin-top: 25px;
  margin-bottom: 10px;
}

/* COMMUNITY IMAGE */
.pageWrapper > img {
  width: 100%;
  height: 100vh;
  max-width: 1200px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
  margin-left: 55px;
}

/* hamburger button for mobile */
.hamburger {
  display: none; /* hidden on desktop i2 if ure wondering*/
  background: none;
  border: none;
  font-size: 26px;
  color: #f4f6f9;
  cursor: pointer;
  margin-left: auto;
}

/* Sidebar */
.pageSection {
  display: none;
}

.pageSection.active {
  display: block;
}

/* PostingTAbel */
.tableContainer {
  width: 100%;
  overflow-x: auto;
}

.aidTable {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.aidTable thead {
  background-color: #eef2f6;
}

.aidTable th,
.aidTable td {
  padding: 14px 12px;
  text-align: left;
  font-size: 14px;
}

.aidTable th {
  font-size: 13px;
  font-weight: 600;
  color: #4a5a6a;
}

.aidTable td {
  font-size: 14px;
}

.aidTable tr {
  border-bottom: 1px solid #e0e6ed;
}

.aidTable tbody tr:hover {
  background-color: #f5f8fb;
}

.recipientsSection {
  border-left: 5px solid #2e9f5c;
  padding-left: 15px;
  margin-top: 30px;
}

.recipientsSection h3 {
  margin-bottom: 10px;
}

/* DetailsAidLis */

.aidHeaderBox {
  background: white;
  padding: 20px;
  border-radius: 14px;
  margin-bottom: 20px;
  border-left: 6px solid #2f6f9f;
}

.aidHeaderBox h2 {
  font-size: 22px;
  margin-bottom: 5px;
}

.aidHeaderBox p {
  font-size: 14px;
  color: #6c7a86;
}

.detailsGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 25px;
}

.card {
  background: #ffffff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  min-height: 90px;
}

.card.full {
  grid-column: span 3;
  background: white;
  border-left: 5px solid #6f2111;
}

.card label {
  font-size: 12px;
  color: #8a97a6;
}

.card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 6px;
}

.subText {
  font-size: 13px;
  color: #6c7a86;
  margin-bottom: 15px;
}

.card.full {
  grid-column: span 3;
  background: #f8fafc;
  border-left: 5px solid #6f2111;
}

.recipientsBox {
  background: #ffffff;
  padding: 20px;
  border-radius: 14px;
  border-left: 6px solid #2e9f5c;
}

.recipientsBox h3 {
  margin-bottom: 15px;
}

/* Reports */
.noticeBox {
  background: #fff3cd;
  color: #856404;
  padding: 12px 15px;
  border-left: 5px solid #ffeeba;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 13px;
}

.formGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 10px;
}

.formGroup {
  display: flex;
  flex-direction: column;
}

.formGroup.full {
  grid-column: span 3;
}

.formGroup label {
  font-size: 12px;
  color: #6c7a86;
  margin-bottom: 4px;
}

.formGroup input,
.formGroup textarea {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #dfe5ea;
  font-size: 14px;
}

.formGroup input:focus,
.formGroup textarea:focus {
  outline: none;
  border-color: #6f2111;
}

.submitBtn {
  margin-top: 20px;
  padding: 12px;
  width: 100%;
  background-color: #5dd057;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.submitBtn:hover {
  background-color: #348b31;
}

@media (max-width: 600px) {
  .formGrid {
    grid-template-columns: 1fr;
  }

  .formGroup.full {
    grid-column: span 1;
  }
}

/* Alert */
.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modalBox {
  background: #fff;
  padding: 25px 20px;
  border-radius: 12px;
  width: 300px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.2s ease;
}

.modalBox p {
  font-size: 14px;
  color: #2f495e;
  margin-bottom: 20px;
}

.modalBox button {
  padding: 10px 20px;
  border: none;
  background: #6f2111;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}

.modalBox button:hover {
  background: #5a1b0d;
}

@keyframes fadeIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Announcement */
/* FORM STYLE ANNOUNCEMENT */

.formTitle {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #2f495e;
  letter-spacing: 1px;
}

.formSection {
  background: #ffffff;
  border: 1px solid #dfe5ea;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 20px;
}

.profesi {
  border-left: 7px solid #2e9f5c;
  border-right: 7px solid #2e9f5c;
}

.formRow {
  display: flex;
  margin-bottom: 10px;
}

.formRow label {
  width: 140px;
  font-weight: 600;
  font-size: 13px;
  color: #6c7a86;
}

.formRow span {
  font-size: 14px;
  color: #2f495e;
}

/* Content area */
.formContent {
  margin-top: 10px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
  color: #2f495e;
}

/* Home */
/* HERO */
.heroSection {
  width: 100%;
  height: 220px;
  background: url("Media/Community.jpg") center/cover no-repeat;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.heroOverlay {
  width: 100%;
  height: 100%;
  background: rgba(111, 33, 17, 0.55);
  display: flex;
  align-items: center;
  padding: 30px;
}

.heroContent h1 {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.heroContent p {
  font-size: 14px;
  color: #f0d0c8;
  margin-bottom: 8px;
}

.heroTagline {
  font-size: 13px;
  color: #fde8e4;
  font-style: italic;
}

/* HOME BODY */
.homeBody {
  padding: 20px 5px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* QUICK INFO ROW */
.quickInfoRow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.infoCard {
  background: white;
  border-radius: 10px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-left: 5px solid #6f2111;
}

.infoIcon {
  font-size: 22px;
}

.infoLabel {
  font-size: 11px;
  color: #8a97a6;
  margin-bottom: 3px;
}

.infoValue {
  font-size: 13px;
  font-weight: 600;
  color: #2f495e;
}

/* HOME COLUMNS */
.homeColumns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.homeCard {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.homeCardTitle {
  font-size: 15px;
  font-weight: 700;
  color: #6f2111;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0e8e6;
}

.homeCardText {
  font-size: 13px;
  color: #4a5a6a;
  line-height: 1.7;
  margin-bottom: 15px;
}

.homeServiceList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.serviceItem {
  font-size: 13px;
  color: #2f495e;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 6px;
}

/* ANNOUNCEMENT PREVIEW ITEMS */
.homeAnnouncementItem {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.homeAnnouncementItem:last-child {
  border-bottom: none;
}

.homeAnnouncementItem:hover .announceTitlePreview {
  color: #6f2111;
}

.announceTitlePreview {
  font-size: 13px;
  font-weight: 600;
  color: #2f495e;
  transition: color 0.2s;
}

.announceDatePreview {
  font-size: 11px;
  color: #aaa;
  margin-top: 3px;
}

.viewAllBtn {
  margin-top: 12px;
  font-size: 12px;
  color: #6f2111;
  cursor: pointer;
  font-weight: 600;
  text-align: right;
  display: block;
}

.viewAllBtn:hover {
  text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .quickInfoRow {
    grid-template-columns: 1fr;
  }
  .homeColumns {
    grid-template-columns: 1fr;
  }
}

/* Announcement */
.announcementDetailWrapper {
  width: 100%;
  min-height: calc(100vh - 120px);
  margin: 0;
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.announcementDetailHeader {
  background: #6f2111;
  padding: 28px 35px;
  text-align: center;
}

.announcementDetailHeader h2 {
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: 0.85;
}

.announcementDetailTitle {
  color: white;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
}

.announcementDetailMeta {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 16px 35px;
  background: #f8f0ee;
  border-bottom: 1px solid #e8d8d5;
}

.announcementMetaItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.announcementMetaLabel {
  font-size: 10px;
  font-weight: 600;
  color: #6f2111;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.announcementMetaValue {
  font-size: 13px;
  font-weight: 500;
  color: #2f495e;
}

.announcementDetailDivider {
  height: 3px;
  background: linear-gradient(to right, #6f2111, #c0392b, #6f2111);
  opacity: 0.3;
}

.announcementDetailBody {
  padding: 30px 35px 35px;
  flex: 1;
}

.announcementDetailBodyLabel {
  font-size: 11px;
  font-weight: 600;
  color: #6f2111;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.announcementDetailContent {
  font-size: 14px;
  line-height: 1.9;
  color: #2f495e;
  white-space: pre-line;
  padding: 20px 25px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #6f2111;
}

.announcementDetailFooter {
  padding: 16px 35px;
  background: #f8f0ee;
  border-top: 1px solid #e8d8d5;
  text-align: center;
  font-size: 11px;
  color: #9a6e6e;
  letter-spacing: 0.5px;
}

/* Featured announcement card */
.featuredAnnouncement {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 12px;
  position: relative;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.featuredAnnouncement:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.featuredAnnouncement.has-photo {
  background-size: cover;
  background-position: center;
}

.featuredAnnouncement.no-photo {
  background: linear-gradient(135deg, #6f2111, #a0392b);
}

.featuredOverlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.2) 60%,
    transparent 100%
  );
  padding: 14px;
}

.featuredAnnouncement .announceTitlePreview {
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.featuredAnnouncement .announceDatePreview {
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  margin-top: 3px;
}

/* Announcement detail photos */
.announcementPhotosRow {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 18px;
}

.announcementDetailPhoto {
  width: 130px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e0e4ea;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.announcementDetailPhoto:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

/* Lightbox */
.photoLightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.photoLightbox.show {
  opacity: 1;
  pointer-events: auto;
}

.photoLightbox img {
  max-width: 88vw;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightboxClose {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: white;
  font-size: 34px;
  cursor: pointer;
}

/* MOBILE / TABLET RESPONSIVE */

/* medium screens: tablets and small laptops kasi for resi */
@media (max-width: 900px) {
  /* collapse sidebar column and remove reserved header row */
  .container {
    grid-template-columns: 1fr;
    grid-template-rows: 0 1fr;
    grid-template-areas:
      "header"
      "main";
  }

  /* page image scales nicely */
  .pageWrapper img {
    width: 95%;
    height: auto;
    margin-left: 0;
  }

  /* subheader stacks vertically */
  .subHeader {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 10px;
    gap: 4px;
  }

  /* text adjustments */
  .pageTitle {
    font-size: 14px;
  }
  .systemName {
    font-size: 12px;
  }

  /* main content padding + clear fixed header */
  .mainContent {
    padding: 10px;
    margin-top: 60px;
  }

  /* sidebar toggle si hamburger */
  .hamburger {
    display: block; /* show hamburger */
    margin-left: auto; /* right side */
    background: none;
    border: none;
    font-size: 26px;
    color: #f4f6f9;
    cursor: pointer;
  }

  .sidebar {
    position: fixed; /* slide in/out */
    top: 60px; /* below header */
    left: -220px; /* hidden by default */
    width: 190px;
    height: calc(100vh - 60px);
    padding-top: 20px;
    transition: left 0.3s ease;
    z-index: 200;
  }

  .sidebar.active {
    left: 0;
  }
}

/* small screens: phones */
@media (max-width: 600px) {
  /* collapse sidebar column */
  .container {
    grid-template-columns: 1fr;
    grid-template-rows: 0 1fr;
    grid-template-areas:
      "header"
      "main";
  }

  /* page image full width */
  .pageWrapper img {
    width: 100%;
    height: auto;
    margin: 10px 0;
  }

  /* subheader smaller and stacked */
  .subHeader {
    flex-direction: column;
    align-items: flex-start;
    padding: 6px 8px;
    gap: 2px;
  }

  .pageTitle {
    font-size: 13px;
  }
  .systemName {
    font-size: 11px;
  }

  /* pageWrapper padding reduced */
  .pageWrapper {
    padding: 10px 5px;
  }

  /* main content padding smaller + clear fixed header */
  .mainContent {
    padding: 5px 10px;
    margin-top: 60px;
  }

  /* sidebar toggle remains same as 900px */
  .hamburger {
    display: block;
  }
  .sidebar {
    left: -220px;
  }
  .sidebar.active {
    left: 0;
  }
  .announcementPhotosRow {
    flex-direction: column;
  }

  .announcementDetailPhoto {
    width: 100%;
    height: 220px;
  }
}
