/* style/resources.css */

/* --- General Styles & Reset (Scoped) --- */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css, which is #000 */
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.page-resources__section-padding {
    padding-top: 60px;
    padding-bottom: 60px;
}

.page-resources__text-center {
    text-align: center;
}

/* --- Typography --- */
.page-resources__hero-title {
    font-size: 3.2em;
    color: #FFD700; /* Gold for main title */
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

.page-resources__hero-description {
    font-size: 1.3em;
    color: #f0f0f0;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__section-title {
    font-size: 2.5em;
    color: #FFD700;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-resources__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #000080;
    border-radius: 2px;
}

.page-resources__section-title--white {
    color: #ffffff;
}

.page-resources__section-title--white::after {
    background-color: #FFD700;
}

.page-resources__paragraph {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 20px;
    text-align: justify;
}

.page-resources__paragraph--white {
    color: #ffffff;
}

.page-resources__category-title, 
.page-resources__guide-title, 
.page-resources__promo-title, 
.page-resources__faq-title {
    font-size: 1.6em;
    color: #FFD700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-resources__category-title a, 
.page-resources__guide-title a, 
.page-resources__promo-title a {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__category-title a:hover, 
.page-resources__guide-title a:hover, 
.page-resources__promo-title a:hover {
    color: #ffffff;
}

.page-resources__category-description, 
.page-resources__promo-description {
    color: #cccccc;
    font-size: 0.95em;
    margin-bottom: 20px;
}

.page-resources__safety-list {
    list-style: disc inside;
    color: #f0f0f0;
    padding-left: 20px;
    margin-top: 20px;
}

.page-resources__safety-list-item {
    margin-bottom: 10px;
    font-size: 1.05em;
}

.page-resources__safety-list-item a {
    color: #FFD700;
    text-decoration: none;
}

.page-resources__safety-list-item a:hover {
    text-decoration: underline;
}

/* --- Buttons --- */
.page-resources__btn-primary, 
.page-resources__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

.page-resources__btn-primary {
    background-color: #FFD700;
    color: #000080;
    border: 2px solid #FFD700;
}

.page-resources__btn-primary:hover {
    background-color: #e6c200;
    color: #000066;
    border-color: #e6c200;
}

.page-resources__btn-secondary {
    background-color: transparent;
    color: #FFD700;
    border: 2px solid #FFD700;
    margin-left: 15px;
}

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

.page-resources__btn-large {
    padding: 18px 40px;
    font-size: 1.2em;
}

.page-resources__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* --- Hero Section --- */
.page-resources__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 600px;
    padding: 100px 20px;
    overflow: hidden;
    background-color: #000080; /* Fallback background */
    padding-top: calc(100px + var(--header-offset, 120px)); /* Adjust for header if not handled by body */
}

.page-resources__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4; /* Slightly dim image for text readability */
}

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

/* --- Category Grid --- */
.page-resources__category-grid, 
.page-resources__promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-resources__category-card, 
.page-resources__promo-card {
    background-color: rgba(0, 0, 0, 0.5); /* Darker background for cards on dark section */
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__category-card:hover, 
.page-resources__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.2);
}

.page-resources__category-image {
    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 */
}

/* --- Guide Items --- */
.page-resources__guide-item {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 40px;
}

.page-resources__guide-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

.page-resources__guide-item .page-resources__btn-primary {
    margin-top: 20px;
    margin-right: 15px; /* Adjust spacing for multiple buttons */
}

/* --- Safety Section --- */
.page-resources__safety-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

/* --- FAQ Section --- */
.page-resources__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__faq-item {
    background-color: rgba(0, 0, 0, 0.5); /* Darker background for FAQ items */
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    background-color: #000080; /* Dark blue background for question */
    color: #ffffff;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-title {
    margin: 0;
    font-size: 1.2em;
    color: #ffffff; /* White for FAQ question title */
}

.page-resources__faq-toggle {
    font-size: 1.8em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #FFD700;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg); /* Plus to X/Minus */
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px; /* Initial padding 0 */
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #cccccc;
    background-color: rgba(0, 0, 0, 0.6);
}

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

.page-resources__faq-answer p {
    margin: 0;
    padding-bottom: 10px;
    color: #cccccc;
}

.page-resources__faq-answer a {
    color: #FFD700;
    text-decoration: none;
}

.page-resources__faq-answer a:hover {
    text-decoration: underline;
}

/* --- Dark Background Section --- */
.page-resources__dark-bg {
    background-color: #000080;
    color: #ffffff;
}

/* --- Image & Video Styles (Global for page-resources) --- */
.page-resources img {
  max-width: 100%;
  height: auto;
  display: block;
  min-width: 200px; /* Enforce min size for all content images */
  min-height: 200px; /* Enforce min size for all content images */
}

.page-resources video,
.page-resources__video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__category-grid,
    .page-resources__promo-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
        padding-top: var(--header-offset, 120px) !important; /* Ensure padding top is applied on mobile */
    }

    .page-resources__hero-section {
        min-height: 450px;
        padding-top: calc(80px + var(--header-offset, 120px));
        padding-bottom: 80px;
    }

    .page-resources__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-resources__hero-description {
        font-size: 1.1em;
        margin-bottom: 20px;
    }

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

    .page-resources__paragraph {
        font-size: 1em;
        text-align: left;
    }

    .page-resources__category-grid,
    .page-resources__promo-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        padding: 12px 25px;
        font-size: 1em;
        margin-left: 0;
        margin-bottom: 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

    .page-resources__container {
        padding: 0 15px;
    }

    /* Mobile specific image adaptations */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }

    /* All image containers in content area must be responsive */
    .page-resources__category-card,
    .page-resources__promo-card,
    .page-resources__guide-item,
    .page-resources__hero-content,
    .page-resources__faq-item,
    .page-resources__section-padding {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Video responsiveness */
    .page-resources video,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-resources__video-section,
    .page-resources__video-container,
    .page-resources__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

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

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

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__btn-large {
        padding: 15px 30px;
        font-size: 1.1em;
    }
}

/* Ensure no filter is used on images */
.page-resources img,
.page-resources__category-image,
.page-resources__guide-image,
.page-resources__safety-image {
    filter: none;
}