/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #25D366;
    --secondary-color: #128C7E;
    --dark-color: #075E54;
    --light-color: #DCF8C6;
    --text-color: #333;
    --light-text: #666;
    --background-color: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 10px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--dark-color);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.admin-btn {
    background-color: var(--primary-color);
    color: white !important;
    padding: 8px 20px;
    border-radius: 5px;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(7, 94, 84, 0.9), rgba(18, 140, 126, 0.9)), url('https://images.unsplash.com/photo-1611605698323-b1e99cfd37ea?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: var(--shadow);
}

.search-box i {
    color: var(--light-text);
    font-size: 1.2rem;
    align-self: center;
    margin-right: 10px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 10px 0;
}

.search-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: var(--secondary-color);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--light-text);
}

/* Categories Section */
.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.category-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.category-card p {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Groups Section */
.category-section {
    margin-bottom: 50px;
}

.category-title {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.group-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.group-card:hover {
    transform: translateY(-5px);
}

.group-image {
    height: 180px;
    width: 100%;
    object-fit: cover;
}

.group-info {
    padding: 20px;
}

.group-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.group-info p {
    color: var(--light-text);
    font-size: 0.95rem;
    margin-bottom: 15px;
    min-height: 60px;
}

.group-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.group-category {
    background-color: var(--light-color);
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.group-pinned {
    color: #FF9800;
    font-weight: 500;
}

.join-button {
    display: block;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.join-button:hover {
    background-color: var(--secondary-color);
}

/* Bottom Image Section */
.bottom-image {
    background: linear-gradient(rgba(37, 211, 102, 0.9), rgba(18, 140, 126, 0.9)), url('https://images.unsplash.com/photo-1611605698335-8b1569810432?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-top: 60px;
}

.bottom-content h3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.bottom-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: white;
    color: var(--dark-color);
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-logo {
    flex: 1;
    min-width: 300px;
    margin-bottom: 30px;
}

.footer-logo i {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-logo p {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--light-text);
}

.modal h2 {
    color: var(--dark-color);
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .search-box {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        gap: 15px;
    }
    
    .search-box input {
        padding: 15px;
        border-radius: 5px;
    }
    
    .categories-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .groups-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
}