/* ===== Global Styles ===== */
:root {
    --primary-color: #1877F2;
    --secondary-color: #25D366;
    --red-color: #cc0000;
    --light-gray: #F0F2F5;
    --dark-gray: #1C1E21;
    --white: #FFFFFF;
    --text-color: #1C1E21;
    --border-color: #DDDFE2;
    --gray: #666;
    
    --sidebar-width-collapsed: 68px;
    --sidebar-width-expanded: 240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}
.btn-primary:hover {
    background-color: #166FE5;
    transform: scale(1.05);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}
.btn-secondary:hover {
    background-color: #1a8a4a;
}

.btn-logout {
    background-color: var(--red-color);
    color: var(--white);
}
.btn-logout:hover {
    background-color: #a00000;
}

/* ===== Header ===== */
header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
}
.logo i {
    margin-right: 10px;
    font-size: 28px;
}

/* ===== Desktop Navigation ===== */
nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 10px;
}
nav ul li {
    margin-left: 0;
}
nav ul li a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}
nav ul li a:hover {
    color: var(--secondary-color);
}
nav ul li a.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 4px;
}

/* ===== Search Bar ===== */
.search-container {
    flex-grow: 1;
    margin: 0 20px;
}
.search-container form {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}
.search-container form:focus-within {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.search-container input[type="text"] {
    width: 100%;
    padding: 12px 20px;
    border: none;
    font-size: 16px;
    color: var(--dark-gray);
    background-color: transparent;
    outline: none;
}
.search-container input[type="text"]::placeholder {
    color: #999;
}
.search-container button {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    width: 150px;
}
.search-container button:hover {
    background-color: #166FE5;
    transform: scale(1.05);
}
.search-container button i {
    margin-right: 8px;
}

/* ===== Nav Actions ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== Language Selector ===== */
.language-selector {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.language-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s;
}
.language-button:hover {
    background-color: var(--light-gray);
}
.language-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 150px;
}
.language-selector:hover .language-dropdown {
    display: block;
}
.language-dropdown .language-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    transition: background-color 0.3s;
}
.language-dropdown .language-option:hover {
    background-color: var(--light-gray);
}

/* ===== Mobile Menu Toggle (Hamburger) ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 8px 10px;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s;
    order: 0;
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:active {
    background-color: var(--light-gray);
}

/* ==========================================
   SIDEBAR - DESKTOP VERSION
   ========================================== */

/* Sidebar container - collapsed by default */
.sidebar-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width-collapsed);
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

/* Expand on hover (Desktop only) */
@media (min-width: 768px) {
    .sidebar-nav:hover {
        width: var(--sidebar-width-expanded);
    }
}

/* Sidebar Header */
.sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    flex-shrink: 0;
    min-height: 64px;
}

.sidebar-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--gray);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
    background: var(--light-gray);
    color: var(--primary-color);
}

.sidebar-brand-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 16px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

/* Show brand title on hover (desktop) */
@media (min-width: 768px) {
    .sidebar-nav:hover .sidebar-brand-title {
        opacity: 1;
        visibility: visible;
    }
}

/* Sidebar Menu */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 10px;
    flex: 1;
    overflow-y: auto;
}

/* Navigation Items */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
    min-height: 44px;
    white-space: nowrap;
    overflow: hidden;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    color: var(--gray);
    transition: color 0.2s ease;
}

.nav-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-gray);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

/* Show labels on hover (desktop) */
@media (min-width: 768px) {
    .sidebar-nav:hover .nav-label {
        opacity: 1;
        visibility: visible;
    }
}

/* Hover state for nav items */
.nav-item:hover {
    background: var(--light-gray);
    color: var(--primary-color);
}
.nav-item:hover .nav-icon {
    color: var(--primary-color);
}

/* Active state for nav items */
.nav-item.active {
    background: rgba(24, 119, 242, 0.1);
    color: var(--primary-color);
}
.nav-item.active .nav-icon {
    color: var(--primary-color);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--primary-color);
}

/* Tooltips - only show when sidebar is collapsed */
@media (min-width: 768px) {
    .nav-item::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(var(--sidebar-width-collapsed) + 12px);
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: #ffffff;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 12px;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 100;
    }
    
    .sidebar-nav:not(:hover) .nav-item:hover::after {
        opacity: 1;
    }
    
    /* Hide tooltips when expanded */
    .sidebar-nav:hover .nav-item::after {
        display: none;
    }
}

