@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap");

/* =========================
     Theme & Base Styles
     ======================== */
:root {
  --primary-color: #1e3a8a;
  --secondary-color: #fbbf24;
  --third-color: #f3f4f6;
  --background-color: #f3f4f6;

  --gradient-primary: linear-gradient(100deg, var(--primary-color) 0%, #60a5fa 60%, var(--secondary-color) 100%);
  --gradient-secondary: linear-gradient(90deg, var(--primary-color) 0%, #60a5fa 100%);
  --gradient-third: linear-gradient(90deg, var(--secondary-color) 0%, #fff 100%);

  --card-bg: #fff;

  /* NEW: neutral tokens for consistent UI */
  --text-color: #0f172a;
  --text-muted: #475569;
  --border-color: #e5e7eb;
  --surface-muted: #f8fafc;

  --shadow-sm: 0 1px 4px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;

  --transition: 0.15s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.1px;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   Iframe Styles
   ========================= */
.navbar-frame,
.footer-frame {
  width: 100%;
  border: none;
  display: block;
}

.navbar-frame {
  height: 80px;
}

.footer-frame {
  margin-top: auto;
  height: 70px;
  width: 100%;
  border: none;
  display: block;
  overflow: hidden;
}

/* =========================
   Layout & Utility Classes
   ========================= */
.section-container {
  width: 100%;
  max-width: 1200px;
  margin: var(--space-6) auto 0 auto;
  padding: var(--space-6) var(--space-5);
}

.scrollable-section {
  overflow-y: auto;
  max-height: 800px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  border: 1px solid var(--border-color);
}

@media (max-width: 700px) {
  .section-container {
    padding: var(--space-5) var(--space-3);
  }
}

/* =========================
   Global Header (Fullscreen Hero)
   ========================= */
.global-header {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: auto;
  padding: 120px 18px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0b1220;
  box-shadow: var(--shadow-md);
}

.global-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,18,32,0.72) 0%, rgba(11,18,32,0.35) 50%, rgba(11,18,32,0.82) 100%),
    url("../img/homepage-trx.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.global-header-bg {
  display: none;
}

.global-header-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 980px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.global-header-content::before {
  content: '';
  display: block;
  width: 76px;
  height: 5px;
  background: var(--secondary-color);
  border-radius: 999px;
  margin: 0 auto 22px auto;
}

.global-header-title {
  color: #fff;
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.22);
  margin: 0 0 0.2em 0;
}

.global-header-desc {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.75;
  max-width: 860px;
  margin: 16px auto 0;
}

/* =========================
   Homepage full-bleed layout fixes
   ========================= */
.section-container.section-home {
  max-width: 100%;
  margin-top: 0;
  padding-top: 44px;
  padding-left: 0;
  padding-right: 0;
}

.section-container.section-home .features-list {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

@media (max-width: 700px) {
  .section-container.section-home .features-list {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
}

/* =========================
   Section Headings (General)
   ========================= */
.section-container h2 {
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
  letter-spacing: 0.3px;
}

.section-container p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: var(--space-6) 0 var(--space-5) 0;
}

/* =========================
   Features & Cards (Horizontal Scroll)
   ========================= */
.features-list {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  overflow-y: hidden;
  padding: var(--space-3) var(--space-2) var(--space-4);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.features-list::-webkit-scrollbar {
  height: 10px;
}

.features-list::-webkit-scrollbar-thumb {
  background: rgba(30, 58, 138, 0.35);
  border-radius: 999px;
}

.feature-card {
  flex: 0 0 min(360px, 86vw);
  scroll-snap-align: start;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5) var(--space-5);
  text-align: left;
  transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.feature-card h2 {
  margin: 0 0 var(--space-2) 0;
  font-size: 1.25rem;
}

.feature-card p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
}

@media (prefers-reduced-motion: no-preference) {
  .features-list.auto-scroll {
    scroll-behavior: smooth;
  }
}

/* =========================
   CTA Button
   ========================= */
.cta-button {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--primary-color);
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  margin-top: 12px;
  transition: background 0.18s, color 0.18s, transform 0.12s;
  box-shadow: var(--shadow-sm);
}

.cta-button:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-1px);
}

/* =========================
   Homepage Events Section
   ========================= */
.events-section {
  margin: var(--space-7) 0 var(--space-6) 0;
}

.events-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.event-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  text-align: center;
  border: 1px solid var(--border-color);
}

