/* ============================================
   Antiquity Lodge #571 — Shared Stylesheet
   Light & Clean with Navy + Gold accents
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --navy:       #1b2a4a;
  --navy-light: #2c3e6b;
  --gold:       #c5a55a;
  --gold-light: #ddc88e;
  --gold-dark:  #a88b3d;
  --bg:         #f9f8f5;
  --bg-white:   #ffffff;
  --text:       #333333;
  --text-light: #666666;
  --border:     #e0ddd6;
  --shadow:     0 2px 20px rgba(0,0,0,0.06);
  --radius:     8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy);
  line-height: 1.3;
}

a { color: var(--navy-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-dark); }

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

/* --- Utility --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.gold-rule {
  width: 60px; height: 3px;
  background: var(--gold);
  border: none;
  margin: 16px auto 24px;
}

/* --- Top Bar --- */
.top-bar {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  padding: 6px 0;
  text-align: center;
  letter-spacing: 0.5px;
}
.top-bar strong { color: var(--gold-light); }

/* --- Header --- */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-group img {
  height: 50px;
  width: auto;
}
.logo-text h1 {
  font-size: 1.25rem;
  margin: 0;
  letter-spacing: 0.5px;
}
.logo-text .motto {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

/* --- Navigation --- */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
}
.main-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav a.active {
  background: var(--navy);
  color: #fff;
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: 0.3s;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 80px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30z' fill='none' stroke='rgba(197,165,90,0.06)' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero h1,
.hero h2 {
  font-size: 2.6rem;
  color: #fff !important;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.hero .subtitle {
  font-size: 1.1rem;
  color: var(--gold-light);
  font-weight: 300;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.hero .tagline {
  font-size: 0.95rem;
  opacity: 0.7;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 48px 0 40px;
  text-align: center;
  position: relative;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30z' fill='none' stroke='rgba(197,165,90,0.06)' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.page-hero h1,
.page-hero h2 {
  font-size: 2rem;
  color: #fff !important;
  position: relative;
  z-index: 1;
}
.page-hero p {
  color: var(--gold-light);
  font-size: 0.95rem;
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

/* --- Content Sections --- */
.content-section {
  padding: 56px 0;
}
.content-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 48px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}
.content-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.content-card p {
  margin-bottom: 16px;
  color: var(--text-light);
}
.content-card p:last-child { margin-bottom: 0; }

/* --- Quick Info Cards (Home) --- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.info-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.info-card .icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
}
.info-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.info-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* --- Officers Table --- */
.officers-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.officers-table thead th {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.officers-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.officers-table thead th:last-child { border-radius: 0 var(--radius) 0 0; }
.officers-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.officers-table tbody tr:nth-child(even) { background: rgba(27,42,74,0.02); }
.officers-table tbody tr:hover { background: rgba(197,165,90,0.06); }
.officers-table a { color: var(--navy-light); font-weight: 500; }
.officers-table a:hover { color: var(--gold-dark); }

/* --- Events --- */
.event-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 36px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
}
.event-card h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.event-card .event-meta {
  font-size: 0.85rem;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.event-card p {
  color: var(--text-light);
  line-height: 1.7;
}

/* --- Media Section --- */
.media-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.media-item h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.media-item p {
  color: var(--text-light);
  margin-bottom: 12px;
}

/* --- Links Page --- */
.link-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}
.link-card .link-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.link-card h3 {
  font-size: 1.05rem;
  margin-bottom: 2px;
}
.link-card p {
  font-size: 0.88rem;
  color: var(--text-light);
}
.link-card a {
  color: var(--gold-dark);
  font-weight: 500;
}

/* --- Contact Form --- */
.contact-form { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--navy);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197,165,90,0.15);
}
.form-group textarea { resize: vertical; min-height: 140px; }

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--navy);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.3px;
}
.btn:hover { background: var(--navy-light); color: #fff; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); color: #fff; }

/* --- Footer --- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 40px 0 24px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.footer-col h4 {
  color: var(--gold-light);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}
.footer-col p, .footer-col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
}
.footer-col a:hover { color: var(--gold-light); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 4px; }

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
.footer-bottom p { color: rgba(255,255,255,0.4); }

/* --- Button Group (for stacking on mobile) --- */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .info-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 768px) {
  /* --- Mobile Nav --- */
  .mobile-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 12px 0;
    z-index: 200;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 0 16px; }
  .main-nav a { padding: 10px 16px; }
  .header-inner { position: relative; }

  /* --- Header logo scales down --- */
  .logo-group img { height: 40px; }

  /* --- Hero --- */
  .hero { padding: 48px 0 40px; }
  .hero h1, .hero h2 { font-size: 1.6rem; }
  .hero .subtitle { font-size: 0.95rem; }
  .page-hero { padding: 32px 0 28px; }
  .page-hero h1, .page-hero h2 { font-size: 1.5rem; }

  /* --- Content --- */
  .content-section { padding: 36px 0; }
  .content-card { padding: 24px 20px; }

  /* --- Buttons: full-width stacked on mobile --- */
  .btn-group {
    flex-direction: column;
  }
  .btn-group .btn {
    width: 100%;
    text-align: center;
  }

  /* --- Officers Table: horizontal scroll wrapper --- */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    padding: 0 20px;
  }
  .officers-table {
    min-width: 520px;
    font-size: 0.82rem;
  }
  .officers-table thead th,
  .officers-table tbody td {
    padding: 10px 12px;
    white-space: nowrap;
  }
  .officers-table tbody td:last-child {
    word-break: break-all;
    white-space: normal;
    max-width: 180px;
  }

  /* --- Info Grid: always single column on mobile --- */
  .info-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .info-card {
    padding: 24px 20px;
  }
  /* Prevent email overflow in info cards */
  .info-card a,
  .info-card p {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* --- Event Cards --- */
  .event-card { padding: 24px 20px; }

  /* --- Link Cards --- */
  .link-card { padding: 20px 16px; gap: 14px; }
  .link-card .link-icon { font-size: 1.6rem; }

  /* --- Media Items --- */
  .media-item { padding: 22px 20px; }

  /* --- Contact Form --- */
  .contact-form { max-width: 100%; }
  .form-group input,
  .form-group textarea {
    padding: 10px 14px;
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  /* --- Footer --- */
  .footer-inner { gap: 24px; }
  .footer-col p,
  .footer-col a {
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* --- Extra small screens --- */
@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .hero h1, .hero h2 { font-size: 1.35rem; }
  .content-card { padding: 20px 16px; }
  .officers-table { min-width: 440px; font-size: 0.78rem; }
  .officers-table thead th,
  .officers-table tbody td { padding: 8px 8px; }
}
