/* style/resources.css */

/* BEM Naming: .page-resources__element-name */

.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light body background */
    background-color: #ffffff; /* Body background is default white */
}

.page-resources__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    background-color: #017439; /* Primary brand color for hero background */
    color: #ffffff;
    text-align: center;
    overflow: hidden;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle overlay to allow text to stand out */
    z-index: 0;
}

.page-resources__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.4); /* Dark overlay for text readability */
    border-radius: 10px;
}

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

.page-resources__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #ffffff;
}

.page-resources__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-resources__btn-primary {
    background-color: #C30808; /* Custom color for Register/Login */
    color: #FFFF00; /* Custom font color for Register/Login */
    border: 2px solid #C30808;
}

.page-resources__btn-primary:hover {
    background-color: #ff3333;
    border-color: #ff3333;
    color: #ffffff;
}

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

.page-resources__btn-secondary:hover {
    background-color: #ffffff;
    color: #017439;
    border-color: #ffffff;
}

.page-resources__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: #017439; /* Primary brand color for section titles */
}

.page-resources__intro-section,
.page-resources__promotions-section,
.page-resources__faq-section {
    padding: 80px 20px;
}

.page-resources__guides-section,
.page-resources__news-section,
.page-resources__contact-section {
    padding: 80px 20px;
    background-color: #017439; /* Dark background */
    color: #ffffff; /* White text */
}

.page-resources__guides-section .page-resources__section-title,
.page-resources__news-section .page-resources__section-title,
.page-resources__contact-section .page-resources__section-title {
    color: #ffffff; /* White title on dark background */
}

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

.page-resources__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

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

.page-resources__grid-item {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease;
}

.page-resources__grid-item:hover {
    transform: translateY(-10px);
}

.page-resources__grid-item .page-resources__image {
    max-width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

.page-resources__item-title {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.page-resources__item-title a {
    color: #017439; /* Primary brand color for link text */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__item-title a:hover {
    color: #005a2d; /* Slightly darker primary color on hover */
    text-decoration: underline;
}

.page-resources__item-description {
    font-size: 1em;
    color: #555555;
}

.page-resources__promo-content {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.page-resources__promo-image {
    flex: 1;
    min-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-height: 200px; /* Enforce min size */
}

.page-resources__promo-text {
    flex: 2;
    min-width: 300px;
}

.page-resources__btn-faq-more {
    margin-top: 30px;
    text-align: center;
    width: fit-content;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__contact-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    font-size: 1.1em;
    color: #ffffff;
}

.page-resources__contact-list li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
}

.page-resources__contact-list li::before {
    content: '•';
    color: #FFFF00; /* Custom font color for register/login as bullet point */
    position: absolute;
    left: 0;
    font-size: 1.2em;
    line-height: 1.6;
}

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

/* FAQ styles */
.page-resources__faq-list {
    margin-top: 30px;
}

.page-resources__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-title {
    font-size: 1.2em;
    margin: 0;
    color: #017439;
}

.page-resources__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    color: #017439;
    transition: transform 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg);
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #ffffff;
    color: #555555;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Sufficiently large value */
    padding: 20px 25px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-resources__hero-title {
        font-size: 2.5em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__promo-content {
        flex-direction: column;
    }
    .page-resources__promo-image {
        max-width: 100%;
        height: auto;
    }
}

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

    .page-resources__hero-section {
        min-height: 450px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile padding-top */
    }

    .page-resources__hero-title {
        font-size: 2em;
    }

    .page-resources__hero-description {
        font-size: 1em;
    }

    .page-resources__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
    }

    .page-resources__intro-section,
    .page-resources__guides-section,
    .page-resources__promotions-section,
    .page-resources__news-section,
    .page-resources__faq-section,
    .page-resources__contact-section {
        padding: 40px 15px;
    }

    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-resources__grid-layout {
        grid-template-columns: 1fr;
    }

    .page-resources__grid-item .page-resources__image {
        height: 180px;
    }

    .page-resources__promo-content {
        gap: 20px;
    }
    
    .page-resources__image {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }

    .page-resources__container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden !important; /* Ensure no horizontal scroll */
    }

    /* FAQ specific mobile styles */
    .page-resources__faq-question {
        padding: 15px 20px;
    }

    .page-resources__faq-title {
        font-size: 1.1em;
    }

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

    .page-resources__contact-buttons {
        flex-direction: column;
        gap: 15px;
    }
}

/* Ensure content area images are not smaller than 200px */
.page-resources img {
  min-width: 200px;
  min-height: 200px;
}

/* General image responsive rules for all images within .page-resources */
.page-resources img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* General container responsive rules for all containers within .page-resources */
.page-resources__section,
.page-resources__card,
.page-resources__container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .page-resources__section,
    .page-resources__card,
    .page-resources__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
}