/* style/resources.css */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --button-register: #C30808;
    --button-login: #C30808;
    --text-login-register: #FFFF00;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --background-light: #f9f9f9;
    --border-color: #e0e0e0;
}

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

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

.page-resources__section {
    padding: 60px 0;
    text-align: center;
}

.page-resources__section-title {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.3;
}

.page-resources__section-description {
    font-size: 18px;
    color: var(--text-color-dark);
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* 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 */
    background: linear-gradient(135deg, #017439, #28a745); /* Gradient for visual appeal */
    color: var(--text-color-light);
    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;
    z-index: 1;
}

.page-resources__hero-image {
    width: 100%;
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

.page-resources__hero-image img:hover {
    transform: scale(1.03);
}

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

.page-resources__hero-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-color-light);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.page-resources__hero-description {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 900px;
    margin: 0 auto 40px auto;
    line-height: 1.5;
}

.page-resources__cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: var(--button-register); /* Specific color for registration */
    color: var(--text-login-register); /* Specific color for text */
    text-decoration: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
}

.page-resources__cta-button:hover {
    background: #e02c2c; /* Slightly darker red on hover */
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.page-resources__introduction .page-resources__section-title {
    color: var(--primary-color);
}

.page-resources__introduction .page-resources__section-description {
    color: var(--text-color-dark);
}

/* Grid Layouts */
.page-resources__grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.page-resources__grid--two-cols {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

.page-resources__grid--three-cols {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.page-resources__card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    box-sizing: border-box;
}

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

.page-resources__card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px;
}

.page-resources__card-title {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.4;
}

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

.page-resources__card-title a:hover {
    color: #005f2b; /* Darker green on hover */
    text-decoration: underline;
}

.page-resources__card-text {
    font-size: 16px;
    color: var(--text-color-dark);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-resources__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto; /* Push to bottom */
    box-sizing: border-box;
}

.page-resources__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-color-light);
}

.page-resources__game-guides .page-resources__section-title,
.page-resources__news-updates .page-resources__section-title {
    color: var(--primary-color);
}

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

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

.page-resources__dark-bg .page-resources__section-title,
.page-resources__dark-bg .page-resources__section-description {
    color: var(--text-color-light);
}

.page-resources__content-block {
    text-align: left;
    padding: 20px;
}

.page-resources__content-block-title {
    font-size: 28px;
    color: var(--text-color-light);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-resources__content-block-text {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
}

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

.page-resources__image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px;
}

.page-resources__btn-primary {
    display: inline-block;
    padding: 14px 30px;
    background: var(--button-register);
    color: var(--text-login-register);
    text-decoration: none;
    border-radius: 50px;
    font-size: 17px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

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

.page-resources__support-info {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

.page-resources__support-info .page-resources__content-block-title {
    color: var(--text-color-light);
}

.page-resources__support-info .page-resources__content-block-text {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.page-resources__cta-section {
    padding: 80px 0;
    background: var(--primary-color);
    color: var(--text-color-light);
}

.page-resources__cta-section .page-resources__section-title {
    color: var(--text-color-light);
    font-size: 42px;
}

.page-resources__cta-section .page-resources__section-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    margin-bottom: 50px;
}

/* FAQ Styles */
.page-resources__faq .page-resources__section-title {
    color: var(--primary-color);
}

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

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  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(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-color-dark);
}

.page-resources__faq-question:hover {
  background: #f0f0f0;
  border-color: #c0c0c0;
}

.page-resources__faq-question:active {
  background: #e0e0e0;
}

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

.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; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

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

.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 25px;
  opacity: 0;
  background: var(--background-light);
  color: var(--text-color-dark);
  border-radius: 0 0 8px 8px;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Ensure enough space for content */
  padding: 20px 25px !important;
  opacity: 1;
}

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

.page-resources__faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-resources__faq-answer a:hover {
    color: #005f2b;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__grid--two-cols {
        grid-template-columns: 1fr;
    }
    .page-resources__hero-title {
        font-size: 40px;
    }
    .page-resources__section-title {
        font-size: 32px;
    }
    .page-resources__content-block-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-resources__hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-resources__cta-button {
        padding: 15px 35px;
        font-size: 18px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-resources__section {
        padding: 40px 0;
    }
    .page-resources__section-title {
        font-size: 28px;
    }
    .page-resources__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-resources__grid--three-cols {
        grid-template-columns: 1fr;
    }
    .page-resources__card {
        padding: 20px;
    }
    .page-resources__card-image {
        height: auto; /* Allow height to adjust */
        min-height: 200px;
    }
    .page-resources__card-title {
        font-size: 20px;
    }
    .page-resources__card-text {
        font-size: 15px;
    }
    .page-resources__btn-secondary {
        padding: 10px 20px;
        font-size: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-resources__btn-primary {
        padding: 12px 25px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-resources__content-block {
        padding: 15px;
    }
    .page-resources__content-block-title {
        font-size: 22px;
    }
    .page-resources__content-block-text {
        font-size: 15px;
    }

    .page-resources__image-wrapper {
        padding: 15px;
    }
    .page-resources__image {
        min-width: 200px;
        min-height: 200px;
    }

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

    .page-resources__faq-list {
        margin-top: 30px;
    }
    .page-resources__faq-question {
        padding: 15px 20px;
    }
    .page-resources__faq-question h3 {
        font-size: 16px;
    }
    .page-resources__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    .page-resources__faq-answer {
        padding: 0 20px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 20px !important;
    }

    /* Ensure all images are responsive and don't overflow */
    .page-resources img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__content-block,
    .page-resources__image-wrapper {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }
    .page-resources__hero-section .page-resources__container {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 28px;
    }
    .page-resources__section-title {
        font-size: 24px;
    }
    .page-resources__cta-button {
        font-size: 16px;
        padding: 12px 25px;
    }
    .page-resources__card-image {
        height: 180px;
    }
    .page-resources__card-title {
        font-size: 18px;
    }
    .page-resources__content-block-title {
        font-size: 20px;
    }
    .page-resources__cta-section .page-resources__section-title {
        font-size: 26px;
    }
}