:root {
  /* JS sets real values; these are safe defaults */
  --topbar-h: 107px;
  --footer-h: 42px;

  --green-deep: #2d6a4f;
  --page-bg: #e6f4ea;
  --text-dark: #212121;
}

/* Base */
html, body, #root { height: 100%; margin: 0; }
body {
  overflow: hidden;                  /* only the middle scrolls */
  background: var(--page-bg);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Fixed Top Bar (header + menu + flash) ===== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  pointer-events: none;              /* let wheel/touch pass through by default */
}

/* Keep interactive things clickable */
.site-header, .site-menu {
  pointer-events: auto;              /* links/buttons in header/menu work */
}

/* Flash bar should never trap scroll/click  */
.top-flash-bar { pointer-events: none; }

/* Spacer equal to the exact topbar height */
.topbar-spacer {
  height: var(--topbar-h);
  flex: 0 0 auto;
}

/* ===== App wrapper ===== */
.app-shell {
  height: 100vh;
  background: var(--page-bg);
}

/* ===== THE ONLY SCROLL CONTAINER ===== */
.page-content {
  /* height = viewport - topbar - footer */
  height: calc(100vh - var(--topbar-h) - var(--footer-h));

  overflow: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;               /* reliable trackpad/touch scrolling */
  overscroll-behavior: contain;

  box-sizing: border-box;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.page-content::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* In-page anchors (e.g., #mission) won’t hide under header */
html {
  scroll-padding-top: var(--topbar-h);
  scroll-behavior: smooth;
}

body {
  background-color: #e6f4ea; /* light background */
  color: #212121;           /* dark text */
  font-family: Arial, sans-serif;
}

header {
  background-color: #004d26; /* dark green like farooqshubli.in */
  color: #ffffff;            /* white text */
  font-family: 'Yuzarsif', serif;
  padding: 1rem;
}

header h1, header h2, header p {
  color: #ffffff; /* force all header text to white */
  margin: 0;
}
button, .btn {
  background-color: #4caf50; /* secondary green */
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

/*button:hover, .btn:hover {
  background-color: #2e7d32;
}*/

/* ============================================================
   Unified item card – shared across gallery, press, events
   ============================================================ */
.item-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.item-col {
  flex: 0 0 calc(25% - 15px);
  max-width: calc(25% - 15px);
}
@media (max-width: 992px) {
  .item-col { flex: 0 0 calc(33.333% - 14px); max-width: calc(33.333% - 14px); }
}
@media (max-width: 768px) {
  .item-col { flex: 0 0 calc(50% - 10px); max-width: calc(50% - 10px); }
}
@media (max-width: 480px) {
  .item-col { flex: 0 0 100%; max-width: 100%; }
}

.item-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,.07);
  border: 1px solid rgba(0,0,0,.05);
  transition: transform .35s ease, box-shadow .35s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(30,135,86,.18);
}
.item-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  flex-shrink: 0;
}
.item-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.item-card:hover .item-card-img {
  transform: scale(1.05);
}
.item-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #e6f4ea;
  color: #9ca3af;
  font-size: 40px;
  flex-shrink: 0;
}
.item-card-body {
  padding: 14px 16px;
  flex: 1;
}
.item-card-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #1b381e;
  line-height: 1.3;
}
.item-card-caption {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-card-date {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #1e8756;
  margin-bottom: 6px;
}

/* Media type badge (video / doc) */
.item-card-media-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  pointer-events: none;
}
.item-card-media-badge svg { width: 11px; height: 11px; flex-shrink: 0; }
.item-card-media-badge--video { background: rgba(0,0,0,.65); color: #fff; }
.item-card-media-badge--doc { background: rgba(30,135,86,.85); color: #fff; bottom: 10px; left: auto; right: 10px; }

/* Video preview on card */
.item-card-video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Placeholder */
.item-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #f3f4f6; color: #9ca3af; font-size: 13px;
}

/* Date Badge - positioned on image */
.item-card-date-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #1e8756 0%, #14532d 100%);
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  text-align: center;
  min-width: 60px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.item-card-date-badge .badge-day {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.item-card-date-badge .badge-month {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}
.item-card-date-badge .badge-year {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.8;
}
.item-card-date-badge .badge-time {
  font-size: 10px;
  font-weight: 600;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,.3);
  opacity: 0.9;
}

/* Date badge shown inline (no image) */
.item-card-date-badge--inline {
  position: static;
  display: inline-flex;
  border-radius: 6px;
  margin: 12px 12px 0;
  align-self: flex-start;
}

.item-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ============================================================
   Filter Bar – Date Range Picker
   ============================================================ */
.filter-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #1e8756 0%, #2d6a4f 100%);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.filter-bar-inner {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* Label + input group */
.fcal-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fcal-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.75);
  text-transform: uppercase;
  letter-spacing: .6px;
}

.fcal-input {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
  transition: background .2s ease, border-color .2s ease;
  /* native date picker colour overrides */
  color-scheme: dark;
}
.fcal-input:focus {
  background: rgba(255,255,255,.25);
  border-color: rgba(255,255,255,.6);
}
.fcal-input-error {
  border-color: #f87171 !important;
  background: rgba(248,113,113,.15) !important;
}

/* Apply button */
.fcal-apply-btn {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 18px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  white-space: nowrap;
  align-self: flex-end;
}
.fcal-apply-btn:hover {
  background: rgba(255,255,255,.32);
  border-color: rgba(255,255,255,.55);
}
.fcal-apply-btn--active {
  background: #fff;
  color: #1e8756;
  border-color: #fff;
}