.event-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--space-2);
}

.event-date {
  display: block;
  margin-top: var(--space-2);
  color: var(--primary-color);
  font-weight: 600;
}

/* =========================
   Homepage Info Section (Full-width like header)
   ========================= */
.info-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  margin: var(--space-6) 0 var(--space-6) 0;
  padding: 70px 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border-top: 1px solid rgba(229, 231, 235, 0.8);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.info-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,18,32,0.72) 0%, rgba(11,18,32,0.35) 45%, rgba(11,18,32,0.85) 100%),
    url("../img/trx entrance 3.jpg");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.info-section > * {
  position: relative;
  z-index: 1;
}

.info-section h2,
.info-section .info-list {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.info-section h2 {
  text-align: center;
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.22);
}

.info-list {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  list-style: none;
  padding-top: 0;
  padding-bottom: 0;
}

.info-list li {
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: var(--shadow-md);
  font-size: 1.02rem;
  min-height: 120px;
}

.info-list li:before {
  content: "";
  display: none;
}

.info-list li strong {
  display: block;
  color: var(--primary-color);
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.info-list a {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
}

.info-list a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .info-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .info-section h2,
  .info-section .info-list {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
}

/* =========================
   Homepage Newsletter Section
   ========================= */
.newsletter-section {
  margin: var(--space-6) 0 0 0;
  text-align: center;
}

.newsletter-form {
  margin-top: var(--space-2);
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 1rem;
  min-width: 220px;
  background: var(--surface-muted);
}

.newsletter-form button {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.12s;
}

.newsletter-form button:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-1px);
}

/* =========================
   Park Section Styles
   ========================= */
.park-section {
  padding: 60px 20px;
  background: var(--third-color);
  color: var(--text-color);
}

.section-inner {
  max-width: 1100px;
  margin: auto;
}

.park-title {
  font-size: 2rem;
  color: var(--primary-color);
  background: var(--gradient-third);
  padding: 15px 25px;
  border-radius: var(--radius-md);
  text-align: center;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.park-content {
  background: #fff;
  padding: var(--space-6);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.park-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
  gap: var(--space-6);
}

.park-section h3 {
  color: var(--primary-color);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: var(--space-5);
}

.park-section ul {
  padding-left: 20px;
  color: var(--text-muted);
}

.park-section li {
  margin-bottom: 8px;
}

.park-image {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), filter var(--transition);
}

.park-image:hover {
  box-shadow: var(--shadow-md);
  filter: brightness(0.98) contrast(1.03);
}

.info-box {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: #f9fafb;
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
  border-left: 6px solid var(--secondary-color);
}

.info-box h4 {
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--primary-color);
  margin-bottom: var(--space-2);
}

.info-box.bring {
  background: #e0f7fa;
  border-left-color: #00bcd4;
}

.info-box.tips {
  background: #fff9c4;
  border-left-color: #fdd835;
}

@media (max-width: 768px) {
  .park-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 600px) {
  .park-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Ride Section Styles
   ========================= */
.rides {
  padding: 60px 20px;
  background: var(--third-color);
}

.rides h2 {
  font-size: 2rem;
  color: var(--primary-color);
  background: var(--gradient-third);
  padding: 15px 25px;
  border-radius: var(--radius-md);
  text-align: center;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.ride-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  max-width: 1100px;
  margin: auto;
}

.ride-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.ride-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}

.ride-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: filter var(--transition);
}

.ride-card img:hover {
  filter: brightness(0.98) contrast(1.03);
}

.ride-card h3 {
  color: var(--primary-color);
  font-size: 1.25rem;
  font-weight: 700;
  margin: var(--space-4) var(--space-4) var(--space-2);
}

.ride-card p {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 var(--space-4) var(--space-5);
}

@media (max-width: 768px) {
  .rides h2 {
    font-size: 1.6rem;
  }
}

/* =========================
   Contact Section Styles
   ========================= */
.section-contact .contact-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-7);
  margin-top: var(--space-4);
}

.section-contact .contact-form {
  flex: 1 1 320px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  min-width: 280px;
  border: 1px solid var(--border-color);
}

.section-contact .contact-form label {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--primary-color);
}

.section-contact .contact-form input,
.section-contact .contact-form textarea,
.section-contact .contact-form select {
  margin-bottom: var(--space-4);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface-muted);
  transition: border 0.18s, box-shadow 0.18s;
}

