/* style/resources.css */

/* Base styles for the page */
.page-resources {
  font-family: 'Arial', sans-serif;
  color: #f0f0f0; /* Light text for dark body background */
  line-height: 1.6;
}

/* Top padding for the first section to clear fixed header */
.page-resources__hero-banner {
  padding-top: 120px; /* Adjust based on shared header height */
}

/* Sections */
.page-resources__section {
  padding: 80px 0;
  background-color: var(--secondary-color); /* Default dark background */
  color: #f0f0f0;
}

.page-resources__section--guides {
  background-color: #f9f9f9;
  color: #333333;
}

.page-resources__section--faq {
  background-color: #f9f9f9;
  color: #333333;
}

.page-resources__dark-bg {
  background-color: var(--secondary-color);
  color: #f0f0f0;
}

.page-resources__light-bg {
  background-color: #ffffff;
  color: #333333;
}

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

.page-resources__text-center {
  text-align: center;
}

/* Hero Banner */
.page-resources__hero-banner {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #000000 100%);
  padding-bottom: 80px;
  text-align: center;
}

.page-resources__hero-title {
  font-size: 48px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-resources__hero-description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #e0e0e0;
}

.page-resources__hero-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Buttons */
.page-resources__btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 16px;
}

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

.page-resources__btn--primary:hover {
  background-color: #e0b800;
  border-color: #e0b800;
  color: #ffffff;
}

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

.page-resources__btn--secondary:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

.page-resources__btn--link {
  background: none;
  border: none;
  color: var(--primary-color);
  padding: 0;
  font-weight: bold;
  text-decoration: underline;
  font-size: 15px;
}

.page-resources__btn--link:hover {
  color: #e0b800;
}

.page-resources__btn--large {
  padding: 18px 40px;
  font-size: 18px;
}

/* Section Titles & Descriptions */
.page-resources__section-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-resources__section--guides .page-resources__section-title,
.page-resources__section--news .page-resources__section-title,
.page-resources__section--faq .page-resources__section-title {
  color: var(--secondary-color);
}

.page-resources__section-description {
  font-size: 17px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px auto;
  color: inherit;
}

/* Grids */
.page-resources__grid {
  display: grid;
  gap: 30px;
  margin-top: 40px;
}

.page-resources__grid--3-cols {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.page-resources__grid--2-cols {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.page-resources__grid--reverse-order {
  grid-template-columns: 1fr 1fr;
  direction: rtl; /* For reversing content order */
}

.page-resources__grid--reverse-order > *:nth-child(1) {
  direction: ltr;
}

.page-resources__grid--reverse-order > *:nth-child(2) {
  direction: ltr;
}

/* Cards */
.page-resources__card {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  height: 100%;
}

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

.page-resources__card-image-wrapper {
  width: 100%;
  height: 200px;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.page-resources__card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-resources__card-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color);
  line-height: 1.3;
}

.page-resources__card-title a {
  color: inherit;
  text-decoration: none;
}

.page-resources__card-title a:hover {
  color: var(--primary-color);
}

.page-resources__card-text {
  font-size: 16px;
  margin-bottom: 20px;
  flex-grow: 1;
  color: #555555;
}

/* Content Blocks with Image */
.page-resources__content-block {
  padding: 30px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-resources__content-block .page-resources__content-title {
  color: var(--primary-color);
  font-size: 28px;
  margin-bottom: 15px;
}

.page-resources__content-block .page-resources__content-text {
  font-size: 16px;
  color: #e0e0e0;
  margin-bottom: 25px;
}

.page-resources__image-block {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-resources__image-block .page-resources__image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* FAQ */
.page-resources__faq-list {
  margin-top: 40px;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 20px;
  opacity: 0;
  color: #555555;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
  background: #fdfdfd;
  border-radius: 0 0 5px 5px;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-resources__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-resources__faq-question:active {
  background: #eeeeee;
}

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--secondary-color);
}

.page-resources__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 40px;
  }
  .page-resources__section-title {
    font-size: 32px;
  }
  .page-resources__grid--2-cols {
    grid-template-columns: 1fr;
  }
  .page-resources__grid--reverse-order {
    direction: ltr; /* Reset for smaller screens */
  }
  .page-resources__grid--reverse-order > * {
    direction: ltr;
  }
  .page-resources__content-block {
    padding: 25px;
  }
  .page-resources__image-block .page-resources__image {
    max-height: 350px;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-banner {
    padding-top: 100px; /* Adjust for mobile fixed header */
    padding-bottom: 60px;
  }
  .page-resources__hero-title {
    font-size: 32px;
  }
  .page-resources__hero-description {
    font-size: 16px;
  }
  .page-resources__hero-cta {
    flex-direction: column;
    gap: 15px;
  }
  .page-resources__btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  .page-resources__section {
    padding: 50px 0;
  }
  .page-resources__section-title {
    font-size: 28px;
  }
  .page-resources__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-resources__grid {
    gap: 20px;
    margin-top: 30px;
  }
  .page-resources__card {
    padding: 20px;
  }
  .page-resources__card-image-wrapper {
    height: 180px;
  }
  .page-resources__card-title {
    font-size: 20px;
  }
  .page-resources__card-text {
    font-size: 15px;
  }
  .page-resources__content-block {
    padding: 20px;
  }
  .page-resources__content-block .page-resources__content-title {
    font-size: 24px;
  }
  .page-resources__content-block .page-resources__content-text {
    font-size: 15px;
  }
  .page-resources__image-block .page-resources__image {
    max-height: 300px;
  }
  .page-resources__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-resources__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  .page-resources__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-resources__faq-answer {
    padding: 0 15px;
  }
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }

  /* Mobile image responsiveness */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__content-block,
  .page-resources__image-block {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}