/* Modern CSS for Punxsutawney Website */

/* CSS Custom Properties (Variables) */
:root {
  --primary-color: #2c5aa0;
  --secondary-color: #e74c3c;
  --accent-color: #3498db;
  --text-color: #333;
  --light-text: #666;
  --background-color: #ffffff;
  --light-bg: #ffb3ba;
  --pink-bg: #ffccdd;
  --border-color: #e9ecef;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --serif-font: Georgia, 'Times New Roman', serif;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  background: 
    linear-gradient(rgba(255, 182, 193, 0.6), rgba(255, 182, 193, 0.6)),
    url('/images/mainback2.png') repeat !important;
}

/* Ensure no other elements override the body background */
html {
  background: 
    linear-gradient(rgba(255, 182, 193, 0.6), rgba(255, 182, 193, 0.6)),
    url('/images/mainback2.png') repeat !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--secondary-color), #c0392b);
  color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin: 1rem auto;
  max-width: 600px;
}

h2 {
  font-size: 1.8rem;
  border-bottom: 3px solid var(--accent-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
  margin: 1.5rem auto;
  max-width: 500px;
}

h4 {
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--secondary-color), #c0392b);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
  margin: 1rem auto;
  max-width: 400px;
}

h5 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Paragraph and Text */
p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  max-width: 65ch;
}

/* Links */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

a:visited {
  color: var(--primary-color);
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
  color: white;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../images/bg.jpg') center/cover;
  opacity: 0.1;
  z-index: 0;
}

.header > * {
  position: relative;
  z-index: 1;
}

/* Site Header for Forms */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header h1 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  text-align: center;
}

.breadcrumb {
  text-align: center;
  font-size: 1rem;
  color: var(--light-text);
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.Container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
}

/* Reposition the news box to the right side */
#index_news {
  display: none; /* Hide by default on mobile */
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-color);
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  z-index: 10;
}

/* Show and position the news box only on desktop screens */
@media screen and (min-width: 1024px) {
  #index_news {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 280px;
  }
}

/* Ensure it stays hidden on phones regardless of orientation */
@media screen and (max-device-width: 812px) {
  #index_news {
    display: none !important;
  }
}
  line-height: 1.4;
  z-index: 10;
}

#index_news a {
  color: var(--secondary-color);
  font-weight: bold;
}

/* Move the main content up and center it better */
#index_top {
  margin-top: 1rem;
  text-align: center;
}

/* Use original Background CSS structure but with pink overlay */
.Background {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: url('../images/bg.jpg');
  background-repeat: repeat;
  background-size: 100% 100%;
  background-size: cover;
  filter: hue-rotate(320deg) saturate(0.6) brightness(1.2) !important;
}

#index_news {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#index_top {
  text-align: center;
}

.mainlogoimage {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* Main Layout */
.row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  background: transparent !important;
}

/* Sidebar Styles */
.lside, .rside {
  background: rgba(255, 255, 255, 0.8) !important;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  height: fit-content;
}

/* Ensure background shows in grid layout */
main.row .lside,
main.row .rside,
.row aside.lside,
.row aside.rside {
  background: rgba(255, 255, 255, 0.8) !important;
}

.lside section, .rside section {
  margin-bottom: 2rem;
}

.lside section:last-child, .rside section:last-child {
  margin-bottom: 0;
}

/* Main Content */
.main {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  transition: transform 0.3s ease;
}

img:hover {
  transform: scale(1.02);
}

/* Preserve animated GIF functionality */
img[src$=".gif"] {
  /* Ensure animated GIFs keep their natural animation */
  animation: none;
  /* Reduce hover effect for animated GIFs to avoid interference */
}

img[src$=".gif"]:hover {
  transform: scale(1.01);
}

.morepics, .schools, .ovens {
  display: block;
  margin: 1rem auto;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

/* Rocking animation for More Pictures - only on hover */
.morepics, .schools, .ovens {
  transform-origin: center bottom;
}

@keyframes rock {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-3deg);
  }
  75% {
    transform: rotate(3deg);
  }
}