.section-contact .contact-form input:focus,
.section-contact .contact-form textarea:focus,
.section-contact .contact-form select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.section-contact .contact-form button {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
}

.section-contact .contact-form button:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.section-contact .contact-info,
.contact-info.enhanced-info {
  flex: 1 1 220px;
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-5);
  box-shadow: var(--shadow-sm);
  min-width: 220px;
  border: 1px solid var(--border-color);
}

.contact-info.enhanced-info {
  background: #f9fafb;
  border-left: 6px solid var(--secondary-color);
  padding: var(--space-5);
}

.section-contact .contact-info h3,
.contact-info.enhanced-info h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.15rem;
  margin-bottom: var(--space-3);
}

.contact-info.enhanced-info h3 {
  font-size: 1.4rem;
  margin-bottom: var(--space-4);
}

.section-contact .contact-info ul,
.section-contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.section-contact .contact-info li,
.section-contact li,
.contact-info.enhanced-info li {
  margin-bottom: var(--space-2);
  font-size: 1.05rem;
  color: var(--text-color);
}

@media (max-width: 800px) {
  .section-contact .contact-content {
    flex-direction: column;
    gap: var(--space-5);
  }
}

/* =========================
   Sidebar Styles
   ========================= */
.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 240px;
  height: 100%;
  background: var(--primary-color);
  color: #fff;
  z-index: 2000;
  transition: left 0.3s;
  box-shadow: 2px 0 12px rgba(30,58,138,0.10);
  padding-top: 60px;
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  left: 0;
}

.sidebar .sidebar-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.7rem;
  cursor: pointer;
}

.sidebar ul {
  list-style: none;
  padding: 0 0 0 24px;
  margin: 0;
}

.sidebar ul li {
  margin: 18px 0;
}

.sidebar ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.18s;
}

.sidebar ul li a:hover {
  color: var(--secondary-color);
}

.sidebar-submenu {
  list-style: none;
  padding-left: 18px;
  margin: 6px 0 0 0;
}

.sidebar-submenu li {
  margin: 8px 0;
}

.sidebar-submenu a {
  font-size: 0.98rem;
  color: #fbbf24;
  opacity: 0.85;
}

.sidebar-bottom {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 32px;
}

.sidebar-bottom-link {
  color: #fff;
  background: var(--primary-color);
  border: 1px solid #fbbf24;
  border-radius: var(--radius-sm);
  padding: 8px 24px;
  font-size: 1rem;
  text-decoration: none;
  margin-top: 4px;
  transition: background 0.18s, color 0.18s;
}

.sidebar-bottom-link:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 1999;
}

.sidebar.open ~ .sidebar-overlay {
  display: block;
}

.sidebar-toggle-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 2100;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.18s;
}

.sidebar-toggle-btn:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
}

@media (max-width: 700px) {
  .sidebar {
    width: 80vw;
    min-width: 160px;
  }
}

/* =========================
   Back to Top Button
   ========================= */
#backToTopBtn {
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 1200;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.18s, box-shadow 0.18s, opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}

#backToTopBtn.show {
  opacity: 1;
  pointer-events: auto;
}

#backToTopBtn:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

/* =========================
   Collections / Resources Table Styles
   ========================= */
.table {
  max-width: 1200px;
  margin: 28px auto 80px;
  padding: 18px;
}

.table-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.table-controls input[type="search"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.table-controls select {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
}

/* Table visual refinement (collections/resources) */
#collections-table,
#resources-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
}

#collections-table thead th,
#resources-table thead th {
  background: var(--gradient-secondary);
  color: #fff;
  text-align: left;
  font-weight: 600;
  padding: 12px 14px !important;
  letter-spacing: 0.2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

#collections-table tbody td,
#resources-table tbody td {
  padding: 12px 14px !important;
  border-bottom: 1px solid #eef2f7;
  color: #0f172a;
  vertical-align: top;
}

#collections-table tbody tr:nth-child(even) td,
#resources-table tbody tr:nth-child(even) td {
  background: #fafbff;
}

#collections-table tbody tr:hover td,
#resources-table tbody tr:hover td {
  background: rgba(251, 191, 36, 0.12);
}

#collections-table a,
#resources-table a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  word-break: break-word;
}

#collections-table a:hover,
#resources-table a:hover {
  text-decoration: underline;
}

/* Table wrapper spacing */
.table {
  max-width: 1200px;
  margin: 28px auto 80px;
  padding: 18px;
}

