/* styles.css for Cambridge Tamil Sangam */
:root {
  --accent: #0f766e;
  --bg: #f0fdfa;
  --fg: #0f172a;
  --muted: #64748b;
  --card: #ccfbf1;
  --crimson-font: 'Crimson Text', serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Roboto', system-ui, sans-serif;
  background: #f8fafc;
  color: #222;
  line-height: 1.5;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  z-index: 100;
  position: sticky;
  top: 0;
}
header.mdc-top-app-bar {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  left: 0;
  right: 0;
  box-sizing: border-box;
}
@media (min-width: 900px) {
  header.mdc-top-app-bar {
    max-width: 1254px;
  }
}
.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  z-index: 2;
}
.logo-img {
  height: 2.5rem;
  width: 2.5rem;
  margin-right: 0.75rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
nav {
  display: flex;
  gap: 1.5rem;
}
nav a {
  color: #222;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 0.5rem;
  padding: 0.25em 0.75em;
  transition: background 0.15s;
}
nav a:hover {
  background: #f0fdfa;
  color: #0f766e;
}
.mdc-top-app-bar .logo {
  font-size: 1.5rem;
}
.site-title-centered {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f766e;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}
@media (max-width: 600px) {
  .mdc-top-app-bar .logo {
    font-size: 1rem;
  }
  .mdc-top-app-bar #main-nav a {
    font-size: 0.9rem;
  }
  .site-title-centered {
    font-size: 1rem;
  }
}

/* Main */
main {
  padding: 2rem 0.5rem 1.5rem 0.5rem;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
@media (max-width: 600px) {
  main {
    padding: 1rem 1rem 1rem 1rem;
  }
}

/* Intro Section */
.intro {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1.5px 8px rgba(0,0,0,0.07);
  padding: 2rem 2.5rem;
  margin-bottom: 0.5rem;
}
.intro h1 {
  text-align: center;
  color: #0f766e;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  font-family: var(--crimson-font) !important;

}
.intro {
  font-size: 1.5rem;
  color: #374151;
  font-family: var(--crimson-font) !important;

}
.intro-logo {
  width: 160px;
  height: auto;
  max-width: 100%;
}
@media (max-width: 600px) {
  .intro h1 {
    font-size: 2rem;
  }
  .intro-logo {
    width: 100px;
  }
}

/* Action Grid */
.card-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(2, 1fr);
}
.mdc-card.card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  position: relative;
  min-height: 120px;
  aspect-ratio: 1 / 1;
  border-radius: 0.75rem;
  font-size: 1rem;
  padding: 0;
  box-shadow: 0 1.5px 4px rgba(0,0,0,0.12), 0 1.5px 8px rgba(0,0,0,0.08);
  background: var(--bg, #fff);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.18s;
}
.mdc-card.card:hover, .mdc-card.card:focus {
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
  transform: translateY(-2px) scale(1.03);
}
.card-dock-label {
  display: block;
  width: 100%;
  background: rgba(15, 118, 110, 0.92); /* Material accent, semi-transparent */
  color: #0f766e;
  font-size: 1.08rem;
  font-weight: 600;
  text-align: center;
  padding: 0.7em 0.5em 0.6em 0.5em;
  border-radius: 0 0 0.75rem 0.75rem;
  letter-spacing: 0.01em;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
  z-index: 2;
  margin-top: auto;
  position: relative;
}
@media (min-width: 900px) {
  .mdc-card.card {
    min-height: 140px;
    font-size: 1.08rem;
  }
  .card-dock-label {
    font-size: 1.12rem;
    padding: 0.8em 0.5em 0.7em 0.5em;
  }
}

/* Specific background images for new card IDs */
.card#about {
  background: #f0fdfa;
  position: relative;
  overflow: hidden;
}
.card#about::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('images/cts-logo.webp') center/90% no-repeat;
  opacity: 1;
  z-index: 0;
}
.card#about .card-dock-label {
  position: relative;
  z-index: 1;
  background: rgba(15, 118, 110, 0.92);
}
.card#trustees { background: url('https://images.pexels.com/photos/3184394/pexels-photo-3184394.jpeg?auto=compress&w=400&h=400&fit=crop') center/cover no-repeat; }
.card#membership { background: url('https://images.pexels.com/photos/461382/pexels-photo-461382.jpeg?auto=compress&w=400&h=400&fit=crop') center/cover no-repeat; }
.card#events { background: url('https://images.pexels.com/photos/1763075/pexels-photo-1763075.jpeg?auto=compress&w=400&h=400&fit=crop') center/cover no-repeat; }
.card#newsletters { background: url('https://images.pexels.com/photos/209948/pexels-photo-209948.jpeg?auto=compress&w=400&h=400&fit=crop') center/cover no-repeat; }
.card#contact { background: url('https://images.pexels.com/photos/1643383/pexels-photo-1643383.jpeg?auto=compress&w=400&h=400&fit=crop') center/cover no-repeat; }
.card#tamil-school { background: url('https://images.pexels.com/photos/301926/pexels-photo-301926.jpeg?auto=compress&w=400&h=400&fit=crop') center/cover no-repeat; }
.card#sports-clubs { background: url('https://images.pexels.com/photos/399187/pexels-photo-399187.jpeg?auto=compress&w=400&h=400&fit=crop') center/cover no-repeat; }