.morepics:hover, .schools:hover, .ovens:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Start rocking animation only on hover for all three images */
.morepics:hover {
  animation: rock 1.5s ease-in-out infinite;
  transform: translateY(-2px);
}

.schools:hover {
  animation: rock 1.5s ease-in-out infinite;
  transform: translateY(-2px);
}

.ovens:hover {
  animation: rock 1.5s ease-in-out infinite;
  transform: translateY(-2px);
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
}

.footer img {
  transition: all 0.3s ease;
}

.footer img:hover {
  transform: scale(1.05);
}

/* Content Sections */
.index_subtext {
  font-family: var(--serif-font);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--light-text);
}

/* Responsive Design */
@media (max-width: 768px) {
  .row {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem auto;
  }
  
  .header {
    padding: 2rem 1rem;
  }
  
  h1 {
    font-size: 2rem;
    padding: 1rem;
  }
  
  h3 {
    font-size: 1.3rem;
    padding: 0.8rem 1.5rem;
  }
  
  .lside, .rside, .main {
    padding: 1.5rem;
  }
  
  .lside, .rside {
    background: #FFF4F7 url('../images/pinkgranite.gif') !important;
  }
  
  .Container {
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.2rem;
    padding: 0.6rem 1rem;
  }
  
  .lside, .rside, .main {
    padding: 1rem;
  }
  
  .lside, .rside {
    background: #FFF4F7 url('../images/pinkgranite.gif') !important;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mt-2 {
  margin-top: 2rem;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* Focus states for accessibility */
a:focus, button:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000080;
    --secondary-color: #cc0000;
    --text-color: #000000;
    --light-text: #333333;
  }
}

/* Reduced motion support - only affects CSS animations, not animated GIFs */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  /* Preserve animated GIF functionality */
  img[src$=".gif"] {
    animation: none !important;
  }
}

/* =========================
   OVENS PAGE SPECIFIC STYLES
   ========================= */

/* Article Layout */
.main-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.article {
  line-height: 1.6;
}

.article-header {
  text-align: center;
  margin-bottom: 3rem;
}

.article-header h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
  color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.article-date {
  font-size: 1.2rem;
  color: var(--light-text);
  font-style: italic;
  margin: 0;
}

/* Content Sections */
.content-section {
  margin-bottom: 2rem;
}

.content-section p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: none;
  line-height: 1.7;
}

/* Figure and Image Styles */
figure {
  margin: 2rem 0;
  text-align: center;
}

figure img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

figure img:hover {
  transform: scale(1.02);
}

figcaption {
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--light-text);
  font-size: 0.9rem;
}

/* Hero Image */
.hero-image {
  margin: 2rem auto 3rem;
  max-width: 900px;
}

.hero-image img {
  width: 100%;
  aspect-ratio: 21/10;
  object-fit: cover;
}

/* Map Figure */
.map-figure {
  margin: 2rem auto;
  max-width: 700px;
}

/* Single Images */
.single-image {
  margin: 2rem auto;
  max-width: 800px;
}

/* Image Gallery */
.image-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
}

/* Panoramic Images */
.panoramic-image {
  margin: 3rem auto;
  max-width: 900px;
}

.panoramic-image img {
  width: 100%;
  aspect-ratio: 21/10;
  object-fit: cover;
}

