/* ========================================
   1. VARIABLES & RESET
   ======================================== */
:root {
    --sky-blue: #4A90E2;
    --sky-blue-light: #6BA3E8;
    --sky-blue-dark: #3A7BC8;
    --sun-yellow: #FFD84D;
    --sun-yellow-light: #FFE57F;
    --sun-yellow-dark: #FFC520;
    --accent-coral: #FF6B6B;
    --bg-white: #FFFFFF;
    --bg-off-white: #FAFBFC;
    --bg-light-gray: #F5F7FA;
    --text-dark: #2C3E50;
    --text-medium: #5A6C7D;
    --text-light: #8B9BAB;
    --border-light: #E1E8ED;
    --border-medium: #CBD6E2;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; }

body {
    background: var(--bg-off-white);
    color: var(--text-dark);
    font-family: "Inter", sans-serif;
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   2. NAVIGATION (Simplified)
   ======================================== */
.navbar-custom {
    background: var(--bg-white);
    border-bottom: 2px solid var(--sun-yellow);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
}

.navbar-flex-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.chrpi-logo {
    height: 80px;
    width: auto;
}

.navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--sky-blue);
    background: var(--bg-light-gray);
}

/* ========================================
   3. SEARCH SECTION (Fixed Alignment)
   ======================================== */
.search-section {
    max-width: 400px;
    margin: 0 auto 2rem auto;
}

.search-form {
    display: flex;
    gap: 8px;
    background: var(--bg-white);
    padding: 6px;
    border-radius: 30px;
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.search-form input {
    flex: 1;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
}

.search-form button {
    border-radius: 25px;
    padding: 0 20px;
    background: var(--sun-yellow);
    border: none;
    font-weight: 500;
    cursor: pointer;
}

/* ========================================
   4. POST CARDS (Unified Component)
   ======================================== */
.post-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.post-card-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 12px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--sun-yellow);
}

.post-avatar-container {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    margin-right: 12px;
}

.avatar-emoji-placeholder {
    width: 48px;
    height: 48px;
    background-color: var(--sun-yellow-light);
    border: 2px solid var(--sun-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
}

.post-username-link {
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
}

.post-content {
    padding: 0 1.25rem 1rem 1.25rem;
    font-size: 1.1rem;
}

.post-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

/* ========================================
   5. REACTIONS (Modern Pills)
   ======================================== */
.post-reactions {
    padding: 1rem;
    border-top: 1px solid var(--bg-light-gray);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reaction-btn {
    background: var(--bg-light-gray);
    border: 1px solid var(--border-light);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.reaction-btn:hover {
    transform: scale(1.05);
    background: var(--sun-yellow-light);
}

.reaction-btn-active {
    background: var(--sun-yellow);
    border-color: var(--sun-yellow-dark);
}

/* ========================================
   6. UTILITIES & RESPONSIVE
   ======================================== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 576px) {
    .navbar-flex-container {
        flex-wrap: nowrap;
    }

    .navbar-nav {
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .nav-link {
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }
}