:root {
  --club-primary: #8b4513; /* Rich leather brown */
  --club-secondary: #f4e9d7; /* Aged paper */
  --club-accent: #2f1810; /* Dark wood */
  --club-highlight: #d4a373; /* Soft leather */
  --text-light: #f4e9d7;
  --text-dark: #2f1810;
  --shadow: 0 4px 20px rgba(47, 24, 16, 0.2);
  --book-edge: repeating-linear-gradient(
    to right,
    var(--club-primary),
    var(--club-primary) 2px,
    #a0522d 2px,
    #a0522d 4px
  );
  --navbar-height: 80px;
  --footer-height: 400px;
  --transition-standard: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Layout */
.club-page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 2rem;
  padding-top: calc(var(--navbar-height) + 2rem); /* Add padding for navbar */
  background: var(--club-secondary);
  color: var(--text-dark);
  font-family: "EB Garamond", serif;
  min-height: 100vh;
  position: relative;
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}

/* Book Spine Decoration */
.book-spine-decoration {
  position: fixed;
  left: 0;
  top: 0;
  width: 20px;
  height: 100%;
  background: var(--book-edge);
  z-index: 10;
}

/* Header Section */
.club-header {
  text-align: center;
  padding: 4rem 2rem 5rem;
  background: var(--club-accent);
  color: var(--text-light);
  position: relative;
  margin-bottom: 3rem;
  border: 2px solid var(--club-primary);
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
  animation: fadeIn 1s ease-out;
  background-image: url("/images/paper-texture.jpg");
  background-blend-mode: overlay;
  background-size: cover;
}

.club-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(47, 24, 16, 0.9) 0%,
    rgba(47, 24, 16, 0.7) 100%
  );
  opacity: 0.85;
  pointer-events: none;
  z-index: 1;
}

.header-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

/* Logo styling */
.club-logo-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 2.5rem;
  transform: perspective(800px) rotateY(5deg);
  transition: transform 0.5s ease;
}

.club-logo-container:hover {
  transform: perspective(800px) rotateY(-5deg);
}

/* Book cover effect */
.club-logo-container::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--club-primary);
  border-radius: 0 5px 5px 0;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.club-logo {
  position: relative;
  width: 92%;
  height: 92%;
  object-fit: cover;
  object-position: center;
  z-index: 2;
  border: 3px solid var(--club-highlight);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
  top: 4%;
  left: 4%;
}

/* Book spine effect */
.club-logo-container::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 100%;
  background: var(--book-edge);
  left: -15px;
  top: 0;
  transform: perspective(800px) rotateY(-25deg);
  box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.3);
  z-index: 0;
}

.club-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  font-family: "Playfair Display", serif;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  display: inline-block;
}

/* Decorative underline for title */
.club-title::after {
  content: "";
  position: absolute;
  width: 80%;
  height: 3px;
  background: var(--club-highlight);
  bottom: -10px;
  left: 10%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.club-description {
  position: relative;
  max-width: 700px;
  margin: 2rem auto 0;
  padding: 1.5rem;
  background: rgba(47, 24, 16, 0.3);
  border: 1px solid var(--club-highlight);
  border-radius: 5px;
}

.club-description strong {
  display: block;
  font-size: 1.2rem;
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
  color: var(--club-highlight);
}

.quote {
  display: block;
  font-style: italic;
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: var(--club-highlight);
  margin-top: 0.5rem;
  position: relative;
  padding: 0 1.5rem;
}

/* Quotation marks */
.quote::before,
.quote::after {
  content: "''";
  font-family: "Playfair Display", serif;
  font-size: 3rem;
  position: absolute;
  opacity: 0.4;
  color: var(--text-light);
}

.quote::before {
  top: -1.5rem;
  left: 0;
}

.quote::after {
  content: "''";
  bottom: -2.5rem;
  right: 0;
}

/* Floating book pages decoration */
.floating-pages {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.floating-page {
  position: absolute;
  width: 40px;
  height: 60px;
  background: rgba(244, 233, 215, 0.2);
  border-radius: 2px;
  animation: floatPage 15s linear infinite;
  opacity: 0;
}

.floating-page:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
}

.floating-page:nth-child(2) {
  left: 25%;
  animation-delay: 3s;
}

.floating-page:nth-child(3) {
  left: 40%;
  animation-delay: 6s;
}

.floating-page:nth-child(4) {
  left: 65%;
  animation-delay: 9s;
}

.floating-page:nth-child(5) {
  left: 80%;
  animation-delay: 12s;
}

/* Literature Card - Updated for consistent structure */
.literature-card {
  background: var(--text-light);
  /* padding: 3rem; */ /* Removed base padding, handled by card-content */
  border: 2px solid var(--club-primary);
  border-radius: 8px;
  position: relative;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition-standard);
  animation: slideUp 0.6s ease-out forwards;
  opacity: 0;
  background-image: url("/images/parchment-texture.jpg");
  background-size: cover;
  background-blend-mode: overlay;
  overflow: hidden; /* Added overflow hidden */
}

