/* =====================================================
   Hawks Quarter Horses — Shared Stylesheet
   Import this in every page:
   <link rel="stylesheet" href="shared_styles.css" />
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@300;400;600&display=swap');

/* ─── Under Construction Banner ─────────────────────────── */
.wip-banner {
  background: repeating-linear-gradient(
    -45deg,
    #2c1505,
    #2c1505 10px,
    #1a0a02 10px,
    #1a0a02 20px
  );
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  padding: 9px 20px;
  border-bottom: 2px solid var(--gold);
}
.wip-banner span {
  background: var(--leather);
  padding: 4px 20px;
  display: inline-block;
}
.wip-banner a {
  color: var(--tan);
  text-decoration: none;
  border-bottom: 1px dotted var(--tan);
  margin-left: 16px;
  font-size: 0.65rem;
}
.wip-banner a:hover { color: var(--gold); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --leather:   #2c1505;
  --saddle:    #5c2d0a;
  --rust:      #8b3a0f;
  --copper:    #b5541e;
  --tan:       #c49a6c;
  --cream:     #f5e6c8;
  --parchment: #fdf4e3;
  --red:       #8b1010;
  --gold:      #c9a227;
  --white:     #fff9f0;
}

body {
  font-family: 'Source Sans 3', sans-serif;
  background-color: var(--parchment);
  color: var(--leather);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 800px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%235c2d0a' stroke-width='1.5' opacity='0.12'%3E%3Cellipse cx='80' cy='130' rx='35' ry='22' /%3E%3Cellipse cx='80' cy='130' rx='28' ry='16' /%3E%3Cpath d='M115 130 C130 128 148 118 160 105' stroke-width='4'/%3E%3Cpath d='M115 133 C130 133 150 125 162 112' stroke-width='2'/%3E%3Ccircle cx='165' cy='108' r='18' stroke-width='2'/%3E%3Ccircle cx='165' cy='108' r='4'/%3E%3Cline x1='165' y1='86' x2='165' y2='78'/%3E%3Cline x1='165' y1='130' x2='165' y2='138'/%3E%3Cline x1='143' y1='108' x2='135' y2='108'/%3E%3Cline x1='187' y1='108' x2='195' y2='108'/%3E%3Cline x1='149' y1='92' x2='143' y2='86'/%3E%3Cline x1='181' y1='124' x2='187' y2='130'/%3E%3Cline x1='181' y1='92' x2='187' y2='86'/%3E%3Cline x1='149' y1='124' x2='143' y2='130'/%3E%3Ccircle cx='56' cy='118' r='3'/%3E%3Ccircle cx='56' cy='130' r='3'/%3E%3Ccircle cx='56' cy='142' r='3'/%3E%3Cpath d='M50 108 L50 152' stroke-width='3'/%3E%3Cpath d='M45 108 C45 102 115 102 115 108 L115 152 C115 158 45 158 45 152 Z' stroke-width='1.5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

/* Top Bar */
.top-bar {
  background: var(--leather);
  color: var(--tan);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 6px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: var(--gold); text-decoration: none; }
.top-bar a:hover { text-decoration: underline; }

/* Header */
header {
  background: linear-gradient(135deg, var(--leather) 0%, var(--saddle) 60%, var(--rust) 100%);
  padding: 36px 40px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 4px solid var(--gold);
  position: relative;
  overflow: hidden;
}
header::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 40%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='160' viewBox='0 0 400 160'%3E%3Cpath d='M0 160 Q100 20 200 80 Q300 140 400 30 L400 160 Z' fill='%23ffffff08'/%3E%3C/svg%3E") no-repeat right bottom;
  pointer-events: none;
}
.brand h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--cream);
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 2px 3px 8px rgba(0,0,0,0.5);
}
.brand .aka {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--tan);
  margin-top: 4px;
  letter-spacing: 0.06em;
}
.brand .tagline {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 10px;
  border-top: 1px solid rgba(201,162,39,0.3);
  padding-top: 8px;
  display: inline-block;
}
.header-contact { text-align: right; color: var(--cream); font-size: 0.85rem; line-height: 1.8; }
.header-contact strong { display: block; font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.15em; color: var(--gold); margin-bottom: 2px; }
.header-contact a { color: var(--tan); text-decoration: none; }

