/* TriCitiesTNGuide.com — site.css
   Design spec: spec_v2 visual design section
   Colors: #2e6b4f (brand green), #b8860b (gold/accent),
           #1a3a5c (stats blue), #1a1a2e (dark), #f4f6f8 (light gray) */

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

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a2e;
  background: #fff;
}

a { color: #2e6b4f; text-decoration: none; }
a:hover { text-decoration: underline; color: #1d4a34; }

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

/* -------------------------------------------------------
   Layout
------------------------------------------------------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section { padding: 2.5rem 0; }
.section + .section { border-top: 1px solid #e8eaed; }

/* -------------------------------------------------------
   Header & Nav
------------------------------------------------------- */
.site-header {
  background: #2e6b4f;
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 80px;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; color: #fff; }
.site-logo span { color: #b8860b; }

.site-tagline {
  font-size: 0.8rem;
  opacity: 0.8;
  display: none;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-nav a {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: background 0.15s;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,0.15); text-decoration: none; color: #fff; }
.site-nav a.active { background: rgba(255,255,255,0.2); color: #fff; }

.btn-nav-cta {
  background: #b8860b !important;
  color: #fff !important;
  font-weight: 600;
  padding: 0.4rem 1rem !important;
}
.btn-nav-cta:hover { background: #9a700a !important; }

/* -------------------------------------------------------
   Hero / Page Header
------------------------------------------------------- */
.page-hero {
  background: linear-gradient(135deg, #2e6b4f 0%, #1d4a34 100%);
  color: #fff;
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.page-hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.page-hero p  { font-size: 1.1rem; opacity: 0.9; }

/* -------------------------------------------------------
   Buttons
------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary   { background: #2e6b4f; color: #fff; }
.btn-primary:hover { background: #1d4a34; color: #fff; }

.btn-gold      { background: #b8860b; color: #fff; }
.btn-gold:hover { background: #9a700a; color: #fff; }

.btn-outline   { background: transparent; border: 2px solid #2e6b4f; color: #2e6b4f; }
.btn-outline:hover { background: #2e6b4f; color: #fff; }

.btn-danger    { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a93226; color: #fff; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; }

/* -------------------------------------------------------
   Event Cards
------------------------------------------------------- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.event-card {
  background: #fff;
  border: 1px solid #e0e4e8;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.event-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }

.event-card.featured {
  border: 2px solid #b8860b;
  box-shadow: 0 2px 8px rgba(184,134,11,0.15);
}

.event-card-img img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.event-card-img-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #f4f6f8, #e0e4e8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.event-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.event-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.3;
}
.event-card-title a { color: inherit; }
.event-card-title a:hover { color: #2e6b4f; text-decoration: none; }

.event-card-meta {
  font-size: 0.83rem;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.event-card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-featured  { background: #b8860b; color: #fff; }
.badge-category  { background: #f0f7f4; color: #2e6b4f; border: 1px solid #c8dfd6; }
.badge-city      { background: #f0f4f8; color: #1a3a5c; border: 1px solid #cad5e0; }
.badge-pending   { background: #fff3cd; color: #856404; }
.badge-published { background: #d4edda; color: #155724; }
.badge-rejected  { background: #f8d7da; color: #721c24; }

/* -------------------------------------------------------
   Section Headings
------------------------------------------------------- */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
}
.section-heading h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1a1a2e;
}
.section-heading h2 .accent { color: #2e6b4f; }
.section-heading a { font-size: 0.9rem; color: #2e6b4f; }

/* -------------------------------------------------------
   Category Grid
------------------------------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.category-card {
  background: #f4f6f8;
  border-radius: 6px;
  padding: 1.25rem 1rem;
  text-align: center;
  border: 1px solid #e0e4e8;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.category-card:hover {
  background: #2e6b4f;
  border-color: #2e6b4f;
  transform: translateY(-2px);
  text-decoration: none;
}
.category-card:hover .cat-name,
.category-card:hover .cat-count { color: #fff; }

.cat-icon  { font-size: 2rem; margin-bottom: 0.4rem; }
.cat-name  { font-size: 0.9rem; font-weight: 700; color: #1a1a2e; }
.cat-count { font-size: 0.8rem; color: #666; margin-top: 0.2rem; }

/* -------------------------------------------------------
   City Cards
------------------------------------------------------- */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.city-card {
  background: #fff;
  border: 1px solid #e0e4e8;
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
}
.city-card:hover {
  border-color: #2e6b4f;
  transform: translateY(-2px);
  text-decoration: none;
}
.city-card strong { display: block; font-size: 0.95rem; color: #1a1a2e; }
.city-card span   { font-size: 0.8rem; color: #666; }

/* -------------------------------------------------------
   Newsletter Signup
------------------------------------------------------- */
.newsletter-section {
  background: linear-gradient(135deg, #1a3a5c, #0d2440);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.newsletter-section h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.newsletter-section p  { opacity: 0.85; margin-bottom: 1.5rem; }

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 480px;
  margin: 0 auto;
}
.newsletter-form input[type=email] {
  flex: 1;
  min-width: 220px;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
}

/* -------------------------------------------------------
   Forms
------------------------------------------------------- */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; }

.form-control {
  display: block;
  width: 100%;
  padding: 0.6rem 0.9rem;
  font-size: 1rem;
  border: 1px solid #cdd0d4;
  border-radius: 6px;
  background: #fff;
  color: #1a1a2e;
  transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: #2e6b4f; box-shadow: 0 0 0 3px rgba(46,107,79,0.15); }

textarea.form-control { resize: vertical; min-height: 120px; }

.form-hint  { font-size: 0.82rem; color: #777; margin-top: 0.3rem; }
.form-error { font-size: 0.85rem; color: #c0392b; margin-top: 0.3rem; }

.alert {
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* -------------------------------------------------------
   Stat Cards (admin + business dashboards)
------------------------------------------------------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #fff;
  border: 1px solid #e0e4e8;
  border-top: 3px solid #2e6b4f;
  border-radius: 6px;
  padding: 1.25rem;
}
.stat-card.accent { border-top-color: #b8860b; }
.stat-card.blue   { border-top-color: #1a3a5c; }
.stat-card.alert  { border-top-color: #c0392b; }

.stat-card-label  { font-size: 0.8rem; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card-value  { font-size: 2rem; font-weight: 800; color: #1a1a2e; line-height: 1.2; margin: 0.25rem 0; }
.stat-card-sub    { font-size: 0.8rem; color: #888; }

/* -------------------------------------------------------
   Tables
------------------------------------------------------- */
.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  background: #1a3a5c;
  color: #fff;
  padding: 0.65rem 0.9rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.data-table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid #e8eaed;
  vertical-align: middle;
}
.data-table tr:nth-child(even) td { background: #f4f6f8; }
.data-table tr:hover td { background: #f0f7f4; }

/* -------------------------------------------------------
   Pagination
------------------------------------------------------- */
.pagination {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border: 1px solid #e0e4e8;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #2e6b4f;
}
.pagination a:hover { background: #2e6b4f; color: #fff; border-color: #2e6b4f; text-decoration: none; }
.pagination .current { background: #2e6b4f; color: #fff; border-color: #2e6b4f; }
.pagination .disabled { color: #ccc; cursor: default; }

/* -------------------------------------------------------
   Admin sidebar layout
------------------------------------------------------- */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 64px);
}

.admin-sidebar {
  background: #1a1a2e;
  color: #fff;
  padding: 1.5rem 0;
}
.admin-sidebar .sidebar-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  padding: 0.75rem 1.25rem 0.3rem;
}
.admin-sidebar a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  transition: background 0.15s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
}

.admin-content { padding: 2rem; background: #f4f6f8; }
.admin-content-header { margin-bottom: 1.5rem; }
.admin-content-header h1 { font-size: 1.5rem; font-weight: 800; }

/* -------------------------------------------------------
   Footer
------------------------------------------------------- */
.site-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0;
  margin-top: 3rem;
}
.site-footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
}
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.75rem; }
.site-footer a  { color: rgba(255,255,255,0.65); font-size: 0.88rem; display: block; margin-bottom: 0.4rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
}

/* -------------------------------------------------------
   Responsive — 768px breakpoint
------------------------------------------------------- */
@media (max-width: 768px) {
  .site-header .container { height: auto; flex-wrap: wrap; padding: 0.75rem 1rem; gap: 0.75rem; }
  .site-nav { margin-left: 0; width: 100%; gap: 0.15rem; }
  .site-nav a { padding: 0.35rem 0.6rem; font-size: 0.82rem; }

  .page-hero h1 { font-size: 1.6rem; }

  .events-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .city-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }

  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; } /* mobile: use a menu button in Phase 5 */

  .newsletter-form { flex-direction: column; }
  .newsletter-form input[type=email] { min-width: 0; }

  .site-footer .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stat-cards { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .city-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer .container { grid-template-columns: 1fr; }
}

