/* style/resources.css */

/* Custom properties for colors (ensure consistency with brand colors) */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --accent-color: #C30808; /* For register/login buttons */
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --bg-color-light: #f9f9f9;
  --border-color: #e0e0e0;
}

/* Base styles for the page content */
.page-resources {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Default dark text for light body background */
  background-color: var(--secondary-color); /* Matches body background from shared.css */
}

.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-resources__section {
  padding: 80px 0;
  text-align: center;
}

.page-resources__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-resources__light-bg {
  background-color: var(--secondary-color);
  color: var(--text-color-dark);
}

.page-resources__section-title {
  font-size: 36px;
  margin-bottom: 20px;
  color: inherit; /* Inherit color from parent section */
  font-weight: bold;
}

.page-resources__dark-bg .page-resources__section-title {
  color: var(--text-color-light);
}

.page-resources__light-bg .page-resources__section-title {
  color: var(--text-color-dark);
}

.page-resources__section-description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.7;
  color: inherit;
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  padding-bottom: 60px;
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-resources__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-resources__hero-image {
  width: 100%;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.page-resources__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-resources__main-title {
  font-size: 48px;
  margin-bottom: 15px;
  color: var(--text-color-light);
  line-height: 1.2;
  font-weight: 800;
}

.page-resources__intro-description {
  font-size: 20px;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: var(--text-color-light);
  line-height: 1.6;
}

.page-resources__cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure group takes full width for wrapping */
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 180px; /* Ensure buttons are not too small */
  text-align: center;
  box-sizing: border-box;
}

.page-resources__btn-primary {
  background: var(--accent-color); /* Register/Login color */
  color: var(--text-color-light); /* Font color for register/login */
  border: 2px solid var(--accent-color);
}

.page-resources__btn-primary:hover {
  background: #a90707; /* Darken for hover */
  border-color: #a90707;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.page-resources__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-resources__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* News Grid */
.page-resources__latest-news {
  padding-top: 60px;
  padding-bottom: 60px;
}

.page-resources__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
  text-align: left;
}

.page-resources__news-card {
  background: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-resources__news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-resources__news-card .page-resources__card-title {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 20px 10px 20px;
  line-height: 1.4;
}

.page-resources__news-card .page-resources__card-title a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.page-resources__news-card .page-resources__card-title a:hover {
  color: #005a2e; /* Darken for hover */
}

.page-resources__news-card .page-resources__card-excerpt {
  font-size: 16px;
  color: var(--text-color-dark);
  margin: 0 20px 15px 20px;
  flex-grow: 1; /* Allow excerpt to take available space */
}

.page-resources__read-more {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  margin: 0 20px 20px 20px;
  transition: color 0.3s ease;
}

.page-resources__read-more:hover {
  color: #005a2e; /* Darken for hover */
}

.page-resources__arrow {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-resources__read-more:hover .page-resources__arrow {
  transform: translateX(5px);
}

.page-resources__view-all-news {
  margin-top: 50px;
}

/* Guides Section */
.page-resources__guides {
  padding-top: 60px;
  padding-bottom: 60px;
}

.page-resources__guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
  text-align: left;
}

.page-resources__guide-card {
  background: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-resources__guide-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-resources__guide-card .page-resources__card-title {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 20px 10px 20px;
  line-height: 1.4;
}