/* style/resources.css */

/* Base Styles for Page Resources */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #FFFFFF); /* Inherit from shared, fallback to white */
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    min-height: 200px; /* Enforce minimum image size */
    min-width: 200px; /* Enforce minimum image size */
}

.page-resources__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
    z-index: 2;
}

.page-resources__hero-content {
    position: relative;
    z-index: 3;
    color: #FFFFFF;
    max-width: 800px;
    padding: 20px;
}

.page-resources__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFFFFF;
}

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

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

.page-resources__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Add padding for smaller screens */
    box-sizing: border-box;
}

.page-resources__section-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #26A9E0; /* Brand color for titles */
}

.page-resources__section-intro {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Color Schemes for Sections */
.page-resources__light-bg {
    background-color: #FFFFFF;
    color: #333333;
}

.page-resources__dark-bg {
    background-color: #26A9E0; /* Brand primary color */
    color: #FFFFFF;
}

.page-resources__dark-bg .page-resources__section-title {
    color: #FFFFFF; /* Ensure titles are white on dark background */
}

.page-resources__dark-bg .page-resources__section-intro {
    color: #F0F0F0;
}

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

/* Cards */
.page-resources__card {
    background-color: #FFFFFF; /* Default card background */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: left;
    transition: transform 0.3s ease;
    color: #333333;
    border: 1px solid #e0e0e0;
}

.page-resources__card:hover {
    transform: translateY(-5px);
}

.page-resources__card-title {
    font-size: 1.5em;
    color: #26A9E0;
    margin-bottom: 15px;
}

.page-resources__card-text {
    margin-bottom: 15px;
}

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

/* Lists */
.page-resources__list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.page-resources__list-item {
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.page-resources__list-item:last-child {
    border-bottom: none;
}

/* Buttons */
.page-resources__cta-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 10px;
    box-sizing: border-box;
    max-width: 100%; /* Ensure button doesn't overflow */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-resources__btn-primary {
    background-color: #26A9E0;
    color: #FFFFFF;
    border: 2px solid #26A9E0;
}

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

.page-resources__btn-secondary {
    background-color: #FFFFFF;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-resources__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #1a8ccb;
}

/* Special Button for Login/Register */
.page-resources__btn-login {
    background-color: #EA7C07; /* Custom color for login */
    color: #FFFFFF;
    border: 2px solid #EA7C07;
}

.page-resources__btn-login:hover {
    background-color: #cc6a00;
    border-color: #cc6a00;
}


/* Video Section */
.page-resources__video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 40px auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    box-sizing: border-box; /* Ensure padding/border is included in width */
}

.page-resources__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Ensure no extra space below video */
    max-width: 100%; /* Ensure video does not overflow */
}

.page-resources__video-caption {
    margin-top: 10px;
    font-style: italic;
    color: #555;
    font-size: 0.9em;
}


/* FAQ Section */
.page-resources__faq-list {
    margin-top: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.page-resources__faq-item {
    background-color: #F8F8F8;
    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: 18px 25px;
    font-size: 1.1em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    background-color: #F0F0F0;
    border-bottom: 1px solid #E0E0E0;
    list-style: none; /* For <summary> tag */
}

.page-resources__faq-question::-webkit-details-marker {
    display: none; /* Hide default arrow for <summary> */
}
.page-resources__faq-question::marker {
    display: none; /* Hide default arrow for <summary> */
}

.page-resources__faq-item[open] .page-resources__faq-question {
    background-color: #E6E6E6;
}

.page-resources__faq-qtext {
    flex-grow: 1;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #26A9E0;
}

.page-resources__faq-answer {
    padding: 15px 25px 20px;
    color: #555555;
    background-color: #F8F8F8;
}

.page-resources__faq-answer p {
    margin-bottom: 10px;
}

/* Contact Section */
.page-resources__contact-section {
    padding-bottom: 80px;
}

.page-resources__contact-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 30px auto;
    display: block;
    min-height: 200px; /* Enforce minimum image size */
    min-width: 200px; /* Enforce minimum image size */
}

/* Responsive Design */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 3em;
    }

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

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

    .page-resources__card {
        padding: 25px;
    }
}

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

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

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

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

    .page-resources__section {
        padding: 40px 15px;
    }

    .page-resources__section-title {
        font-size: 1.8em;
    }

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

    .page-resources__card {
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

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

    .page-resources__hero-image {
        min-height: 200px !important; /* Override potential smaller values */
        min-width: 200px !important;
    }

    .page-resources__card-image {
        min-height: 200px !important;
        min-width: 200px !important;
    }

    .page-resources__contact-image {
        min-height: 200px !important;
        min-width: 200px !important;
    }

    /* Mobile video responsiveness */
    .page-resources__video-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding-bottom: 56.25% !important; /* Maintain aspect ratio */
        margin-left: 0 !important; /* Remove horizontal margins */
        margin-right: 0 !important;
        padding-left: 15px; /* Add padding for content safety */
        padding-right: 15px;
    }

    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: 100% !important; /* Important for absolute positioned video */
        display: block !important;
    }

    /* Mobile button responsiveness */
    .page-resources__cta-button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin: 10px 0 !important; /* Stack buttons vertically */
    }

    /* Ensure containers for images/videos/buttons are also responsive */
    .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;
    }

    .page-resources__contact-section .page-resources__cta-button {
        display: block; /* Stack buttons in contact section */
    }
}