* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #120c3a;
  background: #fff;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

#container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  padding-top: 0;
}

#header {
  text-align: center;
  margin-bottom: 0;
  position: static;
  background: #ffffff;
  box-shadow: none;
}

#header img {
  margin: 0 auto;
  max-height: 140px;
  width: auto;
  height: auto;
}

/* SIDE-BY-SIDE LAYOUT (DESKTOP) */
#main-layout {
  display: flex !important;
  flex-direction: row !important;
  gap: 16px;
  width: 100%;
  align-items: flex-start;
}

#sidebar-nav {
  width: 240px;
  flex-shrink: 0;
  position: relative;
  top: auto;
}

#text {
  flex-grow: 1;
  min-width: 0;
}

#nav-panel {
  background: #f3f8ff;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#nav-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1d66a8 0%, #133f72 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 14px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  min-height: 44px;
  line-height: 1.2;
  white-space: normal;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 7px 14px rgba(14, 42, 82, 0.12);
}

.nav-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(29, 109, 176, 0.16);
}

.button-62 {
  background: #1d6db0;
  border: 0;
  border-radius: 12px;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 12px;
  text-decoration: none;
  width: 100%;
  white-space: normal;
}

.button-62.button-donate {
  background: linear-gradient(180deg, #2fae2f 0%, #228b22 100%) !important;
}

.button-62.button-whatsapp {
  background: linear-gradient(180deg, #22c55e 0%, #1f9d4e 100%) !important;
  color: #fff !important;
}

#text .text {
  padding: 0 10px;
}

#text h1 {
  font-size: 1.75rem;
  margin-top: 0;
}

#photo-map img {
  margin: 0 auto;
}

/* GENERAL TABLE STYLES */
table,
.table {
  width: 100% !important;
  border-collapse: collapse;
  border: 1px solid #241F59;
  font-size: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.table th,
.table td,
table td,
table th {
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
}

.table thead th {
  font-weight: 700;
  background: #f3f7ff;
  border-bottom: 1px solid #241F59;
  padding: 10px;
}

.table tbody tr + tr td {
  border-top: 1px solid #241F59;
}

.table td + td {
  border-left: 1px solid #241F59;
  padding-left: 12px;
}

.text h2 {
  display: block;
  margin: 1.25rem 0 0.5rem;
  padding: 8px 10px;
  background: transparent;
  border-bottom: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: #120c3a;
  text-align: left;
}

#footer {
  font-size: 0.85rem;
  color: #4D4A77;
  text-align: center;
  padding: 16px 0 32px;
}

/* MOBILE RESPONSIVE LAYOUT (NAV STACKS ABOVE CONTENT) */
@media screen and (max-width: 860px) {
  #header {
    position: static !important;
    box-shadow: none !important;
  }

  #header img {
    max-height: 96px;
  }

  /* Stack sidebar and content vertically so content gets 100% width */
  #main-layout {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
  }

  #sidebar-nav {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
  }

  #text {
    width: 100% !important;
    min-width: 100% !important;
    margin-top: 0 !important;
  }

  #container {
    padding-top: 0 !important;
    overflow: visible !important;
  }

  #text .text {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 0 !important;
  }

  #nav-panel {
    padding: 12px !important;
    gap: 8px !important;
  }

  #nav-panel a,
  .button-62 {
    font-size: 0.85rem !important;
    padding: 8px 12px !important;
    min-height: 38px !important;
  }

  #text p {
    font-size: 0.95rem !important;
  }

  /* Force content tables to stretch completely across screen space */
  #text table, #text .table {
    width: 100% !important;
    display: table !important;
  }

  #text table td, #text table th,
  #text .table td, #text .table th {
    width: auto !important; /* Overrides legacy inline HTML width attributes */
  }
}

/* SMALL PHONES (CARD VIEW FOR SMALL SCREENS) */
@media screen and (max-width: 600px) {
  /* Converts legacy table rows inside main text into clean individual cards without breaking sidebar/nav */
  #text table {
    display: block !important;
    width: 100% !important;
    border: none !important;
  }

  #text table tbody {
    display: block !important;
    width: 100% !important;
  }

  #text table tr {
    display: block !important;
    width: 100% !important;
    margin-bottom: 12px !important;
    padding: 10px !important;
    border: 1px solid #c8d8ea !important;
    border-radius: 8px !important;
    background-color: #f8faff !important;
  }

  #text table td {
    display: block !important;
    width: 100% !important;
    padding: 4px 0 !important;
    border: none !important;
  }
}