/* Navigation */
.nav {
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

.nav a {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: var(--secondary-color);
}

/* Footer */
.page-footer {
  margin-top: 3rem;
  text-align: center;
}

.return-link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.return-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.return-link img {
  width: 60px;
  height: auto;
}

/* Responsive Design for Ovens Page */
@media (max-width: 768px) {
  .main-content {
    padding: 1rem;
    margin: 1rem;
  }
  
  .article-header h1 {
    font-size: 2rem;
    padding: 1rem;
  }
  
  .image-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .hero-image,
  .map-figure,
  .single-image,
  .panoramic-image {
    max-width: 100%;
    margin: 1.5rem 0;
  }
  
  .content-section p {
    font-size: 1rem;
  }
  
  .return-link {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .return-link span {
    font-size: 0.9rem;
  }
}

/* =========================
   SCHOOLS PAGE SPECIFIC STYLES
   ========================= */

/* Schools Article Layout */
.schools-article {
  line-height: 1.6;
}

.schools-article .article-header {
  text-align: center;
  margin-bottom: 3rem;
}

.schools-article .article-header h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
  color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.schools-article .article-header h2 {
  font-size: 1.8rem;
  color: var(--secondary-color);
  margin: 0;
  font-weight: normal;
  font-style: italic;
}

/* Content Layout */
.content-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.main-content-section {
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.historical-narrative p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
  max-width: none;
}

.historical-narrative a {
  color: var(--secondary-color);
  font-weight: bold;
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: rgba(var(--secondary-color-rgb), 0.1);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.historical-narrative a:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-1px);
}

/* Historical Quote Section */
.historical-quote {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-left: 4px solid var(--accent-color);
  border-radius: var(--border-radius);
}

.historical-quote blockquote {
  margin: 0;
  font-family: var(--serif-font);
  color: var(--text-color);
}

.historical-quote blockquote p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.6;
}

.historical-quote blockquote p:first-child {
  font-weight: bold;
  color: var(--primary-color);
}

.historical-quote em {
  color: var(--secondary-color);
  font-weight: bold;
}

/* Schools Directory Sidebar */
.schools-directory {
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  height: fit-content;
}

.schools-directory h3 {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--secondary-color), #c0392b);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin-bottom: 1rem;
}

.directory-description {
  font-style: italic;
  color: var(--light-text);
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Schools Table */
.schools-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.schools-table thead {
  background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
  color: white;
}

.schools-table th {
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-weight: bold;
  font-size: 0.8rem;
}

.schools-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #e9ecef;
  vertical-align: top;
}

.schools-table tbody tr:hover {
  background: rgba(var(--primary-color-rgb), 0.05);
}

.schools-table a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.schools-table a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* District rows styling */
.schools-table th[rowspan] {
  background: linear-gradient(135deg, var(--secondary-color), #c0392b);
  color: white;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
}

/* Historical Gallery */
.historical-gallery {
  margin-top: 3rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.historical-gallery header h3 {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--accent-color), #16a085);
  color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.gallery-item {
  text-align: center;
  background: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.gallery-item figcaption {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1rem;
  margin: 0;
}

/* Responsive Design for Schools Page */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .schools-directory {
    order: -1;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 1rem;
    margin: 1rem;
  }
  
  .schools-article .article-header h1 {
    font-size: 2rem;
    padding: 1rem;
  }
  
  .schools-article .article-header h2 {
    font-size: 1.4rem;
  }
  
  .main-content-section,
  .schools-directory,
  .historical-gallery {
    padding: 1.5rem;
  }
  
  .schools-table {
    font-size: 0.8rem;
  }
  
  .schools-table th,
  .schools-table td {
    padding: 0.4rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-item img {
    width: 100%;
    height: auto;
  }
  
  .historical-narrative p {
    font-size: 1rem;
  }
}

/* =========================
   TOWNSHIP PAGES SPECIFIC STYLES
   ========================= */

/* Township Article Layout */
.township-article {
  line-height: 1.6;
}

.township-article .article-header {
  text-align: center;
  margin-bottom: 3rem;
}

.township-article .article-header h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
  color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.township-article .subtitle {
  font-size: 1.2rem;
  color: var(--light-text);
  font-style: italic;
  margin: 0;
}

/* Township Header Image */
.township-header-image {
  margin: 2rem auto;
  max-width: 66.67%; /* Reduce size by 1/3 (2/3 of original) */
}

.township-header-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.township-header-image figcaption {
  text-align: center;
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--light-text);
  font-style: italic;
}

/* Schools Overview Section */
.schools-overview {
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
}

.schools-overview h2 {
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--secondary-color), #c0392b);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin-bottom: 2rem;
}

/* Bell Township specific overview layout */
.overview-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.schools-list {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.bell-image {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.bell-image figure {
  margin: 0;
}

.bell-image img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: var(--border-radius);
}

.bell-image figcaption {
  margin-top: 1rem;
  font-weight: bold;
  color: var(--primary-color);
}

.school-description {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent-color);
}

.school-description p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-color);
}

