/* style/resources.css */

/* Base styles and typography for dark background */
.page-resources {
  background-color: #0d1117; /* Dark background from shared.css */
  color: #ffffff; /* Light text for dark background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

.page-resources h1, .page-resources h2, .page-resources h3, .page-resources h4 {
  color: #FFD700; /* Accent color for headings */
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

.page-resources h1 {
  font-size: 3.2em;
  text-align: center;
}

.page-resources h2 {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 1em;
}

.page-resources h3 {
  font-size: 1.8em;
  color: #ffffff;
  text-align: left;
}

.page-resources p {
  margin-bottom: 1em;
  color: #f0f0f0;
}

.page-resources a {
  color: #FFD700;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.page-resources ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1em;
}

.page-resources ul li {
  margin-bottom: 0.5em;
  position: relative;
  padding-left: 20px;
  color: #f0f0f0;
}

.page-resources ul li::before {
  content: '▶';
  color: #FFD700;
  position: absolute;
  left: 0;
  font-size: 0.8em;
  top: 5px;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-download,
.page-resources__btn-contact {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%;
  box-sizing: border-box;
}

.page-resources__btn-primary {
  background-color: #FFD700;
  color: #1A202C;
  border: 2px solid #FFD700;
}

.page-resources__btn-primary:hover {
  background-color: #e6c200;
  border-color: #e6c200;
  color: #1A202C;
}

.page-resources__btn-secondary {
  background-color: transparent;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.page-resources__btn-secondary:hover {
  background-color: #FFD700;
  color: #1A202C;
}

.page-resources__btn-download,
.page-resources__btn-contact {
  background-color: #1A202C;
  color: #FFD700;
  border: 2px solid #FFD700;
  margin-top: 15px;
}

.page-resources__btn-download:hover,
.page-resources__btn-contact:hover {
  background-color: #FFD700;
  color: #1A202C;
}

.page-resources__btn-large {
  padding: 15px 30px;
  font-size: 1.2em;
}

/* Section common styles */
.page-resources__section {
  padding: 80px 20px;
  position: relative;
}

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

.page-resources__section-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #FFD700;
  text-align: center;
}

.page-resources__section-intro {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  width: 100%;
  height: 600px; /* Fixed height for hero */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0; /* shared handles body padding */
  margin-top: 0;
}

.page-resources__hero-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

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

.page-resources__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.page-resources__main-title {
  font-size: 3.5em;
  color: #FFD700;
  margin-bottom: 20px;
  max-width: 900px;
}

.page-resources__hero-description {
  font-size: 1.4em;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 800px;
}

/* Guides Grid Layout */
.page-resources__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-resources__card {
  background-color: #1A202C; /* Dark card background */
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #333;
}

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

.page-resources__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistent card images */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-resources__card-title {
  color: #FFD700;
  font-size: 1.5em;
  margin-bottom: 15px;
}

.page-resources__card-list {
  text-align: left;
  width: 100%;
  margin-bottom: 20px;
}

.page-resources__card-list li {
  color: #f0f0f0;
}

.page-resources__card-list a {
  color: #f0f0f0;
}

.page-resources__card-list a:hover {
  color: #FFD700;
}

/* FAQ Section */
.page-resources__section--faq {
  background-color: #0d1117;
}

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

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1A202C;
}

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

.page-resources__faq-question:hover {
  background: #2a3340;
  border-color: #555;
}

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  color: #FFD700;
  pointer-events: none;
}

.page-resources__faq-toggle {
  font-size: 1.8em;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  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: 30px;
  height: 30px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: #ffffff;
  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 25px;
  opacity: 0;
  color: #f0f0f0;
  background-color: #2a3340; /* Slightly lighter dark for answer background */
  border-radius: 0 0 8px 8px;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important;
  padding: 20px 25px !important;
  opacity: 1;
}

/* Contact Section */
.page-resources__section--contact {
  background-color: #1A202C;
}

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

.page-resources__contact-card {
  background-color: #0d1117;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-resources__contact-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-resources__contact-heading {
  color: #FFD700;
  font-size: 1.6em;
  margin-bottom: 10px;
}

.page-resources__contact-description {
  color: #f0f0f0;
  margin-bottom: 25px;
}

/* CTA Section */
.page-resources__section--cta {
  background-color: #0d1117;
  text-align: center;
}

.page-resources__cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-resources__cta-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 40px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-resources__cta-title {
  font-size: 3em;
  color: #FFD700;
  margin-bottom: 20px;
}

.page-resources__cta-description {
  font-size: 1.2em;
  max-width: 900px;
  margin-bottom: 40px;
  color: #f0f0f0;
}

/* Image and button responsive styles */
.page-resources img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-download,
.page-resources__btn-contact,
.page-resources a[class*="button"],
.page-resources a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__cta-buttons,
.page-resources__button-group,
.page-resources__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-resources h1 {
    font-size: 2.8em;
  }
  .page-resources h2 {
    font-size: 2.2em;
  }
  .page-resources h3 {
    font-size: 1.6em;
  }
  .page-resources__hero-description {
    font-size: 1.2em;
  }
  .page-resources__section-title {
    font-size: 2.4em;
  }
  .page-resources__cta-title {
    font-size: 2.5em;
  }
  .page-resources__card-image {
    height: 180px;
  }
  .page-resources__hero-section {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .page-resources {
    font-size: 15px;
    line-height: 1.5;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile padding is also correct */
  }

  .page-resources h1 {
    font-size: 2.2em;
  }
  .page-resources h2 {
    font-size: 1.8em;
  }
  .page-resources h3 {
    font-size: 1.4em;
  }
  .page-resources__hero-section {
    height: 400px;
  }
  .page-resources__hero-overlay {
    padding: 15px;
  }
  .page-resources__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .page-resources__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-resources__section {
    padding: 40px 15px;
  }

  .page-resources__container {
    padding-left: 0;
    padding-right: 0;
  }

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

  .page-resources__grid-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-resources__card {
    padding: 20px;
  }

  .page-resources__card-image {
    height: 160px;
  }

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

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

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

  .page-resources__faq-toggle {
    font-size: 1.5em;
    width: 25px;
    height: 25px;
  }

  .page-resources__faq-answer {
    padding: 0 20px;
  }

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

  .page-resources__contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-resources__contact-card {
    padding: 25px;
  }

  .page-resources__contact-icon {
    width: 80px;
    height: 80px;
  }

  .page-resources__contact-heading {
    font-size: 1.4em;
  }

  .page-resources__cta-image {
    margin-bottom: 30px;
  }

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

  .page-resources__btn-primary,
  .page-resources__btn-secondary,
  .page-resources__btn-download,
  .page-resources__btn-contact,
  .page-resources a[class*="button"],
  .page-resources a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__cta-buttons,
  .page-resources__button-group,
  .page-resources__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-resources__btn-large {
    font-size: 1.1em;
  }
}