/* ============================================================
   ACM Bangalore Professional Chapter — Shared Stylesheet
   Styled to match ACM India (india.acm.org) aesthetic
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&family=Roboto+Slab:wght@700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --navy:        #1a2332;
  --navy-light:  #243044;
  --teal:        #0d8ea0;
  --teal-dark:   #0a7080;
  --teal-light:  #e0f5f8;
  --blue:        #0d8ea0;   /* alias — keeps existing code working */
  --blue-dark:   #0a7080;
  --blue-light:  #e0f5f8;
  --accent:      #0d8ea0;
  --link:        #1a6e80;
  --gray-50:     #f8f8f8;
  --gray-100:    #f2f2f2;
  --gray-200:    #e0e0e0;
  --gray-400:    #999999;
  --gray-600:    #555555;
  --gray-700:    #333333;
  --gray-900:    #111111;
  --white:       #ffffff;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg:   0 4px 20px rgba(0,0,0,0.12);
  --radius:      6px;
  --radius-sm:   4px;
  --transition:  0.2s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  color: var(--gray-700);
  background: #e8e8e8;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Page canvas — centres content with grey gutters on wide screens */
.page-canvas {
  max-width: 1440px;
  margin: 0 auto;
  background: var(--white);
  overflow: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; color: var(--gray-900); }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1rem, 2vw, 1.25rem); }
h4 { font-size: 1rem; }

p { color: var(--gray-700); line-height: 1.75; }

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  border-bottom: 2px solid var(--teal);
  padding-bottom: 4px;
  margin-bottom: 16px;
}

/* --- Layout Utilities --- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 72px 0; }
.section--gray { background: var(--gray-50); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy p { color: rgba(255,255,255,0.80); }
.section--teal { background: var(--teal); color: var(--white); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: 10px; }
.gap-md { gap: 20px; }

.text-center { text-align: center; }
.mt-xs { margin-top: 8px; }
.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 28px; }
.mt-lg { margin-top: 48px; }

/* ============================================================
   NAVIGATION — 3-tier ACM India style
   ============================================================ */

/* --- Tier 1: Utility bar --- */
.util-bar {
  background: #111;
  border-bottom: 1px solid #2a2a2a;
}
.util-bar__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}
.util-bar__inner a {
  color: #bbb;
  font-size: 0.71rem;
  font-weight: 400;
  text-decoration: none;
  padding: 7px 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-left: 1px solid #2a2a2a;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.util-bar__inner a:last-child { border-right: 1px solid #2a2a2a; }
.util-bar__inner a:hover { background: #222; color: #fff; }

/* --- Tier 2: Site header --- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 14px 0;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-header__logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-header__logo img { height: 52px; width: auto; }
.site-header__org {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.site-header__chapter {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 3px;
  font-weight: 400;
}
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.hdr-btn--teal { background: var(--teal); color: var(--white); }
.hdr-btn--teal:hover { background: var(--teal-dark); color: var(--white); }
.hdr-btn--search { background: var(--navy); color: var(--white); }
.hdr-btn--search:hover { background: var(--teal); color: var(--white); }

/* --- Tier 3: Main navigation (sticky) --- */
.main-nav {
  background: #1a1a1a;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.main-nav__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  position: relative;
}
.main-nav__links {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav__links li { display: flex; }
.main-nav__links a {
  display: flex;
  align-items: center;
  padding: 0 18px;
  height: 48px;
  color: rgba(255,255,255,0.88);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: none;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
}
.main-nav__links a:hover,
.main-nav__links a.active {
  background: var(--teal);
  color: var(--white);
}

/* Hamburger toggle (hidden on desktop) */
.main-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0 16px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  flex-shrink: 0;
}
.main-nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile-only elements — hidden on desktop.
   Use li.main-nav__mobile-actions to beat .main-nav__links li specificity */
.main-nav__mobile-logo          { display: none; }
li.main-nav__mobile-actions     { display: none; }

/* ============================================================
   BUTTONS — rectangular, ACM India style
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--teal-dark);
  transform: none;
  box-shadow: none;
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.6);
}
.btn--outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  transform: none;
}

.btn--outline-blue {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}
.btn--outline-blue:hover {
  background: var(--teal);
  color: var(--white);
  transform: none;
}

.btn--accent {
  background: var(--teal);
  color: var(--white);
}
.btn--accent:hover {
  background: var(--teal-dark);
  transform: none;
  box-shadow: none;
}

.btn--sm { padding: 7px 16px; font-size: 0.82rem; }
.btn--lg { padding: 12px 28px; font-size: 0.95rem; }

/* ============================================================
   PAGE HERO (non-home pages)
   ============================================================ */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 72px 0 60px;
  border-bottom: 3px solid var(--teal);
}

.page-hero::before { display: none; }

.page-hero__content { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); margin-top: 12px; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.page-hero p  { color: rgba(255,255,255,0.80); margin-top: 12px; font-size: 1rem; max-width: 600px; }

/* ============================================================
   CARDS — ACM India style: clean, minimal border
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
  transform: none;
}

.card__body { padding: 24px; }
.card__img  { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  border: 1px solid var(--gray-200);
  text-align: center;
  border-top: 3px solid var(--teal);
}

.stat-card__number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.stat-card__label {
  font-size: 0.84rem;
  color: var(--gray-600);
  margin-top: 6px;
  font-weight: 500;
}

/* ============================================================
   EVENT CARD
   ============================================================ */
.event-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 24px 28px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  transition: border-color var(--transition);
  border-left: 3px solid var(--teal);
}

