/* Base Styles and Variables with Neumorphic Theme */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #93c5fd;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --text-color: #3a3a3a;
    --text-light: #6b7280;
    --bg-color: #f0f0f0;
    --bg-light: #f5f5f5;
    --bg-dark: #111827;
    --neumorph-light: #ffffff;
    --neumorph-dark: #d1d9e6;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --shadow: 5px 5px 10px var(--neumorph-dark), 
              -5px -5px 10px var(--neumorph-light);
    --shadow-inset: inset 2px 2px 5px var(--neumorph-dark), 
                   inset -2px -2px 5px var(--neumorph-light);
    --shadow-lg: 8px 8px 16px var(--neumorph-dark), 
                -8px -8px 16px var(--neumorph-light);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Buttons */
.btn-primary, .btn-outline {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Navigation - Neumorphic Design */
.navbar {
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo-img {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 20px;
}

.nav-item a {
    color: var(--text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-item a:hover {
    color: white;
    box-shadow: var(--shadow-inset);
}

/* Notification and Message Badges */
.notification-badge, .message-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--error-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s infinite;
    box-shadow: var(--shadow);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
/* Profile Picture Styles */
.profile-picture {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    transition: var(--transition);
    border: 2px solid var(--primary-light);
    box-shadow: var(--shadow);
}

.profile-picture.default {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Profile Picture Styles - FIXED with higher specificity */
.nav-item.profile-link-item .profile-link .profile-picture {
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: 50%;
    object-fit: cover;
    transition: var(--transition);
    border: 2px solid var(--primary-light);
    box-shadow: var(--shadow);
}

.nav-item.profile-link-item .profile-link .profile-picture.default {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    color: var(--primary-color);
    overflow: hidden;
}

.nav-item.profile-link-item .profile-link .profile-picture.default img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Adjust profile picture size for different screen sizes */
@media (max-width: 1024px) {
    .nav-item.profile-link-item .profile-link .profile-picture {
        width: 2.25rem !important;
        height: 2.25rem !important;
    }
}

@media (max-width: 768px) {
    .nav-item.profile-link-item .profile-link .profile-picture {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    /* When mobile menu is active, make profile picture slightly larger */
    .nav-links.active .nav-item.profile-link-item .profile-link .profile-picture {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
}

@media (max-width: 480px) {
    .nav-item.profile-link-item .profile-link .profile-picture {
        width: 1.75rem !important;
        height: 1.75rem !important;
    }
    
    /* When mobile menu is active */
    .nav-links.active .nav-item.profile-link-item .profile-link .profile-picture {
        width: 2.25rem !important;
        height: 2.25rem !important;
    }
}

/* Ensure the profile link container properly contains the image */
.profile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.profile-link:hover {
    box-shadow: var(--shadow-inset);
}

/* Adjust username visibility */
.username {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

@media (max-width: 1024px) {
    .username {
        max-width: 80px;
    }
}

@media (max-width: 768px) {
    .username {
        display: none;
    }
    
    /* Show username when mobile menu is active */
    .nav-links.active .username {
        display: block;
        max-width: 100%;
    }
}

/* Menu Dropdown */
.menu-dropdown {
    position: relative;
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-color);
    border: none;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.menu-toggle:hover {
    box-shadow: var(--shadow-inset);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-color);
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 10px 0;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    box-shadow: var(--shadow-inset);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px 0;
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 50px 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #d1d5db;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 1.5rem;
}

.footer-logo .logo-img {
    height: 35px;
    margin-right: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.newsletter-form {
    display: flex;
    margin-top: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
}

.newsletter-form button {
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    margin-top: 40px;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #d1d5db;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-links {
        gap: 15px;
    }
    
    .username {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
        gap: 15px;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-item a {
        width: 100%;
        justify-content: center;
    }
    
    .profile-link {
        justify-content: center;
    }
    
    .username {
        display: block;
    }
    
    .menu-dropdown {
        width: 100%;
    }
    
    .menu-toggle {
        width: 100%;
        border-radius: var(--radius);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        width: 100%;
        margin-top: 10px;
        display: none;
    }
    
    .dropdown-menu.active {
        display: block;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo span {
        display: none;
    }
    
    .nav-links {
        padding: 15px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}