/* Base Styles */
:root {
    --primary-color: #1a4d5c;
    --primary-dark: #0f3540;
    --secondary-color: #ffffff;
    --text-dark: #191919;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --success-color: #e8a835;
    --error-color: #e11d48;
    --warning-color: #f59e0b;
    --navbar-height: 60px;
}

body {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

/* Navbar */
.navbar {
    background-color: #003B49;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 0;
    width: 100%;
    z-index: 1000;
    height: var(--navbar-height);
    margin: 0;
}

.navbar-nav {
    height: var(--navbar-height);
    align-items: center;
}

.nav-item {
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar-light .navbar-nav .nav-link {
    color: white;
    font-weight: 500;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 1rem !important;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: #E1B87F;
}

.nav-item .dropdown-toggle.btn-link {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 1rem !important;
    font-weight: 500;
    color: white;
}

.nav-item .dropdown-toggle.btn-link:hover,
.nav-item .dropdown-toggle.btn-link:focus {
    color: #E1B87F !important;
    text-decoration: none;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white !important;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.nav-link {
    color: white !important;
    padding: 1rem !important;
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    color: #E1B87F !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #E1B87F;
}

/* Dropdown Buttons */
.nav-item .dropdown-toggle.btn-link {
    font-size: inherit;
    font-weight: 500;
    text-decoration: none;
    padding: 1rem !important;
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.dropdown-item {
    font-weight: 500;
    padding: 0.75rem 1rem;
}

.dropdown-item:hover {
    background-color: rgba(26, 77, 92, 0.1);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

/* Main Content */
main.container {
    padding-top: 20px;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    background-color: white;
    margin-bottom: 1rem;
}

.card-header {
    background-color: #003B49;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    color: white;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 24px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #E1B87F;
    border-color: #E1B87F;
}

.btn-primary:hover {
    background-color: #d4a76a;
    border-color: #d4a76a;
}

.btn-outline-primary {
    color: #E1B87F;
    border-color: #E1B87F;
}

.btn-outline-primary:hover {
    background-color: #E1B87F;
    color: #003B49;
}

.btn-outline-secondary {
    color: #E1B87F;
    border-color: #E1B87F;
}

.btn-outline-secondary:hover {
    background-color: #E1B87F;
    color: #003B49;
}

/* Profile Components */
.profile-header {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1rem;
    position: relative;
}

.profile-cover {
    height: 200px;
    background-color: var(--primary-color);
    border-radius: 8px 8px 0 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.profile-photo {
    width: 152px;
    height: 152px;
    border-radius: 50%;
    border: 4px solid white;
    position: relative;
    margin-top: 124px;
    background-color: white;
}

.profile-info {
    margin-top: 1rem;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.profile-title {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Feed Components */
.post-card {
    margin-bottom: 1rem;
}

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

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 1rem;
}

.post-meta {
    flex-grow: 1;
}

.post-author {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.post-time {
    color: var(--text-light);
    font-size: 0.875rem;
}

.post-content {
    padding: 0 1rem 1rem;
}

/* Forms */
.form-control {
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 77, 92, 0.1);
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Responsive */
@media (max-width: 991.98px) {
    /* ========================================
       MOBILE MENU - Complete Redesign
       Pure CSS + Custom JS (No Bootstrap Dropdowns)
       ======================================== */
    
    /* Hamburger button */
    .navbar-toggler {
        border: none;
        padding: 0.625rem 0.75rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        transition: all 0.3s ease;
        z-index: 1060;
    }
    
    .navbar-toggler:hover,
    .navbar-toggler:focus {
        background: rgba(255, 255, 255, 0.2);
        box-shadow: none;
        outline: none;
    }
    
    .navbar-toggler .fa-bars {
        color: white;
        font-size: 1.25rem;
    }
    
    /* Full screen menu */
    .navbar-collapse {
        position: fixed !important;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg, #003B49 0%, #00262e 100%);
        padding: 0;
        margin: 0;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1050;
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar-collapse .navbar-nav {
        height: auto;
        padding: 1rem 0 6rem 0;
        flex-direction: column;
    }
    
    .navbar-collapse .nav-item {
        height: auto;
        display: block;
    }
    
    /* ==========================================
       MENU ITEMS - Main Level
       ========================================== */
    .navbar-collapse .nav-link:not(.dropdown-toggle),
    .navbar-collapse .navbar-nav .nav-link:not(.dropdown-toggle) {
        color: white !important;
        padding: 1rem 1.25rem !important;
        font-size: 1rem;
        font-weight: 500;
        display: flex !important;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .navbar-collapse .nav-link:not(.dropdown-toggle):hover {
        background-color: rgba(255, 255, 255, 0.05);
        color: #E1B87F !important;
    }
    
    .navbar-collapse .nav-link i {
        width: 24px;
        margin-right: 12px;
        text-align: center;
        opacity: 0.85;
    }
    
    /* ==========================================
       ACCORDION HEADERS (Items with submenus)
       ========================================== */
    .navbar-collapse .nav-item.dropdown {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .navbar-collapse .dropdown-toggle.btn-link {
        color: white !important;
        padding: 1rem 1.25rem !important;
        font-size: 1rem;
        font-weight: 500;
        width: 100%;
        text-align: left;
        display: flex !important;
        align-items: center;
        background: transparent !important;
        border: none !important;
        text-decoration: none !important;
        position: relative;
    }
    
    .navbar-collapse .dropdown-toggle.btn-link:hover,
    .navbar-collapse .dropdown-toggle.btn-link:focus {
        background-color: rgba(255, 255, 255, 0.05) !important;
        color: #E1B87F !important;
        text-decoration: none !important;
        box-shadow: none !important;
        outline: none !important;
    }
    
    .navbar-collapse .dropdown-toggle.btn-link i:first-child {
        width: 24px;
        margin-right: 12px;
        text-align: center;
        opacity: 0.85;
    }
    
    /* Accordion Arrow */
    .navbar-collapse .dropdown-toggle.btn-link::after {
        content: '';
        border: solid rgba(255, 255, 255, 0.5);
        border-width: 0 2px 2px 0;
        padding: 4px;
        margin-left: auto;
        margin-right: 4px;
        flex-shrink: 0;
        transform: rotate(45deg);
        transition: transform 0.3s ease;
    }
    
    /* Add spacing between text and arrow */
    .navbar-collapse .dropdown-toggle.btn-link {
        gap: 12px;
    }
    
    .navbar-collapse .nav-item.dropdown.mobile-open .dropdown-toggle.btn-link::after {
        transform: rotate(-135deg);
    }
    
    .navbar-collapse .nav-item.dropdown.mobile-open .dropdown-toggle.btn-link {
        background-color: rgba(225, 184, 127, 0.15) !important;
        color: #E1B87F !important;
    }
    
    /* ==========================================
       SUBMENU (Accordion Content)
       ========================================== */
    .navbar-collapse .dropdown-menu {
        position: static !important;
        transform: none !important;
        float: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.15) !important;
        display: none !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    
    .navbar-collapse .nav-item.dropdown.mobile-open .dropdown-menu {
        display: block !important;
        max-height: 500px;
        padding: 0.5rem 0 !important;
    }
    
    /* Submenu Items */
    .navbar-collapse .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
        padding: 0.875rem 1.25rem 0.875rem 3.5rem !important;
        font-size: 0.95rem;
        font-weight: 400;
        display: flex !important;
        align-items: center;
        background: transparent !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .navbar-collapse .dropdown-item:last-child {
        border-bottom: none;
    }
    
    .navbar-collapse .dropdown-item:hover,
    .navbar-collapse .dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.08) !important;
        color: #E1B87F !important;
    }
    
    .navbar-collapse .dropdown-item i {
        width: 20px;
        margin-right: 10px;
        text-align: center;
        opacity: 0.75;
        font-size: 0.9rem;
    }
    
    /* Dropdown Dividers */
    .navbar-collapse .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.1);
        margin: 0.25rem 0;
    }
    
    /* Badge */
    .navbar-collapse .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
        margin-left: auto;
    }
    
    /* ==========================================
       LANGUAGE SELECTOR
       ========================================== */
    .navbar-collapse .dropdown-item:has(.form-select),
    .navbar-collapse form.dropdown-item {
        padding: 0.75rem 1.25rem 0.75rem 3.5rem !important;
    }
    
    .navbar-collapse .form-select {
        background-color: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.25);
        color: white;
        font-size: 0.85rem;
        padding: 0.4rem 2rem 0.4rem 0.75rem;
        border-radius: 6px;
    }
    
    .navbar-collapse .form-select:focus {
        border-color: #E1B87F;
        box-shadow: 0 0 0 2px rgba(225, 184, 127, 0.25);
    }
    
    .navbar-collapse .form-select option {
        background: #003B49;
        color: white;
    }
    
    /* ==========================================
       SPECIAL ITEMS
       ========================================== */
    
    /* Points - Golden star */
    .navbar-collapse .dropdown-toggle .fa-star {
        color: #E1B87F !important;
    }
    
    /* Logout - Red highlight */
    .navbar-collapse .dropdown-item[href*="logout"] {
        color: #ff7b7b !important;
    }
    
    .navbar-collapse .dropdown-item[href*="logout"]:hover {
        background-color: rgba(255, 100, 100, 0.15) !important;
    }
    
    /* ==========================================
       PROFILE COMPONENTS
       ========================================== */
    .profile-header {
        text-align: center;
    }
    
    .profile-photo {
        margin: 124px auto 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}
