/* ===========================================================
  DEPARTMENTS SPECIFIC STYLES
  Only styles specific to departments content
=========================================================== */
*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Departments content wrapper */
.clubs-content {
    margin: 2rem auto;
    max-width: 1400px;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8fdf8 0%, #e8f5e8 50%, #f0f8f0 100%);
    min-height: calc(100vh - 200px); /* Adjust to account for header/footer */
}

/* Page title styling */
.page-title {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-green, #2D5016), var(--accent-yellow-dark, #D89000));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-shadow: none;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optimized grid layout */
.clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* Enhanced card design */
.card {
    background: linear-gradient(145deg, #ffffff, #f8fff8);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(45, 80, 22, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    text-align: center;
    padding: 1.8rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(45, 80, 22, 0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    will-change: transform;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
    animation: fadeInUp 0.6s ease-out backwards;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-green, #2D5016) 0%, var(--accent-yellow, #F4A400) 50%, var(--primary-green, #2D5016) 100%);
    opacity: 0;
    transition: all 0.4s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }
.card:nth-child(n+7) { animation-delay: 0.7s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(45, 80, 22, 0.2), 0 10px 20px rgba(244, 164, 0, 0.15);
    border-color: rgba(45, 80, 22, 0.2);
    text-decoration: none;
    color: inherit;
}

/* Optimized card images */
.card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 15px;
    margin-bottom: 1.2rem;
    transition: all 0.4s ease;
    background: linear-gradient(135deg, #f8fdf8, #e8f5e8);
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.08);
}

.card:hover img {
    transform: scale(1.05) rotateZ(1deg);
    box-shadow: 0 8px 20px rgba(45, 80, 22, 0.15);
}

/* Card titles */
.card h3 {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary-green, #2D5016), var(--primary-green-light, #4D8528));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
    font-weight: 700;
    text-transform: capitalize;
    line-height: 1.3;
    transition: all 0.3s ease;
    position: relative;
}

.card:hover h3 {
    letter-spacing: 0.5px;
}

/* Card descriptions */
.card p {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.card:hover p {
    color: #333;
}

/* Card buttons */
.card .card-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-green, #2D5016), var(--primary-green-light, #4D8528));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
}

.card .card-btn:hover {
    background: linear-gradient(135deg, var(--accent-yellow-dark, #D89000), var(--accent-yellow, #F4A400));
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(244, 164, 0, 0.5), 0 0 20px rgba(244, 164, 0, 0.3);
    letter-spacing: 1px;
}

/* Legacy support for old structure */
.main-section {
    padding: 60px 30px;
    background: linear-gradient(to bottom, #f9f9f9, #e6e6e6);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    margin: 0 auto;
}

.main-section h1 {
    font-size: 3em;
    color: #003d33;
    margin-bottom: 40px;
    font-family: 'Roboto', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    row-gap: 50px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .clubs-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .footer-grid {
        flex-direction: column;
        align-items: center;
    }

    .clubs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0.5rem;
    }
    
    .card {
        padding: 1.2rem;
    }
    
    .card h3 {
        font-size: 1.4rem;
    }
    
    .page-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .clubs-content {
        padding: 1.5rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .clubs-content {
        padding: 1rem 0.5rem;
    }
    
    .card img {
        height: 150px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .card .card-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}