/* Clear button */
.fcal-clear-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
  white-space: nowrap;
  align-self: flex-end;
}
.fcal-clear-btn:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

@media (max-width: 480px) {
  .filter-bar-inner {
    gap: 8px;
  }
  .fcal-input {
    font-size: 12px;
    padding: 5px 8px;
  }
  .fcal-apply-btn,
  .fcal-clear-btn {
    padding: 5px 12px;
    font-size: 12px;
  }
}

/* ============================================================
   Card Carousel – Bootstrap carousel on item cards
   ============================================================ */
.card-carousel {
  width: 100%;
  height: 100%;
}
.card-carousel .carousel-inner,
.card-carousel .carousel-item {
  height: 100%;
}
.card-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-carousel .carousel-indicators {
  margin-bottom: 6px;
}
.card-carousel .carousel-indicators button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin: 0 3px;
  opacity: 0.6;
  border: none;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.card-carousel .carousel-indicators button.active {
  opacity: 1;
}
.card-carousel .carousel-control-prev,
.card-carousel .carousel-control-next {
  display: none;
}

/* ============================================================
   Page Title Header
   ============================================================ */
.page-title-header {
  padding: 16px 0 8px;
}
.page-title-row {
  display: flex;
  align-items: center;
  position: relative;
}
.page-title-row .ev-tabs-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.page-title-heading {
  margin: 0;
  color: #2d6a4f;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  text-align: left;
}

/* ============================================================
   Event Compact Cards
   ============================================================ */
.ev-compact-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: transform .25s ease, box-shadow .25s ease;
  height: 100%;
}
.ev-compact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(30,135,86,.14);
}
.ev-date-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #2d6a4f;
  background: #e6f4ea;
  border-radius: 20px;
  padding: 2px 10px;
  margin-bottom: 8px;
}
.ev-date-badge--upcoming {
  color: #92400e;
  background: #fef3c7;
}
.ev-compact-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #1b381e;
  line-height: 1.3;
}
.ev-compact-caption {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

/* ============================================================
   Floating Side Panel
   ============================================================ */
.fp-root {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 1050;
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* Tab strip on right edge */
.fp-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: all;
}

.fp-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #1e8756 0%, #2d6a4f 100%);
  color: #fff;
  border: none;
  border-radius: 10px 0 0 10px;
  padding: 12px 8px;
  cursor: pointer;
  width: 44px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  box-shadow: -2px 2px 10px rgba(0,0,0,.25);
  transition: background .2s, width .2s;
}
.fp-tab:hover {
  background: linear-gradient(135deg, #25a066 0%, #1e8756 100%);
  width: 48px;
}
.fp-tab.fp-tab--active {
  background: #fff;
  color: #1e8756;
}
.fp-tab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Sliding drawer */
.fp-drawer {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translate(100%, -50%);
  width: 280px;
  max-height: 90vh;
  background: linear-gradient(160deg, #1b3a2f 0%, #14532d 100%);
  box-shadow: -4px 0 24px rgba(0,0,0,.35);
  border-radius: 12px 0 0 12px;
  display: flex;
  flex-direction: column;
  padding: 48px 20px 24px;
  pointer-events: all;
  z-index: 1051;
  overflow-y: auto;
}
.fp-drawer.fp-drawer--open {
  transform: translate(0, -50%);
}

/* Close button */
.fp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  color: #fff;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
  padding: 0;
  line-height: 1;
}
.fp-close:hover { background: rgba(255,255,255,.3); }
.fp-close svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
  stroke: #fff;
}

/* Individual panels inside drawer */
.fp-panel { display: none; }
.fp-panel.fp-panel--active { display: block; }

.fp-panel-title {
  color: rgba(255,255,255,.6);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin: 0 0 16px;
}

/* Filter panel */
.fp-filter-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fp-filter-inner .fcal-field-group {
  flex-direction: column;
  width: 100%;
}
.fp-filter-inner .fcal-input {
  width: 100%;
}
.fp-filter-inner .fcal-apply-btn,
.fp-filter-inner .fcal-clear-btn {
  width: 100%;
  text-align: center;
  padding: 8px;
}

/* Social links */
.fp-social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fp-social-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s, transform .15s;
  border: 1px solid rgba(255,255,255,.08);
}
.fp-social-btn:hover {
  color: #fff;
  transform: translateX(-4px);
}
.fp-social-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fp-social-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
.fp-social-facebook .fp-social-icon  { background: #1877f2; }
.fp-social-facebook:hover             { background: rgba(24,119,242,.15); border-color: rgba(24,119,242,.4); }
.fp-social-twitter  .fp-social-icon  { background: #000; }
.fp-social-twitter:hover              { background: rgba(0,0,0,.2); border-color: rgba(255,255,255,.2); }
.fp-social-instagram .fp-social-icon { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.fp-social-instagram:hover            { background: rgba(225,48,108,.15); border-color: rgba(225,48,108,.4); }
.fp-social-youtube  .fp-social-icon  { background: #ff0000; }
.fp-social-youtube:hover              { background: rgba(255,0,0,.15); border-color: rgba(255,0,0,.4); }
.fp-social-linkedin .fp-social-icon  { background: #0a66c2; }
.fp-social-linkedin:hover             { background: rgba(10,102,194,.2); border-color: rgba(10,102,194,.5); }

/* Backdrop */
.fp-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1049;
  pointer-events: all;
}
.fp-backdrop.fp-backdrop--visible { display: block; }

/* Mobile: wider drawer */
@media (max-width: 480px) {
  .fp-drawer {
    width: 90vw;
    border-radius: 12px 0 0 12px;
  }
}