/* Sidebar Backdrop - hidden on desktop */
.sidebar-backdrop {
    display: none;
}

/* ==========================================
   MAIN CONTENT OFFSET (DESKTOP)
   ========================================== */
@media (min-width: 768px) {
    .main-wrapper {
        margin-left: var(--sidebar-width-collapsed);
        transition: margin-left 0.3s ease;
        min-height: 100vh;
    }
    
    .sidebar-nav:hover ~ .main-wrapper,
    .sidebar-nav:hover + .main-wrapper {
        margin-left: var(--sidebar-width-expanded);
    }
}

/* ==========================================
   CARDS, FORMS, EVENTS, ETC.
   ========================================== */
.card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}
.card h2, .card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}
.card.participant {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}
.card.participant:hover {
    background-color: var(--light-gray);
    transform: translateX(5px);
}
.card.participant i {
    margin-right: 10px;
    color: var(--primary-color);
}
.card.participant span {
    font-weight: 500;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
}
#location,
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
}
.form-group small {
    display: block;
    color: var(--gray);
    font-size: 12px;
    margin-top: 5px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.event-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}
.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.event-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    flex-shrink: 0;
}
.event-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.event-card-content h3 {
    margin: 0 0 10px 0;
    color: var(--dark-gray);
    font-size: 18px;
}
.event-card-content p {
    margin: 8px 0;
    color: var(--gray);
    font-size: 14px;
}
.event-card.private-event::after {
    content: "Private";
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 165, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}
.event-card.cancelled-event::after {
    content: "Cancelled";
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(204, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}
.event-card.past-event::after {
    content: "Past Event";
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(102, 102, 102, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.event-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--light-gray);
    width: 100%;
    flex-shrink: 0;
}
.event-meta span {
    color: var(--gray);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.event-meta .btn {
    margin-left: 10px;
}

.dashboard-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}
.dashboard-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.dashboard-section h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
}
.dashboard-section h2 i {
    font-size: 20px;
}

.dashboard-links {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.dashboard-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    font-weight: 500;
    font-size: 16px;
}
.dashboard-links a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.dashboard-links a i {
    font-size: 18px;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('');
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-bottom: 30px;
}
.hero-content {
    max-width: 800px;
    padding: 0 20px;
}
.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-align: center;
}
.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    text-align: center;
}
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 30px 0;
    margin-top: 50px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-links {
    display: flex;
    flex-direction: column;
}
.footer-links a {
    color: var(--white);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--secondary-color);
}
.social-icons {
    display: flex;
    gap: 15px;
}
.social-icons a {
    color: var(--white);
    font-size: 24px;
    transition: color 0.3s;
}
.social-icons a:hover {
    color: var(--secondary-color);
}
.copyright {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.classic-minimalist-sidebar {
    display: flex;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.classic-minimalist-sidebar .left-column {
    flex: 2;
    padding: 25px;
}
.classic-minimalist-sidebar .right-column {
    flex: 1;
    padding: 25px;
    border-left: 1px solid var(--border-color);
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.classic-minimalist-sidebar h2 {
    margin-top: 0;
    color: var(--dark-gray);
    font-size: 1.5em;
}
.classic-minimalist-sidebar .details p {
    margin: 12px 0;
    color: var(--text-color);
    line-height: 1.6;
}
.classic-minimalist-sidebar .status {
    color: var(--secondary-color);
    font-weight: bold;
    margin: 12px 0;
    align-self: flex-start;
}
.classic-minimalist-sidebar button {
    background-color: var(--red-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
    font-weight: bold;
    align-self: flex-start;
}
.classic-minimalist-sidebar button:hover {
    background-color: #a00000;
}

.default-images {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}
.default-images label {
    display: block;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}
.default-images img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.default-images input[type="radio"]:checked + img {
    border: 2px solid var(--red-color);
}

.full-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: pointer;
}
.full-image-container {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}
.full-image-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.discussion-board {
    margin-top: 40px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.discussion-board h2 {
    margin-bottom: 20px;
    color: #1877F2;
    font-size: 24px;
}
.discussion-messages {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
}
.discussion-message {
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.discussion-message:last-child {
    border-bottom: none;
}
.discussion-message .message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}
.discussion-message .message-text {
    font-size: 16px;
    line-height: 1.5;
}
.discussion-form {
    display: flex;
    gap: 10px;
}
.discussion-form textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    min-height: 50px;
    font-family: inherit;
}
.discussion-form button {
    padding: 10px 20px;
    background-color: #1877F2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}
.discussion-form button:hover {
    background-color: #166FE5;
}
.not-registered {
    color: #cc0000;
    font-style: italic;
    margin-bottom: 20px;
}

.rating-section {
    margin-top: 30px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.rating-section h3 {
    margin-bottom: 15px;
    color: #1877F2;
    font-size: 20px;
}
.rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.rating-stars {
    display: flex;
    gap: 5px;
    font-size: 20px;
}
.rating-text {
    font-size: 16px;
    color: #666;
}
.rating-form {
    margin-top: 20px;
}
.rating-form h4 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}
.star-rating {
    display: flex;
    gap: 5px;
    font-size: 24px;
    cursor: pointer;
}
.rating-star {
    color: #ccc;
    transition: color 0.2s;
}
.star-rating:hover .rating-star {
    color: #FFD700;
}
.star-rating .rating-star:hover ~ .rating-star {
    color: #ccc;
}

#map {
    width: 100%;
    height: 350px;
    border: 1px solid black;
}
#map-control-panel {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    margin-left: 10px;
    max-width: calc(100% - 20px);
}
#map-control-panel input[type="text"] {
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    height: 36px;
    padding: 0 10px;
    width: 200px;
    box-sizing: border-box;
    outline: none;
}
#map-control-panel input[type="text"]:focus {
    border-color: #1a73e8;
}
#map-control-panel .button {
    border: none;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    height: 36px;
    padding: 0 10px;
    white-space: nowrap;
    box-sizing: border-box;
}
.button-primary {
    background-color: #1a73e8;
    color: #ffffff;
}
.button-primary:hover {
    background-color: #1557b0;
}
.button-secondary {
    background-color: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
}
.button-secondary:hover {
    background-color: #f1f3f4;
}