/* Nav */
nav {
  background: var(--saddle);
  border-bottom: 3px solid var(--copper);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
nav ul { list-style: none; display: flex; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
nav > ul > li { position: relative; }
nav > ul > li > a {
  display: block; padding: 16px 22px;
  color: var(--cream); text-decoration: none;
  font-family: 'Cinzel', serif; font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
nav > ul > li > a:hover,
nav > ul > li > a.active { background: var(--rust); color: var(--gold); }
nav ul ul {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--leather); border: 1px solid var(--copper);
  border-top: 3px solid var(--gold); min-width: 220px;
  box-shadow: 4px 6px 16px rgba(0,0,0,0.5);
  flex-direction: column; padding: 8px 0;
}
nav ul li:hover > ul { display: flex; }
nav ul ul li a {
  display: block; padding: 10px 20px; color: var(--tan);
  text-decoration: none; font-size: 0.82rem; letter-spacing: 0.05em;
  transition: background 0.15s, color 0.15s;
}
nav ul ul li a:hover { background: var(--saddle); color: var(--gold); padding-left: 28px; }
nav ul ul .heading {
  padding: 6px 20px 2px; font-family: 'Cinzel', serif;
  font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--copper); pointer-events: none;
  border-top: 1px solid rgba(255,255,255,0.07); margin-top: 4px;
}

/* Page Banner (used on sub-pages) */
.page-banner {
  background: linear-gradient(135deg, var(--saddle) 0%, var(--rust) 100%);
  padding: 32px 48px;
  border-bottom: 3px solid var(--gold);
}
.page-banner h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--cream);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.page-banner p {
  color: var(--tan);
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
}
.breadcrumb {
  font-size: 0.75rem;
  color: var(--tan);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  opacity: 0.8;
}
.breadcrumb a { color: var(--gold); text-decoration: none; }

