/* style/resources.css */

:root {
  --primary-color: #0A1931;
  --secondary-color: #FFD700;
  --text-color-light: #f4f4f4; /* From body background */
  --text-color-dark: #333333;
  --card-bg-light: #ffffff;
  --card-text-dark: #333333;
  --section-padding-desktop: 80px 0;
  --section-padding-mobile: 40px 15px;
}

.page-resources {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: var(--text-color-light); /* Body background is light */
}

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

.page-resources__section {
  padding: var(--section-padding-desktop);
}

.page-resources__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-resources__light-bg {
  background-color: var(--text-color-light);
  color: var(--text-color-dark);
}

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

.page-resources__dark-bg .page-resources__section-title {
  color: var(--secondary-color);
}

.page-resources__section-description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  color: inherit;
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
  overflow: hidden;
}

.page-resources__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-resources__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

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

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-resources__main-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--secondary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-resources__intro-text {
  font-size: 20px;
  max-width: 900px;
  margin: 0 auto 40px;
  color: var(--text-color-light);
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 50px;
  font-size: 20px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__cta-button:hover {
  background: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* Grid for Guides & Strategies */
.page-resources__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.page-resources__card {
  background: var(--card-bg-light);
  color: var(--card-text-dark);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-resources__card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-resources__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-resources__card-title {
  font-size: 22px;
  font-weight: 700;
  margin: 20px 20px 10px;
  color: var(--primary-color);
}

.page-resources__card-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
  color: var(--secondary-color);
}

.page-resources__card-text {
  font-size: 16px;
  padding: 0 20px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__card-link {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--primary-color);
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  margin: 0 20px 20px;
  transition: background-color 0.3s ease;
}

.page-resources__card-link:hover {
  background-color: #e6c200;
}

/* News Grid */
.page-resources__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.page-resources__news-item {
  background: var(--card-bg-light);
  color: var(--card-text-dark);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__news-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

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

.page-resources__news-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.page-resources__news-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__news-title a:hover {
  color: var(--secondary-color);
}

.page-resources__news-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.page-resources__news-excerpt {
  font-size: 16px;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-resources__news-readmore {
  display: inline-block;
  background: var(--primary-color);
  color: var(--text-color-light);
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.page-resources__news-readmore:hover {
  background-color: #051020;
}

/* Security Features */
.page-resources__security-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.page-resources__feature-item {
  background: var(--card-bg-light);
  color: var(--card-text-dark);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.page-resources__feature-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-resources__feature-text {
  font-size: 16px;
  color: #555;
}

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

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

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

.page-resources__faq-item.active .page-resources__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.page-resources__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

.page-resources__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-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: 30px;
  height: 30px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg); /* Change to X or rotate for minus sign */
}

.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.3s ease;
  padding: 0 25px;
  opacity: 0;
  background: #fdfdfd;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Sufficiently large for content */
  padding: 20px 25px !important;
  opacity: 1;
  background: #fdfdfd;
  border-radius: 0 0 8px 8px;
}

.page-resources__faq-answer p {
  margin: 0;
  color: var(--text-color-dark);
  font-size: 16px;
}

/* Contact Methods */
.page-resources__contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.page-resources__contact-item {
  background: var(--card-bg-light);
  color: var(--card-text-dark);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-resources__contact-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-resources__contact-text {
  font-size: 16px;
  color: #555;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* General Buttons */
.page-resources__cta-buttons {
  text-align: center;
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-resources__btn-primary:hover {
  background: #051020;
  border-color: #051020;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-resources__btn-secondary:hover {
  background: #e6c200;
  border-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-resources__container {
    padding: 0 15px;
  }

  .page-resources__section {
    padding: var(--section-padding-mobile);
  }

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

  .page-resources__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .page-resources__intro-text {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-resources__cta-button {
    padding: 12px 25px;
    font-size: 16px;
    width: 100% !important;
  }

  .page-resources__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

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

  .page-resources__grid,
  .page-resources__news-grid,
  .page-resources__security-features,
  .page-resources__contact-methods {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-resources__card-image,
  .page-resources__news-image {
    height: 180px;
  }

  .page-resources__card-title,
  .page-resources__news-title,
  .page-resources__feature-title,
  .page-resources__contact-title {
    font-size: 20px;
  }

  .page-resources__card-text,
  .page-resources__news-excerpt,
  .page-resources__feature-text,
  .page-resources__contact-text,
  .page-resources__faq-answer p {
    font-size: 15px;
  }

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

  .page-resources__faq-question h3 {
    font-size: 16px;
  }

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

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

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

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100% !important;
    padding: 12px 25px;
    font-size: 16px;
  }

  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}