.beautiful-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.beautiful-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}
.beautiful-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 16px;
}
.beautiful-form label i {
    margin-right: 8px;
    color: #1877F2;
}
.beautiful-form input[type="text"],
.beautiful-form input[type="number"],
.beautiful-form input[type="datetime-local"],
.beautiful-form textarea,
.beautiful-form input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}
.beautiful-form input[type="text"]:focus,
.beautiful-form input[type="number"]:focus,
.beautiful-form input[type="datetime-local"]:focus,
.beautiful-form textarea:focus {
    outline: none;
    border-color: #1877F2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}
.beautiful-form textarea {
    resize: vertical;
    min-height: 100px;
}
.beautiful-form .checkbox-group {
    margin-bottom: 20px;
}
.beautiful-form .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    padding: 8px 0;
}
.beautiful-form .checkbox-label input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}
.beautiful-form .checkbox-custom {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid #1877F2;
    border-radius: 4px;
    position: relative;
    transition: background-color 0.3s, border-color 0.3s;
}
.beautiful-form .checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #1877F2;
    border-color: #1877F2;
}
.beautiful-form .checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}
.beautiful-form .label-text {
    display: flex;
    align-items: center;
}
.beautiful-form .file-input-container {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}
.beautiful-form .file-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.beautiful-form .file-input-label {
    display: block;
    padding: 12px;
    background-color: #f9f9f9;
    color: #333;
    border: 1px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}
.beautiful-form .file-input-label:hover {
    background-color: #f0f0f0;
    border-color: #1877F2;
}
.beautiful-form .file-input-label i {
    margin-right: 8px;
    color: #1877F2;
}
.beautiful-form .auth-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}
.beautiful-form .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.beautiful-form .btn-primary {
    background-color: #1877F2;
    color: white;
}
.beautiful-form .btn-primary:hover {
    background-color: #166FE5;
    transform: translateY(-2px);
}
.beautiful-form .btn-primary i {
    color: white;
}

.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}
.threads-icon {
    width: 32px;
    height: 32px;
    fill: white;
    transition: transform 0.2s ease, fill 0.2s ease;
}

/* ==========================================
   MOBILE STYLES (max-width: 767px)
   ========================================== */

