/* pagibigwebsite — Modern Design System */

/* CSS Variables */
:root {
  --brand: #8d021f;
  --brand-dark: #6a0018;
  --brand-light: #e8d7db;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1rem 0; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

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

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--brand);
  color: var(--text-inverse);
  border-color: var(--brand);
}

.btn-primary:hover {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--text-inverse);
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.btn-outline:hover {
  background-color: var(--brand-light);
  color: var(--brand-dark);
  text-decoration: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-brand {
  background-color: var(--brand-light);
  color: var(--brand-dark);
}

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* ============ Layout Components ============ */

.header {
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}

.header-card {
  background: var(--brand);
  color: var(--text-inverse);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1rem;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.logo-img {
  height: 100px;
  width: auto;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.3);
}

.header-text h1.brand {
  color: var(--text-inverse);
  font-size: 1.75rem;
  margin: 0 0 0.25rem 0;
}

.tagline {
  color: rgba(255,255,255,0.85);
  margin: 0;
  font-size: 0.95rem;
}

.header-contact {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  width: 100%;
}

.contact-item {
  color: rgba(255,255,255,0.9);
  margin: 0.25rem 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-link {
  color: var(--text-inverse);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.4);
}

.contact-link:hover {
  text-decoration-color: var(--text-inverse);
}

/* Navigation */
.navbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-list {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--text);
  font-weight: 600;
  padding: 0.875rem 1.25rem;
  display: block;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--brand);
  background-color: var(--bg-alt);
  text-decoration: none;
}

.nav-link.external {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
}

/* Dropdown */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  list-style: none;
  margin: 0.5rem 0 0 0;
  padding: 0.5rem 0;
  min-width: 160px;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-link {
  color: var(--text);
  padding: 0.5rem 1rem;
  display: block;
  transition: var(--transition);
}

.dropdown-link:hover {
  background-color: var(--bg-alt);
  color: var(--brand);
  text-decoration: none;
}

/* Hero / Carousel */
.hero-section {
  margin-bottom: 2rem;
}

.carousel-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
}

.carousel-item {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-item.active {
  display: block;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  padding: 2rem;
  color: var(--text-inverse);
}

.carousel-caption h3 {
  color: var(--text-inverse);
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
}

.carousel-caption p {
  color: rgba(255,255,255,0.9);
  margin: 0;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  color: var(--brand);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Committee Cards */
.committee-card {
  border: none;
  height: 100%;
}

.committee-card .card-img-top {
  height: 150px;
  object-fit: cover;
}

.committee-member {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.committee-member:last-child {
  border-bottom: none;
}

.committee-member img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Profile Cards */
.profile-card {
  text-align: center;
}

.profile-card .card-img-top {
  height: 180px;
  object-fit: cover;
}

/* Announcement Cards */
.announcement-card {
  border: none;
  background: transparent;
  box-shadow: none;
}

.announcement-card:hover {
  box-shadow: var(--shadow);
  background: var(--bg-alt);
  transform: translateY(-2px);
}

/* Announcement Detail */
.announcement-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

/* Utilities */
.text-brand { color: var(--brand); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Main content spacing to prevent header overlap */
.main {
  padding-top: 2rem;
}

/* Footer */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
  text-align: center;
}

/* Mobile */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .container { padding: 0 1rem; }
  .carousel-container { aspect-ratio: 3 / 2; }
  .navbar .container {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--bg);
    padding: 1rem 0;
    border-top: 1px solid var(--border);
  }
  .nav-list.open {
    display: flex;
  }
  .nav-item { width: 100%; }
  .nav-link { padding: 0.75rem 1rem; }
  .nav-toggle { display: block; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--bg-alt);
  }
  .header-card {
    padding: 1.5rem;
  }
  .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .header-contact {
    text-align: center;
  }
}
/* ============ Homepage Enhancements ============ */

.bg-alt {
  background-color: var(--bg-alt);
}
/* ============ PlaceholderImage Component ============ */

.placeholder-image {
  position: relative;
}

/* ============ Committee Photo (click to expand) ============ */

.committee-photo-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
  cursor: pointer;
  margin-bottom: 1rem;
}

.committee-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.committee-photo-wrap:hover .committee-photo {
  transform: scale(1.05);
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.875rem;
  padding: 0.5rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.committee-photo-wrap:hover .photo-overlay {
  opacity: 1;
}

.committee-card {
  cursor: pointer;
}

.committee-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ============ Committee Photo Modal ============ */

.committee-photo-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
  cursor: pointer;
  margin-bottom: 1rem;
}

.committee-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.committee-photo-wrap:hover .committee-photo {
  transform: scale(1.05);
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.875rem;
  padding: 0.5rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.committee-photo-wrap:hover .photo-overlay {
  opacity: 1;
}

.committee-card {
  cursor: pointer;
}

.committee-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Modal */
.photo-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
}

.photo-modal.open {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.modal-close:hover {
  background-color: var(--brand-dark);
}

.modal-caption {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

/* Close modal on Escape key */
