/* style/resources.css */

/* Base styles for the page content, ensuring light text on dark body background */
.page-resources {
  color: #ffffff; /* Must use light text as body background is dark (#0a0a0a) */
  background-color: transparent; /* Let body background from shared.css take effect */
  line-height: 1.6;
  font-family: Arial, sans-serif;
}

/* Ensure main content is pushed down by header */
.page-resources__hero-section {
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

/* General section styling */
.page-resources__section {
  padding: 60px 20px;
  text-align: center;
}

.page-resources__dark-bg {
  background-color: #0a0a0a; /* Explicitly dark background for contrast */
  color: #ffffff;
}

.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px; /* Add padding for mobile responsiveness */
}

.page-resources__section-title,
.page-resources__cta-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #26A9E0; /* Brand color for titles */
  font-weight: bold;
}

.page-resources__section-description,
.page-resources__hero-description,
.page-resources__cta-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0; /* Slightly off-white for readability */
}

/* Hero Section */
.page-resources__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  background-color: #0a0a0a; /* Dark background */
  padding-bottom: 60px;
}

.page-resources__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
  padding: 20px;
}

.page-resources__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #ffffff; /* White text for main title */
  font-weight: bold;
  line-height: 1.2;
}

.page-resources__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.2; /* Subtle background image */
}

.page-resources__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ensure image size is at least 200x200px */
  min-width: 200px;
  min-height: 200px;
}

/* CTA Buttons */
.page-resources__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words break */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  max-width: 100%; /* Ensure button doesn't overflow container */
}

.page-resources__btn-primary {
  background-color: #26A9E0; /* Brand primary color */
  color: #ffffff; /* White text for primary button */
  border: 2px solid #26A9E0;
}

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

.page-resources__btn-secondary {
  background-color: transparent;
  color: #26A9E0; /* Brand color for secondary button text */
  border: 2px solid #26A9E0;
}

.page-resources__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

/* Content Grid for sections */
.page-resources__content-grid {
  display: flex;
  gap: 40px;
  align-items: center;
  text-align: left;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-resources__content-grid--reverse {
  flex-direction: row-reverse;
}

.page-resources__content-grid > div {
  flex: 1;
  min-width: 300px; /* Ensure content blocks have a minimum width */
}

.page-resources__image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-resources__image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  /* Ensure image size is at least 200x200px */
  min-width: 200px;
  min-height: 200px;
}

/* Installation Guide */
.page-resources__step-by-step {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.page-resources__step-item {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly visible card on dark background */
  padding: 25px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-resources__step-title {
  color: #26A9E0;
  font-size: 1.5em;
  margin-bottom: 10px;
}

.page-resources__step-text {
  color: #f0f0f0;
}

/* Strategy Guide */
.page-resources__strategy-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.page-resources__strategy-item {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 25px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-resources__strategy-title {
  color: #26A9E0;
  font-size: 1.5em;
  margin-bottom: 10px;
}

.page-resources__list {
  list-style: disc;
  padding-left: 20px;
  color: #f0f0f0;
}

.page-resources__list li {
  margin-bottom: 8px;
}

/* Features & Updates */
.page-resources__features-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.page-resources__feature-item {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 25px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-resources__feature-title {
  color: #26A9E0;
  font-size: 1.5em;
  margin-bottom: 10px;
}

.page-resources__feature-text {
  color: #f0f0f0;
}

/* Optimize Experience Cards */
.page-resources__optimize-experience .page-resources__content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__card {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly brighter card on dark background */
  padding: 30px;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff; /* Light text for card content */
  min-width: 200px; /* Ensure card is not too small */
}

.page-resources__card-title {
  font-size: 1.6em;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-resources__card-text {
  font-size: 1em;
  color: #f0f0f0;
}

/* FAQ Section */
.page-resources__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
  text-align: left;
}

.page-resources__faq-item {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.page-resources__faq-title {
  margin: 0;
  color: #26A9E0;
  font-size: 1.2em;
}

.page-resources__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  width: 20px;
  text-align: center;
  transition: transform 0.3s ease;
  color: #ffffff;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  transform: rotate(45deg);
}

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content, !important for JS override */
  padding: 15px 25px;
}

.page-resources__faq-text {
  margin: 0;
  padding-bottom: 10px;
}

/* Final CTA Section */
.page-resources__cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-color: #0a0a0a; /* Dark background */
}

.page-resources__cta-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 20px;
}

.page-resources__cta-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.1; /* Subtle background image */
}

.page-resources__cta-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-resources__hero-title {
    font-size: 2.8em;
  }
  .page-resources__section-title,
  .page-resources__cta-title {
    font-size: 2em;
  }
  .page-resources__content-grid {
    flex-direction: column;
  }
  .page-resources__content-grid--reverse {
    flex-direction: column; /* Revert to column for smaller screens */
  }
  .page-resources__content-grid > div {
    min-width: unset; /* Allow flexibility */
  }
}

@media (max-width: 768px) {
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Mobile header offset for video section */
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-resources__hero-title {
    font-size: 2.2em;
  }
  .page-resources__section-title,
  .page-resources__cta-title {
    font-size: 1.8em;
  }
  .page-resources__section-description,
  .page-resources__hero-description,
  .page-resources__cta-description {
    font-size: 1em;
  }

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

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* All images must be responsive */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All video elements must be responsive */
  .page-resources video,
  .page-resources__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* All containers with images/videos must be responsive */
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__image-wrapper,
  .page-resources__video-section,
  .page-resources__video-container,
  .page-resources__video-wrapper,
  .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;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  /* Specific padding for sections */
  .page-resources__section {
    padding: 40px 15px;
  }

  .page-resources__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }

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

  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 10px 20px;
  }

  /* Ensure content area images are not smaller than 200px */
  /* This rule explicitly prevents smaller sizes, but max-width: 100% handles scaling down */
  .page-resources__hero-image,
  .page-resources__image,
  .page-resources__cta-image {
    min-width: 200px;
    min-height: 200px;
  }
}