/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #00a884;
    --primary-dark: #008f6f;
    --secondary-color: #008069;
    --bg-gradient: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --radius: 16px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
}

/* Layout */
.main-layout {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    gap: 2.5rem;
    align-items: flex-start;
}

/* Sidebar */
.sidebar-public {
    width: 320px;
    flex-shrink: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 6rem;
}

.sidebar-search .search-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.sidebar-search input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.sidebar-search input:focus {
    outline: none;
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1);
}

.sidebar-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.category-list h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.category-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.category-list a:hover,
.category-list a.active {
    background: rgba(0, 168, 132, 0.1);
    color: var(--primary-color);
}

/* Main Content */
.content-area {
    flex: 1;
    width: 100%;
    /* Ensure it takes full width in flex context */
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 168, 132, 0.3);
}

.card-image {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
}

.card-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 3em;
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
    margin-top: auto;
}

.btn-join,
.btn-share {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-join {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(37, 211, 102, 0.2);
}

.btn-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 211, 102, 0.3);
}

.btn-share {
    background: white;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-share:hover {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.2);
}

/* Mobile Nav */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

#mobile-nav {
    display: none;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    position: fixed;
    top: 60px;
    /* Adjust based on header height */
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem;
    z-index: 999;
    overflow-y: auto;
}

#mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#mobile-nav li {
    margin-bottom: 1rem;
}

#mobile-nav li a {
    display: block;
    padding: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
}

/* Join Page */
.join-container {
    max-width: 600px;
    margin: 2rem auto;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
}

.group-icon {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    border: 4px solid white;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
}

/* Footer */
footer {
    background: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--glass-border);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .sidebar-public {
        width: 100%;
        position: static;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .main-layout {
        padding: 0 1rem;
        margin: 1.5rem auto;
    }

    .sidebar-public {
        display: none;
        /* Hide sidebar on mobile */
    }

    .mobile-menu-btn {
        display: block;
    }

    .grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 1rem;
    }

    .card {
        flex-direction: row;
        /* Horizontal layout on mobile */
        padding: 1rem;
        align-items: center;
        text-align: left;
    }

    .card-image {
        width: 70px;
        height: 70px;
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .card-content {
        align-items: flex-start;
    }

    .card-title {
        margin-bottom: 0.75rem;
        height: auto;
        -webkit-line-clamp: 1;
        font-size: 1rem;
    }

    .card-actions {
        margin-top: 0;
        gap: 0.5rem;
    }

    .btn-join,
    .btn-share {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}