/* style/resources.css */

:root {
  --primary-color: #007bff;
  --secondary-color: #0056b3; /* Darker shade for hover */
  --accent-color: #ffc107;
  --text-color-dark-bg: #ffffff;
  --text-color-light-bg: #333333;
  --background-dark: #121212; /* From shared.css body background */
  --card-bg-dark-mode: rgba(255, 255, 255, 0.08);
  --border-color-dark-mode: rgba(255, 255, 255, 0.15);
}

.page-resources {
  color: var(--text-color-dark-bg); /* Default text color for dark body background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  padding-bottom: 60px; /* General padding for the bottom of the page */
}

.page-resources__title-section {
  background: linear-gradient(135deg, var(--primary-color), #004085);
  padding: 120px 20px 80px; /* Desktop padding-top for fixed header */
  text-align: center;
  color: var(--text-color-dark-bg);
  position: relative;
  overflow: hidden;
}

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

.page-resources__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-resources__title-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  opacity: 0.9;
}

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

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--accent-color);
  color: var(--text-color-light-bg);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__cta-button:hover {
  background: #e6a700; /* Darker accent color */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-resources__faq-section {
  padding: 60px 20px;
  background: var(--background-dark);
}

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

.page-resources__faq-main-title {
  font-size: 2.5em;
  color: var(--text-color-dark-bg);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color-dark-mode);
  background: var(--card-bg-dark-mode);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--card-bg-dark-mode);
  color: var(--text-color-dark-bg);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

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

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

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

.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 20px;
  opacity: 0;
  color: rgba(255, 255, 255, 0.8);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 0 8px 8px;
}

.page-resources__faq-answer p {
  margin: 0;
  font-size: 1em;
  line-height: 1.7;
}

.page-resources__brand-section {
  padding: 80px 20px;
  background: #1a1a1a;
  color: var(--text-color-dark-bg);
}

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

.page-resources__brand-title {
  font-size: 2.5em;
  color: var(--text-color-dark-bg);
  text-align: center;
  margin-bottom: 50px;
  font-weight: bold;
}

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

.page-resources__brand-item {
  background: var(--card-bg-dark-mode);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--border-color-dark-mode);
}

.page-resources__brand-item h3 {
  font-size: 1.8em;
  color: var(--primary-color);
  margin-top: 20px;
  margin-bottom: 15px;
  font-weight: 700;
}

.page-resources__brand-item p {
  font-size: 1em;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.page-resources__brand-image {
  width: 100%;
  max-width: 300px; /* Constrain image width within card */
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.page-resources__blog-section {
  padding: 80px 20px;
  background: var(--background-dark);
}

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

.page-resources__blog-title {
  font-size: 2.5em;
  color: var(--text-color-dark-bg);
  text-align: center;
  margin-bottom: 50px;
  font-weight: bold;
}

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

.page-resources__blog-item {
  background: var(--card-bg-dark-mode);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color-dark-mode);
}

.page-resources__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-resources__blog-link {
  text-decoration: none;
  color: inherit;
  display: block;
  padding-bottom: 20px;
}

.page-resources__blog-image {
  width: 100%;
  height: 200px; /* Fixed height for blog images */
  object-fit: cover;
  margin-bottom: 15px;
}

.page-resources__blog-item-title {
  font-size: 1.3em;
  color: var(--primary-color);
  padding: 0 20px;
  margin-bottom: 10px;
  font-weight: 700;
}

.page-resources__blog-item-excerpt {
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.7);
  padding: 0 20px;
  margin-bottom: 15px;
}

.page-resources__blog-item-date {
  display: block;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.6);
  padding: 0 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__main-title {
    font-size: 2.8em;
  }
  .page-resources__title-description {
    font-size: 1.1em;
  }
  .page-resources__faq-main-title,
  .page-resources__brand-title,
  .page-resources__blog-title {
    font-size: 2.2em;
  }
}

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

  .page-resources__title-section {
    padding: 100px 15px 60px; /* Mobile padding-top for fixed header */
  }

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

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

  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
  }

  .page-resources__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 25px !important;
    font-size: 1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources__faq-section {
    padding: 40px 15px;
  }

  .page-resources__faq-main-title,
  .page-resources__brand-title,
  .page-resources__blog-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

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

  .page-resources__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }

  .page-resources__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }

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

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

  .page-resources__brand-section,
  .page-resources__blog-section {
    padding: 50px 15px;
  }

  .page-resources__brand-content,
  .page-resources__blog-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .page-resources__brand-item, 
  .page-resources__blog-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-resources__blog-image {
    height: 180px; /* Adjust height for mobile */
  }

  .page-resources__blog-item-title {
    font-size: 1.1em;
    padding: 0 15px;
  }

  .page-resources__blog-item-excerpt,
  .page-resources__blog-item-date {
    padding: 0 15px;
  }

  /* Ensure all containers are responsive */
  .page-resources__title-container,
  .page-resources__faq-container,
  .page-resources__brand-container,
  .page-resources__blog-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .page-resources__main-title {
    font-size: 1.8em;
  }
  .page-resources__faq-main-title,
  .page-resources__brand-title,
  .page-resources__blog-title {
    font-size: 1.6em;
  }
}