/* ============================================================
   Morontota Api Association — Public Website Styles
   ============================================================ */

:root {
  --primary:    #1d4ed8;
  --primary-dk: #1e40af;
  --accent:     #f59e0b;
  --dark:       #0f172a;
  --text:       #334155;
  --page-surface: #e8f0ff;
  --page-surface-2: #f2f7ff;
  --page-surface-3: #f8fbff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background-image:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(242, 247, 255, 0.86)),
    linear-gradient(135deg, rgba(29, 78, 216, 0.18), rgba(245, 158, 11, 0.12)),
    url('../../uploads/branding/6a4a6563a2b786.59743632.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.06) 24%, transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.25) 0%, transparent 34%);
  filter: blur(10px);
  opacity: 0.82;
  pointer-events: none;
  z-index: -1;
}

.sinhala-text { font-family: 'Noto Sans Sinhala', sans-serif; }

/* ── Spacing ──────────────────────────────────────────────── */
.py-4, .py-5, .py-6 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.py-4 { padding-top: 3rem; padding-bottom: 3rem; }
.py-5 { padding-top: 4rem; padding-bottom: 4rem; }
.py-6 { padding-top: 5rem; padding-bottom: 5rem; }
.x-small { font-size: 0.75rem; }

/* ── Navbar ───────────────────────────────────────────────── */
#mainNav {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.35rem 0;
  transition: all 0.3s ease;
}
#mainNav.scrolled {
  background: rgba(15, 23, 42, 0.98);
  padding: 0.18rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
#mainNav .navbar-brand { font-size: 0.95rem; }
#mainNav .brand-icon { font-size: 1.6rem; }
#mainNav .nav-link {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  transition: color 0.2s;
}
#mainNav .nav-link:hover { color: #fff; }

/* Logo display: render site logo and sidebar logos as circular */
.brand-logo,
.sidebar-logo img {
  width: 40px !important;
  height: 40px !important;
  display: inline-block;
  object-fit: cover;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #0f3460 100%),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.03)"/></svg>') center/cover;
  position: relative;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(29,78,216,0.2) 0%, transparent 70%);
}
.hero-title { text-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.hero-badge {
  display: inline-block;
  background: rgba(245,158,11,0.2);
  border: 1px solid rgba(245,158,11,0.4);
  color: #f59e0b;
  padding: 0.35rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.hero-stat-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 1.5rem;
}
/* Animated hover effect for hero/stat/feature/service cards */
.hero-stat-card, .feature-item, .service-card, .about-stat-card {
  transition: transform 0.28s cubic-bezier(.2,.9,.2,1), box-shadow 0.28s ease, filter 0.28s ease;
  will-change: transform, box-shadow;
}
.hero-stat-card:hover, .feature-item:hover, .service-card:hover, .about-stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 18px 40px rgba(2,6,23,0.12);
  filter: saturate(1.03);
}
.feature-item:hover .feature-icon, .service-card:hover .feature-icon {
  transform: translateY(-3px) rotate(-6deg);
  transition: transform 0.32s cubic-bezier(.2,.9,.2,1);
}

/* subtle pop animation when revealed */
@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(.98);} 
  to   { opacity: 1; transform: translateY(0) scale(1);} 
}
.fade-in.visible { animation: popIn 420ms cubic-bezier(.2,.9,.2,1) both; }
.hero-stat-num { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.hero-stat-label { font-size: 0.85rem; opacity: 0.8; margin-top: 0.25rem; }
.hero-scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-10px)} }

/* ── Sections ─────────────────────────────────────────────── */
section[id] {
  position: relative;
}

section[id]::before {
  content: "";
  position: absolute;
  inset: 0;
  /* stronger primary-tinted overlay to visually connect sections with navbar/hero */
  background: linear-gradient(180deg, rgba(29,78,216,0.14) 0%, rgba(29,78,216,0.08) 100%);
  z-index: -1;
  border-radius: 0;
}

#committee.bg-light,
#events.bg-light {
  background: linear-gradient(180deg, rgba(235, 245, 255, 0.95) 0%, rgba(217, 235, 255, 0.95) 100%);
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.72), 0 16px 40px rgba(15, 23, 42, 0.04);
  padding: 3rem 0;
}

