/* =================================================================== */
/*    FINAL, UNIFIED STYLES FOR THE DYNAMIC RESOURCES PAGE
/* =================================================================== */

/* --- 1. Root Variables & Page Setup --- */
:root {
    --adept-primary: #0056b3;
    --adept-dark-blue: #0d3b4e;
    --adept-text-dark: #212529;
    --adept-text-muted: #6c757d;
    --adept-bg-light: #f8f9fa;
    --adept-bg-white: #ffffff;
    --adept-border-color: #eef2f6;
    --adept-blue-light: #e6f0ff;
}


body { background: #f8f9fa; background: linear-gradient(72deg, rgba(255, 255, 255, 1) 90%, rgba(0, 86, 179, 1) 50%, rgba(165, 197, 232, 1) 60%);

.resources-page .page-content-area {
    padding: 4rem 15px;
}

.resources-page .page-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- 2. Filter Button Styles --- */
.resource-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 3.5rem;
}

.filter-btn {
    background-color: var(--adept-bg-white);
    border: 1px solid #dcdfe3;
    color: var(--adept-text-muted);
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.filter-btn:hover {
    border-color: var(--adept-primary);
    color: var(--adept-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--adept-primary);
    color: var(--adept-bg-white);
    border-color: var(--adept-primary);
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.62);
}


/* --- 3. The Main Resource Grid --- */
.resources-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 2.5rem;
}

/* Two-column layout for large screens */
@media (min-width: 1200px) {
    .resources-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* --- 4. The Resource Card (Two-Column Layout) --- */
.resource-card {
    background-color: var(--adept-bg-white);
    border: 1px solid var(--adept-border-color);
    border-radius: 12px;
    box-shadow: 4px 4px 15px rgba(0, 86, 179, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Mobile-first: stacks preview on top */
}

/* --- 4a. The Floating Template Preview --- */
.resource-card__preview-wrapper {
    display: none; /* Hide on mobile to save space */
    padding: 2rem;
    background-color: var(--adept-bg-light);
    flex-basis: 45%; /* Defines its width in the flex layout */
    display: flex;
    align-items: center;
    justify-content: center;
}


.template-preview {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    background-color: #f0f4f8; /* A light gray background for the container */
    
    /* Create an inset "window" effect */
    padding: 12px;
    border: 1px solid #e9ecef;
    
    /* The strong Adept Blue shadow */
    box-shadow: 10px 10px 40px rgba(0, 86, 179, 0.2);
    
    /* The floating effect */
    transform: rotate(-4deg) translateY(-10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* Crucial to contain the iframe */
}
/* ADD THESE STYLES FOR THE IMAGE PREVIEW */

.template-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area without distortion */
    border-radius: 6px; /* Match the iframe style */
}

.template-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--adept-blue-primary);
    opacity: 0.55;
}

.resource-card:hover .template-preview {
    transform: rotate(0deg) translateY(0) scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 86, 179, 0.25);
}

/* This is the new, crucial iframe styling */
.template-preview iframe {
    /* Make the iframe's content much larger than the container */
    width: 400%;
    height: 400%;
    
    /* Scale the oversized content back down to "zoom it out" */
    transform: scale(0.25);
    transform-origin: top left; /* Anchor the scaling to the top-left */
    
    /* Style the iframe element itself */
    border: 1px solid #dee2e6;
    border-radius: 6px; /* Rounded corners for the "document" inside */
    background: white;
    
    /* Prevent user interaction */
    pointer-events: none;
}
/* --- 4b. The Main Content Wrapper (Left-aligned) --- */
.resource-card__content-wrapper {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2rem;
    flex-grow: 1;
    text-align: left;
}

.resource-card__icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--adept-blue-light);
    color: var(--adept-primary);
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
}

.resource-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--adept-dark-blue);
    margin-bottom: 0.5rem;
}

.resource-card__description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--adept-text-muted);
    flex-grow: 1; /* Pushes the footer to the bottom */
}

/* --- 4c. Footer with Buttons --- */
.resource-card__footer {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--adept-border-color);
    display: flex;
    gap: 0.8rem;
    justify-content: flex-start;
}

.resource-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    flex-grow: 1;
    transition: all 0.2s ease;
}

.resource-card__cta.preview {
    background-color: var(--adept-bg-white);
    color: var(--adept-primary);
    border: 1px solid var(--adept-primary);
}
.resource-card__cta.preview:hover {
    background-color: var(--adept-bg-light);
}

.resource-card__cta.download {
    background-color: var(--adept-primary);
    color: var(--adept-bg-white);
    border: 1px solid var(--adept-primary);
}
.resource-card__cta.download:hover {
    background-color: var(--adept-dark-blue);
    border-color: var(--adept-dark-blue);
}

join-us-section { background: #0056B3; background-image: linear-gradient(183deg, rgba(0, 86, 179, 1) 5%, rgba(248, 249, 250, 1) 35%, rgba(255, 255, 255, 1) 44%); padding: 4rem 15px; margin-top: 4rem; text-align: center;}.join-us-container { max-width: 700px; margin: 0 auto;}.join-us-section h2 { font-size: 2rem; color: #0d3b4e; margin-bottom: 1rem;}.join-us-section p { color: #6c757d; line-height: 1.7; margin-bottom: 2rem;}.newsletter-form { display: flex; justify-content: center; gap: 0.5rem;}.newsletter-form input[type="email"] { width: 100%; max-width: 350px; padding: 0.9rem 1.2rem; border: 1px solid #ced4da; border-radius: 8px; font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s;}.newsletter-form input[type="email"]:focus { outline: none; border-color: #0056b3; box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);}.newsletter-form button { padding: 0.9rem 2rem; background-color: #0056b3; color: #ffffff; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s;}.newsletter-form button:hover { background-color: #004494; }.cta-section { position: relative; padding: 5rem 15px; text-align: center; color: #0056b3; overflow: hidden; }.cta-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #0056B3; background-image: linear-gradient(183deg, rgba(0, 86, 179, 1) 5%, rgba(248, 249, 250, 1) 35%, rgba(255, 255, 255, 1) 44%); transform: scale(1.05); z-index: 1;}.cta-container { position: relative; z-index: 2; max-width: 800px; margin: 0 auto;}.cta-section h2 { font-size: 2.5rem; font-weight: 700; text-shadow: 0 2px 5px rgba(0,0,0,0.5); margin-bottom: 1rem;}.cta-section p { font-size: 1.1rem; line-height: 1.7; max-width: 650px; margin: 0 auto 2.5rem auto; opacity: 0.9;}.cta-button { display: inline-block; background-color: #ffffff; color: #0d3b4e; font-size: 1.1rem; font-weight: 600; padding: 1rem 2.5rem; border-radius: 50px; text-decoration: none; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: transform 0.3s ease, box-shadow 0.3s ease;}.cta-button:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 8px 25px rgba(0,0,0,0.25);}.cta-button i { margin-left: 0.5rem; transition: transform 0.3s ease;}.cta-button:hover i { transform: translateX(5px);}

/* --- 5. Responsive Layout for Desktop --- */
@media (min-width: 992px) {
    .resource-card {
        flex-direction: row; /* Side-by-side layout on desktop */
    }
    .resource-card__preview-wrapper {
        display: flex; /* Show the preview on desktop */
    }
    /* On desktop, stack icon/content vertically again */
    .resource-card__content-wrapper {
        flex-basis: 55%;
    }
}