/* Remove or adjust the old ::before border if needed */
.literature-card::before {
  /* content: ""; */ /* Commented out or removed */
  /* position: absolute;
  top: 10px;
  right: 10px;
  bottom: 10px;
  left: 10px;
  border: 1px solid var(--club-primary);
  pointer-events: none;
  border-radius: 6px;
  opacity: 0.5;
  background: rgba(244, 233, 215, 0.7); */
  content: none; /* Simpler removal */
}

/* Updated Card Header */
.card-header {
  position: relative;
  z-index: 2; /* Ensure header is above background textures */
  /* margin-bottom: 1.5rem; */ /* Removed, spacing handled by card-content padding */
  padding: 1.5rem 2rem; /* Added padding */
  background: rgba(47, 24, 16, 0.1); /* Subtle background for header */
  border-bottom: 2px solid var(--club-primary); /* Consistent border */
}

.card-header h2 {
  color: var(--club-primary);
  font-size: 2.2rem;
  margin: 0; /* Remove default margin */
  /* margin-bottom: 1rem; */ /* Removed */
  font-family: "Playfair Display", serif;
  display: flex;
  align-items: center;
  gap: 1rem;
  /* border-bottom: 2px solid var(--club-primary); */ /* Moved border to card-header */
  /* padding-bottom: 1rem; */ /* Removed */
  position: relative;
}

/* Remove or adjust the old h2::after decoration */
.card-header h2::after {
  /* content: "✦";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-light);
  padding: 0 15px;
  color: var(--club-primary);
  font-size: 1.2rem; */
  content: none; /* Simpler removal */
}

.card-header h2 i {
  stroke-width: 2; /* Ensure consistent icon stroke */
}


/* Updated Card Content */
.card-content {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-dark);
  /* column-count: 2; */ /* Consider removing columns for simplicity or adjusting */
  /* column-gap: 2.5rem; */
  text-align: justify;
  padding: 2rem; /* Added padding */
}

.card-content p {
  margin-bottom: 1.5rem;
  /* break-inside: avoid; */ /* May not be needed without columns */
}

.card-content p:last-of-type {
  margin-bottom: 0;
}

.first-letter {
  font-size: 3.5rem;
  float: left;
  line-height: 1;
  padding: 0.5rem 0.7rem 0 0;
  font-family: "Playfair Display", serif;
  color: var(--club-primary);
  font-weight: bold;
}

/* Feature List Styling (ensure it's inside card-content) */
.feature-list {
  margin-top: 2rem; /* Add space above the list */
  /* column-span: all; */ /* Span columns if using column-count */
}

.feature-list ul {
  list-style: none;
  padding: 0;
  display: grid; /* Use grid for better control */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: rgba(139, 69, 19, 0.05); /* Subtle background */
  border-left: 3px solid var(--club-highlight);
  border-radius: 4px;
}

.feature-list li i {
  color: var(--club-primary);
  stroke-width: 2;
}


/* Remove or comment out the old .connect-section styles */
/*
.connect-section {
  background: var(--text-light);
  padding: 3rem;
  border: 2px solid var(--club-primary);
  border-radius: 8px;
  position: relative;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  animation: slideUp 0.6s ease-out forwards;
  animation-delay: 0.6s;
  opacity: 0;
  overflow: hidden;
}

.connect-section::before {
  ...
}

.connect-section h2 {
  ...
}

.connect-section h2::before,
.connect-section h2::after {
  ...
}

.connect-intro {
  ...
}
*/

/* Keep Ink Splatter Styles */
.ink-splatter {
  position: absolute;
  width: 100px;
  height: 100px;
  background-image: url("/images/ink-splatter.png");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.1;
  z-index: 0;
}

.ink-splatter.top-right {
  top: 20px;
  right: 20px;
  transform: rotate(45deg);
}

.ink-splatter.bottom-left {
  bottom: 20px;
  left: 20px;
  transform: rotate(-45deg) scale(0.8);
}

/* Connect Section */
.connect-section {
  background: var(--text-light);
  padding: 3rem;
  border: 2px solid var(--club-primary);
  border-radius: 8px;
  position: relative;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  animation: slideUp 0.6s ease-out forwards;
  animation-delay: 0.6s;
  opacity: 0;
  overflow: hidden;
}