.section-label {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-title { font-size: 2.2rem; font-weight: 700; line-height: 1.2; }

/* ── Features ─────────────────────────────────────────────── */
.row.g-3 > .col-6 { display: flex; }
.feature-item {
  padding: 1.25rem;
  background: #f8faff;
  border-radius: 12px;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 132px;
}
.feature-icon { width: 48px; height: 48px; border-radius: 12px; display:flex; align-items:center; justify-content:center; }
.bg-primary-soft  { background: rgba(29,78,216,0.1);  }
.bg-success-soft  { background: rgba(34,197,94,0.1);  }
.bg-warning-soft  { background: rgba(245,158,11,0.1); }
.bg-info-soft     { background: rgba(6,182,212,0.1);  }

/* ── About Stats ──────────────────────────────────────────── */
.about-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.about-stat-card {
  background: rgba(255,255,255,0.9);
  border: 2px solid rgba(29,78,216,0.08);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.3s;
}
.about-stat-card:hover { transform: translateY(-4px); }

/* ── Committee ────────────────────────────────────────────── */
.committee-card {
  background: rgba(255,255,255,0.92);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  border: 1px solid rgba(29,78,216,0.08);
  position: relative;
  overflow: hidden;
}
.committee-card:hover { transform: translateY(-6px); box-shadow: 0 14px 40px rgba(0,0,0,0.12); }
.committee-avatar { width: 104px; height: 104px; position: relative; }
.committee-avatar img { width: 104px; height: 104px; object-fit: cover; border: 4px solid #fff; box-shadow: 0 6px 16px rgba(0,0,0,0.12); transition: transform 0.3s ease; }
.committee-card:hover .committee-avatar img { transform: scale(1.06); }
.avatar-initials {
  width: 104px; height: 104px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2rem; font-weight: 700;
  border: 4px solid #fff; box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.committee-role-topic {
  font-size: 1.15rem;
  line-height: 1.2;
}
.committee-badge-super_admin { background: linear-gradient(135deg, #dc3545, #b02a37); color: #fff; }
.committee-badge-treasurer { background: linear-gradient(135deg, #fd7e14, #d97706); color: #fff; }
.committee-badge-committee_member { background: linear-gradient(135deg, #0d6efd, #0a58ca); color: #fff; }
.member-detail-box {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 0.75rem 0.5rem;
  margin-top: 1rem;
}

/* ── Finance Cards ────────────────────────────────────────── */
.finance-card {
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.92);
}

/* ── Events ───────────────────────────────────────────────── */
.event-card {
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all 0.3s;
}
.event-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.12); }
.event-card-img { height: 200px; overflow: hidden; }
.event-card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s; }
.event-card:hover .event-card-img img { transform: scale(1.05); }
.event-card-placeholder {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  display: flex; align-items: center; justify-content: center;
}

/* ── Event Filter Buttons ──────────────────────────────────── */
.btn-filter {
  background: #f1f5f9;
  color: var(--text);
  border: 2px solid #e2e8f0;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1.2rem;
  transition: all 0.3s ease;
  border-radius: 20px;
  white-space: nowrap;
}

.btn-filter:hover {
  background: #e2e8f0;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-filter.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

.fade-in-event {
  animation: fadeInEvent 0.3s ease-in-out;
}

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

/* ── Gallery ──────────────────────────────────────────────── */
.gallery-item {
  position: relative; overflow: hidden; border-radius: 12px;
  cursor: pointer; aspect-ratio: 1;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ── Contact ──────────────────────────────────────────────── */
.contact-info { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1.5rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem;
}

/* ── Service picture (image) for services cards ─────────── */
.service-pic {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  border-radius: 12px;
  background: rgba(29,78,216,0.06);
}
.service-pic img { width: 42px; height: 42px; display: block; }

/* Service card layout and responsive adjustments */
.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.service-pic img { max-width: 100%; height: auto; }

@media (max-width: 768px) {
  .service-pic { width: 48px; height: 48px; }
  .service-pic img { width: 36px; height: 36px; }
  .service-card { padding: 1rem; }
  .service-card h5 { font-size: 1rem; }
  .section-title { font-size: 1.6rem; }
}

@media (max-width: 576px) {
  .service-pic { width: 44px; height: 44px; }
  .service-pic img { width: 28px; height: 28px; }
  .service-card { padding: 0.8rem; }
  .service-card h5 { font-size: 0.98rem; }
  .section-title { font-size: 1.4rem; }
  .section-label { font-size: 0.7rem; }
}

/* ── Upload zone ──────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed #cbd5e1; border-radius: 12px;
  padding: 2.5rem; text-align: center;
  transition: all 0.3s; cursor: pointer;
}
.upload-zone.dragover { border-color: var(--primary); background: rgba(29,78,216,0.05); }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.75rem; }

/* ── Scroll animations ────────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .section-title { font-size: 1.7rem; }
  .about-stat-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .hero-stat-num { font-size: 2rem; }
  .py-6 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

@media (max-width: 576px) {
  .feature-item {
    min-height: 120px;
    padding: 1rem;
  }
}

@media (max-width: 991.98px) {
  .hero-section {
    align-items: flex-start !important;
    padding-top: 100px;
    padding-bottom: 60px;
  }
}
