/*
Theme Name: Hartford St. Patrick's Day Parade
Theme URI: https://www.irishamericanparade.com
Author: Central Connecticut Celtic Cultural Committee
Author URI: https://www.irishamericanparade.com
Description: Modern, dynamic WordPress theme built specifically for the Greater Hartford St. Patrick's Day Parade. Features 100% visual editing via native WordPress Blocks and Customizer, a live parade countdown, Past Parade Photo Gallery with Lightbox, dedicated Sponsors showcase, and automatic starter content setup.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: hartford-parade
*/

:root {
  --hp-emerald-900: #052919;
  --hp-emerald-800: #073b25;
  --hp-emerald-700: #0b5d3b;
  --hp-emerald-600: #117a4e;
  --hp-emerald-50:  #eef8f3;
  --hp-gold-500:    #d4af37;
  --hp-gold-400:    #e3c152;
  --hp-gold-100:    #fcf6df;
  --hp-cream:       #f8faf8;
  --hp-white:       #ffffff;
  --hp-slate-900:   #0f172a;
  --hp-slate-700:   #334155;
  --hp-slate-500:   #64748b;
  --hp-border:      #dce5df;
  --hp-radius:      14px;
  --hp-shadow:      0 10px 28px rgba(5, 41, 25, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--hp-slate-900);
  background-color: var(--hp-cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--hp-emerald-700);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--hp-emerald-900);
}

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

.hp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hp-alert-bar {
  background: var(--hp-gold-500);
  color: var(--hp-emerald-900);
  text-align: center;
  padding: 0.55rem 1rem;
  font-weight: 700;
  font-size: 0.92rem;
}

/* Header & Navigation */
.hp-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--hp-emerald-900);
  border-bottom: 3px solid var(--hp-gold-500);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.hp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: 0.5rem 0;
}

.hp-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--hp-white);
}

.hp-brand:hover {
  color: var(--hp-gold-400);
}

.hp-brand-crest {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hp-emerald-700), var(--hp-emerald-800));
  border: 2px solid var(--hp-gold-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.hp-brand-text {
  display: flex;
  flex-direction: column;
}

.hp-brand-title {
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hp-brand-sub {
  font-size: 0.76rem;
  color: #b7e4c7;
  font-weight: 500;
}

.hp-custom-logo img {
  max-height: 52px;
  width: auto;
}

.hp-menu-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--hp-gold-500);
  color: var(--hp-white);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.hp-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
}

.hp-nav a {
  display: inline-block;
  padding: 0.5rem 0.72rem;
  color: #ecfdf5;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.hp-nav a:hover,
.hp-nav .current-menu-item > a {
  background: rgba(212, 175, 55, 0.18);
  color: var(--hp-gold-400);
}

.hp-nav li.menu-item a[href*="become-a-sponsor"] {
  background: var(--hp-gold-500);
  color: var(--hp-emerald-900);
  font-weight: 800;
  margin-left: 0.25rem;
}

.hp-nav li.menu-item a[href*="become-a-sponsor"]:hover {
  background: var(--hp-gold-400);
  color: var(--hp-emerald-900);
}

@media (max-width: 1024px) {
  .hp-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
  .hp-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--hp-emerald-900);
    border-bottom: 3px solid var(--hp-gold-500);
    padding: 1rem 1.25rem;
  }
  .hp-nav.is-open {
    display: block;
  }
  .hp-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .hp-nav a {
    display: block;
    padding: 0.65rem 0.85rem;
  }
}

/* Front Page Dynamic Hero */
.hp-hero {
  position: relative;
  background: radial-gradient(circle at top right, #136f47 0%, var(--hp-emerald-800) 55%, var(--hp-emerald-900) 100%);
  color: var(--hp-white);
  padding: 4.25rem 0 3.75rem;
  border-bottom: 4px solid var(--hp-gold-500);
  overflow: hidden;
}

.hp-hero-inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.hp-eyebrow {
  display: inline-block;
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid var(--hp-gold-500);
  color: var(--hp-gold-400);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  padding: 0.38rem 0.95rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hp-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4.5vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hp-hero-date {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  color: #e2f5ea;
  font-weight: 600;
  margin: 0 0 1.85rem;
}

/* Countdown Timer */
.hp-countdown {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 0 auto 2rem;
}

.hp-cd-box {
  background: rgba(5, 41, 25, 0.72);
  border: 2px solid rgba(212, 175, 55, 0.65);
  border-radius: 12px;
  min-width: 92px;
  padding: 0.75rem 0.9rem;
  backdrop-filter: blur(4px);
}

.hp-cd-num {
  display: block;
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--hp-white);
}

.hp-cd-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hp-gold-400);
  margin-top: 0.2rem;
}

.hp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.45rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hp-btn:hover {
  transform: translateY(-2px);
}

.hp-btn-gold {
  background: var(--hp-gold-500);
  color: var(--hp-emerald-900);
}

.hp-btn-gold:hover {
  background: var(--hp-gold-400);
  color: var(--hp-emerald-900);
}

.hp-btn-outline {
  border: 2px solid var(--hp-white);
  color: var(--hp-white);
  background: transparent;
}

.hp-btn-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--hp-white);
}