.location-note {
  font-style: italic !important;
  color: var(--light-text) !important;
  margin-top: 0.5rem;
}

/* Schools Gallery */
.schools-gallery {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.school-entry {
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 100px; /* For anchor links */
}

.school-entry h3 {
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--accent-color), #16a085);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.school-note {
  font-style: italic;
  color: var(--light-text);
  text-align: center;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  border: 2px dashed #dee2e6;
}

/* School Images */
.school-image {
  margin: 1.5rem 0;
  text-align: center;
}

.school-image img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.school-image img:hover {
  transform: scale(1.02);
}

.school-image figcaption {
  margin-top: 0.75rem;
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1rem;
}

/* Image Comparison Layout */
.image-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 1.5rem 0;
}

.image-comparison .school-image img {
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Location Information */
.location-info {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent-color);
  margin-top: 1.5rem;
}

.location-info p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-color);
}

.location-info p:last-of-type {
  margin-bottom: 1rem;
}

.location-info strong {
  color: var(--primary-color);
  font-weight: bold;
}

.location-info a {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.location-info a:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Responsive Design for Township Pages */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .schools-directory {
    order: -1;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  /* Bell page specific responsive */
  .overview-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .bell-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .township-article .article-header h1 {
    font-size: 2rem;
    padding: 1rem;
  }
  
  .township-article .subtitle {
    font-size: 1rem;
  }
  
  .schools-overview,
  .school-entry {
    padding: 1.5rem;
  }
  
  .school-entry h3 {
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
  }
  
  .image-comparison {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .school-image img {
    max-width: 100%;
  }
  
  .location-info {
    padding: 1rem;
  }
  
  .location-info a {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* ========================= 
   GALLERY PAGE SPECIFIC STYLES
   ========================= */

/* Gallery Article Layout */
.gallery-article {
  line-height: 1.6;
}

.gallery-article .article-header {
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-article .article-header h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
  color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.gallery-subtitle {
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--secondary-color), #c0392b);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin: 1rem auto 2rem;
  max-width: 400px;
  box-shadow: var(--shadow);
}

.gallery-description {
  font-size: 1.2rem;
  color: var(--light-text);
  font-style: italic;
  text-align: center;
  margin-bottom: 2rem;
}

/* Filter Section */
.filter-section {
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
  text-align: center;
}

.filter-section h3 {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--accent-color), #2980b9);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.filter-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background: white;
  color: var(--text-color);
  min-width: 200px;
  transition: border-color 0.3s ease;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-button {
  background: linear-gradient(135deg, var(--accent-color), #2980b9);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.filter-button:hover {
  background: linear-gradient(135deg, #2980b9, var(--accent-color));
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.gallery-item {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-figure {
  margin: 0;
  padding: 1.5rem;
}

.image-title {
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
  color: white;
  padding: 0.8rem 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin: 0 0 1rem 0;
  box-shadow: var(--shadow);
}

.gallery-link {
  display: block;
  text-decoration: none;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

.gallery-image {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  transition: transform 0.3s ease;
  display: block;
}

.gallery-link:hover .gallery-image {
  transform: scale(1.05);
}

.image-description {
  font-style: italic;
  color: var(--light-text);
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
  padding: 0.5rem;
  background: rgba(244, 244, 244, 0.8);
  border-radius: var(--border-radius);
  margin-top: 1rem;
}

/* No Results Message */
.no-results {
  text-align: center;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.no-results p {
  font-size: 1.2rem;
  color: var(--light-text);
  font-style: italic;
}

/* Responsive Design for Gallery */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .filter-form {
    gap: 1rem;
  }
  
  .form-group {
    width: 100%;
  }
  
  .filter-select {
    min-width: auto;
    width: 100%;
    max-width: 300px;
  }
  
  .gallery-article .article-header h1 {
    font-size: 2rem;
    padding: 1rem;
  }
  
  .gallery-subtitle {
    font-size: 1.5rem;
    padding: 0.8rem;
  }
  
  .image-title {
    font-size: 1.1rem;
    padding: 0.6rem 0.8rem;
  }
}

/* =========================
   LISTING FORM STYLES
   ========================= */

/* Listing Application Layout */
.listing-application {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--primary-color);
}

.page-header h2 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.info-image {
  float: right;
  margin: 0 0 1rem 2rem;
  text-align: center;
}

.info-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.info-image figcaption {
  font-style: italic;
  color: var(--light-text);
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Guidelines Section */
.guidelines {
  margin-bottom: 3rem;
  clear: both;
}

.guidelines h3 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.guidelines p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.service-info {
  background: linear-gradient(135deg, #ffeaa7, #fab1a0);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent-color);
  margin: 2rem 0;
}

.service-info p {
  margin: 0;
  font-weight: 500;
}

/* Form Sections */
.application-form h3 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.listing-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-section {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.form-section legend {
  background: var(--primary-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: bold;
  font-size: 1.2rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: bold;
  color: var(--dark-text);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.required {
  color: #e74c3c;
  font-weight: bold;
}

/* Form Inputs */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Name Input Group */
.name-group .name-inputs {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
}

/* Form Notes */
.form-note {
  color: var(--light-text);
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 0.3rem;
  display: block;
}

/* Verification Section */
.verification {
  background: linear-gradient(135deg, #ffeaa7, #fab1a0) !important;
}

.verification-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.verification-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.security-code {
  background: #34495e;
  color: #3498db;
  padding: 0.8rem 1.2rem;
  border-radius: var(--border-radius);
  font-family: 'Courier New', monospace;
  font-weight: bold;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.verification-group input {
  width: 120px !important;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-weight: bold;
}

/* Form Actions */
.form-actions {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--primary-color);
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 0.5rem;
  min-width: 150px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #c62868, #1a2f4a);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.3);
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(149, 165, 166, 0.3);
}

/* Page Navigation */
.page-navigation {
  text-align: center;
  margin: 3rem 0;
}

.return-link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.return-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 1);
}

.return-link img {
  border-radius: var(--border-radius);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .listing-application {
    padding: 1rem;
  }
  
  .info-image {
    float: none;
    margin: 1rem auto;
    display: block;
  }
  
  .info-image img {
    max-width: 100%;
    height: auto;
  }
  
  .page-header h2 {
    font-size: 2rem;
  }
  
  .form-section {
    padding: 1rem;
  }
  
  .name-group .name-inputs {
    grid-template-columns: 1fr;
  }
  
  .verification-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .verification-container {
    justify-content: center;
  }
  
  .btn {
    display: block;
    margin: 0.5rem auto;
    width: 100%;
    max-width: 250px;
  }
  
  .return-link {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================
   HISTORY PAGE STYLES
   ========================= */

/* History page background to match main page */
body:has(.history-article) {
  background: url('../images/bg.jpg') !important;
  background-repeat: repeat !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  filter: hue-rotate(320deg) saturate(0.6) brightness(1.2) !important;
}

/* History Article Layout */
.history-article {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.history-article .article-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid var(--primary-color);
}

.history-article .article-header h2 {
  color: var(--primary-color);
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.subtitle {
  font-size: 1.3rem;
  color: var(--light-text);
  font-style: italic;
  margin: 0;
}

/* Historical Sections */
.founding-section,
.first-hundred-years,
.town-development,
.community-services,
.churches-section,
.community-organizations,
.brass-band-section {
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(233, 30, 99, 0.2);
}

.brass-band-section {
  border-bottom: none;
}

.history-article h3 {
  color: var(--primary-color);
  font-size: 2.2rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--accent-color);
  padding-left: 1rem;
}

.history-article h4 {
  color: var(--dark-text);
  font-size: 1.6rem;
  margin: 2rem 0 1rem 0;
  font-weight: 600;
}

/* Historical Map */
.historical-map {
  float: right;
  margin: 0 0 2rem 2rem;
  text-align: center;
  max-width: 400px;
}

.historical-map img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
}

.historical-map figcaption {
  font-style: italic;
  color: var(--light-text);
  margin-top: 0.5rem;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.5rem;
  border-radius: var(--border-radius);
}

/* Historical Narrative */
.historical-narrative {
  font-size: 1.1rem;
  line-height: 1.7;
  text-align: justify;
}

.historical-narrative p {
  margin-bottom: 1.5rem;
}

/* Holland Land Company Sidebar */
.holland-land-company {
  background: linear-gradient(135deg, #ffeaa7, #fab1a0);
  padding: 2rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent-color);
  margin: 2rem 0;
  clear: both;
}

.holland-land-company h4 {
  color: var(--primary-color);
  margin-top: 0;
  font-size: 1.4rem;
}

.holland-land-company p {
  margin-bottom: 1rem;
}

.holland-land-company p:last-child {
  margin-bottom: 0;
}

/* Inline Images */
.inline-image {
  margin: 1rem;
  text-align: center;
}

.inline-image.left {
  float: left;
  margin-right: 2rem;
  margin-left: 0;
}

.inline-image.right {
  float: right;
  margin-left: 2rem;
  margin-right: 0;
}

.inline-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.inline-image img:hover {
  transform: scale(1.05);
}

.inline-image figcaption {
  font-style: italic;
  color: var(--light-text);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.3rem 0.6rem;
  border-radius: var(--border-radius);
}

/* Service Sections */
.service-section {
  margin-bottom: 2.5rem;
  clear: both;
  overflow: hidden;
}

.service-section h4 {
  background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
  color: white;
  padding: 0.8rem 1.2rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  display: inline-block;
}

/* Church History */
.church-history {
  margin-bottom: 3rem;
  clear: both;
  overflow: hidden;
  padding: 1.5rem;
  background: rgba(248, 249, 250, 0.8);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
}

.church-history h4 {
  background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
  color: white;
  padding: 0.8rem 1.2rem;
  border-radius: var(--border-radius);
  margin: 0 0 1.5rem 0;
  display: inline-block;
  font-size: 1.4rem;
}

.church-history p {
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

/* Band Section */
.band-image {
  text-align: center;
  margin: 2rem 0;
}

.band-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  max-width: 100%;
  height: auto;
}

.band-image figcaption {
  font-style: italic;
  color: var(--light-text);
  margin-top: 1rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.8rem;
  border-radius: var(--border-radius);
  display: inline-block;
}

/* Mobile Responsiveness for History */
@media (max-width: 768px) {
  .history-article {
    padding: 1rem;
  }
  
  .history-article .article-header h2 {
    font-size: 2.2rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .history-article h3 {
    font-size: 1.8rem;
  }
  
  .historical-map {
    float: none;
    margin: 1rem auto 2rem auto;
    display: block;
    max-width: 100%;
  }
  
  .inline-image.left,
  .inline-image.right {
    float: none;
    margin: 1rem auto;
    display: block;
    max-width: 200px;
  }
  
  .holland-land-company {
    padding: 1rem;
    margin: 1rem 0;
  }
  
  .church-history {
    padding: 1rem;
  }
  
  .historical-narrative {
    text-align: left;
  }
}

/* Hide news div on mobile screens */
@media screen and (max-width: 768px) {
    #index_news {
        display: none;
    }
}