/* Resources Page Styles */

/* Hero Section - Matches About-Marriage-Solutions.html sizing */
.u-section-1 {
  background-repeat: no-repeat, no-repeat;
  background-image: linear-gradient(to bottom, rgba(41, 45, 51, 0.6), rgba(41, 45, 51, 0.6)), url('images/photo-1705978173299-b6df3b554934.jpeg');
  background-size: cover, cover;
}

.u-section-1 .u-sheet-1 {
  min-height: 572px;
}

.u-section-1 .u-group-1 {
  min-height: 340px;
  margin-top: 60px;
  margin-bottom: 60px;
  height: auto;
}

.u-section-1 .u-text-1 {
  margin: 0 10px;
  color: #ffffff;
  font-size: 3rem;
  font-weight: 700;
}

.u-section-1 .u-text-2 {
  width: 726px;
  margin: 20px auto 0;
  color: #ffffff;
  font-size: 1.125rem;
  line-height: 1.8;
}

/* Intro Section */
.u-section-2 {
  background-color: #ffffff;
  padding: 60px 0;
}

.u-section-2 .u-sheet-1 {
  max-width: 1140px;
  margin: 0 auto;
}

.u-section-2 .u-group-1 {
  padding: 20px;
}

.u-section-2 .u-icon-1 {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: block;
}

.u-section-2 .u-text-1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #292d33;
  margin-bottom: 20px;
}

.u-section-2 .u-text-2 {
  font-size: 1.125rem;
  color: #555555;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
}

/* Book Grid Section */
.u-section-3 {
  padding: 60px 0 80px;
}

.u-section-3 .u-sheet-1 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Book Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

/* Book Card */
.book-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Book Cover - with watermark background */
.book-cover {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f2f5;
  background-image: url('images/book-placeholder.svg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 70px auto;
  padding: 20px;
  overflow: hidden;
}

.book-cover img {
  max-width: 100%;
  max-height: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  background-color: #fff;
}

.book-card:hover .book-cover img {
  transform: scale(1.05);
}

/* Hide book cover images for books without valid covers - shows watermark instead */
.book-cover.no-cover img {
  display: none;
}

/* Book Info - Fixed layout with bottom alignment */
.book-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 140px;
}

.book-title {
  font-size: 1rem;
  font-weight: 700;
  color: #292d33;
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

/* Bottom section - author and link stay together at bottom */
.book-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.book-author {
  font-size: 0.875rem;
  color: #666666;
  margin: 0 0 15px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.book-link {
  display: inline-block;
  background-color: #4a90e2;
  color: #ffffff !important;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.book-link:hover {
  background-color: #3a7bc8;
  transform: scale(1.02);
  text-decoration: none;
}

/* Contact/CTA Section - Center Aligned */
.u-section-4 {
  padding: 60px 0;
}

.u-section-4 .u-sheet-1 {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.u-section-4 .u-text-1 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 auto 15px;
  text-align: center;
}

.u-section-4 .u-text-2 {
  font-size: 1.125rem;
  color: #ffffff;
  margin: 0 auto 25px;
  opacity: 0.9;
  text-align: center;
}

.u-section-4 .u-btn-1 {
  padding: 14px 35px;
  font-size: 1rem;
  font-weight: 600;
  display: inline-block;
  margin: 0 auto;
}

/* Responsive Styles - Matching About page breakpoints */
@media (max-width: 1199px) {
  .u-section-1 {
    background-position: 50% 50%, 50% 50%;
  }

  .u-section-1 .u-sheet-1 {
    min-height: 472px;
  }

  .u-section-1 .u-group-1 {
    height: auto;
  }

  .u-section-1 .u-text-1 {
    margin-left: 0;
    margin-right: 0;
  }

  .book-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
}

@media (max-width: 991px) {
  .u-section-1 .u-sheet-1 {
    min-height: 362px;
  }

  .u-section-1 .u-text-2 {
    width: 720px;
  }

  .book-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .book-cover {
    height: 200px;
    background-size: 60px auto;
  }

  .book-cover img {
    max-height: 160px;
  }
}

@media (max-width: 767px) {
  .u-section-1 .u-sheet-1 {
    min-height: 272px;
  }

  .u-section-1 .u-text-2 {
    width: 540px;
  }

  .u-section-2 .u-text-1 {
    font-size: 1.75rem;
  }

  .u-section-2 .u-text-2 {
    font-size: 1rem;
  }

  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .book-cover {
    height: 180px;
    background-size: 55px auto;
  }

  .book-cover img {
    max-height: 140px;
  }

  .book-info {
    padding: 15px;
    min-height: 130px;
  }

  .book-title {
    font-size: 0.9375rem;
    min-height: 2.6em;
  }

  .book-author {
    font-size: 0.8125rem;
    min-height: 2.3em;
  }

  .book-link {
    padding: 8px 16px;
    font-size: 0.8125rem;
  }

  .u-section-4 .u-text-1 {
    font-size: 1.75rem;
  }

  .u-section-4 .u-text-2 {
    font-size: 1rem;
  }
}

@media (max-width: 575px) {
  .u-section-1 .u-sheet-1 {
    min-height: 171px;
  }

  .u-section-1 .u-text-2 {
    width: 340px;
  }

  .u-section-2 {
    padding: 40px 0;
  }

  .u-section-3 {
    padding: 40px 0 60px;
  }

  .book-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 320px;
    margin: 0 auto;
  }

  .book-card {
    flex-direction: row;
    align-items: stretch;
  }

  .book-cover {
    width: 120px;
    min-width: 120px;
    height: auto;
    min-height: 160px;
    padding: 15px;
    background-size: 45px auto;
  }

  .book-cover img {
    max-height: 130px;
    max-width: 90px;
  }

  .book-info {
    padding: 15px;
    justify-content: flex-start;
    min-height: auto;
  }

  .book-title {
    font-size: 0.9375rem;
    -webkit-line-clamp: 3;
    min-height: auto;
  }

  .book-author {
    font-size: 0.8125rem;
    margin-bottom: 10px;
    min-height: auto;
  }

  .book-link {
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  .u-section-4 {
    padding: 40px 0;
  }

  .u-section-4 .u-text-1 {
    font-size: 1.5rem;
  }
}
