/* Resources Page Styles */

.resources-hero {
    padding-top: 140px;
    padding-bottom: 60px;
    background: linear-gradient(135deg, #fcf0f8 0%, #f8f0f7 100%);
    text-align: center;
}

.resources-hero h1 {
    color: #4a4a4a;
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.resources-hero p {
    color: #666666;
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
}

.resources-content {
    padding: 80px 0;
    background-color: #ffffff;
}

/* Resources Grid - 2x2 on desktop, 1 column on mobile */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

/* Resource Tile */
.resource-tile {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.resource-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.tile-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tile-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.tile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.resource-tile:hover .tile-image img {
    transform: scale(1.05);
}

/* Video Thumbnail Styles */
.video-thumbnail {
    position: relative;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 2;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Tile Content */
.tile-content {
    padding: 30px;
}

.tile-content h3 {
    color: #894d77;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.tile-content p {
    color: #666666;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading Indicator for Infinite Scroll */
.loading-indicator {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #894d77;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    color: #666666;
    font-size: 1rem;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    z-index: 10000;
}

.close-modal {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: scale(1.1);
}

#modal-video {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Active state for Resources link in nav */
.nav-menu a.active {
    color: #894d77;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 992px) {
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .resources-hero h1 {
        font-size: 2.5rem;
    }

    .resources-hero p {
        font-size: 1.1rem;
    }

    .tile-image {
        height: 240px;
    }
}

@media (max-width: 768px) {
    .resources-hero {
        padding-top: 120px;
        padding-bottom: 40px;
    }

    .resources-hero h1 {
        font-size: 2rem;
    }

    .resources-hero p {
        font-size: 1rem;
    }

    .resources-content {
        padding: 60px 0;
    }

    .tile-content {
        padding: 20px;
    }

    .tile-content h3 {
        font-size: 1.2rem;
    }

    .tile-content p {
        font-size: 0.95rem;
    }

    .video-modal-content {
        width: 95%;
    }

    .close-modal {
        top: -45px;
    }
}

@media (max-width: 576px) {
    .resources-grid {
        gap: 20px;
    }

    .tile-image {
        height: 200px;
    }

    .play-button svg {
        width: 50px;
        height: 50px;
    }
}
