/* style/resources.css */

/* Base styles for the resources page */
.page-resources {
  font-family: 'Arial', sans-serif;
  color: var(--text-color-dark);
  background-color: var(--primary-bg);
}

/* --- Hero Banner Section --- */
.page-resources__hero-banner {
  background: linear-gradient(135deg, #0A192F, #1A3B5F); /* Darker gradient for hero */
  color: #ffffff;
  padding: 140px 20px 80px; /* Adjusted padding-top for fixed header */
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-resources__hero-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-resources__hero-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFD700; /* Gold color for title */
}

.page-resources__hero-description {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__hero-cta-button {
  display: inline-block;
  background-color: #FFD700;
  color: #0A192F;
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 2px solid #FFD700;
}

.page-resources__hero-cta-button:hover {
  background-color: #e6c200;
  transform: translateY(-3px);
}

/* --- General Section Styles --- */
.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

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

.page-resources__section-subtitle {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  color: #f0f0f0; /* Light text for dark backgrounds */
}

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

.page-resources__light-bg .page-resources__section-title {
  color: #0A192F;
}

.page-resources__light-bg .page-resources__section-subtitle {
  color: #555555;
}

.page-resources__dark-bg {
  background-color: #0A192F;
  color: #ffffff;
}

.page-resources__card-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #FFD700; /* Gold for card titles on dark backgrounds */
}

.page-resources__light-bg .page-resources__card-title {
  color: #0A192F; /* Dark blue for card titles on light backgrounds */
}

.page-resources__btn-primary {
  display: inline-block;
  background-color: #FFD700;
  color: #0A192F;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 2px solid #FFD700;
  margin-top: 20px;
}

.page-resources__btn-primary:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
}

.page-resources__btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: #FFD700;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 2px solid #FFD700;
  margin-top: 20px;
}

.page-resources__btn-secondary:hover {
  background-color: #FFD700;
  color: #0A192F;
}

/* --- Introduction Section --- */
.page-resources__introduction-section {
  padding-top: 60px; /* Adjust for fixed header if no hero */
}

.page-resources__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-resources__text-block {
  flex: 1;
  line-height: 1.8;
}

.page-resources__text-block p {
  margin-bottom: 15px;
}

.page-resources__image-block {
  flex: 1;
  min-width: 300px; /* Ensure image block has a minimum width */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-resources__image-block img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* --- Guide Section --- */
.page-resources__guide-section .page-resources__section-title, 
.page-resources__guide-section .page-resources__section-subtitle {
  color: #FFD700;
}

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

.page-resources__guide-card {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for cards on dark background */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.page-resources__guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-resources__guide-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* --- Troubleshooting Section --- */
.page-resources__troubleshooting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-resources__troubleshooting-card {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e0e0e0;
}

.page-resources__troubleshooting-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.page-resources__troubleshooting-card p {
  color: #555555;
  line-height: 1.7;
}

/* --- Security Tips Section --- */
.page-resources__tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-resources__tip-card {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.page-resources__tip-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* --- FAQ Section --- */
.page-resources__faq-section {
  padding-bottom: 60px; /* Ensure space below FAQ */
}

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

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.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 15px;
  opacity: 0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Use!important and a large value to ensure expansion */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #333333; /* Ensure dark text on light background */
}

.page-resources__faq-answer p {
  margin-bottom: 10px;
  line-height: 1.6;
  color: #333333; /* Ensure dark text on light background */
}

.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; /* Slightly larger for better readability */
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: #0A192F; /* Dark blue for question title */
}

.page-resources__faq-toggle {
  font-size: 28px; /* Larger toggle icon */
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Gold color for toggle icon */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Larger click area for icon */
  height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: #0A192F; /* Darker when active */
}

/* --- Contact Section --- */
.page-resources__contact-section {
  text-align: center;
  padding-bottom: 80px;
}

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

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 40px;
  }
  .page-resources__hero-description {
    font-size: 18px;
  }
  .page-resources__section-title {
    font-size: 32px;
  }
  .page-resources__section-subtitle {
    font-size: 16px;
  }
  .page-resources__content-wrapper {
    flex-direction: column;
  }
  .page-resources__image-block {
    order: -1; /* Image appears above text on smaller screens */
  }
}

@media (max-width: 768px) {
  .page-resources__hero-banner {
    padding: 120px 15px 60px;
  }
  .page-resources__hero-title {
    font-size: 32px;
  }
  .page-resources__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-resources__hero-cta-button {
    padding: 12px 25px;
    font-size: 16px;
  }

  .page-resources__container {
    padding: 40px 15px;
  }
  .page-resources__section-title {
    font-size: 28px;
  }
  .page-resources__section-subtitle {
    font-size: 15px;
  }
  .page-resources__guide-grid, 
  .page-resources__troubleshooting-grid, 
  .page-resources__tips-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-resources__guide-card, 
  .page-resources__troubleshooting-card, 
  .page-resources__tip-card {
    padding: 25px;
  }
  .page-resources__guide-image {
    height: 180px;
  }
  .page-resources__card-title {
    font-size: 20px;
  }
  .page-resources__btn-primary, .page-resources__btn-secondary {
    padding: 10px 20px;
    font-size: 15px;
  }
  .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: 28px;
    height: 28px;
    font-size: 24px;
  }
  .page-resources__faq-answer {
    padding: 0 15px;
  }
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }
  .page-resources__contact-buttons {
    flex-direction: column;
    gap: 15px;
  }
  /* Mobile image responsiveness (mandatory) */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-resources__hero-banner,
  .page-resources__introduction-section,
  .page-resources__guide-section,
  .page-resources__troubleshooting-section,
  .page-resources__security-tips-section,
  .page-resources__faq-section,
  .page-resources__contact-section,
  .page-resources__container,
  .page-resources__content-wrapper,
  .page-resources__text-block,
  .page-resources__image-block,
  .page-resources__guide-grid,
  .page-resources__guide-card,
  .page-resources__troubleshooting-grid,
  .page-resources__troubleshooting-card,
  .page-resources__tips-grid,
  .page-resources__tip-card,
  .page-resources__faq-list,
  .page-resources__faq-item,
  .page-resources__faq-question,
  .page-resources__faq-answer {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-resources__introduction-section .page-resources__container,
  .page-resources__guide-section .page-resources__container,
  .page-resources__troubleshooting-section .page-resources__container,
  .page-resources__security-tips-section .page-resources__container,
  .page-resources__faq-section .page-resources__container,
  .page-resources__contact-section .page-resources__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}