/* Table controls alignment */
.table-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.table-controls input[type="search"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.table-controls select {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
}

/* Pagination */
#pagination {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

#pagination button {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: var(--radius-sm);
  padding: 8px 10px !important;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

#pagination button:hover:not(:disabled) {
  border-color: var(--primary-color);
  background: rgba(30, 58, 138, 0.06);
}

#pagination button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive table */
@media (max-width: 760px) {
  #collections-table,
  #resources-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #collections-table thead th,
  #collections-table tbody td,
  #resources-table thead th,
  #resources-table tbody td {
    white-space: nowrap;
  }
}

/* =========================
   Contact Form Styles
   ========================= */
.contact-form-section {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-top: 30px;
  border: 1px solid var(--border-color);
}

.contact-form-section h2 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 25px;
  font-size: 1.8rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--surface-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.submit-btn {
  background: var(--gradient-primary);
  color: white;
  padding: 14px 30px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

.submit-btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.submit-btn:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .contact-form-section {
    padding: 20px;
  }

  .contact-form-section h2 {
    font-size: 1.5rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 10px 12px;
    font-size: 16px;
  }

  .submit-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }
}

/* =========================
   Team Member Styles
   ========================= */
.team-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.team-member {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--border-color);
}

.team-member:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.member-photo {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color) 0%, #60a5fa 100%);
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-info {
  padding: 20px;
  text-align: center;
}

.member-name {
  color: var(--primary-color);
  margin: 0 0 8px 0;
  font-size: 1.25rem;
}

.member-role {
  color: var(--secondary-color);
  font-weight: 600;
  margin: 0 0 10px 0;
  font-size: 0.95rem;
}

.member-email {
  color: #666;
  margin: 0;
  font-size: 0.9rem;
}

.project-info .project-details {
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.project-info .project-details h3 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 15px;
}

.project-info .project-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-info .project-details li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  color: #333;
}

.project-info .project-details li:last-child {
  border-bottom: none;
}

.project-info .project-details strong {
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .team-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .member-photo {
    height: 200px;
  }

  .project-info .project-details {
    padding: 20px;
  }
}

/* =========================
   Shared Buttons, Cards, Badges
   ========================= */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
  background: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: #f0f9ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(30, 64, 175, 0.15);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-descriptive {
  background: #dbeafe;
  color: #1e40af;
}

.badge-technical {
  background: #fecaca;
  color: #9f1239;
}

.badge-preservation {
  background: #ddd6fe;
  color: #5b21b6;
}

/* =========================
   Page Header / Banner / Content
   ========================= */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-md);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.page-header p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

.page-banner {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat;
  padding: 3rem 1rem;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  max-width: 800px;
}

.banner-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.banner-content p {
  font-size: 1.1rem;
  color: #dbeafe;
  font-weight: 500;
}

.page-intro {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: 700px;
}

.page-intro p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.7;
}

.content-section {
  margin-bottom: 2rem;
}

.section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.section-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.section-card-highlight {
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
  border-color: #bfdbfe;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin-bottom: 1.5rem;
  letter-spacing: -0.3px;
  border-bottom: 3px solid #1e40af;
  padding-bottom: 0.75rem;
  display: inline-block;
  width: 100%;
}

.section-description {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Content Lists */
.content-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.content-list li {
  padding: 0.75rem 0;
  color: #334155;
  line-height: 1.7;
  border-bottom: 1px solid #f1f5f9;
}

.content-list li:last-child {
  border-bottom: none;
}

.content-list strong {
  color: #0f172a;
  font-weight: 600;
}

/* Table Styles */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
}

.metadata-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.metadata-table thead {
  background: #f1f5f9;
}

.metadata-table thead th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #0f172a;
  border-bottom: 2px solid #e2e8f0;
}

