/* Base Styling */
body {
    color: var(--text-color);
    min-height: 100vh;
    background-color: var(--bg-color);
    visibility: hidden;
}

/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color, #14532d);
    padding: 10px 20px;
    color: white;
}

.navbar-logo {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Fix: Flex container for tabs + icon */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Tabs */
.navbar-tabs {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.navbar-tabs li a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background-color 0.2s, color 0.2s;
}

.navbar-tabs li a:hover,
.navbar-tabs li a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.navbar-tabs li {
    display: none;
}

.navbar-tabs li:last-child {
    display: list-item;
}

/* Profile Wrapper */
.profile-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

/* Profile Card */
.profile-card {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Profile Sidebar (Left Column) */
.profile-sidebar {
    width: 300px;
    background: #2c3e50;
    color: #ffffff;
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-sidebar #userImg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid #3498db;
    object-fit: cover;
    margin-bottom: 20px;
}

.profile-sidebar #name {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.profile-sidebar #city {
    font-size: 1rem;
    color: #bdc3c7;
    margin-top: 5px;
}

/* Profile Details (Right Column) */
.profile-details {
    flex: 1;
    padding: 40px;
}

.section {
    margin-bottom: 30px;
}

.section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.info {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info:last-child {
    border-bottom: none;
}

.info strong {
    font-weight: 600;
    color: #34495e;
}

.info span {
    color: #555;
    text-align: right;
}

/* Iqama Image Section */
.iqama-image {
    margin-top: 20px;
    text-align: left;
}

.iqama-image h4 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.iqama-image img {
    max-width: 200px;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 5px;
}

/* Error Message */
#error-message {
    display: none;
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 5px solid #f5c6cb;
}

/* Sidebar Menu Icon */
.menu-icon {
    width: 24px;
    height: 18px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-icon div {
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Drawer Styles */
.sidebar-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background-color: var(--primary-color);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    padding: 60px 20px 20px 20px;
    box-sizing: border-box;
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-drawer.open {
    right: 0;
}

/* Drawer Menu Items */
.sidebar-drawer a {
    text-decoration: none;
    font-weight: 600;
    color: var(--text-color-light);
    padding: 15px 10px;
    border-bottom: 2px solid #e0e0e0;
    transition: background-color 0.2s;
}

.sidebar-drawer a:hover {
    border-radius: 5px;
    background-color: var(--bg-color);
    color: var(--dark-color);
}

/* Overlay behind drawer */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.drawer-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Animate hamburger to X when open */
.menu-icon.open div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-icon.open div:nth-child(2) {
    opacity: 0;
}

.menu-icon.open div:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.drawer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #ffffff20;
    border: 2px solid #ffffff50;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    width: 36px;
    height: 36px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drawer-close:hover {
    background-color: #ffffff40;
    transform: rotate(90deg);
    color: var(--bg-color);
    border-color: #ffffff80;
}


/* Responsive: smaller on very small screens */
@media (max-width: 400px) {
    .menu-icon {
        top: 15px;
        right: 15px;
        width: 28px;
        height: 24px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-card {
        flex-direction: column;
    }

    .profile-sidebar {
        width: 100%;
        border-radius: 16px 16px 0 0;
    }

    .profile-details {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .profile-wrapper {
        margin: 20px auto;
        padding: 10px;
    }

    .profile-details {
        padding: 20px;
    }

    .info {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .info span {
        text-align: left;
        margin-top: 5px;
    }
}