/* style/resources.css */

/* Base styles for the page content */
.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background #121212 */
  background-color: #121212; /* Inherited from body, but explicitly set for clarity */
}

/* Section base styles */
.page-resources__section {
  padding: 60px 20px;
  text-align: center;
}

.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px; /* Add padding for smaller screens */
  box-sizing: border-box;
}

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

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

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  width: 100%;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

.page-resources__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.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 */
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.page-resources__hero-title {
  font-size: 3.5em;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-resources__hero-description {
  font-size: 1.3em;
  color: #f0f0f0;
  margin-bottom: 40px;
}

.page-resources__hero-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-link {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box; /* Crucial for responsive buttons */
}

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

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

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

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

.page-resources__btn-link {
  background: none;
  border: none;
  color: #26A9E0;
  padding: 0;
  font-size: 1em;
  text-decoration: underline;
}

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

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

/* Overview Section */
.page-resources__overview-section {
  background-color: #1a1a1a; /* Slightly lighter dark background */
  color: #ffffff;
}

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

.page-resources__feature-item {
  background-color: rgba(255, 255, 255, 0.05); /* Subtle card background */
  padding: 30px;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

/* Resource Types Section */
.page-resources__resource-types {
  background-color: #121212;
}

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

.page-resources__card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.page-resources__card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block; /* Ensure image behaves as block for max-width */
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-resources__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

.page-resources__card-title a {
  color: #26A9E0;
  text-decoration: none;
}

.page-resources__card-title a:hover {
  color: #1a8cc2;
  text-decoration: underline;
}

.page-resources__card-text {
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Video Section */
.page-resources__video-section {
  background-color: #1a1a1a;
  color: #ffffff;
}

.page-resources__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  margin: 40px auto;
  border-radius: 10px;
}

.page-resources__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer; /* Indicate it's clickable */
  display: block; /* Ensure it respects width/height */
}

.page-resources__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.page-resources__video-wrapper:hover .page-resources__video-overlay {
  opacity: 1;
}

.page-resources__video-cta-text {
  color: #ffffff;
  font-size: 2em;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.page-resources__video-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* FAQ Section */
.page-resources__faq-section {
  background-color: #121212;
  color: #ffffff;
}

.page-resources__faq-list {
  max-width: 900px;
  margin: 50px auto 0;
  text-align: left;
}

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

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

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

.page-resources__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  transform: rotate(45deg); /* Plus sign becomes an X or minus */
}

.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; /* Ensure it expands sufficiently */
  padding: 15px 25px 25px;
}

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

/* Community Section */
.page-resources__community-section {
  background-color: #26A9E0; /* Brand color as background */
  color: #ffffff;
}

.page-resources__contact-info {
  margin-top: 40px;
  font-size: 1.1em;
}

.page-resources__contact-info p {
  margin-bottom: 15px;
}

.page-resources__text-link {
  color: #ffffff;
  text-decoration: underline;
}

.page-resources__text-link:hover {
  color: #f0f0f0;
}

/* CTA Bottom Section */
.page-resources__cta-bottom {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 80px 20px;
}

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

/* Utility classes for dark/light backgrounds (contrast safety) */
.page-resources__dark-bg {
  color: #ffffff;
}

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

.page-resources__light-text {
  color: #ffffff;
}

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

/* Mobile Responsive */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 3em;
  }
  .page-resources__hero-description {
    font-size: 1.1em;
  }
  .page-resources__section-title {
    font-size: 2em;
  }
  .page-resources__card-title {
    font-size: 1.3em;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    min-height: 400px;
  }
  .page-resources__hero-title {
    font-size: 2.2em;
  }
  .page-resources__hero-description {
    font-size: 1em;
  }
  .page-resources__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    padding-left: 15px !important; /* Ensure padding inside button */
    padding-right: 15px !important; /* Ensure padding inside button */
    white-space: normal !important; /* Allow text wrap */
    word-wrap: break-word !important; /* Allow text wrap */
  }

  .page-resources__section {
    padding: 40px 15px;
  }
  .page-resources__section-title {
    font-size: 1.8em;
  }
  .page-resources__section-description {
    font-size: 0.95em;
  }

  .page-resources__feature-grid,
  .page-resources__card-grid {
    grid-template-columns: 1fr;
  }

  .page-resources__card-image {
    height: 200px; /* Adjust card image height for mobile */
    min-width: 200px !important;
    min-height: 200px !important;
  }

  /* Images responsive rules (mandatory) */
  .page-resources img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  /* All containers with images should be responsive */
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__feature-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }
  .page-resources__hero-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .page-resources__hero-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Video responsive rules (mandatory) */
  .page-resources video,
  .page-resources__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-resources__video-section,
  .page-resources__video-container,
  .page-resources__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-resources__video-wrapper {
    padding-bottom: 56.25% !important; /* Maintain aspect ratio */
  }
  .page-resources__video-section {
    padding-top: var(--header-offset, 120px) !important; /* Re-apply for mobile if needed */
  }
  .page-resources__video-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }
  .page-resources__faq-answer {
    padding: 0 20px;
  }
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 10px 20px 20px;
  }
  .page-resources__cta-bottom {
    padding: 60px 15px;
  }
  .page-resources__hero-cta-buttons .page-resources__btn-primary,
  .page-resources__hero-cta-buttons .page-resources__btn-secondary {
    padding: 12px 20px;
    font-size: 1em;
  }
}