*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ==========================================
   Public Health Page Title
========================================== */

.page-title {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;

  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;

  color: #003b49;
}

.page-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;

  width: 90px;
  height: 4px;

  background-color: #00a3ad;
  border-radius: 999px;
}


/* ==========================================
   Banner CSS Section
========================================== */

.banner-image img {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  margin: 0 auto;
}

/* ==========================================
   Resources Section
========================================== */

.resources-section {
  margin-top: 3rem;
}

.resources-title {
  font-size: 2rem;
  font-weight: 700;
  color: #003b49;
  margin-bottom: 0.75rem;
}

.resources-intro {
  max-width: 820px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #4b5563;
  margin-bottom: 1.75rem;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.1rem;
  align-items: stretch;
}

/* ==========================================
   Resource Card
========================================== */

.resource-card {
  position: relative;
  display: flex;
  flex-direction: column;

  min-width: 0;
  height: 100%;

  background: #ffffff;

  border: 1px solid #dbe5e8;
  border-radius: 16px;

  padding: 1.25rem;

  overflow: hidden;

  box-shadow: 0 3px 10px rgba(0, 59, 73, 0.05);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.resource-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;

  width: 5px;

  background: linear-gradient(180deg, #00a3ad, #005b70);
}

.resource-card:hover {
  border-color: #c7d6da;
  box-shadow:
    0 10px 22px rgba(0, 59, 73, 0.1);
}

/* ==========================================
   Card Header
========================================== */

.resource-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;

  margin-bottom: 1rem;
}

.resource-card-icon {
  flex-shrink: 0;

  width: 52px;
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  background-color: #eef8f9;
  color: #005b70;

  font-size: 1.2rem;
}

.resource-card-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 28px;

  padding: 0.25rem 0.7rem;

  background-color: #eef8f9;
  color: #005b70;

  border-radius: 999px;

  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;

  margin: 0;
}

/* ==========================================
   Card Content
========================================== */

.resource-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.resource-card-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;

  color: #003b49;

  margin-bottom: 0.5rem;
}

.resource-card-description {
  color: #4b5563;

  font-size: 0.96rem;
  line-height: 1.6;

  margin-bottom: 1rem;
}

/* ==========================================
   Resource Button Link
========================================== */

.resource-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;

  width: fit-content;
  min-height: 42px;

  padding: 0.75rem 1rem;

  border-radius: 10px;
  border: 1px solid #004657;

  background: linear-gradient(180deg, #005b70 0%, #004657 100%);

  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;

  text-decoration: none;

  box-shadow: 0 3px 10px rgba(0, 91, 112, 0.16);

  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.resource-card-link:hover {
  color: #ffffff;
  text-decoration: none;

  transform: translateY(-1px);

  box-shadow:
    0 8px 18px rgba(0, 91, 112, 0.22);
}

/* ==========================================
   Language Dropdown
========================================== */

.resource-language-select {
  max-width: 100%;
}

.resource-select {
  min-height: 50px;

  padding: 0.85rem 3rem 0.85rem 1rem;

  border-radius: 12px;

  font-size: 0.95rem;
}

.resource-select-wrapper {
  position: relative;
  width: 100%;
}

/* Custom Arrow */
.resource-select-wrapper::after {
  content: "";

  position: absolute;

  right: 1.15rem;
  top: 50%;

  width: 0.7rem;
  height: 0.7rem;

  border-right: 2px solid #007c89;
  border-bottom: 2px solid #007c89;

  transform: translateY(-70%) rotate(45deg);
  transform-origin: center;

  pointer-events: none;

  transition: transform 0.2s ease;
}

/* Rotate Arrow */
.resource-select-wrapper:focus-within::after {
  transform: translateY(-35%) rotate(-135deg);
}

.resource-select {
  width: 100%;
  min-height: 56px;

  padding: 0.95rem 3.25rem 0.95rem 1rem;

  border: 1px solid #c6d4d8;
  border-radius: 14px;

  background-color: #ffffff;
  background-image: none !important;

  color: #003b49;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;

  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  box-shadow: 0 2px 8px rgba(0, 59, 73, 0.05);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.resource-select::-ms-expand {
  display: none;
}

.resource-select:hover {
  border-color: #007c89;

  box-shadow:
    0 6px 16px rgba(0, 59, 73, 0.08);
}

.resource-select:focus {
  outline: none;
  border-color: #007c89;

  box-shadow:
    0 0 0 4px rgba(0, 163, 173, 0.18),
    0 6px 16px rgba(0, 59, 73, 0.08);
}

.resource-select option {
  background-color: #ffffff;
  color: #003b49;
}

/* Remove old icon */
.resource-select-icon {
  display: none !important;
}

/* ==========================================
   Error Message
========================================== */

.resources-error {
  padding: 1rem;

  border: 1px solid #fecaca;
  border-radius: 12px;

  background-color: #fef2f2;
  color: #7f1d1d;
}

/* ==========================================
   Responsive
========================================== */

@media (max-width: 992px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }

  .resource-card {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .resources-section {
    margin-top: 2.25rem;
  }

  .page-title {
    margin-bottom: 1.5rem;
    padding-bottom: 0.65rem;
  }

  .page-title::after {
    width: 70px;
  }

  .resources-title {
    font-size: 1.75rem;
  }

  .resources-intro {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .resource-card {
    padding: 1.35rem;
  }

  .resource-card-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .resource-card-icon {
    width: 56px;
    height: 56px;

    border-radius: 16px;

    font-size: 1.25rem;
  }

  .resource-card-title {
    font-size: 1.3rem;
  }

  .resource-language-select,
  .resource-card-link {
    width: 100%;
    max-width: 100%;
  }

  .resource-card-link {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .resource-card {
    padding: 1.15rem;
    border-radius: 14px;
  }

  .resource-card-title {
    font-size: 1.2rem;
  }

  .resource-card-description {
    font-size: 0.95rem;
  }

  .resource-select {
    min-height: 52px;
    font-size: 0.95rem;
  }

  .resource-card-header {
    flex-wrap: wrap;
  }
}