/* UA Cooperative Extension Brand Theme
   Exact match to extension.arizona.edu design system
   -------------------------------------------------------
   Arizona Navy (primary):   #0C234B  — header, nav, footer, section headers
   Arizona Red (accent):     #AB0520  — utility bar, buttons, accents, CTAs
   Deep Navy:                #001C48  — footer bg, dark overlays
   Mid Blue:                 #1E5288  — links, secondary elements
   Warm Off-White:           #F4EDE5  — page background
   Light Gray:               #E2E9EB  — borders, dividers
   Body Text:                #1a1a1a  — main readable text
   White:                    #FFFFFF  — text on dark backgrounds
   -------------------------------------------------------
   Fonts: 'Nunito Sans' (Proxima Nova web equivalent) + 'Source Sans 3' (body)
*/

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

:root {
  --ua-navy:       #0C234B;
  --ua-red:        #AB0520;
  --ua-red-hover:  #8B0015;
  --ua-deep-navy:  #001C48;
  --ua-mid-blue:   #1E5288;
  --ua-warm-white: #F4EDE5;
  --ua-light-gray: #E2E9EB;
  --ua-white:      #FFFFFF;
  --body-text:     #1a1a1a;
  --text-muted:    #555555;
  --font-display:  'Nunito Sans', 'Arial', sans-serif;
  --font-body:     'Source Sans 3', 'Arial', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--ua-warm-white);
  color: var(--body-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* UTILITY BAR — thin red top bar matching UA Extension */
.utility-bar {
  background: var(--ua-red);
  padding: 0.4rem 2rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.utility-bar a {
  color: var(--ua-white);
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.utility-bar a:hover { opacity: 1; text-decoration: underline; }

/* NAV — white background, navy text, matching UA Extension header */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ua-white);
  border-bottom: 1px solid var(--ua-light-gray);
  box-shadow: 0 1px 4px rgba(12,35,75,0.08);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}
.nav-logo-mg {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}
.nav-logo-ua {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}
.nav-logo-divider {
  width: 1px;
  height: 40px;
  background: var(--ua-light-gray);
  flex-shrink: 0;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-link {
  color: var(--ua-navy);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--ua-red); }

.btn-share {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--ua-red);
  color: var(--ua-white);
  border: none;
  padding: 0.5rem 1.2rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 0;
}
.btn-share:hover { background: var(--ua-red-hover); }

/* HERO — full-width with navy overlay, white text */
.hero {
  position: relative;
  height: 70vh;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12, 35, 75, 0.90) 0%,
    rgba(12, 35, 75, 0.55) 45%,
    rgba(12, 35, 75, 0.15) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
  animation: heroFadeUp 0.8s ease-out both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.75rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--ua-white);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin-bottom: 1.8rem;
  font-weight: 400;
  line-height: 1.65;
}
.hero-cta {
  display: inline-block;
  background: var(--ua-red);
  border: none;
  color: var(--ua-white);
  padding: 0.75rem 1.8rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
  border-radius: 0;
}
.hero-cta:hover { background: var(--ua-red-hover); }

/* INTRO — white background, navy headings, matching UA content sections */
.intro {
  padding: 4rem 2rem 3rem;
  background: var(--ua-white);
  border-top: 4px solid var(--ua-red);
}
.intro-inner {
  max-width: 800px;
  margin: 0 auto;
}
.intro-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--body-text);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  font-weight: 400;
}
.intro-credit {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ua-light-gray);
}
.intro-thanks {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-left: 3px solid var(--ua-red);
  padding-left: 1rem;
  margin-top: 0.75rem;
}
.intro-credit a {
  color: var(--ua-mid-blue);
  text-decoration: none;
}
.intro-credit a:hover { text-decoration: underline; }

/* GALLERY BAR */
.gallery-bar {
  padding: 1.5rem 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.gallery-count {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ua-navy);
  white-space: nowrap;
}
.gallery-divider {
  flex: 1;
  height: 1px;
  background: var(--ua-light-gray);
}

/* MASONRY GALLERY — on warm white background */
.gallery-wrap {
  padding: 1.5rem 1.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--ua-warm-white);
}
.masonry {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.masonry-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.masonry-item {
  overflow: hidden;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  width: 100%;
}
.masonry-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.masonry-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}
.masonry-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
  pointer-events: none;
}
.masonry-item:hover img {
  transform: scale(1.04);
}
.masonry-item:hover::after {
  border-color: var(--ua-red);
}