.event-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.event-card__date {
  min-width: 60px;
  text-align: center;
  background: var(--teal);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
}

.event-card__date .month {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.event-card__date .day {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-top: 2px;
}

.event-card__content { flex: 1; }
.event-card__type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 2px 0;
  display: inline-block;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--teal);
}

.event-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}

.event-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.event-card__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--gray-600);
}

.event-card__meta-item svg { flex-shrink: 0; color: var(--teal); }
.event-card__action { margin-left: auto; align-self: center; }

/* ============================================================
   LEADERSHIP / PERSON CARD
   ============================================================ */
.person-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.person-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
  transform: none;
}

.person-card__img { width: 100%; aspect-ratio: 1/1; object-fit: cover; object-position: top center; }
.person-card__body { padding: 16px; }
.person-card__name { font-size: 0.96rem; font-weight: 700; color: var(--gray-900); }
.person-card__role {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.person-card__org { font-size: 0.8rem; color: var(--gray-600); margin-top: 4px; }

/* ============================================================
   FORM STYLES
   ============================================================ */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(13,142,160,0.12);
}

.form-group textarea { resize: vertical; min-height: 110px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-note { font-size: 0.8rem; color: var(--gray-400); margin-top: 6px; }

/* ============================================================
   BENEFIT PILLS / CHIPS — simpler, border-based
   ============================================================ */
.benefit-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.benefit-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-50);
  color: var(--teal-dark);
  border: 1px solid var(--teal-light);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
}

.benefit-pill svg { flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #111111;
  color: rgba(255,255,255,0.75);
  padding: 56px 0 0;
  border-top: 3px solid var(--teal);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer__brand img { height: 34px; width: auto; margin-bottom: 12px; }

.footer__brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.footer__tagline {
  font-size: 0.83rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.50);
  max-width: 280px;
}

.footer__social { display: flex; gap: 10px; margin-top: 18px; }

.footer__social a {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  transition: all var(--transition);
}

.footer__social a:hover {
  background: var(--teal);
  color: var(--white);
}

.footer__heading {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.40);
  margin-bottom: 14px;
}

.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__links a {
  font-size: 0.86rem;
  color: rgba(255,255,255,0.60);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--white); }

.footer__contact { font-size: 0.86rem; }
.footer__contact p {
  color: rgba(255,255,255,0.55);
  font-size: 0.84rem;
  margin-bottom: 8px;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer__bottom p { font-size: 0.78rem; color: rgba(255,255,255,0.35); }

.footer__bottom-links { display: flex; gap: 18px; }

.footer__bottom-links a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  transition: color var(--transition);
}
.footer__bottom-links a:hover { color: rgba(255,255,255,0.70); }

/* ============================================================
   DIVIDER
   ============================================================ */
.divider { height: 1px; background: var(--gray-200); margin: 0; }

/* ============================================================
   SHIMMER LOADING ANIMATION
   ============================================================ */
@keyframes shimmer {
  0%   { background-color: var(--gray-100); }
  50%  { background-color: var(--gray-200); }
  100% { background-color: var(--gray-100); }
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  border-left: 3px solid var(--teal);
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .event-card { flex-direction: column; }
  .event-card__action { margin-left: 0; margin-top: 10px; }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }

  /* Hide util-bar and full site-header on mobile */
  .util-bar    { display: none; }
  .site-header { display: none; }

  /* Mobile nav TOP BAR — white background */
  .main-nav { background: #ffffff; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
  .main-nav__inner {
    justify-content: space-between;
    padding: 0 16px;
  }

  /* Show mobile logo + text (left side of nav bar) */
  .main-nav__mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    overflow: hidden;
  }
  .main-nav__mobile-logo img {
    height: 38px;
    width: auto;
    display: block;
    flex-shrink: 0;
  }
  .main-nav__mobile-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    overflow: hidden;
  }
  .main-nav__mobile-org {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--teal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
  }
  .main-nav__mobile-chapter {
    font-size: 0.62rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
  }

  /* Show hamburger toggle — dark/teal on white bar */
  .main-nav__toggle { display: flex; }
  .main-nav__toggle span { background: var(--teal); }

  /* Mobile SIDEBAR/DROPDOWN — teal background with white lines */
  .main-nav__links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: var(--teal);
    border-bottom: 3px solid rgba(255,255,255,0.3);
    z-index: 999;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .main-nav__links.open { display: flex; }
  .main-nav__links li   { display: block; }
  .main-nav__links a {
    height: 50px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,0.25);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.92);
    background: transparent;
  }
  .main-nav__links a:hover,
  .main-nav__links a.active {
    background: rgba(0,0,0,0.15);
    color: var(--white);
  }

  /* Join + myACM buttons at top of sidebar */
  li.main-nav__mobile-actions {
    display: flex !important;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
  }
  li.main-nav__mobile-actions a {
    flex: 1;
    height: 40px !important;
    padding: 0 16px !important;
    justify-content: center;
    font-size: 0.85rem !important;
    border-bottom: none !important;
    border-radius: 3px;
    background: rgba(255,255,255,0.15) !important;
    color: var(--white) !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
  }
  li.main-nav__mobile-actions a:hover {
    background: rgba(255,255,255,0.28) !important;
  }

  .form-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
