* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.resources-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

.resources-header {
    text-align: center;
    margin-bottom: 4rem;
}

.resources-title {
    font-size: 3rem;
    font-weight: bold;
    color: rgb(var(--color-dark-blue));
    margin-bottom: 1rem;
}

.resources-subtitle {
    font-size: 1.2rem;
    color: rgb(var(--color-dark) / 0.65);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.resource-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgb(var(--color-blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgb(var(--color-dark-blue) / 0.16);
}

.resource-card:hover::before {
    transform: scaleX(1);
}

.resource-card.book {
    background: white;
    padding: 0;
    overflow: hidden;
}

.resource-card.book .book-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.resource-card.book .book-content {
    padding: 2rem;
}

.resource-card.stories,
.resource-card.bibliography {
    background: white;
}

.resource-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

.resource-card.book .resource-icon {
    background: rgb(var(--color-blue));
    color: white;
}

.resource-card.stories .resource-icon {
    background: rgb(var(--color-blue));
    color: white;
}

.resource-card.bibliography .resource-icon {
    background: rgb(var(--color-blue));
    color: white;
}

.resource-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: rgb(var(--color-dark));
    margin-bottom: 1rem;
}

.resource-description {
    font-size: 1rem;
    color: rgb(var(--color-dark) / 0.65);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: rgb(var(--color-dark-blue));
    transition: gap 0.3s ease, color 0.3s ease;
}

.resource-card:hover .resource-link {
    gap: 0.75rem;
    color: rgb(var(--color-blue));
}

@media (max-width: 768px) {
    .resources-container {
        padding: 2rem 1rem;
    }

    .resources-title {
        font-size: 2rem;
    }

    .resources-subtitle {
        font-size: 1rem;
    }

    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .resource-card {
        padding: 2rem;
    }

    .resource-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}