@media (max-width: 767px) {
    
    /* Show hamburger menu */
    .mobile-menu-toggle {
        display: flex !important;
        order: 0 !important;
        flex-shrink: 0 !important;
        font-size: 18px !important;
        padding: 4px 4px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }
    
    /* HIDE desktop navigation */
    nav ul {
        display: none !important;
    }
    
    /* ===== Mobile Header - ALL IN ONE LINE ===== */
    header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 999 !important;
        padding: 2px 0 !important;
        background-color: var(--white) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        min-height: 40px !important;
    }
    
    .header-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 4px !important;
        gap: 2px !important;
        min-height: 38px !important;
        max-width: 100% !important;
    }
    
    /* Logo - smaller */
    .logo {
        font-size: 13px !important;
        flex-shrink: 0 !important;
        min-width: 40px !important;
        display: flex !important;
        align-items: center !important;
        order: 1 !important;
    }
    .logo i {
        font-size: 14px !important;
        margin-right: 3px !important;
    }
    
    /* ===== Search Bar - VERY COMPACT ===== */
    .search-container {
        flex: 1 !important;
        margin: 0 2px !important;
        max-width: 100% !important;
        min-width: 20px !important;
        order: 2 !important;
    }
    
    .search-container form {
        border-radius: 12px !important;
        background-color: var(--light-gray) !important;
        box-shadow: none !important;
        border: 1px solid var(--border-color) !important;
        height: 26px !important;
        display: flex !important;
        align-items: center !important;
        overflow: hidden !important;
    }
    
    .search-container input[type="text"] {
        padding: 0 6px !important;
        font-size: 10px !important;
        height: 24px !important;
        background-color: transparent !important;
        flex: 1 !important;
        min-width: 20px !important;
        border: none !important;
        outline: none !important;
    }
    
    .search-container input[type="text"]::placeholder {
        font-size: 9px !important;
        color: #999 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .search-container button {
        padding: 0 4px !important;
        font-size: 9px !important;
        width: auto !important;
        min-width: 22px !important;
        height: 24px !important;
        border-radius: 0 12px 12px 0 !important;
        background-color: var(--primary-color) !important;
        color: var(--white) !important;
        border: none !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
    
    .search-container button span {
        display: none !important;
    }
    
    .search-container button i {
        margin-right: 0 !important;
        font-size: 10px !important;
    }
    
    /* ===== Nav Actions - ALL IN ONE LINE ===== */
    .nav-actions {
        display: flex !important;
        align-items: center !important;
        gap: 2px !important;
        flex-shrink: 0 !important;
        order: 3 !important;
    }
    
    /* ===== Language Selector ===== */
    .language-selector {
        flex-shrink: 0 !important;
        position: relative !important;
    }
    
    .language-button {
        font-size: 14px !important;
        width: 28px !important;
        height: 28px !important;
        padding: 0 !important;
        min-width: 28px !important;
        min-height: 28px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .language-dropdown {
        right: -5px !important;
        min-width: 100px !important;
    }
    .language-dropdown .language-option {
        font-size: 11px !important;
        padding: 4px 8px !important;
        min-height: 30px !important;
    }
    
    /* ===== Login/Logout Button - COMPACT ===== */
    .btn-logout,
    /*.btn-primary {
        padding: 2px 6px !important;
        font-size: 10px !important;
        flex-shrink: 0 !important;
        min-width: 32px !important;
        min-height: 26px !important;
        justify-content: center !important;
        border-radius: 4px !important;
        display: flex !important;
        align-items: center !important;
        gap: 2px !important;
    }*/
	
	.btn-primary {
		background-color: var(--primary-color);
		color: var(--white);
	}
	.btn-primary:hover {
		background-color: #166FE5;
		transform: scale(1.05);
	}
    
    /* Show the text on mobile - shorter */
    .btn-logout span,
    .btn-primary span {
        display: inline !important;
        font-size: 9px !important;
    }
    
    .btn-logout i,
    .btn-primary i {
        font-size: 10px !important;
        margin: 0 !important;
    }
    
    body {
        padding-top: 44px !important;
    }
    
    /* ==========================================
       SIDEBAR - MOBILE
       ========================================== */
    .sidebar-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        transform: translateX(-100%) !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        background-color: var(--white) !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2) !important;
        z-index: 1001 !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        border-right: 1px solid var(--border-color) !important;
        padding-bottom: 20px !important;
    }
    
    .sidebar-nav.mobile-open {
        transform: translateX(0) !important;
    }
    
    /* ===== Mobile Sidebar Content ===== */
    .sidebar-nav .sidebar-header {
        padding: 10px 16px !important;
        border-bottom: 1px solid var(--border-color) !important;
        background-color: var(--white) !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 2 !important;
        height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }
    
    .sidebar-nav .sidebar-brand-title {
        opacity: 1 !important;
        visibility: visible !important;
        color: var(--primary-color) !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        display: block !important;
    }
    
    .sidebar-nav .sidebar-toggle-btn {
        color: var(--dark-gray) !important;
        font-size: 16px !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
    }
    
    .sidebar-nav .sidebar-toggle-btn:active {
        background-color: var(--light-gray) !important;
    }
    
    .sidebar-nav .sidebar-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        padding: 8px 12px !important;
        flex: 1 !important;
    }
    
    .sidebar-nav .nav-item {
        display: flex !important;
        align-items: center !important;
        padding: 10px 14px !important;
        border-radius: 8px !important;
        color: var(--dark-gray) !important;
        gap: 12px !important;
        height: auto !important;
        min-height: 40px !important;
        text-decoration: none !important;
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .sidebar-nav .nav-item:active {
        background-color: var(--light-gray) !important;
    }
    
    .sidebar-nav .nav-icon {
        font-size: 16px !important;
        width: 22px !important;
        color: var(--gray) !important;
        text-align: center !important;
        flex-shrink: 0 !important;
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .sidebar-nav .nav-label {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: var(--dark-gray) !important;
        white-space: normal !important;
    }
    
    .sidebar-nav .nav-item.active {
        background: rgba(24, 119, 242, 0.1) !important;
        color: var(--primary-color) !important;
    }
    .sidebar-nav .nav-item.active .nav-icon {
        color: var(--primary-color) !important;
    }
    .sidebar-nav .nav-item.active .nav-label {
        color: var(--primary-color) !important;
    }
    .sidebar-nav .nav-item.active::before {
        left: 0 !important;
        top: 6px !important;
        bottom: 6px !important;
        width: 4px !important;
        border-radius: 0 4px 4px 0 !important;
        background: var(--primary-color) !important;
        content: '' !important;
        position: absolute !important;
    }
    .sidebar-nav .nav-item::after {
        display: none !important;
    }
    
    /* ===== Mobile Backdrop ===== */
    .sidebar-backdrop {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        z-index: 1000 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease !important;
    }
    .sidebar-backdrop.active {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    /* ===== Main Content ===== */
    .main-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
        min-height: 100vh !important;
    }
    
    /* ===== Hero Buttons - Don't modify size ===== */
    .hero-buttons {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    .hero-buttons .btn {
        width: auto !important;
        min-width: 180px !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 12px 24px !important;
        font-size: 16px !important;
    }
    
    /* ===== Mobile Specific ===== */
    .events-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .event-card img {
        height: 160px !important;
    }
    .event-card-content {
        padding: 12px !important;
    }
    .event-card-content h3 {
        font-size: 16px !important;
    }
    .event-card-content p {
        font-size: 13px !important;
    }
    
    .hero {
        height: 280px !important;
        margin-bottom: 16px !important;
    }
    .hero h1 {
        font-size: 24px !important;
        margin-bottom: 10px !important;
    }
    .hero p {
        font-size: 14px !important;
        margin-bottom: 14px !important;
    }
    
    /* ===== Footer ===== */
    footer {
        padding: 16px 0 !important;
        margin-top: 20px !important;
    }
    .footer-container {
        flex-direction: column !important;
        text-align: center !important;
        gap: 10px !important;
        padding: 0 16px !important;
    }
    .footer-links {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 16px !important;
        flex-wrap: wrap !important;
    }
    .footer-links a {
        font-size: 13px !important;
        margin-bottom: 0 !important;
    }
    .social-icons a {
        font-size: 18px !important;
    }
}

/* ==========================================
   EXTRA SMALL PHONES (<= 375px)
   ========================================== */
@media (max-width: 375px) {
    .logo {
        font-size: 11px !important;
        min-width: 32px !important;
    }
    .logo i {
        font-size: 12px !important;
    }
    
    .search-container input[type="text"] {
        font-size: 9px !important;
        padding: 0 4px !important;
    }
    .search-container input[type="text"]::placeholder {
        font-size: 8px !important;
    }
    .search-container button {
        min-width: 20px !important;
        font-size: 8px !important;
        padding: 0 3px !important;
    }
    .search-container button i {
        font-size: 8px !important;
    }
    
    .language-button {
        font-size: 12px !important;
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
    }
    
    .btn-logout,
    .btn-primary {
        min-width: 28px !important;
        min-height: 24px !important;
        padding: 2px 4px !important;
        font-size: 9px !important;
    }
    .btn-logout span,
    .btn-primary span {
        font-size: 8px !important;
    }
    .btn-logout i,
    .btn-primary i {
        font-size: 9px !important;
    }
    
    .mobile-menu-toggle {
        font-size: 15px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        padding: 2px 3px !important;
    }
    
    .sidebar-nav {
        width: 260px !important;
        max-width: 90vw !important;
    }
}

/* ==========================================
   ANIMATIONS FOR MOBILE
   ========================================== */
@media (max-width: 767px) {
    .sidebar-nav.mobile-open .nav-item {
        animation: slideInItem 0.3s ease forwards !important;
        opacity: 0 !important;
    }
    .sidebar-nav.mobile-open .nav-item:nth-child(1) { animation-delay: 0.05s; }
    .sidebar-nav.mobile-open .nav-item:nth-child(2) { animation-delay: 0.08s; }
    .sidebar-nav.mobile-open .nav-item:nth-child(3) { animation-delay: 0.11s; }
    .sidebar-nav.mobile-open .nav-item:nth-child(4) { animation-delay: 0.14s; }
    .sidebar-nav.mobile-open .nav-item:nth-child(5) { animation-delay: 0.17s; }
    .sidebar-nav.mobile-open .nav-item:nth-child(6) { animation-delay: 0.20s; }
    
    @keyframes slideInItem {
        from {
            opacity: 0;
            transform: translateX(-15px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Ensure Header Flex Alignment */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

/* Ensure Toggle button displays when needed and stays far left */
.mobile-menu-toggle {
    order: 1;
}

/* Logo second */
.logo {
    order: 2;
    flex-shrink: 0;
}

/* Search container third - expands in middle */
.search-container {
    order: 3;
    flex-grow: 1;
}

/* Language selector fourth */
.language-selector {
    order: 4;
    flex-shrink: 0;
}

/* Login/Logout button fifth (far right) */
.auth-action {
    order: 5;
    flex-shrink: 0;
}

/* Mobile Adjustments (Override existing mobile rules) */
@media (max-width: 767px) {
    .mobile-menu-toggle { order: 1 !important; }
    .logo { order: 2 !important; }
    .search-container { order: 3 !important; }
    .language-selector { order: 4 !important; }
    .auth-action { order: 5 !important; }
}




@media (max-width: 767px) {
    /* Sidebar menu */
    .sidebar-nav .sidebar-menu {
        display: flex !important;
        flex-direction: column !important;
        padding: 8px 12px !important;
        overflow: visible !important;
    }

    /* Navigation items */
    .sidebar-nav .sidebar-menu .nav-item {
        display: flex !important;
        align-items: center !important;
        padding: 12px 16px !important;
        color: var(--dark-gray) !important;
        text-decoration: none !important;
        gap: 14px !important;
        opacity: 1 !important;
        visibility: visible !important;
        min-height: 48px !important;
        font-size: 15px !important;
        line-height: normal !important;
    }

    /* Navigation icons */
    .sidebar-nav .sidebar-menu .nav-icon {
        font-size: 20px !important;
        width: 24px !important;
        color: var(--gray) !important;
        opacity: 1 !important;
        visibility: visible !important;
        text-align: center !important;
        display: inline-block !important; /* Fix: Icons should not be flex */
    }

    /* Navigation labels */
    .sidebar-nav .sidebar-menu .nav-label {
        opacity: 1 !important;
        visibility: visible !important;
        color: var(--dark-gray) !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        white-space: normal !important;
        line-height: normal !important;
        display: block !important; /* Fix: Labels should not be flex */
    }
}