/* Interior Page Banner */
.hp-page-banner {
  background: linear-gradient(135deg, var(--hp-emerald-900), var(--hp-emerald-700));
  color: var(--hp-white);
  padding: 2.6rem 0;
  border-bottom: 3px solid var(--hp-gold-500);
}

.hp-page-banner h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.18;
}

/* Main Content & Block Styling */
.hp-main {
  padding: 2.75rem 0 4rem;
}

.entry-content {
  max-width: 980px;
  margin: 0 auto;
}

.entry-content > * + * {
  margin-top: 1.5rem;
}

.entry-content h2 {
  color: var(--hp-emerald-800);
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  border-left: 5px solid var(--hp-gold-500);
  padding-left: 0.8rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.entry-content h3 {
  color: var(--hp-emerald-900);
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Card utility classes usable inside Gutenberg Group/Column blocks */
.hp-card {
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-top: 4px solid var(--hp-emerald-700);
  border-radius: var(--hp-radius);
  padding: 1.5rem;
  box-shadow: var(--hp-shadow);
  height: 100%;
}

.hp-card-gold {
  border-top-color: var(--hp-gold-500);
}

.hp-callout {
  background: var(--hp-emerald-50);
  border: 1px solid #b7e4c7;
  border-left: 5px solid var(--hp-emerald-700);
  border-radius: var(--hp-radius);
  padding: 1.5rem 1.75rem;
}

/* Native WordPress Accordion / Details Blocks (FAQs) */
.wp-block-details {
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 3px 10px rgba(5, 41, 25, 0.04);
  transition: border-color 0.2s ease;
}

.wp-block-details[open] {
  border-color: var(--hp-emerald-700);
  border-left: 4px solid var(--hp-gold-500);
}

.wp-block-details summary {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--hp-emerald-900);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wp-block-details summary::-webkit-details-marker {
  display: none;
}

.wp-block-details summary::after {
  content: "+";
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--hp-emerald-700);
  flex-shrink: 0;
}

.wp-block-details[open] summary::after {
  content: "−";
  color: var(--hp-gold-500);
}

.wp-block-details > *:not(summary) {
  margin-top: 0.85rem;
  color: var(--hp-slate-700);
}

/* Sponsor Cards Grid */
.hp-sponsor-card {
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--hp-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hp-sponsor-card:hover {
  transform: translateY(-4px);
  border-color: var(--hp-gold-500);
}

.hp-sponsor-card .wp-block-image {
  margin: 0 auto 0.85rem;
}

.hp-sponsor-card .wp-block-image img {
  border-radius: 10px;
  max-height: 150px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* Past Parade Photo Gallery & Lightbox */
.wp-block-gallery .wp-block-image img {
  border-radius: 12px;
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 18px rgba(5, 41, 25, 0.1);
}

.wp-block-gallery .wp-block-image img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 26px rgba(5, 41, 25, 0.18);
}

.hp-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 22, 14, 0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.hp-lightbox.is-active {
  display: flex;
}

.hp-lightbox-content {
  max-width: 960px;
  width: 100%;
  text-align: center;
  position: relative;
}

.hp-lightbox-content img {
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 10px;
  border: 2px solid var(--hp-gold-500);
}

.hp-lightbox-caption {
  color: var(--hp-white);
  margin-top: 0.85rem;
  font-size: 1rem;
  font-weight: 600;
}

.hp-lightbox-close,
.hp-lightbox-prev,
.hp-lightbox-next {
  position: absolute;
  background: var(--hp-gold-500);
  color: var(--hp-emerald-900);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
}

.hp-lightbox-close {
  top: -52px;
  right: 0;
}

.hp-lightbox-prev {
  top: 45%;
  left: -12px;
}

.hp-lightbox-next {
  top: 45%;
  right: -12px;
}

/* WordPress Buttons */
.wp-block-button__link {
  background-color: var(--hp-emerald-700) !important;
  color: var(--hp-white) !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  padding: 0.75rem 1.45rem !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.wp-block-button__link:hover {
  background-color: var(--hp-emerald-900) !important;
  transform: translateY(-1px);
}

.is-style-gold-btn .wp-block-button__link {
  background-color: var(--hp-gold-500) !important;
  color: var(--hp-emerald-900) !important;
}

/* Footer */
.hp-footer {
  background: var(--hp-emerald-900);
  color: #d1fae5;
  border-top: 4px solid var(--hp-gold-500);
  padding: 3.25rem 0 2rem;
  font-size: 0.94rem;
}

.hp-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2.25rem;
}

.hp-footer h3 {
  color: var(--hp-gold-400);
  margin: 0 0 0.85rem;
  font-size: 1.08rem;
}

.hp-footer a {
  color: var(--hp-white);
  text-decoration: none;
}

.hp-footer a:hover {
  color: var(--hp-gold-400);
  text-decoration: underline;
}

.hp-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hp-footer ul li + li {
  margin-top: 0.45rem;
}

.hp-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1.35rem;
  text-align: center;
  color: #a7f3d0;
  font-size: 0.86rem;
}

@media print {
  .hp-header, .hp-footer, .hp-hero-actions, .hp-countdown, .hp-alert-bar {
    display: none !important;
  }
  body {
    background: #ffffff;
  }
}