/* Layout */
.content-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  border-top: 1px solid #ddd;
}
.sidebar {
  background: #f0e0c8;
  border-right: 1px solid #d4b896;
  padding: 28px 20px;
}
.sidebar h3 {
  font-family: 'Cinzel', serif; font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--rust); margin-bottom: 12px;
  border-bottom: 2px solid var(--copper); padding-bottom: 6px;
}
.sidebar ul { list-style: none; margin-bottom: 24px; }
.sidebar ul li a {
  display: block; padding: 7px 10px; color: var(--saddle);
  text-decoration: none; font-size: 0.85rem;
  transition: background 0.15s, padding-left 0.15s;
  border-left: 3px solid transparent;
}
.sidebar ul li a:hover { background: rgba(92,45,10,0.1); padding-left: 16px; border-left-color: var(--copper); }
.sidebar ul li ul { margin: 4px 0 4px 12px; }
.sidebar ul li ul li a { font-size: 0.8rem; padding: 5px 8px; color: #6b3a1f; }
.sidebar-card {
  background: var(--white); border: 1px solid #d4b896;
  border-top: 3px solid var(--copper); padding: 16px; margin-bottom: 16px;
}
.sidebar-card h4 {
  font-family: 'Cinzel', serif; font-size: 0.72rem;
  letter-spacing: 0.1em; color: var(--rust); margin-bottom: 8px; text-transform: uppercase;
}
.sidebar-card p { font-size: 0.8rem; color: #555; line-height: 1.5; }

.main-body { padding: 40px 48px; }
.main-body h2 {
  font-family: 'Cinzel', serif; font-size: 1.5rem; font-weight: 700;
  color: var(--saddle); margin-bottom: 6px; letter-spacing: 0.04em;
}
.main-body h3 {
  font-family: 'Playfair Display', serif; font-size: 1.2rem;
  color: var(--rust); margin: 24px 0 8px;
}
.section-rule {
  height: 3px;
  background: linear-gradient(to right, var(--copper), var(--gold), transparent);
  margin-bottom: 24px; border: none;
}
.main-body p { font-size: 1rem; line-height: 1.75; color: #3a2010; margin-bottom: 16px; }
.main-body p strong { color: var(--rust); }

/* Photo placeholder */
.photo-slot {
  background: linear-gradient(135deg, #e8d5b8 0%, #c9a880 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border: 2px dashed var(--copper);
  color: var(--saddle);
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 12px;
  min-height: 160px;
  width: 100%; height: 100%;
}
.photo-slot .slot-label { margin-top: 8px; opacity: 0.7; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

/* Standardized photo containers */
/* Grid card square (800x800) — wrap img or photo-slot in this */
.photo-square {
  width: 100%; aspect-ratio: 1;
  overflow: hidden; position: relative;
}
/* Horse profile main photo (800x600 landscape) */
.photo-profile {
  width: 100%; aspect-ratio: 4/3;
  overflow: hidden; position: relative;
  margin-bottom: 20px; border: 1px solid #d4b896;
}
.photo-profile img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center; display: block;
}
/* Foal gallery thumbnail (800x800 square) */
.photo-foal {
  width: 100%; aspect-ratio: 1;
  overflow: hidden; position: relative;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--rust) 0%, var(--saddle) 100%);
  padding: 40px 60px; text-align: center;
  border-top: 4px solid var(--gold); border-bottom: 4px solid var(--gold);
}
.cta-banner h2 {
  font-family: 'Cinzel', serif; font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--cream); margin-bottom: 10px; letter-spacing: 0.06em;
}
.cta-banner p { color: var(--tan); font-style: italic; font-family: 'Playfair Display', serif; font-size: 1rem; margin-bottom: 24px; }
.cta-banner .cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
  display: inline-block; padding: 14px 36px;
  background: var(--gold); color: var(--leather);
  font-family: 'Cinzel', serif; font-size: 0.8rem;
  letter-spacing: 0.15em; text-transform: uppercase; text-decoration: none; font-weight: 700;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.btn-primary:hover { background: var(--cream); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.btn-secondary {
  display: inline-block; padding: 14px 36px;
  background: transparent; color: var(--cream);
  font-family: 'Cinzel', serif; font-size: 0.8rem;
  letter-spacing: 0.15em; text-transform: uppercase; text-decoration: none;
  border: 2px solid var(--cream);
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.btn-secondary:hover { background: var(--cream); color: var(--saddle); transform: translateY(-2px); }

/* Footer */
footer {
  background: var(--leather); color: var(--tan);
  padding: 40px 60px 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  border-top: 4px solid var(--copper);
}
footer h3 {
  font-family: 'Cinzel', serif; font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 16px;
  border-bottom: 1px solid rgba(201,162,39,0.2); padding-bottom: 8px;
}
footer ul { list-style: none; }
footer ul li { margin-bottom: 6px; }
footer ul li a { color: var(--tan); text-decoration: none; font-size: 0.85rem; transition: color 0.15s; }
footer ul li a:hover { color: var(--gold); }
footer p { font-size: 0.85rem; line-height: 1.7; }
footer .contact-item { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; font-size: 0.85rem; }
footer .contact-item span:first-child { color: var(--copper); font-size: 1rem; flex-shrink: 0; }
footer a { color: var(--tan); text-decoration: none; }
footer a:hover { color: var(--gold); text-decoration: underline; }
.copyright {
  background: #1a0a02; text-align: center; color: var(--tan);
  font-size: 0.75rem; letter-spacing: 0.08em; padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

@media (max-width: 900px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid #d4b896; }
  footer { grid-template-columns: 1fr; gap: 24px; padding: 30px; }
  header { flex-direction: column; text-align: center; }
  .header-contact { text-align: center; }
  nav ul { flex-wrap: wrap; }
  .page-banner { padding: 24px 20px; }
  .main-body { padding: 24px 20px; }
}

/* ─── Mobile & Tablet Responsive ─────────────────────────── */

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 14px 20px; color: var(--cream);
  font-size: 1.4rem; line-height: 1;
}

@media (max-width: 900px) {
  /* Top bar: stack or hide on small screens */
  .top-bar { flex-direction: column; gap: 4px; padding: 8px 16px; text-align: center; font-size: 0.72rem; }

  /* Header: stack brand + contact */
  header { flex-direction: column; text-align: center; padding: 24px 20px 18px; gap: 12px; }
  .header-contact { text-align: center; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 12px; }

  /* Nav: collapsible hamburger menu */
  .nav-toggle { display: flex; align-items: center; width: 100%; justify-content: space-between; }
  .nav-toggle::after { content: '☰'; font-size: 1.3rem; }
  nav { position: sticky; top: 0; z-index: 200; }
  nav ul {
    display: none; flex-direction: column;
    width: 100%; padding: 0; background: var(--leather);
  }
  nav ul.nav-open { display: flex; }
  nav > ul > li > a { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.07); }
  nav ul ul {
    display: flex !important; position: static;
    background: rgba(0,0,0,0.2); border: none; border-top: none;
    box-shadow: none; padding: 0; min-width: 0;
    flex-direction: column;
  }
  nav ul ul li a { padding: 10px 36px; font-size: 0.8rem; }
  nav ul ul .heading { padding: 6px 36px; }

  /* Layout: single column, sidebar on top */
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar {
    border-right: none; border-bottom: 3px solid var(--copper);
    padding: 20px 16px;
    /* collapse sidebar on mobile by default */
  }
  .sidebar ul li ul { margin-left: 12px; }
  .main-body { padding: 24px 16px; }

  /* Page banner */
  .page-banner { padding: 20px 16px; }

  /* Card grids: 3-col → 2-col */
  div[style*="grid-template-columns:repeat(3"] ,
  div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* 4-col due-to-foal grid → 2-col */
  div[style*="grid-template-columns:repeat(4"] ,
  div[style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Stallion ticker */
  .ticker-wrap { font-size: 0.75rem; }

  /* CTA banner */
  .cta-banner { padding: 28px 20px; }
  .cta-banner .cta-buttons { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; max-width: 280px; text-align: center; }

  /* Footer */
  footer { grid-template-columns: 1fr; gap: 24px; padding: 28px 20px; }
}

@media (max-width: 480px) {
  /* Phone: single column cards */
  div[style*="grid-template-columns:repeat(3"] ,
  div[style*="grid-template-columns: repeat(3"] ,
  div[style*="grid-template-columns:repeat(2"] ,
  div[style*="grid-template-columns: repeat(2"] ,
  div[style*="grid-template-columns:repeat(4"] ,
  div[style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr !important;
  }

  /* Stallion hero grid on index.htm */
  div[style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }

  .brand h1 { font-size: 1.6rem; }
  .wip-banner { font-size: 0.6rem; }
  .main-body { padding: 16px 12px; }
}
