/* Hero Section */
.challenges-hero {
    background: linear-gradient(135deg, #0a1d3a, #133e7c);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.challenges-hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.challenges-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Challenge Grid */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    margin-bottom: 20px;
}

/* Card */
.challenge-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.challenge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Two-column header */
.challenge-header {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    background-color: #f7f9fb;
    border-bottom: 1px solid #e0e0e0;
}

.challenge-header img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.challenge-logo img {
    max-width: 80px;
    max-height: 80px;
}

/* Challenge image container */
.challenge-image {
    width: 100%;
    height: 150px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.challenge-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image fills the space neatly */
}

/* Info section */
.challenge-info {
    padding: 20px;
}

.challenge-info h3 {
    font-size: 1.3rem;
    color: #0a1d3a;
    margin-bottom: 10px;
}

.challenge-info p {
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 15px;
    margin-top: 5px;
}

/* Button */
.join-btn {
    background-color: #133e7c; /* Dark blue replacing orange */
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.join-btn:hover {
    background-color: #0a1d3a;
}

section.sponsorship-banner {
    color: #fff;
    padding: 0px;
    text-align: center;
    margin-bottom: 40px;
}

.sponsorship-card-container {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    background-color: #f5f5f5;
}

.challenge-card.alt-layout {
    width: 80%;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    background-color: #fff;
    text-align: center;
    font-family: sans-serif;
}

/* Top image full width */
.challenge-card.alt-layout .challenge-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* Centered logo below image */
.challenge-card.alt-layout .challenge-logo {
    margin-top: -30px;
}
.challenge-card.alt-layout .challenge-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #fff;
}

/* Info section */
.challenge-card.alt-layout .challenge-info {
    padding: 16px;
}

.challenge-card.alt-layout .challenge-info h3 {
    margin: 12px 0 8px;
    font-size: 1.2rem;
}

.challenge-card.alt-layout .challenge-info p {
    font-size: 0.9rem;
    color: #555;
    text-align: left;
    margin-bottom: 16px;
}

/* Join button */
.challenge-card.alt-layout .join-btn {
    background-color: #ff6b00;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.3s;
}

.challenge-card.alt-layout .join-btn:hover {
    background-color: #e65a00;
}

section.challenges-categories {
    color: #fff;
    padding: 0px;
    text-align: left;
    margin-bottom: 5px;
}

.category-list {
    display: flex;
    justify-content: center; /* centers the whole row */
    gap: 10px;               /* space between buttons */
    flex-wrap: wrap;         /* allows wrapping on smaller screens */
    margin: 20px 0;
}

.category-btn {
    text-decoration: none;
    color: #000;
    border: 1px solid #000;
    padding: 8px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    background-color: transparent;
}

.category-btn:hover {
    background-color: #000;
    color: #fff;
}