/* Parchment background effect */
.connect-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(244, 233, 215, 0.9) 0%,
    rgba(244, 233, 215, 0.7) 100%
  );
  border-radius: 6px;
  background-image: url("/images/old-paper-texture.jpg");
  background-blend-mode: overlay;
  background-size: cover;
  opacity: 0.9;
}

.connect-section h2 {
  color: var(--club-primary);
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  font-family: "Playfair Display", serif;
  position: relative;
  display: inline-block;
  z-index: 2;
}

/* Decorative quill pen for heading */
.connect-section h2::before {
  content: "";
  position: absolute;
  width: 40px;
  height: 2px;
  background: var(--club-primary);
  bottom: -10px;
  left: calc(50% - 60px);
  transform: rotate(-45deg);
}

.connect-section h2::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 2px;
  background: var(--club-primary);
  bottom: -10px;
  right: calc(50% - 60px);
  transform: rotate(45deg);
}

.connect-intro {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-style: italic;
  color: var(--club-accent);
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0.5rem 1rem;
  border-left: 3px double var(--club-primary);
  border-right: 3px double var(--club-primary);
  display: inline-block;
  background-color: rgba(244, 233, 215, 0.7);
}

/* Decorative book corners */
.manuscript-style::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 50px;
  background: var(--club-secondary);
  bottom: -25px;
  right: -25px;
  transform: rotate(45deg);
  border: 2px solid var(--club-primary);
  z-index: 0;
}

.manuscript-style::before {
  content: "";
  position: absolute;
  width: 50px;
  height: 50px;
  background: var(--club-secondary);
  top: -25px;
  left: -25px;
  transform: rotate(45deg);
  border: 2px solid var(--club-primary);
  z-index: 0;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatPage {
  0% {
    transform: translateY(100%) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-100%) rotate(360deg);
    opacity: 0;
  }
}

/* Media Queries */
@media (max-width: 768px) {
  .club-header {
    padding: 3rem 1.5rem 4rem;
  }

  .club-logo-container {
    width: 150px;
    height: 150px;
  }

  .quote::before,
  .quote::after {
    font-size: 2rem;
  }

  .quote::before {
    top: -1rem;
  }

  .quote::after {
    bottom: -1.5rem;
  }

  .card-content {
    /* column-count: 1; */ /* Ensure single column */
    font-size: 1rem;
    line-height: 1.6;
    padding: 1.5rem; /* Adjust padding */
  }

  .literature-card {
    /* padding: 2rem; */ /* Padding handled by card-content */
    margin: 1rem 0;
    width: 100%;
    box-sizing: border-box;
  }

  .card-header {
    padding: 1rem 1.5rem; /* Adjust header padding */
  }

  .card-header h2 {
    font-size: 1.8rem; /* Adjust header font size */
  }

  .feature-list ul {
     grid-template-columns: 1fr; /* Stack list items */
  }

  .connect-section {
    padding: 2rem;
  }

  .connect-intro {
    font-size: 1rem;
    border-left: 2px double var(--club-primary);
    border-right: 2px double var(--club-primary);
  }

  .club-page {
    padding: 1rem;
    padding-top: calc(var(--navbar-height) + 1rem);
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
    max-width: 100vw;
  }

  .club-header {
    padding: 2rem 1rem 3rem;
    margin: 0 -1rem; /* Compensate for padding */
  }

  .literature-card,
  .connect-section {
    margin: 1rem 0;
    padding: 1.5rem;
    width: 100%;
    box-sizing: border-box;
  }

  .floating-pages {
    display: none; /* Hide floating pages on mobile */
  }

  .club-logo-container {
    width: 120px;
    height: 120px;
    margin: 1rem auto;
  }
}

@media (max-width: 480px) {
  .club-header {
    padding: 2rem 1rem 3rem;
  }

  .club-logo-container {
    width: 120px;
    height: 120px;
  }

  .club-description {
    padding: 1rem;
  }

  .quote::before,
  .quote::after {
    font-size: 1.5rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .literature-card,
  .connect-section,
  .club-header {
    animation: none;
    opacity: 1;
  }

  .literature-card:hover,
  .leader-card:hover,
  .club-logo:hover {
    transform: none;
  }

  .floating-page {
    animation: none;
    display: none;
  }
}

/* Print Styles */
@media print {
  .club-page {
    box-shadow: none;
    min-height: initial;
  }

  .book-spine-decoration,
  .floating-pages,
  .ink-splatter {
    display: none;
  }

  .club-header {
    background: none;
    color: var(--text-dark);
    border: none;
    box-shadow: none;
  }

  .club-title {
    color: var(--club-primary);
  }

  .club-logo {
    border: 1px solid var(--club-primary);
    box-shadow: none;
  }

  .literature-card,
  .connect-section {
    background: none;
    border: 1px solid var(--club-primary);
    box-shadow: none;
  }
}
