:root {
    --primary-color: #0084FF;
    --secondary-color: #E5F3FF;
    --hover-color: #CCE6FF;
    --text-color: #333;
    --light-text: #777;
    --white: #fff;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--text-color);
    line-height: 1.6;
}

.head {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.competitions-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 90%; /* Changed from max-width to width */
    max-width: 1000px; /* Keep max-width for very large screens */
    min-height: auto;
    margin: 0 auto;
    margin-bottom: 25px;
}

.competition-card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    width: 100%; /* Make sure card takes full width of container */
}

.competition-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.competition-info {
    padding: 20px;
    /* max-height: 300px; */
    opacity: 1;
    transition: var(--transition);
    overflow: hidden;
}

.competition-title {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.competition-brief {
    margin-bottom: 20px;
    color: var(--text-color);
}
.competition-link {
    display: inline-block;
    font-size: 1.2rem; /* Base font size */
    text-decoration: none; /* Remove default underline */
    color: #00b7ff; /* Default blue color */
    font-weight: 600; /* Make it stand out */
    transition: color 0.3s ease-in-out;
}

.competition-dates-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap; /* Add flex-wrap to handle overflow */
}

.competition-dates {
    flex: 1;
    min-width: 280px; /* Add minimum width for dates */
}

.date-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--light-text);
}

.date-label {
    font-weight: bold;
    margin-right: 5px;
    min-width: 120px; /* Reduced from 200px for better mobile display */
}

.competition-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px; /* Add minimum width for buttons */
}

.btn {
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    text-align: center;
}

.register-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

.register-btn:hover {
    background-color: #006cd9;
}

.results-btn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.results-btn:hover {
    background-color: var(--hover-color);
}

.status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

.card-active {
    background-color: #e8f5e9;
    color: #4caf50;
}

.closed {
    background-color: #ffebee;
    color: #f44336;
}

.upcoming {
    background-color: #fff8e1;
    color: #ffa000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .competition-dates-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .competition-buttons {
        width: 100%;
        flex-direction: row; /* Changed to row for mobile */
        justify-content: space-between; /* Space buttons evenly */
    }

    .btn {
        flex: 1; /* Make buttons take equal space */
        margin: 0 5px; /* Add margin between buttons */
    }

    .competition-image {
        height: 150px;
    }

    .date-label {
        min-width: 100px; /* Further reduce for smaller screens */
    }
}

@media (max-width: 480px) {
    .competition-image {
        height: 130px;
    }
    
    .competition-dates {
        font-size: 0.8rem;
    }

    .competition-buttons {
        width: 100%;
    }

    .competition-info {
        padding: 15px;
    }

    .competition-title {
        font-size: 1.3rem;
    }
}