.metadata-table tbody td {
  padding: 0.875rem 1rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

.metadata-table tbody tr:hover {
  background: #f8fafc;
}

.metadata-table tbody tr:last-child td {
  border-bottom: none;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
  .page-header {
    padding: 1.5rem 1rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .section-card {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .metadata-table {
    font-size: 0.85rem;
  }

  .metadata-table thead th,
  .metadata-table tbody td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .section-card {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .button-group {
    gap: 0.5rem;
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* =========================
   Web Preservation Page
   ========================= */
.main-content {
  padding: 0 0 var(--space-7) 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5);
}

.intro-section {
  margin: var(--space-5) 0 var(--space-6);
}

.intro-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* Section layout */
.content-section {
  margin: var(--space-7) 0;
}

.section-title {
  color: var(--primary-color);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-3);
  letter-spacing: 0.2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto var(--space-5);
  max-width: 780px;
  font-size: 1rem;
}

/* Card grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}

.cards-grid.large {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card h3 {
  margin: var(--space-2) 0 var(--space-2);
  color: var(--primary-color);
  font-size: 1.2rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1rem;
}

.card-icon {
  font-size: 1.6rem;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--surface-muted);
  border-radius: 10px;
  margin-bottom: var(--space-2);
  color: var(--primary-color);
}

/* Card variants */
.card-accent {
  border-color: rgba(30, 58, 138, 0.15);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.card-primary {
  border-color: rgba(251, 191, 36, 0.3);
  background: linear-gradient(180deg, #ffffff 0%, #fff7e6 100%);
}

.card-highlight {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

/* Lists */
.bullet-list {
  margin: var(--space-3) 0 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.bullet-list li {
  margin-bottom: 6px;
}

/* Table styles (page-specific) */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table thead th {
  background: var(--gradient-secondary);
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
}

.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  color: #0f172a;
}

.data-table tbody tr:nth-child(even) td {
  background: #fafbff;
}

/* Badges (page-specific) */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

.badge-red {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-purple {
  background: #ede9fe;
  color: #6d28d9;
}

/* Buttons */
.btn-outline {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background: #fff;
}

.btn-outline:hover {
  background: rgba(30, 58, 138, 0.08);
}

/* Support block */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.support-item {
  text-align: center;
  padding: var(--space-4);
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.support-icon {
  font-size: 1.5rem;
  display: inline-block;
  margin-bottom: var(--space-2);
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: var(--space-5) var(--space-3);
  }

  .section-title {
    font-size: 1.5rem;
  }

  .card-highlight {
    padding: var(--space-5);
  }

  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table thead th,
  .data-table tbody td {
    white-space: nowrap;
  }
}

/* Collections page refinements */
.info-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
}

.collections-intro {
  text-align: center;
  margin: var(--space-6) 0 var(--space-4);
}

/* About page tweaks */
.section-about .section-card {
  margin-bottom: var(--space-5);
}

.section-about .section-title {
  text-align: left;
  font-size: 1.5rem;
}

.section-about .section-description {
  font-size: 1rem;
  line-height: 1.75;
}

/* Page header block */
.section-about .page-header {
  margin: 0 0 var(--space-6);
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.section-about .page-header h2 {
  margin: 0 0 var(--space-2);
  color: var(--primary-color);
  font-size: 1.6rem;
}

.section-about .page-header p {
  margin: 0 auto;
  color: var(--text-muted);
  max-width: 760px;
}

/* About page grid */
.section-about .about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.section-about .section-card {
  margin-bottom: 0;
}

.section-about .section-card:nth-child(odd) {
  transform: translateY(2px);
}

.section-about .section-card:nth-child(even) {
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .section-about .about-grid {
    grid-template-columns: 1fr;
  }
}

/* About: subtle color accents */
.section-about .section-card--accent {
  border-left: 4px solid var(--primary-color);
}

.section-about .section-card--soft {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: #e2e8f0;
}

.section-about .theme-strip {
  margin-top: var(--space-3);
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.section-about .theme-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.section-about .chip-blue {
  background: #dbeafe;
  color: #1e40af;
}

.section-about .chip-gold {
  background: #fef3c7;
  color: #92400e;
}

.section-about .chip-slate {
  background: #e2e8f0;
  color: #334155;
}

/* Make Objectives span full width */
.section-about .section-card--wide {
  grid-column: 1 / -1;
}

/* Center align key sections on About page */
.section-about section[aria-labelledby="our-mission"],
.section-about section[aria-labelledby="vision"],
.section-about section[aria-labelledby="motto"],
.section-about section[aria-labelledby="objectives"] {
  text-align: center;
}

.section-about section[aria-labelledby="objectives"] .content-list {
  text-align: center;
  list-style-position: inside;
  padding-left: 0;
}

/* Center titles for Mission/Vision/Motto/Objectives */
.section-about section[aria-labelledby="our-mission"] .section-title,
.section-about section[aria-labelledby="vision"] .section-title,
.section-about section[aria-labelledby="motto"] .section-title,
.section-about section[aria-labelledby="objectives"] .section-title {
  text-align: center;
}