/* SEDONA BAND — navy background matching UA Extension event sections */
.sedona-band {
  background: var(--ua-navy);
  border-top: 4px solid var(--ua-red);
  padding: 5rem 2rem;
}
.sedona-inner {
  max-width: 800px;
  margin: 0 auto;
}
.sedona-eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.75rem;
}
.sedona-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--ua-white);
  margin-bottom: 1.2rem;
  line-height: 1.1;
}
.sedona-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-weight: 400;
}
.sedona-ticket-note {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
  margin-bottom: 1.8rem;
}
.sedona-ticket-note strong {
  color: var(--ua-white);
}
.sedona-btn {
  display: inline-block;
  background: var(--ua-red);
  color: var(--ua-white);
  padding: 0.8rem 2rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
  border-radius: 0;
}
.sedona-btn:hover { background: var(--ua-red-hover); }

/* SHARE SECTION — light gray background */
.share-section {
  padding: 3.5rem 2rem;
  background: var(--ua-light-gray);
  border-top: 1px solid #cdd5d8;
}
.share-inner {
  max-width: 800px;
  margin: 0 auto;
}
.share-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ua-navy);
  margin-bottom: 1.2rem;
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  background: transparent;
  border-radius: 0;
}
.share-fb  { border-color: var(--ua-navy); color: var(--ua-navy); }
.share-fb:hover  { background: var(--ua-navy); color: var(--ua-white); }
.share-ig  { border-color: var(--ua-navy); color: var(--ua-navy); }
.share-ig:hover  { background: var(--ua-navy); color: var(--ua-white); }
.share-copy { border-color: var(--ua-navy); color: var(--ua-navy); }
.share-copy:hover { background: var(--ua-navy); color: var(--ua-white); }

/* FOOTER — deep navy, white text, logos prominent */
.footer {
  background: var(--ua-deep-navy);
  padding: 3rem 2rem 2rem;
  border-top: 4px solid var(--ua-red);
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  background: var(--ua-white);
  padding: 1rem 1.5rem;
  border-radius: 0;
  width: fit-content;
}
.footer-logo-mg {
  height: 56px;
  width: auto;
  object-fit: contain;
}
.footer-logo-divider {
  width: 1px;
  height: 48px;
  background: var(--ua-light-gray);
  margin: 0 1.2rem;
  flex-shrink: 0;
}
.footer-logo-ua {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: none;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-links a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--ua-white); }
.footer-credit {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}
.footer-credit strong {
  color: rgba(255,255,255,0.85);
}

/* Hidden SEO links — visible to crawlers, invisible to users */
.seo-links {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* LIGHTBOX */
.lightbox-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 20, 51, 0.97);
  z-index: 200;
}
.lightbox-backdrop.active { display: block; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
.lb-img-wrap {
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
}
.lb-close {
  position: fixed;
  top: 1.2rem; right: 1.5rem;
  background: none;
  border: none;
  color: var(--ua-white);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 202;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lb-close:hover { opacity: 1; }
.lb-prev, .lb-next {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: rgba(12, 35, 75, 0.85);
  border: 1px solid rgba(171, 5, 32, 0.5);
  color: var(--ua-white);
  font-size: 2.5rem;
  line-height: 1;
  width: 3rem;
  height: 5rem;
  cursor: pointer;
  z-index: 202;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-prev:hover, .lb-next:hover { background: var(--ua-red); border-color: var(--ua-red); }
.lb-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ua-red);
  color: var(--ua-white);
  padding: 0.6rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 300;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-content { padding: 2rem 1.5rem; }
  .masonry-col:nth-child(3) { display: none; }
}
@media (max-width: 580px) {
  .utility-bar { display: none; }
  .nav-inner { padding: 0.65rem 1rem; }
  .nav-logo-mg { height: 38px; }
  .nav-logo-ua { height: 32px; }
  .hero-content { padding: 2rem 1.2rem; }
  .masonry-col:nth-child(2), .masonry-col:nth-child(3) { display: none; }
  .share-buttons { flex-direction: column; }
  .footer-links { flex-direction: column; gap: 0.8rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .masonry-item { opacity: 1; transform: none; }
}

/* PHOTO PROTECTION */
/* Prevent image selection and dragging */
.masonry-item img,
.lb-img {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  pointer-events: none;
}

/* Transparent overlay on each masonry item to block direct image interaction */
.masonry-item::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

/* Copyright watermark — appears on hover over gallery items */
.masonry-item .photo-copyright {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(12,35,75,0.75) 0%, transparent 100%);
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 1.2rem 0.6rem 0.4rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 3;
  text-align: right;
}
.masonry-item:hover .photo-copyright {
  opacity: 1;
}

/* Copyright notice in lightbox */
.lb-copyright {
  position: fixed;
  bottom: 3.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  pointer-events: none;
  z-index: 202;
}

/* Gallery copyright bar */
.gallery-copyright {
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding: 0 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
