/* style/resources.css */

/* Base styles for the page-resources class */
.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 */
}

/* Section styling */
.page-resources__section {
    padding: 60px 20px;
    text-align: center;
}

.page-resources__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Added for mobile responsiveness */
    box-sizing: border-box;
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    padding: 120px 20px 60px; /* Adjusted padding-top for header offset */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; /* Ensure image doesn't overflow */
    min-height: 600px;
    color: #ffffff;
    background-color: #0a0a0a; /* Ensure dark background for hero */
    padding-top: var(--header-offset, 120px); /* This should align hero below fixed header */
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.3; /* Slightly dim the background image */
}

.page-resources__hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.page-resources__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #26A9E0; /* Brand color for title */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

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

/* Headings */
.page-resources__heading {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: #26A9E0; /* Brand color for headings */
}

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

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

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

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-link {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
}

.page-resources__btn-primary {
    background-color: #26A9E0; /* Brand primary color */
    color: #ffffff;
    border: 2px solid #26A9E0;
}

.page-resources__btn-primary:hover {
    background-color: #1a8cc4;
    border-color: #1a8cc4;
}

.page-resources__btn-secondary {
    background-color: transparent;
    color: #26A9E0; /* Brand primary color */
    border: 2px solid #26A9E0;
}

.page-resources__btn-secondary:hover {
    background-color: #26A9E0;
    color: #ffffff;
}

.page-resources__btn-link {
    background-color: transparent;
    color: #26A9E0;
    border: none;
    padding: 5px 10px;
    font-size: 0.9em;
    margin-top: 10px;
    display: block; /* Make it block to take full width of card */
}

.page-resources__btn-link:hover {
    text-decoration: underline;
    color: #1a8cc4;
}

/* CTA buttons container */
.page-resources__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

.page-resources__cta-buttons--center {
    margin-top: 40px;
}

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

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

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

/* Card styling */
.page-resources__card {
    background-color: rgba(255, 255, 255, 0.1); /* Light background for contrast */
    padding: 25px;
    border-radius: 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 350px; /* Ensure cards have a consistent height */
    color: #ffffff; /* Light text for dark cards */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-resources__card.page-resources__light-bg {
    background-color: #ffffff;
    color: #333333; /* Dark text for light cards */
    border: 1px solid #e0e0e0;
}

.page-resources__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block; /* Ensure no extra space below image */
}

.page-resources__card.page-resources__light-bg .page-resources__card-title {
    color: #26A9E0; /* Brand color for titles on light cards */
}

.page-resources__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #ffffff; /* Default for dark cards */
}

.page-resources__card-title a {
    color: inherit; /* Inherit color from parent */
    text-decoration: none;
}

.page-resources__card-title a:hover {
    text-decoration: underline;
    color: #1a8cc4; /* Lighter brand color on hover */
}

.page-resources__card-text {
    font-size: 0.95em;
    color: #f0f0f0; /* Default for dark cards */
    flex-grow: 1; /* Allow text to take available space */
}

.page-resources__card.page-resources__light-bg .page-resources__card-text {
    color: #555555; /* Darker text for light cards */
}

/* Specific section backgrounds */
.page-resources__overview {
    background-color: #0a0a0a;
    color: #ffffff;
}

.page-resources__guides {
    background-color: #1a1a1a;
    color: #ffffff;
}

.page-resources__strategies {
    background-color: #0a0a0a;
    color: #ffffff;
}

.page-resources__safety {
    background-color: #1a1a1a;
    color: #ffffff;
}

.page-resources__news {
    background-color: #0a0a0a;
    color: #ffffff;
}

.page-resources__faq {
    background-color: #1a1a1a;
    color: #ffffff;
}

.page-resources__cta {
    background-color: #26A9E0; /* Brand color for CTA background */
    color: #ffffff;
    padding: 80px 20px;
}

.page-resources__cta-content {
    max-width: 900px;
}

/* FAQ Section */
.page-resources__faq-list {
    margin-top: 40px;
    text-align: left;
}

.page-resources__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-title {
    margin: 0;
    color: #ffffff;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    font-weight: normal;
    transition: transform 0.3s ease;
    color: #26A9E0;
}

.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;
    color: #f0f0f0;
}

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

.page-resources__faq-answer p {
    margin-bottom: 0;
    color: #f0f0f0;
}


/* --- Responsive Adjustments --- */

@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }
    .page-resources__heading {
        font-size: 2em;
    }
    .page-resources__grid--two-columns {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure header offset applies to mobile */
        min-height: 500px;
    }
    .page-resources__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    .page-resources__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-resources__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        max-width: 100% !important; /* Constrain button width on mobile */
        width: 100% !important;
        margin: 0 auto;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-resources__section {
        padding: 40px 15px;
    }
    .page-resources__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-resources__heading {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-resources__paragraph {
        font-size: 0.95em;
    }

    .page-resources__grid,
    .page-resources__grid--two-columns,
    .page-resources__grid--three-columns {
        grid-template-columns: 1fr; /* Single column layout for cards */
        gap: 20px;
    }

    .page-resources__card {
        min-height: auto;
    }

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

    .page-resources__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .page-resources__faq-answer {
        padding: 0 20px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 20px;
    }

    /* Mobile image responsiveness */
    .page-resources img {
      max-width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    /* Mobile video responsiveness (if any) */
    .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;
    }

    /* Mobile button responsiveness */
    .page-resources__cta-buttons,
    .page-resources__button-group,
    .page-resources__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        flex-direction: column; /* Stack buttons vertically on mobile */
    }
}

/* Color contrast fixes */
.page-resources__dark-bg {
    background-color: #0a0a0a;
    color: #ffffff;
}

.page-resources__light-bg {
    background-color: #ffffff;
    color: #333333;
}