:root {
  --primary-color: #E44D26;
  --secondary-color: #FFB800;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-dark: #000;
  --card-bg-dark-mode: rgba(255, 255, 255, 0.08);
  --border-color-dark-mode: rgba(255, 255, 255, 0.15);
}

/* Base styles for the page content, accounting for fixed header */
.page-resources {
  padding-top: 120px; /* Desktop: Adjust based on actual header height */
  color: var(--text-color-light); /* Default text color for dark body background */
  background-color: var(--background-dark);
  min-height: 100vh;
}

.page-resources h1,
.page-resources h2,
.page-resources h3,
.page-resources h4,
.page-resources h5,
.page-resources h6 {
  color: var(--text-color-light);
  margin-top: 0;
  margin-bottom: 20px;
}

.page-resources p {
  line-height: 1.6;
  margin-bottom: 15px;
}

.page-resources a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

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

/* Hero Section */
.page-resources__hero-section {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(228, 77, 38, 0.8), rgba(255, 184, 0, 0.8)), url('[GALLERY:hero:kv888,kv999,background]') no-repeat center center;
  background-size: cover;
  border-bottom: 5px solid var(--secondary-color);
  position: relative;
  z-index: 1;
}

.page-resources__hero-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-resources__main-title {
  font-size: 3.2em;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-color-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-resources__title-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.9);
}

.page-resources__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
}

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

.page-resources__btn-primary:hover {
  background-color: darken(var(--primary-color), 10%);
  border-color: darken(var(--primary-color), 10%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-resources__btn-secondary:hover {
  background-color: darken(var(--secondary-color), 10%);
  border-color: darken(var(--secondary-color), 10%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-resources__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 50px;
  color: rgba(255, 255, 255, 0.8);
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 80px 0;
  background-color: var(--background-dark);
}

.page-resources__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background-color: var(--card-bg-dark-mode);
  border: 1px solid var(--border-color-dark-mode);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--card-bg-dark-mode);
  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: rgba(255, 255, 255, 0.15);
}

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

.page-resources__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-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(--primary-color);
  transform: rotate(45deg);
}

.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;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 0 5px 5px;
  color: rgba(255, 255, 255, 0.85);
}

.page-resources__faq-item.active .page-resources__faq-answer p {
  margin-bottom: 0;
}

/* Brand Section */
.page-resources__brand-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-resources__brand-section .page-resources__section-title,
.page-resources__brand-section .page-resources__section-description {
  color: var(--text-color-light);
}

.page-resources__brand-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__brand-item {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-resources__brand-item:hover {
  transform: translateY(-8px);
  background-color: rgba(0, 0, 0, 0.3);
}

.page-resources__brand-image {
  width: 150px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__brand-item-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-resources__brand-item p {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.9);
}

/* Blog Section */
.page-resources__blog-section {
  padding: 80px 0;
  background-color: var(--background-dark);
}

.page-resources__blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__blog-item {
  background-color: var(--card-bg-dark-mode);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color-dark-mode);
}

.page-resources__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-resources__blog-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-resources__blog-item-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-resources__blog-item-content {
  padding: 20px;
}

.page-resources__blog-item-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.page-resources__blog-item-excerpt {
  font-size: 0.95em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
}

.page-resources__blog-item-date {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  text-align: right;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__main-title {
    font-size: 2.8em;
  }

  .page-resources__section-title {
    font-size: 2em;
  }

  .page-resources__brand-content,
  .page-resources__blog-list {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .page-resources {
    padding-top: 100px !important; /* Mobile: Adjust based on actual header height */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-resources__container {
    padding: 0 15px;
  }

  .page-resources__hero-section {
    padding: 60px 0;
  }

  .page-resources__main-title {
    font-size: 2.2em;
  }

  .page-resources__title-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-resources__cta-button {
    width: 100%;
    max-width: 300px; /* Limit button width for better appearance on small screens */
    margin: 0 auto;
    padding: 12px 25px;
    font-size: 1em;
  }

  .page-resources__section-title {
    font-size: 1.8em;
  }

  .page-resources__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-resources__faq-section,
  .page-resources__brand-section,
  .page-resources__blog-section {
    padding: 60px 0;
  }

  .page-resources__faq-question {
    padding: 15px;
  }

  .page-resources__faq-question h3 {
    font-size: 1em;
  }

  .page-resources__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }

  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }

  .page-resources__brand-item {
    padding: 25px;
  }

  .page-resources__brand-item-title {
    font-size: 1.3em;
  }

  .page-resources__blog-item-image {
    height: 180px;
  }

  .page-resources__blog-item-title {
    font-size: 1.2em;
  }
  
  /* Ensure all images are responsive and do not overflow */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-resources__hero-section,
  .page-resources__container,
  .page-resources__cta-buttons,
  .page-resources__faq-list,
  .page-resources__brand-content,
  .page-resources__blog-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no horizontal scroll */
  }
}

@media (max-width: 480px) {
  .page-resources__main-title {
    font-size: 1.8em;
  }

  .page-resources__section-title {
    font-size: 1.5em;
  }

  .page-resources__cta-button {
    font-size: 0.9em;
    padding: 10px 20px;
  }

  .page-resources__brand-item {
    padding: 20px;
  }

  .page-resources__blog-item-title {
    font-size: 1.1em;
  }
}