/* style/resources.css */

/* Base styles for the resources page */
.page-resources {
    color: #ffffff; /* Default text color for dark background */
    padding-top: var(--header-offset, 120px);
}

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

.page-resources__section-title {
    font-size: 36px;
    font-weight: bold;
    color: #FFD700;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-resources__section-description {
    font-size: 18px;
    color: #f0f0f0;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #8B0000 0%, #FFD700 100%);
    overflow: hidden;
    text-align: center;
}

.page-resources__hero-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin-bottom: 40px;
}

.page-resources__main-title {
    font-size: 48px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.page-resources__hero-description {
    font-size: 20px;
    color: #f0f0f0;
    margin-bottom: 30px;
    line-height: 1.6;
}

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

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.page-resources__cta-button--primary {
    background: #FFD700;
    color: #8B0000;
}

.page-resources__cta-button--primary:hover {
    background: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-resources__cta-button--secondary {
    background: #8B0000;
    color: #FFD700;
    border: 2px solid #FFD700;
}

.page-resources__cta-button--secondary:hover {
    background: #6a0000;
    border-color: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    z-index: 1;
}

/* Guides Section */
.page-resources__guides-section {
    background: #1a1a1a;
    padding: 60px 0;
}

.page-resources__guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-resources__guide-item {
    background: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-resources__guide-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.page-resources__guide-title {
    font-size: 22px;
    font-weight: bold;
    color: #FFD700;
    margin: 20px 20px 10px 20px;
    flex-grow: 1;
}

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

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

.page-resources__guide-excerpt {
    font-size: 15px;
    color: #cccccc;
    margin: 0 20px 20px 20px;
    line-height: 1.5;
}

.page-resources__read-more {
    display: inline-block;
    margin: 0 20px 20px 20px;
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-resources__read-more:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* News Section */
.page-resources__news-section {
    background: #8B0000;
    padding: 60px 0;
}

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

.page-resources__news-item {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-resources__news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-resources__news-title {
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
    margin: 20px 20px 10px 20px;
    flex-grow: 1;
}

.page-resources__news-title a {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__news-title a:hover {
    color: #ffffff;
}

.page-resources__news-excerpt {
    font-size: 15px;
    color: #f0f0f0;
    margin: 0 20px 20px 20px;
    line-height: 1.5;
}

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

/* FAQ Section */
.page-resources__faq-section {
    background: #1a1a1a;
    padding: 60px 0;
}

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

/* FAQ container style */
.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* FAQ default state - answer hidden */
.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 20px;
    opacity: 0;
    color: #cccccc;
    background: #2a2a2a;
    font-size: 15px;
    line-height: 1.6;
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height */
.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* 🚨 Use !important, value large enough for any content */
    padding: 20px !important;
    opacity: 1;
    background: #2a2a2a;
    border-radius: 0 0 8px 8px;
}

/* Question style */
.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #333333;
    border: 1px solid #444444;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-resources__faq-item.active .page-resources__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: #444444;
    border-color: #FFD700;
}

.page-resources__faq-question:hover {
    background: #444444;
    border-color: #FFD700;
}

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

/* Question title style */
.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #FFD700;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

/* Toggle icon */
.page-resources__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #FFD700;
    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: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    color: #ffffff;
    transform: rotate(45deg);
    background: #8B0000;
}

/* Contact Section */
.page-resources__contact-section {
    background: #0d0d0d;
    padding: 60px 0;
}

.page-resources__contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.page-resources__contact-item {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__contact-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    object-fit: contain;
}

.page-resources__contact-title {
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 10px;
}

.page-resources__contact-text {
    font-size: 16px;
    color: #cccccc;
    margin-bottom: 25px;
    line-height: 1.5;
}

.page-resources__contact-button {
    display: inline-block;
    padding: 12px 25px;
    background: #8B0000;
    color: #FFD700;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-resources__contact-button:hover {
    background: #FFD700;
    color: #8B0000;
}

/* App Download Section */
.page-resources__app-download-section {
    background: #0d0d0d;
    padding: 60px 0;
}

.page-resources__app-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-resources__app-text {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.page-resources__app-features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.page-resources__app-features li {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.page-resources__icon-check {
    color: #FFD700;
    font-size: 24px;
    margin-right: 15px;
    font-weight: bold;
}

.page-resources__app-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.page-resources__app-image-wrapper {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    text-align: center;
}

.page-resources__app-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-resources__main-title {
        font-size: 42px;
    }
    .page-resources__hero-description {
        font-size: 18px;
    }
    .page-resources__section-title {
        font-size: 32px;
    }
    .page-resources__section-description {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .page-resources {
        padding-top: var(--header-offset, 120px) !important;
    }
    .page-resources__container {
        padding: 30px 15px;
    }
    .page-resources__hero-section {
        padding: 60px 15px;
    }
    .page-resources__hero-container {
        margin-bottom: 30px;
    }
    .page-resources__main-title {
        font-size: 36px;
    }
    .page-resources__hero-description {
        font-size: 16px;
    }
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__cta-button {
        width: 100%;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 25px;
    }
    
    .page-resources__section-title {
        font-size: 28px;
    }
    .page-resources__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }
    .page-resources__guides-grid, .page-resources__news-grid, .page-resources__contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-resources__guide-title, .page-resources__news-title, .page-resources__contact-title {
        font-size: 20px;
    }
    .page-resources__guide-excerpt, .page-resources__news-excerpt, .page-resources__contact-text, .page-resources__app-features li {
        font-size: 14px;
    }
    .page-resources__app-content {
        flex-direction: column;
    }
    .page-resources__app-text, .page-resources__app-image-wrapper {
        min-width: unset;
        max-width: 100%;
    }
    .page-resources__app-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__app-buttons .page-resources__cta-button {
        width: 100%;
    }

    /* FAQ mobile */
    .page-resources__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-resources__faq-question h3 {
        font-size: 16px;
        margin-bottom: 0;
        width: calc(100% - 40px);
        pointer-events: none; /* Prevent h3 from blocking click event */
    }
    .page-resources__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
        pointer-events: none; /* Prevent icon from blocking click event */
    }
    .page-resources__faq-answer {
        padding: 0 15px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px !important;
    }
    
    /* Mobile image/video/button responsive rules */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-resources__section, .page-resources__card, .page-resources__container, .page-resources__hero-section, .page-resources__guides-section, .page-resources__news-section, .page-resources__faq-section, .page-resources__contact-section, .page-resources__app-download-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-resources__cta-buttons, .page-resources__app-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        flex-wrap: wrap !important;
        gap: 15px;
    }
    .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;
    }
}