/* Greenside Church Heritage Website
   Traditional/Classic Heritage Aesthetic
   ====================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* CSS Custom Properties */
:root {
  /* Colors */
  --burgundy: #2D5A3D;
  --burgundy-dark: #1E3D2A;
  --burgundy-light: #3D7A52;
  --cream: #F8FBF8;
  --cream-dark: #E8F0E8;
  --charcoal: #2C2C2C;
  --charcoal-light: #4a4a4a;
  --gold: #8B7355;
  --gold-light: #A89070;
  --white: #FFFFFF;
  --border-light: #E8DFD5;
  
  /* Typography */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Crimson Text', Georgia, serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 3rem;
  
  /* Layout */
  --max-width: 1200px;
  --content-width: 800px;
  
  /* Transitions */
  --transition: 0.3s ease;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--charcoal);
  background-color: var(--cream);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--burgundy);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 2.25rem;
  font-weight: 600;
}

h3 {
  font-size: 1.75rem;
  font-weight: 600;
}

h4 {
  font-size: 1.375rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--burgundy);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold);
}

/* Header & Navigation */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--burgundy);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo:hover {
  color: var(--burgundy-dark);
}

.site-logo .logo-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  max-width: none;
  max-height: none;
  object-fit: contain;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  gap: var(--space-lg);
}

.main-nav a {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--burgundy);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  margin: 6px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
  color: var(--white);
  padding: var(--space-xxl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L30 60M0 30L60 30' stroke='%23ffffff' stroke-width='0.5' fill='none' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: var(--content-width);
  margin: 0 auto;
}

.hero h1 {
  color: var(--white);
  font-size: 3.5rem;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero .subtitle {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--gold-light);
  margin-bottom: var(--space-lg);
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 0;
}

/* Page Hero (smaller, for inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
  color: var(--white);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: var(--space-xs);
}

.page-hero .subtitle {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--gold-light);
  margin: 0;
}

/* Main Content */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* Sections */
.section {
  margin-bottom: var(--space-lg);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title h2 {
  display: inline-block;
  position: relative;
  padding-bottom: var(--space-sm);
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gold);
}

/* Decorative Divider */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-xl) 0;
  gap: var(--space-md);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  max-width: 200px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-light), transparent);
}

.divider-icon {
  color: var(--gold);
  font-size: 1.5rem;
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: var(--space-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* Order of Service Cards */
.order-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: var(--space-md);
  transition: box-shadow var(--transition);
}

.order-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.order-card .date {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.order-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.order-card h3 a {
  color: var(--burgundy);
}

.order-card h3 a:hover {
  color: var(--gold);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--burgundy));
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-xl) + 2px);
  top: 8px;
  width: 14px;
  height: 14px;
  background: var(--gold);
  border: 3px solid var(--cream);
  border-radius: 50%;
}

.timeline-year {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--burgundy);
  margin-bottom: var(--space-xs);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

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

th {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--burgundy);
  background: var(--cream-dark);
}

tr:hover {
  background: rgba(184, 134, 11, 0.05);
}

/* Blockquote */
blockquote {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--charcoal-light);
  border-left: 4px solid var(--gold);
  padding-left: var(--space-lg);
  margin: var(--space-lg) 0;
}

blockquote cite {
  display: block;
  font-size: 1rem;
  font-style: normal;
  color: var(--burgundy);
  margin-top: var(--space-sm);
}

/* Image Styles */
.image-container {
  margin: var(--space-lg) 0;
  text-align: center;
}

.image-container img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.image-caption {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--charcoal-light);
  margin-top: var(--space-sm);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-xl);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  font-family: var(--font-heading);
  font-size: 1rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  transition: all var(--transition);
}

.pagination a:hover {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--white);
}

.pagination .current {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--white);
}

/* Search Box */
.search-box {
  display: flex;
  gap: var(--space-sm);
  max-width: 500px;
  margin: 0 auto var(--space-xl);
}

.search-box input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  transition: border-color var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--gold);
}

.search-box button {
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  background: var(--burgundy);
  color: var(--white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition);
}

.search-box button:hover {
  background: var(--burgundy-dark);
}

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: var(--cream);
  padding: var(--space-xl) var(--space-lg);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}

.footer-section h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: var(--space-md);
}

.footer-section p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: var(--space-sm);
}

.footer-section a {
  color: var(--cream);
}

.footer-section a:hover {
  color: var(--gold);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-burgundy { color: var(--burgundy); }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Lead Paragraph */
.lead {
  font-size: 1.1rem;
  color: var(--charcoal-light);
  line-height: 1.8;
}

/* Info Box */
.info-box {
  background: var(--cream-dark);
  border-left: 4px solid var(--gold);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  border-radius: 0 4px 4px 0;
}

.info-box h4 {
  color: var(--burgundy);
  margin-bottom: var(--space-sm);
}

/* Order of Service Detail */
.order-detail {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: var(--space-xl);
  margin: var(--space-lg) 0;
}

.order-detail .order-header {
  text-align: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--gold);
}

.order-detail .order-content {
  font-size: 1.1rem;
}

.order-detail .order-content strong {
  color: var(--burgundy);
}

/* Responsive Design */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero .subtitle {
    font-size: 1.25rem;
  }
  
  .header-container {
    padding: var(--space-sm);
  }
  
  .menu-toggle {
    display: block;
  }
  
  .main-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }
  
  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .main-nav a {
    padding: var(--space-sm) 0;
    font-size: 1.2rem;
  }
  
  .main-content {
    padding: var(--space-lg) var(--space-sm);
  }
  
  .hero {
    padding: var(--space-xl) var(--space-sm);
  }
  
  .timeline {
    padding-left: var(--space-lg);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  table {
    font-size: 0.85rem;
  }
  
  th, td {
    padding: var(--space-xs);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .main-nav {
    gap: var(--space-md);
  }
  
  .main-nav a {
    font-size: 1rem;
  }
}

@media (min-width: 1200px) {
  .hero h1 {
    font-size: 4rem;
  }
}

/* Stevenson Section */
.stevenson-section {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: var(--space-lg);
  align-items: start;
}

.stevenson-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.stevenson-image .image-caption {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--charcoal-light);
  margin-top: var(--space-sm);
}

@media (max-width: 600px) {
  .stevenson-section {
    grid-template-columns: 1fr;
  }
  
  .stevenson-image {
    order: -1;
    max-width: 150px;
    margin: 0 auto;
  }
}

/* History Images */
.history-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.history-images .image-container {
  margin: 0;
}

.history-images img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Home Intro Layout */
.home-intro {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-xl);
  align-items: start;
  max-width: var(--max-width);
  margin: 0 auto;
}

.home-intro-text h1 {
  margin-bottom: var(--space-sm);
}

.home-intro-image {
  position: sticky;
  top: 100px;
}

.home-intro-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.home-intro-image .image-caption {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--charcoal-light);
  margin-top: var(--space-sm);
}

@media (max-width: 900px) {
  .home-intro {
    grid-template-columns: 1fr;
  }
  
  .home-intro-image {
    position: static;
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .menu-toggle,
  .pagination {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .hero {
    background: none;
    color: black;
    padding: var(--space-lg) 0;
  }
  
  .hero h1 {
    color: black;
  }
}