/* Notice */
.notice {
  background: #fef3c7;
  color: #92400e;
  padding: 0.9rem 1.2rem;
  border-radius: 0.75rem;
  font-weight: 500;
  grid-column: 1/-1;
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* Messages Section */
.messages {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1.5px 8px rgba(0,0,0,0.07);
  padding: 2rem 2.5rem;
}
.messages h2 {
  font-size: 1.35rem;
  margin-bottom: 1.1rem;
  font-weight: 700;
  color: #0f766e;
}
.messages article {
  margin-bottom: 1.25rem;
  background: #e0f2fe;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.messages article h3 {
  font-size: 1.08rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: #0f172a;
}
.messages article p {
  color: #64748b;
  font-size: 1.01rem;
}

/* Mobile Quick Actions */
footer.mobile-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 0.5rem 0;
  box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
}
footer.mobile-actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.85rem;
  color: #0f172a;
  text-decoration: none;
}
footer.mobile-actions a span {
  font-size: 1.35rem;
}
@media (min-width: 768px) {
  main {
    padding: 2.5rem 3rem;
  }
  footer.mobile-actions {
    display: none;
  }
}

/* Hamburger styles - improved */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  z-index: 200;
  background: none;
  border: none;
  margin-left: 0.5rem;
  transition: background 0.2s;
  border-radius: 50%;
}
.hamburger:focus {
  outline: 2px solid var(--accent);
  background: #e0f2fe;
}
.hamburger span {
  display: block;
  height: 4px;
  width: 28px;
  background: var(--fg);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
@media (max-width: 767px) {
  nav {
    display: none;
    position: absolute;
    top: 3.5rem;
    right: 1rem;
    flex-direction: column;
    gap: 0;
    border-radius: 0.5rem;
    min-width: 150px;
    padding: 0.5rem 0;
  }
  nav.open {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
}

/* Always show hamburger, hide nav menu, and ensure hamburger is clickable on desktop */
nav#main-nav {
  display: none !important;
}
.hamburger {
  display: flex !important;
  z-index: 300;
  background: none;
  border: none;
  cursor: pointer;
}
.mdc-top-app-bar {
  position: relative;
}

/* Ensure drawer overlays content on desktop */
.mdc-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 340px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 1.5px 0 #e0e3e7;
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  padding-top: 1.5rem;
  outline: none;
}
.mdc-drawer.open {
  display: flex;
  transform: translateX(0);
}
.drawer-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #64748b;
  align-self: flex-end;
  margin: 0 1rem 1rem 0;
  cursor: pointer;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  transition: background 0.15s;
}
.drawer-close:focus, .drawer-close:hover {
  background: #e0f2fe;
  color: #0f766e;
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 1.5rem;
}
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #0f172a;
  text-decoration: none;
  font-size: 1.13rem;
  font-weight: 500;
  border-radius: 0.5rem;
  padding: 0.7em 1em 0.7em 0.7em;
  transition: background 0.15s, color 0.15s;
  min-height: 48px;
  letter-spacing: 0.01em;
}
.drawer-nav a:hover, .drawer-nav a:focus {
  background: #f0fdfa;
  color: #0f766e;
  outline: none;
}
.drawer-icon {
  font-size: 1.35em;
  width: 1.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.drawer-label {
  flex: 1;
  text-align: left;
  font-size: 1em;
  font-weight: 500;
}
.drawer-scrim {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30,41,59,0.18);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.drawer-scrim.open {
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 768px) {
  .mdc-drawer {
    display: flex;
  }
}

/* Use Crimson Text for card text */
.mdc-card, .card-dock-label {
  font-family: var(--crimson-font) !important;
  font-weight: 400;
  font-size: 1.5rem;
}

/* Crimson Text for site title and welcome text */
.site-title-centered{
  font-family: Roboto, system-ui, sans-serif !important;
}

.welcome-text, .mdc-card, .card-dock-label, .intro h1, .intro p {
  font-family: var(--crimson-font) !important;
  font-weight: 400;
}

/* Fix card text color and remove underline */
.mdc-card, .mdc-card.card, .card-dock-label {
  color: #0f172a !important;
  text-decoration: none !important;
}
.mdc-card.card:visited, .mdc-card.card:active, .mdc-card.card:focus {
  color: #0f172a !important;
  text-decoration: none !important;
}
.card-dock-label {
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
