/* British Pennies - Authoritative Reference Site */

:root {
  --copper-dark: #8B4513;
  --copper-medium: #B87333;
  --copper-light: #CD7F32;
  --patina-green: #4A7C59;
  --cream: #FDF5E6;
  --charcoal: #2C2C2C;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --border-light: #e0d5c7;
}

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

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--cream);
}

/* Header */
header {
  background: linear-gradient(135deg, var(--copper-dark) 0%, var(--charcoal) 100%);
  color: white;
  padding: 2rem 0;
  border-bottom: 4px solid var(--copper-light);
}

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

header h1 {
  font-size: 2.5rem;
  font-weight: normal;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

header h1 span {
  color: var(--copper-light);
}

header .tagline {
  font-style: italic;
  opacity: 0.9;
  font-size: 1.1rem;
}

/* Navigation */
nav {
  background: var(--charcoal);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

nav ul {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

nav li {
  position: relative;
}

nav a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
}

nav a:hover,
nav a.active {
  background: var(--copper-medium);
  color: white;
}

/* Dropdown */
nav li:hover .dropdown {
  display: block;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--charcoal);
  min-width: 220px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.dropdown a {
  padding: 0.8rem 1.5rem;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

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

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  margin-bottom: 3rem;
}

.hero h2 {
  font-size: 2rem;
  color: var(--copper-dark);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
}

/* Content Sections */
section {
  background: white;
  border-radius: 8px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

section h2 {
  color: var(--copper-dark);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-light);
}

section h3 {
  color: var(--charcoal);
  font-size: 1.3rem;
  margin: 1.5rem 0 1rem;
}

section p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Cards */
.card {
  background: var(--cream);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card h3 {
  color: var(--copper-dark);
  margin-top: 0;
}

.card .date-range {
  font-size: 0.9rem;
  color: var(--patina-green);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  background: var(--charcoal);
  color: white;
  font-weight: normal;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
}

tr:hover {
  background: rgba(184, 115, 51, 0.05);
}

.rarity-high {
  color: #c0392b;
  font-weight: bold;
}

.rarity-medium {
  color: #e67e22;
}

.rarity-low {
  color: var(--patina-green);
}

/* Source Citations */
.sources {
  background: #f8f6f2;
  border-left: 4px solid var(--copper-medium);
  padding: 1.5rem;
  margin-top: 2rem;
}

.sources h4 {
  color: var(--copper-dark);
  margin-bottom: 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sources ul {
  list-style: none;
  padding: 0;
}

.sources li {
  margin-bottom: 0.5rem;
}

.sources a {
  color: var(--copper-medium);
  text-decoration: none;
  border-bottom: 1px dotted var(--copper-medium);
}

.sources a:hover {
  color: var(--copper-dark);
  border-bottom-style: solid;
}

/* Inline Citations */
.cite {
  font-size: 0.75rem;
  vertical-align: super;
  color: var(--copper-medium);
  text-decoration: none;
  font-weight: bold;
}

.cite:hover {
  color: var(--copper-dark);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--copper-medium);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--copper-light);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--copper-medium);
}

.timeline-item .year {
  font-weight: bold;
  color: var(--copper-dark);
  font-size: 1.2rem;
}

/* Monarch Badges */
.monarch-badge {
  display: inline-block;
  background: var(--charcoal);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background: var(--charcoal);
  color: white;
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}

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

footer h4 {
  color: var(--copper-light);
  margin-bottom: 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

footer li {
  margin-bottom: 0.5rem;
}

footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover {
  color: var(--copper-light);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: #B87333;
  color: white;
  border: none;
  border-radius: 0;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  text-align: left;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none;
  outline: none;
}

.mobile-menu-toggle:focus {
  outline: none;
  background: #8B4513;
}

.mobile-menu-toggle::after {
  content: ' ☰';
  float: right;
  font-size: 1.2rem;
}

.mobile-menu-toggle.active {
  background: #8B4513;
}

.mobile-menu-toggle.active::after {
  content: ' ✕';
}

/* Responsive - Tablet */
@media (max-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  header {
    padding: 1.5rem 0;
  }

  header .container {
    padding: 0 1rem;
  }

  header h1 {
    font-size: 1.6rem;
    letter-spacing: 1px;
  }

  header .tagline {
    font-size: 0.9rem;
  }

  /* Mobile Navigation */
  .mobile-menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    padding: 0;
  }

  nav ul.active {
    display: flex;
  }

  nav a {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .dropdown {
    position: static;
    box-shadow: none;
    background: rgba(0,0,0,0.2);
  }

  .dropdown a {
    padding-left: 2rem;
  }

  /* Show dropdowns on mobile */
  nav li .dropdown {
    display: block;
  }

  /* Main content */
  main {
    padding: 1.5rem 1rem;
  }

  section {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
  }

  section h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .hero {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
  }

  .hero h2 {
    font-size: 1.5rem !important;
  }

  .hero p {
    font-size: 1rem;
  }

  /* Value finder CTA - make it more tappable */
  .hero a[href*="value-finder"] {
    padding: 0.875rem 1.5rem !important;
    font-size: 1.1rem !important;
    display: block !important;
    text-align: center;
  }

  /* Tables - horizontal scroll */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    font-size: 0.85rem;
    min-width: 500px;
  }

  th, td {
    padding: 0.6rem 0.5rem;
  }

  /* Cards */
  .card {
    padding: 1.25rem;
  }

  .card h3 {
    font-size: 1.1rem;
  }

  /* Grid layouts */
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Timeline */
  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-item::before {
    left: -1.5rem;
    width: 10px;
    height: 10px;
  }

  .timeline-item .year {
    font-size: 1.1rem;
  }

  /* Coin gallery */
  .coin-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .coin-image {
    padding: 0.75rem;
  }

  .coin-image .coin-year {
    font-size: 0.95rem;
  }

  /* Footer */
  footer {
    padding: 2rem 0 1.5rem;
  }

  footer .container {
    padding: 0 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    font-size: 0.8rem;
  }
}

/* Responsive - Small phones */
@media (max-width: 480px) {
  header h1 {
    font-size: 1.4rem;
  }

  header .tagline {
    font-size: 0.8rem;
  }

  .hero h2 {
    font-size: 1.3rem !important;
  }

  .coin-gallery {
    grid-template-columns: 1fr 1fr;
  }

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

  table {
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.5rem 0.4rem;
  }
}

/* Coin Image Gallery */
.coin-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.coin-image {
  text-align: center;
  background: white;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--border-light);
  transition: transform 0.3s, box-shadow 0.3s;
}

.coin-image:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.coin-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  border: 3px solid var(--copper-medium);
}

.coin-image figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.coin-image .coin-year {
  display: block;
  font-size: 1.1rem;
  color: var(--copper-dark);
  font-weight: bold;
}

.coin-image .coin-monarch {
  font-size: 0.85rem;
  color: var(--patina-green);
}

/* Featured Coin Display */
.featured-coin {
  display: flex;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, #f8f6f2 0%, white 100%);
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
  border: 1px solid var(--border-light);
}

.featured-coin img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  border: 4px solid var(--copper-medium);
  flex-shrink: 0;
}

.featured-coin-info {
  flex: 1;
}

.featured-coin-info h4 {
  color: var(--copper-dark);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
  .featured-coin {
    flex-direction: column;
    text-align: center;
  }
}

/* Image Attribution */
.image-attribution {
  font-size: 0.75rem;
  color: #888;
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
}

.image-attribution a {
  color: var(--copper-medium);
}

/* Print Styles */
@media print {
  nav, footer {
    display: none;
  }

  section {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
