/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Signika:wght@500;600&display=swap');

/* =========================
   ROOT VARIABLES
========================= */
:root {
    --background-color: rgb(252, 251, 251);
    --font-color: rgb(0, 0, 0);
    --second-font-color: rgb(101, 101, 101);
    --secondary-font-color: rgb(179, 179, 179);
    --background-on-hover: rgb(215, 214, 214);
    --primary-color: #00c4b4;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --gradient: linear-gradient(43deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%);
    --transition: all 0.2s ease;
}

/* =========================
   DARK MODE OVERRIDES
========================= */
body.dark-mode {
    --background-color: rgb(15, 15, 15);
    --font-color: rgb(254, 252, 252);
    --second-font-color: rgb(197, 195, 195);
    --secondary-font-color: rgb(108, 106, 106);
    --background-on-hover: rgba(52, 51, 51, 0.834);
}

/* =========================
   GENERAL RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

/* =========================
   CUSTOM LOADERS & PROGRESS
========================= */
/* Smooth Progress Loader */
.loader {
    width: 120px;
    height: 22px;
    border-radius: 20px;
    color: #514b82;
    border: 2px solid;
    position: relative;
}
.loader::before {
    content: "";
    position: absolute;
    margin: 2px;
    inset: 0 100% 0 0;
    border-radius: inherit;
    background: currentColor;
    animation: l6 2s infinite;
}
@keyframes l6 {
    100% {inset:0}
}

/* Video Progress Loader (branded) */
.video-loader {
    width: 150px;
    height: 25px;
    border-radius: 25px;
    color: #667eea;
    border: 2px solid currentColor;
    position: relative;
    margin: 10px auto;
}
.video-loader::before {
    content: "";
    position: absolute;
    margin: 2px;
    inset: 0 100% 0 0;
    border-radius: inherit;
    background: linear-gradient(45deg, #667eea, #764ba2);
    animation: videoProgress 3s ease-in-out infinite;
}
@keyframes videoProgress {
    0% { inset: 0 100% 0 0; }
    50% { inset: 0 20% 0 0; }
    100% { inset: 0 0 0 0; }
}

/* Fast Pulse Loader */
.pulse-loader {
    width: 100px;
    height: 20px;
    border-radius: 15px;
    color: #00c4b4;
    border: 2px solid;
    position: relative;
    margin: 10px auto;
}
.pulse-loader::before {
    content: "";
    position: absolute;
    margin: 2px;
    inset: 0 100% 0 0;
    border-radius: inherit;
    background: currentColor;
    animation: fastPulse 1.5s ease-in-out infinite;
}
@keyframes fastPulse {
    0%, 100% { inset: 0 100% 0 0; }
    50% { inset: 0 0 0 0; }
}

/* Instant Mode Loader */
.instant-loader {
    width: 80px;
    height: 18px;
    border-radius: 15px;
    color: #28a745;
    border: 2px solid;
    position: relative;
    margin: 10px auto;
}
.instant-loader::before {
    content: "";
    position: absolute;
    margin: 2px;
    inset: 0 100% 0 0;
    border-radius: inherit;
    background: linear-gradient(45deg, #28a745, #20c997);
    animation: instantProgress 0.8s ease-out;
}
@keyframes instantProgress {
    0% { inset: 0 100% 0 0; }
    100% { inset: 0 0 0 0; }
}

body {
  background: var(--background-color);
  color: var(--font-color);
  min-height: 100vh;
  margin: 0;
}

/* Container */
.container {
    display: flex;
}

/* Navbar (Desktop Sidebar) */
.navbar {
    width: 245px;
    height: 100vh;
    background-color: var(--background-color);
    border-right: 0.1px solid rgba(76, 75, 75, 0.737);
    position: sticky;
    top: 0;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.biashara-hub-logo {
    width: 150px;
    margin: 5px 30px;
    cursor: pointer;
}

.biashara-hub-logo img {
    width: 100%;
    height: auto;
}

.sub-section {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.sub-section:hover {
    background-color: var(--background-on-hover);
}

.sub-section i,
.sub-section img.profile-img {
    font-size: 1.3rem;
    color: var(--font-color);
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 50%;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.sub-section a,
.profile-nav-item .profile-text {
    font-family: 'Signika', sans-serif;
    font-size: 0.9rem;
    font-weight: 550;
    color: var(--font-color);
    text-decoration: none;
}

.menu-section {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 10px 20px;
    margin-top: auto;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.menu-section:hover {
    background-color: var(--background-on-hover);
}

.menu-section i {
    font-size: 1.2rem;
    color: var(--font-color);
}

.menu-section a {
    font-family: 'Signika', sans-serif;
    font-size: 0.9rem;
    font-weight: 550;
    color: var(--font-color);
    text-decoration: none;
}

/* Language Toggle Specific Styling */
#language-toggle-icon {
    transition: transform 0.3s ease;
}

#language-toggle:hover + #language-toggle-icon,
#language-toggle-icon:hover {
    transform: rotate(15deg);
}

.menu-section:has(#language-toggle) {
    border: 1px solid rgba(0, 196, 180, 0.3);
    background: rgba(0, 196, 180, 0.05);
}

.menu-section:has(#language-toggle):hover {
    background: rgba(0, 196, 180, 0.1);
    border-color: rgba(0, 196, 180, 0.5);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 975px;
    margin: 0 auto;
    padding: 20px;
}

/* Post Section */
.post-section {
    max-width: 660px;
    margin: 0 auto;
}

/* =================================
   MOBILE NAVIGATION
================================= */
.nav-hidden {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1001;
    pointer-events: none; /* Allow clicks to pass through the container */
}

.nav-hide-2 {
    position: relative; /* Crucial for positioning the floating button */
    width: 100%;
    pointer-events: all; /* Enable clicks on children */
}

#mobile-public-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 70px;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    padding: 10px 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* Hide public nav items when user is authenticated */
body[data-user-role="user"] #mobile-public-nav,
body[data-user-role="admin"] #mobile-public-nav {
    display: none !important;
}

body[data-user-role="user"] #mobile-login-link,
body[data-user-role="admin"] #mobile-login-link,
body[data-user-role="user"] #mobile-register-link,
body[data-user-role="admin"] #mobile-register-link {
    display: none !important;
}

/* Hide desktop login/register sections for authenticated users */
body[data-user-role="user"] #login-section,
body[data-user-role="admin"] #login-section,
body[data-user-role="user"] #register-section,
body[data-user-role="admin"] #register-section {
    display: none !important;
}

/* Show appropriate mobile nav for authenticated users */
body[data-user-role="user"] #mobile-user-nav {
    display: flex !important;
}

body[data-user-role="admin"] #mobile-admin-nav {
    display: flex !important;
}

/* Hide other mobile navs when user is authenticated */
body[data-user-role="user"] #mobile-admin-nav,
body[data-user-role="admin"] #mobile-user-nav {
    display: none !important;
}

#mobile-public-nav .nav-hidden-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
}

.nav-floating-button {
    position: absolute;
    left: 50%;
    top: -20px;
    transform: translateX(-50%);
    background: #00c4b4;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1005; /* Increased to avoid overlaps */
    pointer-events: all !important; /* Ensure interactivity */
    touch-action: manipulation; /* Optimize for touch */
}

#mobile-public-nav .nav-hidden-item[aria-label]:after,
.nav-floating-button[aria-label]:after {
    content: attr(aria-label);
    font-size: 0.65rem;
    margin-top: 2px;
    color: white;
    text-align: center;
    font-weight: 500;
}

/* Hide desktop navbar and show mobile nav on smaller screens */
@media (max-width: 935px) {
    .navbar {
        display: none !important;
    }
    .nav-hidden {
        display: flex !important;
    }
    .main-content {
        padding-bottom: 80px; /* Ensure content isn't hidden by nav */
    }
}

@media (min-width: 936px) {
    .nav-hidden {
        display: none !important;
    }
}

/* Other styles from your file... */
.hero-section { background: var(--gradient); color: white; padding: 24px 16px; border-radius: 0 0 20px 20px; text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); }
.hero-section .user-name { font-size: 1.2rem; font-weight: 600; margin-top: 8px; font-family: 'Signika', sans-serif; }
.hero-section .package-info { margin-top: 12px; font-size: 0.9rem; opacity: 0.9; }
.hero-section .pay-now-btn { margin-top: 18px; background: white; color: var(--primary-color); font-weight: 600; padding: 10px 24px; border-radius: 50px; border: none; cursor: pointer; transition: var(--transition); }
.hero-section .pay-now-btn:hover { background: var(--primary-color); color: white; }

.modal-backdrop.show { 
    display: block; 
}

/* Ensure all modal containers have proper z-index */
.tm-form-container,
.profile-edit-modal,
#subscription-payment-modal {
    z-index: 9999 !important;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.tm-form-container { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--background-color); padding: 24px 20px; border-radius: 16px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); z-index: 9999; max-width: 420px; width: 94%; }
.tm-form-container[aria-hidden="false"] { display: block; }
.tm-form-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--background-on-hover);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--font-color);
    cursor: pointer;
    transition: var(--transition);
}

.tm-form-close:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg);
}
.tm-form-container h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 14px; text-align: center; color: var(--font-color); }
.tm-form-container form { display: flex; flex-direction: column; gap: 15px; }
.tm-form-container input, .tm-form-container select, .tm-form-container textarea { padding: 10px; border: 1px solid var(--secondary-font-color); border-radius: 5px; font-size: 0.9rem; color: var(--font-color); background: var(--background-color); }
.tm-form-container button { padding: 10px; border: none; border-radius: 5px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: var(--transition); }

/* Mobile optimization for all form containers */
@media (max-width: 768px) {
    .modal-backdrop {
        z-index: 9998 !important;
        background: rgba(0, 0, 0, 0.7) !important;
    }
    
    .tm-form-container {
        max-height: 90vh;
        overflow-y: auto;
        top: 5vh;
        transform: translateX(-50%);
        padding: 16px;
        max-width: 95%;
        z-index: 9999 !important;
    }
    
    .tm-form-container form {
        gap: 12px;
    }
    
    .tm-form-container input,
    .tm-form-container select,
    .tm-form-container textarea {
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .tm-form-container h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
    .modal-backdrop {
        z-index: 9998 !important;
        background: rgba(0, 0, 0, 0.8) !important;
    }
    
    .tm-form-container {
        max-height: 95vh;
        top: 2vh;
        padding: 12px;
        border-radius: 12px;
        z-index: 9999 !important;
    }
    
    .tm-form-container h2 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .tm-form-container input,
    .tm-form-container select,
    .tm-form-container textarea {
        padding: 6px;
        font-size: 0.8rem;
    }
    
    .tm-form-container form {
        gap: 10px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
}
.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: #009688; }
.btn-secondary { background: #eee; color: #333; border: none; padding: 10px 16px; border-radius: 8px; cursor: pointer; }
.btn-secondary:hover { background: #999999; }
.btn-success { background: var(--success-color); color: white; }
.btn-danger { background: var(--danger-color); color: white; }
.btn-danger:hover { background: #c82333; }
.step-navigation { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; }
.step-navigation button { flex: 0 0 auto; min-width: 100px; }
.step-indicator { display: flex; justify-content: center; gap: 12px; margin: 0 auto 18px; }
.step { width: 32px; height: 32px; background: var(--secondary-font-color); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 600; }
.step.active { background: var(--primary-color); }
.step-content { display: none; }
.step-content.active { display: block; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: 0.88rem; font-weight: 500; color: var(--second-font-color); }
.image-preview { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.image-preview img { width: 88px; height: 88px; border-radius: 10px; object-fit: cover; border: 1px solid var(--secondary-font-color); }
#alertMessageContainer { position: fixed; top: 20px; right: 20px; max-width: 320px; padding: 16px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); font-size: 0.85rem; font-weight: 500; z-index: 2000; display: none; }
#alertMessageContainer.alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
#alertMessageContainer.alert-error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
/* =================================
   SEARCH FORM STYLES
================================= */
.tm-search-container {
    background: var(--background-color);
    padding: 15px;
    border-radius: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--secondary-font-color);
}

#search-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.tm-search-box {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid var(--secondary-font-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--font-color);
    transition: var(--transition);
}

.tm-search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 196, 180, 0.2);
}

.category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px; /* For scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-on-hover);
}

.category-tabs::-webkit-scrollbar {
    height: 5px;
}

.category-tabs::-webkit-scrollbar-track {
    background: var(--background-on-hover);
    border-radius: 10px;
}

.category-tabs::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid transparent;
    background-color: rgba(175, 221, 255, 0.83);;
    border-radius: 25px; /* Pill shape */
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.category-tab:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-tab.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.category-tab i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .category-tabs {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .category-tab {
        white-space: normal;
        text-align: center;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    #search-form .tm-search-filter,
    #search-form button[type="submit"] {
        display: none;
    }

    #search-form.show-filters .tm-search-filter,
    #search-form.show-filters button[type="submit"] {
        display: block;
    }
}

.tm-search-filter {
    padding: 12px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--font-color);
    font-size: 0.9rem;
    width: 100%;
}

#search-form button[type="submit"] {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

#search-form button[type="submit"]:hover {
    background: #00a394; /* Darker shade of primary */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Grid layout for filters on larger screens */
@media (min-width: 600px) {
    #search-form {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        align-items: center;
    }
    .tm-search-box {
        grid-column: 1 / -1; /* Span full width */
    }
    .category-tabs {
        grid-column: 1 / -1; /* Span full width */
    }
    #search-form button[type="submit"] {
        grid-column: 1 / -1; /* Span full width */
    }
}
.story-section { display: flex; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--secondary-font-color); overflow-x: auto; justify-content: center; }
.story { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.story-image { width: 65px; height: 65px; border-radius: 50%; background: var(--gradient); padding: 2px; display: flex; justify-content: center; align-items: center; }
.story-image img { width: 90%; height: 90%; border-radius: 50%; border: 2px solid var(--background-color); object-fit: cover; }
.story span { font-size: 0.8rem; font-weight: 500; color: var(--font-color); text-align: center; max-width: 74px; overflow: hidden; text-overflow: ellipsis; }
.post-main { background-color: var(--background-color); border-radius: 12px; border: 1px solid var(--secondary-font-color); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); width: 100%; max-width: 470px; margin: 0 auto 20px; }
.post-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; }
.post-image { width: 32px; height: 32px; border-radius: 50%; background: var(--gradient); padding: 2px; display: flex; justify-content: center; align-items: center; }
.post-image img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--background-color); }
.post-username { font-size: 14px; font-weight: 600; color: var(--font-color); }
.business-carousel { position: relative; width: 100%; overflow: hidden; }
.carousel-wrapper { overflow: hidden; width: 100%; }
.carousel-images { display: flex; transition: transform 0.4s ease; }
.carousel-images img { 
    flex-shrink: 0; 
    width: 100%; 
    max-height: 500px; 
    object-fit: contain; 
    background: #000; 
}
.post-footer { padding: 8px 15px; }
.post-description { padding: 10px 15px; }

/* Post content images - show full images without cropping */
.post-description img,
.business-description img,
.tm-content img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
  display: block;
  margin: 10px 0;
}

.dark-mode .post-description img,
.dark-mode .business-description img,
.dark-mode .tm-content img {
  background: #1a1a1a;
}

/* Business post images specifically */
.business-post img,
.user-post img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.dark-mode .business-post img,
.dark-mode .user-post img {
  background: #1a1a1a;
}
.business-title { font-size: 16px; font-weight: 600; color: var(--font-color); margin-bottom: 5px; }
.business-meta { display: flex; gap: 10px; font-size: 13px; color: var(--second-font-color); }
.business-location { font-size: 13px; color: var(--second-font-color); margin-top: 5px; }
.tm-content { max-width: 800px; margin: 0 auto; padding: 20px; }
.tm-collapsible { margin-bottom: 15px; border: 1px solid var(--secondary-font-color); border-radius: 10px; }
.tm-collapsible-header { padding: 12px; background-color: var(--background-on-hover); cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.tm-collapsible-content { display: none; padding: 15px; }
.tm-collapsible-content.active { display: block; }
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }
.stat-card { padding: 15px; background-color: var(--background-on-hover); border-radius: 10px; text-align: center; }
.stat-card i { font-size: 1.8rem; color: var(--primary-color); margin-bottom: 8px; }
.stat-card h4 { font-size: 14px; margin-bottom: 8px; }
.profile-edit-modal .form-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.profile-edit-modal .form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--second-font-color);
    min-width: 120px;
    flex-shrink: 0;
}

.profile-edit-modal .form-group input,
.profile-edit-modal .form-group textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--font-color);
    background: var(--background-color);
}

.profile-edit-modal .form-group input:focus,
.profile-edit-modal .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 196, 180, 0.3);
}

.profile-edit-modal #change-profile-picture,
.profile-edit-modal .tm-action-btn.btn-primary {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.profile-edit-modal #change-profile-picture {
    background: var(--secondary-font-color);
    color: var(--font-color);
}

.profile-edit-modal #change-profile-picture:hover {
    background: #999999;
}

.profile-edit-modal .tm-action-btn.btn-primary {
    background: var(--primary-color);
    color: white;
}

.profile-edit-modal .tm-action-btn.btn-primary:hover {
    background: #009688;
}

/* Medium screens optimization for profile edit */
@media (max-width: 768px) {
    .profile-edit-modal .form-group {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }
    .profile-edit-modal .form-group label {
        min-width: auto;
        margin-bottom: 4px;
    }
    .profile-edit-modal .form-group input,
    .profile-edit-modal .form-group textarea {
        flex: none;
    }
}

/* Subscription Payment Modal */
#subscription-payment-modal.tm-form-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
}

#subscription-payment-modal.tm-form-container[aria-hidden="false"] {
    display: block;
}

#subscription-payment-modal .modal-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#subscription-payment-modal h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

#subscription-payment-modal h3 {
    font-size: 1.1rem;
    color: var(--font-color);
    margin: 8px 0 4px;
}

#subscription-payment-modal select,
#subscription-payment-modal input[type="tel"] {
    padding: 10px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--font-color);
    background: var(--background-color);
    margin-bottom: 8px;
}

#subscription-payment-modal select:focus,
#subscription-payment-modal input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 196, 180, 0.3);
}

#subscription-payment-modal .payment-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px;
}

#subscription-payment-modal .payment-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--font-color);
}

#subscription-payment-modal .payment-options input[type="radio"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary-color);
}

#subscription-payment-modal .mobile-money-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

#subscription-payment-modal .mobile-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: contain;
  padding: 6px;
  margin: 6px;
  background: white;
  border: 2px solid transparent;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

#subscription-payment-modal .mobile-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#subscription-payment-modal .mobile-icon.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 196, 180, 0.6);
  background-color: #f0faf9;
}

#subscription-payment-modal #mobile-money-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    margin: 0 auto;
}

#subscription-payment-modal .payment-instructions,
#subscription-payment-modal .pay-later-instructions {
    font-size: 0.85rem;
    color: var(--font-color);
    margin-bottom: 10px;
    text-align: center;
}

#subscription-payment-modal .payment-instructions p,
#subscription-payment-modal .pay-later-instructions p {
    margin: 0;
}

#subscription-payment-modal #total-charges {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
}

#subscription-payment-modal button[type="submit"],
#subscription-payment-modal .tm-form-close {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

#subscription-payment-modal button[type="submit"] {
    background: var(--primary-color);
    color: white;
}

#subscription-payment-modal button[type="submit"]:hover {
    background: #009688;
}

#subscription-payment-modal .tm-form-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    color: var(--second-font-color);
}

#subscription-payment-modal .tm-form-close:hover {
    color: var(--font-color);
}

#subscription-payment-modal .loader {
    display: none;
    border: 3px solid var(--secondary-font-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 8px auto;
}

#subscription-payment-modal .loader.show {
    display: block;
}



@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 975px;
    margin: 0 auto;
    padding: 20px;
}



/* Post Section */
.post-section {
    max-width: 660px;
    margin: 0 auto;
}


#search-lite {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-text {
    padding: 10px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 5px;
    font-size: 0.9rem;
    flex: 1;
    background-color: var(--background-color);
    color: var(--font-color);
}



@media (max-width: 480px) {
    .tm-search-selects {
        flex-direction: column;
        gap: 6px;
    }
}




/* Story Section */
.story-section {
    display: flex;
    gap: 10px;
    padding: 16px 0;
    border-bottom: 1px solid var(--secondary-font-color);
    overflow-x: auto;
    justify-content: center;
}

.story {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.story-image {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--gradient);
    padding: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.story-image img {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 2px solid var(--background-color);
    object-fit: cover;
}

.story span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--font-color);
    text-align: center;
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Container ya post zote */
.post-section {
    padding: 30px 15px;
}

.post-section .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 15px;
}

.post-section .tm-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
}

/* Post moja moja */
.post-main {
    background-color: var(--background-color);
    border-radius: 12px;
    border: 1px solid var(--secondary-font-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 470px; /* kama Instagram */
    padding-bottom: 15px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px; /* space kati ya post */
}

/* Divider kwa desktop kati ya post */
@media (min-width: 936px) {
    .post-main::after {
        content: "";
        position: absolute;
        bottom: -15px;
        left: 0;
        width: 100%;
        height: 1px;
        background-color: var(--secondary-font-color);
    }

    .tm-list .post-main:last-child::after {
        content: none;
    }
}

/* Post header */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

/* Profile image */
.post-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient);
    padding: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.post-image img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--background-color);
}

/* Username and timestamp */
.post-username {
    font-size: 14px;
    font-weight: 600;
    color: var(--font-color);
}

.one-day {
    font-size: 12px;
    color: var(--second-font-color);
}


.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
}

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

.like-section, .comment-section, .share-section, .view-section {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.view-section {
    cursor: default; /* Views are not clickable */
}

.like-section span, .comment-section span, .share-section span, .view-section span {
    font-size: 0.9rem;
    color: var(--second-font-color);
}

.view-section i {
    color: var(--second-font-color) !important;
    cursor: default;
}

.like-section:hover i, .comment-section:hover i, .share-section:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.view-section .view-count {
    font-weight: 500;
}

.post-footer i {
    font-size: 1.2rem;
    color: var(--font-color);
    cursor: pointer;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.post-footer i:hover {
    color: var(--primary-color);
}

.post-footer i.fa-comment.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.post-description {
    padding: 10px 15px;
}

.business-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--font-color);
    margin-bottom: 5px;
}

#business-description {
    resize: vertical;
    min-height: 80px;
    max-height: 240px;
    line-height: 1.5;
    overflow-y: auto;
    white-space: pre-wrap;
}

.business-meta {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: var(--second-font-color);
}

.business-price,
.business-category {
    font-weight: 500;
}

.business-location {
    font-size: 13px;
    color: var(--second-font-color);
    margin-top: 5px;
}

/* Follow Section */
.follow-section {
    width: 320px;
    padding: 20px;
    margin-top: 30px;
}

.suggestion-follow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.suggestion {
    font-size: 16px;
    font-weight: 600;
    color: var(--second-font-color);
}

.view-all {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.view-all:hover {
    color: #009688;
}

.profile-follow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.profile-follow:hover {
    background-color: var(--background-on-hover);
    border-radius: 8px;
}

.profile-follow-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-follow-img {
    width: 44px;
    height: 44px;
}

.profile-follow-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-follow-content {
    display: flex;
    flex-direction: column;
}

.profile-id {
    font-size: 13px;
    font-weight: 600;
    color: var(--font-color);
}

.profile-name {
    font-size: 12px;
    color: var(--second-font-color);
}

.follow {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.follow:hover {
    color: #009688;
}

.copyright {
    font-size: 12px;
    color: var(--second-font-color);
    text-align: center;
    margin-top: 20px;
}

/* User Dashboard */
.tm-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.tm-collapsible {
    margin-bottom: 15px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 10px;
}

.tm-collapsible-header {
    padding: 12px;
    background-color: var(--background-on-hover);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-family: 'Signika', sans-serif;
    font-weight: 600;
    color: var(--font-color);
}

.tm-collapsible-content {
    display: none;
    padding: 15px;
}

.tm-collapsible-content.active {
    display: block;
}

.tm-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.stat-card {
    padding: 15px;
    background-color: var(--background-on-hover);
    border-radius: 10px;
    text-align: center;
}

.stat-card i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.stat-card h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-card p {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Admin Dashboard */
.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-dashboard h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--secondary-font-color);
}

.admin-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--font-color);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 14px;
}

.admin-tab.active,
.admin-tab:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-tab-content {
    display: none;
    padding: 20px;
    min-height: 300px;
}

.admin-tab-content.active {
    display: block !important;
}

/* Stats Grid for Admin Overview */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid var(--primary-color);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

/* Reports Section */
.reports-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.report-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.report-filters input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.report-filters button {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.admin-stat-card {
    padding: 15px;
    background-color: var(--background-on-hover);
    border-radius: 10px;
    text-align: center;
}

.admin-stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.admin-stat-card h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.admin-stat-card p {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Invoice Reports Styles */
.report-section {
    margin-bottom: 30px;
}

.report-section h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.invoice-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

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

.report-card {
    padding: 20px;
    background-color: var(--background-on-hover);
    border-radius: 10px;
}

.report-card h4 {
    margin-bottom: 15px;
    text-align: center;
}

/* Invoice table responsive styles */
#admin-invoices-table {
    width: 100%;
    font-size: 14px;
}

#admin-invoices-table th,
#admin-invoices-table td {
    padding: 8px;
    text-align: left;
}

.text-success {
    color: #28a745;
    font-weight: bold;
}

.text-warning {
    color: #ffc107;
    font-weight: bold;
}

.text-danger {
    color: #dc3545;
    font-weight: bold;
}

/* Mobile responsiveness for admin tables */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .admin-stat-card {
        padding: 10px;
    }
    
    .admin-stat-card h3 {
        font-size: 12px;
    }
    
    .admin-stat-card p {
        font-size: 20px;
    }
    
    .invoice-filters {
        flex-direction: column;
        gap: 5px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    #admin-invoices-table {
        font-size: 12px;
    }
    
    #admin-invoices-table th,
    #admin-invoices-table td {
        padding: 5px;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.admin-section-header h3 {
    font-size: 16px;
}

.filter-controls select {
    padding: 8px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 6px;
    font-size: 13px;
}

.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    border: 1px solid var(--secondary-font-color);
    text-align: left;
}

/* Modals */
.tm-form-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-color);
    padding: 24px 20px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 420px;
    width: 94%;
    font-family: 'Inter', sans-serif;
}


.tm-form-container[aria-hidden="false"] {
    display: block;
}

.tm-form-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--second-font-color);
    cursor: pointer;
    transition: var(--transition);
}

.tm-form-close:hover {
    color: var(--font-color);
}

.tm-form-container h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 14px;
    text-align: center;
    color: var(--font-color);
}


.tm-form-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tm-form-container input,
.tm-form-container select,
.tm-form-container textarea {
    padding: 10px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--font-color);
    background: var(--background-color);
}

.tm-form-container input::placeholder,
.tm-form-container select:invalid {
    color: var(--secondary-font-color);
	font-style: italic;
}

.tm-form-container input:focus,
.tm-form-container select:focus,
.tm-form-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 196, 180, 0.3);
}

.tm-form-container button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}


.btn-primary:hover {
    background: #009688;
}

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

.btn-secondary {
    background: #eee;
    color: #333;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}


.btn-secondary:hover {
    background: #999999;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Login Modal */
#login-form.tm-form-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    max-width: 450px;
    width: 90%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#login-form.tm-form-container[aria-hidden="false"] {
    display: block;
}

#login-form .tm-form-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--second-font-color);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

#login-form .tm-form-close:hover {
    color: var(--font-color);
    transform: scale(1.1);
}

#login-form h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    font-family: 'Signika', sans-serif;
    color: var(--font-color);
}

#login-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#login-form input[type="email"],
#login-form input[type="password"] {
    padding: 12px 15px;
    border: 2px solid var(--secondary-font-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--font-color);
    background: var(--background-color);
    transition: all 0.3s ease;
}

#login-form input[type="email"]::placeholder,
#login-form input[type="password"]::placeholder {
    color: var(--secondary-font-color);
}

#login-form input[type="email"]:focus,
#login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 196, 180, 0.1);
}

#login-form button[type="submit"] {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#login-form button[type="submit"]:hover {
    background: #00a693;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Register Modal */
#register-form.tm-form-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    max-width: 450px;
    width: 90%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

#register-form.tm-form-container::-webkit-scrollbar {
    width: 6px;
}

#register-form.tm-form-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#register-form.tm-form-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

#register-form.tm-form-container[aria-hidden="false"] {
    display: block;
}

#register-form .tm-form-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--second-font-color);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

#register-form .tm-form-close:hover {
    color: var(--font-color);
    transform: scale(1.1);
}

#register-form h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    font-family: 'Signika', sans-serif;
    color: var(--font-color);
}

#register-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#register-form input[type="text"],
#register-form input[type="email"],
#register-form input[type="password"],
#register-form select {
    padding: 12px 15px;
    border: 2px solid var(--secondary-font-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--font-color);
    background: var(--background-color);
    transition: all 0.3s ease;
}

#register-form input[type="text"]::placeholder,
#register-form input[type="email"]::placeholder,
#register-form input[type="password"]::placeholder,
#register-form select:invalid {
    color: var(--secondary-font-color);
}

#register-form input[type="text"]:focus,
#register-form input[type="email"]:focus,
#register-form input[type="password"]:focus,
#register-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 196, 180, 0.1);
}

#register-form button[type="submit"] {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#register-form button[type="submit"]:hover {
    background: #00a693;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Form Footer Links */
.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.form-footer p {
    color: var(--second-font-color);
    font-size: 0.9rem;
    margin: 0;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-footer a:hover {
    color: #00a693;
    text-decoration: underline;
}

/* Form Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 18px;
}

.step {
    width: 32px;
    height: 32px;
    background: var(--secondary-font-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.step.active {
    background: var(--primary-color);
}

/* Step Section Visibility */
.step-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.step-content.active {
    display: block;
}

/* Fade effect */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Group Styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

/* Form Labels */
.form-group label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--second-font-color);
    padding-left: 2px;
}

/* Image Preview Styling */
.image-preview {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 4px;
}

.image-preview img {
    width: 88px;
    height: 88px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--secondary-font-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    background: #f9f9f9;
}


/* Alerts */
#alertMessageContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 320px;
    padding: 16px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 2000;
    display: none;
}

#alertMessageContainer.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#alertMessageContainer.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#alertMessageContainer.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Invoice List (Mobile Default) */
.invoice-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.invoice-item {
    background: var(--background-color);
    border: 1px solid var(--secondary-font-color);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.invoice-item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.invoice-item-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--font-color);
}

.invoice-item-content p strong {
    color: var(--primary-color);
}

/* Invoice Table */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--font-color);
}

.invoice-table th,
.invoice-table td {
    padding: 12px;
    border: 1px solid var(--secondary-font-color);
    text-align: left;
}

.invoice-table th {
    background: var(--background-on-hover);
    font-weight: bold;
}

.invoice-table td {
    background: var(--background-color);
}

.invoice-table tr:nth-child(even) {
    background: var(--background-on-hover);
}

/* Toggle View Button (Mobile Only) */
.toggle-view-btn {
    display: none;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: var(--transition);
}

.toggle-view-btn:hover {
    background: #009688;
}

/* Pay Button */
.btn-pay {
    padding: 8px 16px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-pay:hover {
    background: #218838;
}

/* Post Options */
.post-options {
    position: relative;
}

.post-options-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    color: var(--font-color);
}

.post-options-toggle:hover {
    color: var(--primary-color);
}

.post-options-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background-color);
    border: 1px solid var(--secondary-font-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 120px;
}

.post-options-dropdown.show {
    display: block;
}

.post-options-dropdown a {
    display: block;
    padding: 8px 12px;
    color: var(--font-color);
    text-decoration: none;
    font-size: 14px;
}

.post-options-dropdown a:hover {
    background: var(--background-on-hover);
}

.post-options-dropdown .delete-option {
    color: var(--danger-color);
}

.post-options-dropdown .delete-option:hover {
    background: #ffe6e6;
}

/* Responsive Design */
.mobile-header {
    display: none; /* Hidden by default */
}

@media (max-width: 935px) {
    body {
        overflow-y: hidden; /* Prevent body from scrolling */
    }
    .container {
        height: 100vh;
        overflow: hidden;
    }
    .navbar {
        display: none !important;
    }
    .nav-hidden {
        display: flex !important;
    }
    .main-content {
        padding: 0;
        max-width: 100%;
        
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: 50px; /* Space for mobile header */
        padding-bottom: 70px; /* Space for bottom nav */
    }
    .post-section {
        max-width: 100%;
        padding: 0;
    }
    .post-main {
        max-width: 100%;
        
        scroll-snap-align: start; /* Snap to the start of each post */
        display: flex;
        flex-direction: column;
    }
    .follow-section {
        display: none;
    }
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.2); /* Semi-transparent background */
        z-index: 1001;
        backdrop-filter: blur(10px);
    }
    .mobile-logo img {
        height: 30px;
        width: auto;
    }
    
    /* Mobile Language Toggle */
    .mobile-header-controls {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .mobile-language-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: rgba(0, 196, 180, 0.1);
        border: 1px solid rgba(0, 196, 180, 0.3);
        border-radius: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        backdrop-filter: blur(5px);
    }
    
    .mobile-language-toggle:hover {
        background: rgba(0, 196, 180, 0.2);
        border-color: rgba(0, 196, 180, 0.5);
        transform: scale(1.05);
    }
    
    .mobile-language-toggle i {
        font-size: 14px;
        color: var(--primary-color);
    }
    
    .mobile-language-toggle span {
        font-size: 12px;
        font-weight: 600;
        color: var(--font-color);
        text-transform: uppercase;
    }
}

@media (max-width: 600px) {
    .profile-edit-modal.tm-form-container {
        width: 95%;
        padding: 16px;
        max-height: 90vh;
        overflow-y: auto;
        top: 10px;
        transform: translateX(-50%);
    }
    .profile-edit-modal #profile-picture-preview {
        width: 80px !important;
        height: 80px !important;
        max-width: 80px !important;
        max-height: 80px !important;
    }
    .profile-edit-modal h2 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    .profile-edit-modal .form-group {
        margin-bottom: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .profile-edit-modal .form-group label {
        min-width: auto;
        margin-bottom: 4px;
    }
    .profile-edit-modal .form-group input,
    .profile-edit-modal .form-group textarea {
        font-size: 0.85rem;
        padding: 8px;
    }
    .profile-edit-modal #change-profile-picture,
    .profile-edit-modal .tm-action-btn.btn-primary {
        padding: 8px;
        font-size: 0.85rem;
    }
    #subscription-payment-modal.tm-form-container {
        width: 95%;
        padding: 16px;
    }
    #subscription-payment-modal h2 {
        font-size: 1.1rem;
    }
    #subscription-payment-modal h3 {
        font-size: 1rem;
    }
    #subscription-payment-modal .mobile-icon {
    width: 60px;
    height: 60px;
    padding: 6px;
}

    #subscription-payment-modal #mobile-money-preview {
    width: 50px;
    height: 50px;
}

    #subscription-payment-modal select,
    #subscription-payment-modal input[type="tel"] {
        font-size: 0.85rem;
        padding: 8px;
    }
    #subscription-payment-modal .payment-options {
        gap: 10px;
    }
    #subscription-payment-modal .payment-options label {
        font-size: 0.85rem;
    }
    #subscription-payment-modal .payment-options input[type="radio"] {
        width: 12px;
        height: 12px;
    }
    #subscription-payment-modal button[type="submit"],
    #subscription-payment-modal .tm-form-close {
        padding: 8px;
        font-size: 0.85rem;
    }
    #subscription-payment-modal .payment-instructions,
    #subscription-payment-modal .pay-later-instructions {
        font-size: 0.8rem;
    }
    #subscription-payment-modal #total-charges {
        font-size: 1rem;
    }
    .tm-search-container {
        padding: 8px;
    }
    .category-tabs {
        gap: 6px;
    }
    .category-tab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .tm-search-filter {
        padding: 8px;
        font-size: 0.8rem;
    }
    .story-section {
        gap: 8px;
    }
    .story-image {
        width: 76px;
        height: 76px;
    }
    .story-image img {
        width: 70px;
        height: 70px;
    }
    .story span {
        font-size: 0.7rem;
    }
   .tm-form-container {
    max-width: 480px;
    border-radius: 12px;
}
    #login-form.tm-form-container,
    #register-form.tm-form-container {
        width: 95%;
        padding: 20px;
        max-width: 95%;
    }
    
    #login-form .tm-form-close,
    #register-form .tm-form-close {
        top: 10px;
        right: 15px;
        font-size: 20px;
    }
    
    #login-form h2,
    #register-form h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    #login-form input[type="email"],
    #login-form input[type="password"],
    #register-form input[type="text"],
    #register-form input[type="email"],
    #register-form input[type="password"],
    #register-form select {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    #login-form button[type="submit"],
    #register-form button[type="submit"] {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    .admin-stats {
        grid-template-columns: 1fr;
    }
    .admin-table th,
    .admin-table td {
        font-size: 0.8rem;
        padding: 8px;
    }
    .invoice-list {
        gap: 8px;
    }
    .invoice-item {
        padding: 8px;
    }
    .invoice-item-content p {
        font-size: 0.8rem;
    }
    
    /* Admin Invoice Mobile Layout */
    .admin-invoice-item {
        background: var(--background-color);
        border: 1px solid var(--secondary-font-color);
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .admin-invoice-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--secondary-font-color);
        padding-bottom: 8px;
    }
    
    .admin-invoice-id {
        font-weight: bold;
        color: var(--primary-color);
        font-size: 0.9rem;
    }
    
    .admin-invoice-status {
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: bold;
    }
    
    .admin-invoice-status.paid {
        background: #d4edda;
        color: #155724;
    }
    
    .admin-invoice-status.pending {
        background: #fff3cd;
        color: #856404;
    }
    
    .admin-invoice-status.failed {
        background: #f8d7da;
        color: #721c24;
    }
    
    .admin-invoice-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .admin-invoice-detail {
        font-size: 0.8rem;
    }
    
    .admin-invoice-detail strong {
        color: var(--primary-color);
        display: block;
        margin-bottom: 2px;
    }
    
    .admin-invoice-actions {
        display: flex;
        gap: 8px;
        justify-content: flex-end;
    }
    
    .admin-invoice-actions .btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        border-radius: 4px;
    }
    
    /* Hide table on mobile for admin invoices */
    @media (max-width: 768px) {
        #admin-invoices-table {
            display: none;
        }
        
        #admin-invoices-mobile {
            display: block;
        }
    }
    
    /* Show table on desktop */
    @media (min-width: 769px) {
        #admin-invoices-table {
            display: table;
        }
        
        #admin-invoices-mobile {
            display: none;
        }
    }
    
    /* Invoice Filter Buttons */
    .invoice-filters {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }
    
    .invoice-filters .btn {
        padding: 8px 16px;
        border: 1px solid var(--primary-color);
        background: transparent;
        color: var(--primary-color);
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.9rem;
    }
    
    .invoice-filters .btn:hover,
    .invoice-filters .btn.active {
        background: var(--primary-color);
        color: white;
    }
    
    .invoice-filters .btn-success {
        border-color: #28a745;
        color: #28a745;
    }
    
    .invoice-filters .btn-success:hover,
    .invoice-filters .btn-success.active {
        background: #28a745;
        color: white;
    }
    
    .invoice-filters .btn-warning {
        border-color: #ffc107;
        color: #856404;
    }
    
    .invoice-filters .btn-warning:hover,
    .invoice-filters .btn-warning.active {
        background: #ffc107;
        color: #856404;
    }
    
    /* Mobile responsive for filter buttons */
    @media (max-width: 480px) {
        .invoice-filters {
            justify-content: center;
        }
        
        .invoice-filters .btn {
            flex: 1;
            min-width: 80px;
            font-size: 0.8rem;
            padding: 6px 12px;
        }
    }
    
    .invoice-table {
        font-size: 0.8rem;
    }
    .invoice-table th,
    .invoice-table td {
        padding: 8px;
    }
    .toggle-view-btn {
        display: block;
    }
    .btn-pay {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .nav-hidden-item {
        font-size: 1.1rem;
    }
    .nav-hidden-item i {
        font-size: 1.2rem;
    }

    .nav-hidden-item img.mobile-profile-img {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        object-fit: cover;
    }
    .nav-hidden-item[aria-label]:after {
        font-size: 0.6rem;
        transition: all 0.3s ease;
    }
    
    /* Language update animation for mobile nav */
    .nav-hidden-item.updating {
        animation: mobileNavUpdate 0.3s ease;
    }
    
    @keyframes mobileNavUpdate {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }
}

@media (max-width: 690px) {
    .story-section .story:nth-child(n+7) {
        display: none;
    }
}

@media (max-width: 562px) {
    .story-section .story:nth-child(n+6) {
        display: none;
    }
}

@media (max-width: 482px) {
    .story-section .story:nth-child(n+5) {
        display: none;
    }
}

@media (max-width: 402px) {
    .story-section .story:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 323px) {
    .story-section .story:nth-child(n+3) {
        display: none;
    }
}

.fa-heart.liked {
    color: red;
}

.fa-heart.loading {
    cursor: not-allowed;
}

.btn-comment-submit {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-comment-submit:hover {
    background: #009688;
}

/* ==== Preview ya picha (usifute hizi) ==== */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.preview-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    background-color: #f3f3f3;
}
.image-preview-container {
    position: relative;
}
.remove-image {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ==== USITUMIE hizi kabisa! ==== */
/* .image-carousel {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin: 10px 0;
    scroll-snap-type: x mandatory;
}
.image-carousel img {
    width: 100%;
    max-width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 5px;
    scroll-snap-align: start;
    background-color: #f0f0f0;
} */

/* ==== Carousel ya post (hizi pekee kwa sliding) ==== */
.business-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dark-mode .business-carousel {
  box-shadow: 0 2px 8px rgba(255,255,255,0.05);
}

.carousel-wrapper {
  overflow: hidden;
  width: 100%;
}

.carousel-images {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
  background: #000;
}

.carousel-images img {
  flex-shrink: 0;
  width: 100%; /* Each image takes full width of container */
  max-width: 100%;
  max-height: 500px;
  min-height: 200px;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* Single image (no carousel needed) */
.business-carousel .carousel-images img:only-child {
  height: auto;
  max-height: 600px;
  width: 100%;
  object-fit: contain;
  background: #000;
  aspect-ratio: auto;
}

/* Landscape images */
.carousel-images img[style*="landscape"] {
  max-height: 400px;
}

/* Portrait images */
.carousel-images img[style*="portrait"] {
  max-height: 600px;
}

/* Square images */
.carousel-images img[style*="square"] {
  max-height: 500px;
  aspect-ratio: 1;
}

/* Image loading states */
.carousel-images img {
  transition: opacity 0.3s ease;
}

.carousel-images img:not([src]),
.carousel-images img[src=""] {
  opacity: 0;
}

.carousel-images img[src]:not([src=""]) {
  opacity: 1;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.9);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow-left { 
    left: 10px; 
}

.carousel-arrow-right { 
    right: 10px; 
}

/* Show arrows on mobile for better UX */
.carousel-arrow { 
    display: flex; 
}

/* Dark mode arrow styles */
.dark-mode .carousel-arrow {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.dark-mode .carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Hide arrows when only one image */
.business-carousel:not([data-image-count]) .carousel-arrow,
.business-carousel[data-image-count="1"] .carousel-arrow {
    display: none !important;
}

/* Show arrows only when multiple images */
.business-carousel[data-image-count]:not([data-image-count="1"]) .carousel-arrow {
    display: flex;
}

/* Mobile responsive arrow improvements */
@media (max-width: 768px) {
    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 16px;
        opacity: 0.9;
    }
    
    .carousel-arrow-left {
        left: 8px;
    }
    
    .carousel-arrow-right {
        right: 8px;
    }
}

/* Touch targets for better mobile UX */
.carousel-arrow::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1;
}
.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 6px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.carousel-dot.active {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
    transform: scale(1.2);
}

.dark-mode .carousel-dot {
    background: rgba(255, 255, 255, 0.4);
}

.dark-mode .carousel-dot.active {
    background: rgba(255, 255, 255, 0.8);
}

/* Hide dots when only one image */
.business-carousel[data-image-count="1"] .carousel-dots {
    display: none;
}

.video-container {
    position: relative;
    width: 100%;
}

.post-video {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
}

/* MOBILE BOTTOM NAVIGATION WITH GRADIENT + FLOATING BUTTON DESIGN */
.nav-hidden {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 70px;
    background: transparent; /* no background here to let #mobile-public-nav handle it */
    z-index: 1000;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

@media (min-width: 769px) {
    .nav-hidden {
        display: none !important;
    }
}

.nav-hide-2 {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
    justify-content: center;
    pointer-events: all;
}

.nav-hidden-nav {
    background: var(--background-color);
    border-top: 1px solid var(--secondary-font-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1001;
}

/* Enhanced Mobile User Navigation */
#mobile-user-nav {
    background: linear-gradient(135deg, #1a237e, #3949ab, #5c6bc0);
    border-top: 2px solid rgba(92, 107, 192, 0.3);
    box-shadow: 0 -4px 20px rgba(26, 35, 126, 0.4);
    border-radius: 20px 20px 0 0;
    padding: 8px 0;
}

#mobile-user-nav .nav-hidden-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px 4px;
    border-radius: 12px;
    margin: 0 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

#mobile-user-nav .nav-hidden-item:hover,
#mobile-user-nav .nav-hidden-item:active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.3);
}

#mobile-user-nav .nav-hidden-item i {
    font-size: 1.6rem;
    margin-bottom: 2px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

#mobile-user-nav .nav-hidden-item[aria-label]:after {
    content: attr(aria-label);
    font-size: 0.65rem;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Enhanced Mobile Admin Navigation */
#mobile-admin-nav {
    background: linear-gradient(135deg, #b71c1c, #d32f2f, #f44336);
    border-top: 2px solid rgba(244, 67, 54, 0.3);
    box-shadow: 0 -4px 20px rgba(183, 28, 28, 0.4);
    border-radius: 20px 20px 0 0;
    padding: 8px 0;
}

#mobile-admin-nav .nav-hidden-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px 4px;
    border-radius: 12px;
    margin: 0 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

#mobile-admin-nav .nav-hidden-item:hover,
#mobile-admin-nav .nav-hidden-item:active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.3);
}

#mobile-admin-nav .nav-hidden-item i {
    font-size: 1.6rem;
    margin-bottom: 2px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

#mobile-admin-nav .nav-hidden-item[aria-label]:after {
    content: attr(aria-label);
    font-size: 0.65rem;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Enhanced Mobile Profile Images */
.nav-hidden-item img.mobile-profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#mobile-user-nav .nav-hidden-item img.mobile-profile-img:hover,
#mobile-admin-nav .nav-hidden-item img.mobile-profile-img:hover {
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

/* Special styling for active navigation items */
.nav-hidden-item.active {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-3px);
}

.nav-hidden-item.active i {
    color: #ffeb3b !important;
    transform: scale(1.1);
}

/* Touch feedback */
.nav-hidden-item:active {
    transform: scale(0.95) translateY(-1px);
}

/* Responsive adjustments for mobile navigation */
@media (max-width: 480px) {
    #mobile-user-nav .nav-hidden-item,
    #mobile-admin-nav .nav-hidden-item {
        margin: 0 2px;
        padding: 6px 2px;
    }
    
    #mobile-user-nav .nav-hidden-item i,
    #mobile-admin-nav .nav-hidden-item i {
        font-size: 1.4rem;
    }
    
    #mobile-user-nav .nav-hidden-item[aria-label]:after,
    #mobile-admin-nav .nav-hidden-item[aria-label]:after {
        font-size: 0.6rem;
    }
    
    .nav-hidden-item img.mobile-profile-img {
        width: 28px;
        height: 28px;
    }
}

.nav-hidden-nav .nav-hidden-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    color: white;
    font-size: 1.6rem;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
}

.nav-floating-button {
    position: absolute;
    left: 50%;
    top: -25px;
    transform: translateX(-50%);
    background: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1002;
    border: 4px solid var(--background-color);
}

.nav-hidden-nav .nav-hidden-item:hover,
.nav-floating-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-hidden-nav .nav-hidden-item.active,
.nav-floating-button.active {
    background: rgba(255, 255, 255, 0.3);
}

.nav-hidden-nav .nav-hidden-item[aria-label]:after,
.nav-floating-button[aria-label]:after {
    content: none; /* Remove text labels */
}

.nav-floating-button {
    pointer-events: all !important;
}

/* Profile Container */
.profile-container {
    max-width: 935px;
    margin: 0 auto;
    padding: 30px 20px;
    background-color: var(--background-color);
}

.profile-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 44px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(219, 219, 219, 0.3);
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 70px;
    flex-shrink: 0;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 196, 180, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.profile-picture:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 196, 180, 0.4);
}

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

.profile-info {
    flex-grow: 1;
    max-width: calc(100% - 220px);
}

/* ====== Profile Name & Actions Section ====== */
.profile-name-and-actions {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.profile-name-and-actions h2 {
    font-size: 28px;
    font-weight: 300;
    margin: 0;
    color: var(--font-color);
    letter-spacing: -0.5px;
}

/* ====== Instagram-Style Edit Profile Button ====== */
#edit-profile-btn {
    background: transparent;
    border: 1px solid var(--secondary-font-color);
    color: var(--font-color);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0;
}

#edit-profile-btn:hover {
    background: var(--background-on-hover);
    border-color: var(--font-color);
    transform: translateY(-1px);
}

/* Dark mode support for profile elements */
body.dark-mode .profile-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .profile-picture {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 196, 180, 0.3);
}

body.dark-mode .profile-links a {
    background: rgba(0, 196, 180, 0.15);
    border-color: rgba(0, 196, 180, 0.3);
}

body.dark-mode .profile-contact {
    background: rgba(0, 196, 180, 0.08);
    border-color: rgba(0, 196, 180, 0.2);
}

body.dark-mode .profile-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode #edit-profile-btn {
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode #edit-profile-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

/* ====== Profile Stats - Instagram Style ====== */
.profile-stats {
    display: flex;
    margin-bottom: 20px;
    gap: 40px;
    align-items: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.stat::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.stat:hover::after {
    width: 100%;
}

.stat:hover {
    transform: translateY(-2px);
}

.stat-count {
    font-weight: 700;
    font-size: 18px;
    color: var(--font-color);
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.stat:hover .stat-count {
    color: var(--primary-color);
    transform: scale(1.1);
}

.stat-label {
    font-weight: 400;
    font-size: 14px;
    color: var(--second-font-color);
    text-transform: lowercase;
    transition: color 0.3s ease;
}

.stat:hover .stat-label {
    color: var(--font-color);
}

/* ====== Bio Section - Instagram Style ====== */
.profile-bio {
    margin-bottom: 16px;
    font-size: 16px;
    color: var(--font-color);
    line-height: 1.5;
    min-height: 24px;
    word-break: break-word;
    font-weight: 400;
}
.profile-bio p {
    margin: 0;
    color: var(--font-color);
    font-size: 16px;
    font-weight: 400;
}

/* ====== Links Section - Instagram Style ====== */
.profile-links {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.profile-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    background: rgba(0, 196, 180, 0.1);
    border: 1px solid rgba(0, 196, 180, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.profile-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}
.profile-links a:hover::before {
    left: 100%;
}
.profile-links a i {
    font-size: 16px;
    transition: transform 0.3s ease;
}
.profile-links a:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 196, 180, 0.3);
}
.profile-links a:hover i {
    transform: scale(1.1);
}

/* ====== Contact Section - Instagram Style ====== */
.profile-contact {
    background: rgba(0, 196, 180, 0.05);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 196, 180, 0.15);
}

.profile-contact h4 {
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--font-color);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-contact h4::before {
    content: "📞";
    font-size: 18px;
}

.profile-contact p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.profile-contact p i {
    font-size: 16px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.profile-contact a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.profile-contact a:hover {
    color: var(--font-color);
    text-decoration: underline;
}

/* ====== Profile Tabs - Instagram Style ====== */
.profile-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(219, 219, 219, 0.3);
    background-color: var(--background-color);
    margin-top: 20px;
    position: relative;
}

.profile-tabs .tab {
    padding: 16px 24px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--second-font-color);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    min-width: 120px;
    background: transparent;
    border: none;
}

.profile-tabs .tab i {
    font-size: 14px;
    transition: all 0.3s ease;
}

.profile-tabs .tab:hover {
    color: var(--font-color);
    transform: translateY(-1px);
}

.profile-tabs .tab.active {
    color: var(--font-color);
    border-bottom: 1px solid var(--font-color);
    font-weight: 700;
}

.profile-tabs .tab.active i {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Profile content wrapper - Instagram Style */
.profile-content {
    padding: 30px 0;
    background-color: var(--background-color);
    min-height: 300px;
}

/* Tab contents */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Buttons */
.tm-action-btn {
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Form styling inside location tab */
#user-location-form {
    display: grid;
    gap: 15px;
    margin-top: 15px;
    max-width: 500px;
}

#user-location-form .form-group {
    display: flex;
    flex-direction: column;
}

#user-location-form label {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--font-color);
}

#user-location-form select,
#user-location-form button {
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid var(--secondary-font-color);
    font-size: 14px;
    font-weight: 500;
    background: var(--background-color);
    color: var(--font-color);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

/* Location dropdowns styling */
#user-location-form select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#user-location-form select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

#user-location-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1), 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

#user-location-form select:disabled {
    background-color: var(--secondary-background-color);
    color: var(--secondary-font-color);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Specific styling for each dropdown */
#profile-mkoa {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #28a745;
}

#profile-wilaya {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
}

#profile-eneo {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-color: #17a2b8;
}

#profile-mkoa:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1), 0 4px 12px rgba(40, 167, 69, 0.15);
}

#profile-wilaya:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1), 0 4px 12px rgba(255, 193, 7, 0.15);
}

#profile-eneo:focus {
    border-color: #17a2b8;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1), 0 4px 12px rgba(23, 162, 184, 0.15);
}

/* Location form container */
#user-location-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: var(--background-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#user-location-form .location-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#user-location-form label {
    font-weight: 600;
    color: var(--font-color);
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#user-location-form label::before {
    content: "📍";
    font-size: 16px;
}

#profile-mkoa + label::before {
    content: "🏔️";
}

#profile-wilaya + label::before {
    content: "🏘️";
}

#profile-eneo + label::before {
    content: "📍";
}

/* Save button styling */
#user-location-form button[type="submit"] {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

#user-location-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

#user-location-form button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

/* Success message styling */
#location-save-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    margin-top: 15px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

#location-save-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile responsive */
@media (max-width: 768px) {
    #user-location-form {
        padding: 16px;
        gap: 16px;
    }
    
    #user-location-form select {
        padding: 14px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    #user-location-form button[type="submit"] {
        padding: 16px 24px;
        font-size: 16px;
    }
}


/* Modern Instagram-like modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-edit-modal-modern {
    background: #18191a;
    color: #fff;
    border-radius: 16px;
    max-width: 400px;
    width: 95%;
    padding: 32px 24px 24px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.3s;
}

@keyframes fadeInUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.profile-edit-modal-modern .tm-form-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4em;
    cursor: pointer;
}

.profile-edit-modal-modern .form-group {
    margin-bottom: 18px;
}

.profile-edit-modal-modern input,
.profile-edit-modal-modern textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #333;
    background: #242526;
    color: #fff;
    padding: 10px;
    font-size: 1em;
}

.profile-edit-modal-modern button.tm-action-btn {
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 480px) {
    .profile-edit-modal-modern {
        max-width: 95%;
        width: 100%;
        padding: 20px 16px;
        border-radius: 12px;
        font-size: 0.9em;
    }

    .profile-edit-modal-modern input,
    .profile-edit-modal-modern textarea {
        font-size: 0.95em;
        padding: 8px;
    }

    .profile-edit-modal-modern .form-group {
        margin-bottom: 12px;
    }

    .profile-edit-modal-modern .tm-form-close {
        font-size: 1.2em;
        top: 12px;
        right: 12px;
    }

    .profile-edit-modal-modern button.tm-action-btn {
        padding: 10px;
        font-size: 0.95em;
    }
}


.tab {
    padding: 15px;
    cursor: pointer;
    color: var(--second-font-color);
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 12px;
}

.tab.active {
    color: var(--font-color);
    border-top: 1px solid var(--font-color);
    margin-top: -1px;
}

.profile-content {
    padding-top: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ====== Instagram-Style Posts Grid ====== */
#posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 20px;
}

.post-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
    background: var(--background-color);
}

.post-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.post-thumbnail:hover img {
    filter: brightness(0.9);
}

/* Instagram-style overlay for video/multiple images */
.post-thumbnail::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.post-thumbnail.has-video::after {
    content: '▶';
    display: flex;
    color: white;
    font-size: 10px;
}

.post-thumbnail.has-multiple::after {
    content: '⊞';
    display: flex;
    color: white;
    font-size: 12px;
}

/* Hover overlay with stats */
.post-thumbnail .post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-weight: 600;
    gap: 20px;
}

.post-thumbnail:hover .post-overlay {
    opacity: 1;
}

.post-overlay-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.post-overlay-stat i {
    font-size: 16px;
}
.pipo-upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #181818;
    margin-bottom: 20px;
    position: relative;
    transition: border-color 0.2s;
}
.pipo-upload-area.dragover {
    border-color: #00c4b4;
    background: #222;
}
.upload-icon {
    margin-bottom: 10px;
    color: #00c4b4;
}
.upload-btn {
    background: #00c4b4;
    color: #fff;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    display: inline-block;
}
.image-preview, .video-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
}
.image-preview img, .video-preview video {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #333;
}


/* HTML: <div class="loader"></div> */
.loader {
  width: 120px;
  height: 20px;
  border-radius: 20px;
  background:
   repeating-linear-gradient(135deg,#f03355 0 10px,#ffa516 0 20px) 0/0%   no-repeat,
   repeating-linear-gradient(135deg,#ddd    0 10px,#eee    0 20px) 0/100%;
  animation: l3 2s infinite;
}
@keyframes l3 {
    100% {background-size:100%}
}

@media (max-width: 600px) {
    .pipo-upload-area {
        padding: 20px 5px;
    }
    .image-preview img, .video-preview video {
        width: 70px;
        height: 70px;
    }
}

/* Video Thumbnail Styles */
.post-thumbnail .post-video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-thumbnail .video-icon-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    color: white;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px;
    border-radius: 50%;
    z-index: 1;
}

/* ===== INSTAGRAM-STYLE GRID ENHANCEMENTS ===== */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.grid-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    background: #000;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.grid-item:hover {
    transform: scale(1.02);
}

.grid-item-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.grid-image, .grid-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:hover .grid-overlay {
    opacity: 1;
}

.grid-stats {
    color: white;
    font-weight: bold;
    display: flex;
    gap: 15px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.grid-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-indicator, .multiple-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    color: white;
    font-size: 16px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.grid-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--background-on-hover);
    color: var(--secondary-font-color);
}

.grid-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-font-color);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .instagram-grid {
        gap: 2px;
        max-width: 100%;
    }
    
    .grid-stats {
        font-size: 0.9rem;
        gap: 10px;
    }
    
    .video-indicator, .multiple-indicator {
        font-size: 14px;
        top: 6px;
        right: 6px;
    }
}

@media (max-width: 480px) {
    .instagram-grid {
        gap: 1px;
    }
    
    .grid-stats {
        font-size: 0.8rem;
        gap: 8px;
    }
}

/* ===== BUSINESS MODAL WITH SEO ===== */
.business-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.business-modal-overlay.show {
    opacity: 1;
}

.business-modal {
    background: var(--background-color);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.business-modal-overlay.show .business-modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--background-on-hover);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-height: calc(90vh - 80px);
    overflow: auto;
}

.modal-images {
    position: relative;
    background: #000;
    min-height: 300px;
}

.modal-image {
    display: none;
    width: 100%;
    height: 100%;
}

.modal-image.active {
    display: block;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 10px;
}

.prev-image, .next-image {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.prev-image:hover, .next-image:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-details {
    padding: 20px;
    overflow-y: auto;
}

.business-info {
    margin-bottom: 20px;
}

.business-category {
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 10px;
}

.business-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.business-location {
    color: var(--second-font-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.business-description, .business-contact {
    margin-bottom: 20px;
}

.business-description h3, .business-contact h3 {
    margin-bottom: 10px;
    color: var(--font-color);
    font-size: 1.1rem;
}

.business-description p {
    line-height: 1.6;
    color: var(--second-font-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--font-color);
}

.business-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--background-on-hover);
    border-radius: 8px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--second-font-color);
}

.business-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.business-actions .btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

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

.btn-success {
    background: #25D366;
    color: white;
}

.btn-secondary {
    background: var(--background-on-hover);
    color: var(--font-color);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .business-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-images {
        min-height: 250px;
    }
    
    .business-actions {
        flex-direction: column;
    }
    
    .business-actions .btn {
        flex: none;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-details {
        padding: 15px;
    }
    
    .business-price {
        font-size: 1.3rem;
    }
}

/* SEO-friendly URL indicator */
.seo-url-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.seo-url-indicator.show {
    opacity: 1;
}

/* =============================================
   SEO PAGE STYLES
   ============================================= */

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 3px;
}

.skip-to-content:focus {
    top: 6px;
}

/* Site header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo img {
    max-height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #00c4b4;
}

/* Main content */
.seo-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.seo-page main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    color: #ccc;
}

.breadcrumb-list a {
    color: #00c4b4;
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

/* Business details article */
.business-details {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

.business-header {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.business-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.business-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.business-category {
    background: #00c4b4;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.business-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 15px;
}

.business-location i {
    color: #00c4b4;
}

/* Business gallery */
.business-gallery {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.main-image {
    margin-bottom: 20px;
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-thumbnails img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-thumbnails img:hover {
    transform: scale(1.05);
}

/* Business info */
.business-info {
    padding: 30px;
}

.business-description {
    margin-bottom: 30px;
}

.business-description h2 {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.business-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item h3 {
    color: #34495e;
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.detail-item .price {
    color: #00c4b4;
    font-size: 18px;
    font-weight: 700;
}

.detail-item a {
    color: #00c4b4;
    text-decoration: none;
}

.detail-item a:hover {
    text-decoration: underline;
}

/* Contact actions */
.contact-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.btn-primary {
    background: #00c4b4;
    color: white;
}

.btn-primary:hover {
    background: #00a89a;
    transform: translateY(-1px);
}

.btn-success {
    background: #25d366;
    color: white;
}

.btn-success:hover {
    background: #20ba5a;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Related businesses */
.related-businesses {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

.related-businesses h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    margin-top: 60px;
    padding: 40px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    color: #00c4b4;
    margin-bottom: 15px;
}

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

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

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #00c4b4;
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #00c4b4;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    color: #bdc3c7;
}

/* Responsive design for SEO page */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        height: 50px;
    }
    
    .nav-links {
        gap: 15px;
        font-size: 14px;
    }
    
    .seo-page main {
        padding: 15px;
    }
    
    .business-header {
        padding: 20px;
    }
    
    .business-header h1 {
        font-size: 2em;
    }
    
    .business-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .business-gallery {
        padding: 20px;
    }
    
    .main-image img {
        height: 250px;
    }
    
    .business-info {
        padding: 20px;
    }
    
    .business-details-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
        padding: 15px;
    }
    
    .related-businesses {
        padding: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }
    
    .business-header h1 {
        font-size: 1.6em;
    }
    
    .gallery-thumbnails img {
        width: 80px;
        height: 80px;
    }
    
    .btn {
        font-size: 14px;
        padding: 12px;
    }
}

/* =========================
   SOCIAL SHARING STYLES
========================= */
.share-section {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.share-section:hover {
    color: var(--primary-color);
}

/* Share Dropdown Menu */
.share-dropdown {
    position: absolute;
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 15px;
    min-width: 280px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-dropdown.show {
    opacity: 1;
    visibility: visible;
    top: -260px;
}

.dark-mode .share-dropdown {
    background: #2a2a2a;
    border: 1px solid #444;
}

.share-dropdown h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: var(--font-color);
}

.share-platforms {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.share-platform-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.share-platform-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.share-platform-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Mobile haptic feedback simulation */
@media (hover: none) and (pointer: coarse) {
    .share-platform-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

.share-platform-btn i {
    font-size: 16px;
}

/* Platform-specific colors */
.share-whatsapp { background: #25D366; }
.share-whatsapp:hover { background: #128C7E; }

.share-facebook { background: #1877F2; }
.share-facebook:hover { background: #166FE5; }

.share-twitter { background: #1DA1F2; }
.share-twitter:hover { background: #0C90E1; }

.share-telegram { background: #0088CC; }
.share-telegram:hover { background: #0077B3; }

.share-linkedin { background: #0077B5; }
.share-linkedin:hover { background: #005582; }

.share-instagram { background: linear-gradient(45deg, #F09433 0%,#E6683C 25%,#DC2743 50%,#CC2366 75%,#BC1888 100%); }
.share-instagram:hover { background: linear-gradient(45deg, #E6683C 0%,#DC2743 25%,#CC2366 50%,#BC1888 75%,#8B0E68 100%); }

.share-email { background: #EA4335; }
.share-email:hover { background: #D33B2C; }

.share-sms { background: #34C759; }
.share-sms:hover { background: #30B350; }

.share-copy { background: #6C757D; }
.share-copy:hover { background: #5A6268; }

.share-more { background: var(--primary-color); }
.share-more:hover { background: #00A999; }

/* Copy Link Section */
.share-copy-section {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.dark-mode .share-copy-section {
    border-top-color: #444;
}

.share-url-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.share-url-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #f9f9f9;
}

.dark-mode .share-url-input input {
    background: #333;
    border-color: #555;
    color: var(--font-color);
}

.share-url-input button {
    padding: 10px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.share-url-input button:hover {
    background: #00A999;
}

/* =========================
   INSTAGRAM-STYLE COMMENTS MODAL
========================= */
.comments-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.comments-modal.show {
    opacity: 1;
    visibility: visible;
}

.comments-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    display: grid;
    grid-template-columns: 1fr 400px;
    overflow: hidden;
    position: relative;
}

.dark-mode .comments-modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
}

/* Close button */
.comments-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
	font-size: 1.2em;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.comments-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Media section (left side) */
.comments-modal-media {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 400px;
}

.comments-modal-media img,
.comments-modal-media video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Modal carousel styles */
.modal-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-carousel .carousel-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.modal-carousel .carousel-images {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.modal-carousel .carousel-img {
    min-width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-carousel .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
    transition: background 0.2s ease;
}

.modal-carousel .carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-carousel .carousel-arrow-left {
    left: 15px;
}

.modal-carousel .carousel-arrow-right {
    right: 15px;
}

.modal-carousel .carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.modal-carousel .carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-carousel .carousel-dot.active {
    background: white;
}

/* Comments section (right side) */
.comments-modal-sidebar {
    display: flex;
    flex-direction: column;
    height: 600px;
    background: white;
}

.dark-mode .comments-modal-sidebar {
    background: #1a1a1a;
}

/* Business header in comments */
.comments-modal-header {
    padding: 16px;
    border-bottom: 1px solid #dbdbdb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dark-mode .comments-modal-header {
    border-bottom-color: #333;
}

.comments-modal-header img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comments-modal-header .business-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--font-color);
}

.comments-modal-header .business-info p {
    margin: 0;
    font-size: 12px;
    color: var(--second-font-color);
}

/* Comments list area */
.comments-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-username {
    font-weight: 600;
    font-size: 14px;
    color: var(--font-color);
    margin-right: 8px;
}

.comment-text {
    font-size: 14px;
    color: var(--font-color);
    line-height: 1.4;
    word-wrap: break-word;
}

.comment-meta {
    margin-top: 8px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.comment-time {
    font-size: 12px;
    color: var(--second-font-color);
}

.comment-like-btn {
    background: none;
    border: none;
    color: var(--second-font-color);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}

.comment-like-btn:hover {
    color: var(--font-color);
}

/* Comment form */
.comments-modal-footer {
    border-top: 1px solid #dbdbdb;
    padding: 16px;
}

.dark-mode .comments-modal-footer {
    border-top-color: #333;
}

.comment-form-modal {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.comment-input-modal {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 14px;
    line-height: 1.4;
    max-height: 80px;
    background: transparent;
    color: var(--font-color);
}

.comment-input-modal::placeholder {
    color: var(--second-font-color);
}

.comment-submit-modal {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

.comment-submit-modal:disabled {
    color: var(--secondary-font-color);
    cursor: not-allowed;
}

.comment-submit-modal:enabled {
    color: var(--primary-color);
}

.comment-submit-modal:enabled:hover {
    color: #00A999;
}

/* Loading state for comments */
.comments-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--second-font-color);
}

.comments-loading i {
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Smooth scroll for comments */
.comments-modal-body {
    scroll-behavior: smooth;
}

/* Improved focus states */
.comment-input-modal:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* Animation for new comments */
.comment-item.new-comment {
    animation: slideInComment 0.3s ease-out;
}

@keyframes slideInComment {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   VIDEO MUTE/UNMUTE CONTROL
========================= */
.video-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.video-mute-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.video-mute-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
    transform: scale(1.1);
}

.video-mute-toggle:active {
    transform: scale(0.95);
}

.video-mute-toggle.muted {
    background: rgba(220, 53, 69, 0.8);
}

.video-mute-toggle.muted:hover {
    background: rgba(220, 53, 69, 1);
}

.video-mute-toggle.unmuted {
    background: rgba(40, 167, 69, 0.8);
}

.video-mute-toggle.unmuted:hover {
    background: rgba(40, 167, 69, 1);
}

/* Animation for mute state change */
.video-mute-toggle i {
    transition: all 0.2s ease;
}

.video-mute-toggle.changing i {
    transform: scale(1.2);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .video-mute-toggle {
        width: 35px;
        height: 35px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }
}

/* Tooltip for mute button */
.video-mute-toggle::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 20;
}

.video-mute-toggle:hover::before {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .comments-modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: 60vh auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .comments-modal-sidebar {
        height: auto;
        min-height: 300px;
    }
    
    .comments-modal-media {
        min-height: 300px;
    }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .share-dropdown {
        min-width: 260px;
        padding: 12px;
        left: 0;
        transform: none;
        right: 0;
        margin: 0 10px;
    }
    
    .share-platforms {
        grid-template-columns: 1fr;
    }
    
    .share-platform-btn {
        padding: 15px;
        font-size: 15px;
        justify-content: center;
    }
    
    .comments-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    /* Mobile image optimizations - show full images */
    .carousel-images img {
        max-height: 400px;
        min-height: 150px;
        object-fit: contain;
    }
    
    .business-carousel .carousel-images img:only-child {
        max-height: 500px;
        object-fit: contain;
    }
    
    /* All post images on mobile */
    .post-description img,
    .business-description img,
    .tm-content img,
    .business-post img,
    .user-post img {
        max-height: 400px;
        object-fit: contain;
    }
    
    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .carousel-arrow-left {
        left: 8px;
    }
    
    .carousel-arrow-right {
        right: 8px;
    }
}

/* Comments modal mobile responsive fixes */
@media (max-width: 768px) {
    .comments-modal-content {
        width: 100vw;
        height: 100vh;
        max-width: none;
        border-radius: 0;
        flex-direction: column;
    }
    
    .comments-modal-media {
        height: 60vh;
        min-height: 300px;
    }
    
    .comments-modal-sidebar {
        height: 40vh;
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--secondary-font-color);
    }
    
    .comments-modal-footer {
        padding: 15px;
        border-top: 1px solid var(--secondary-font-color);
        background: var(--background-color);
    }
    
    .comment-form-modal {
        display: flex;
        align-items: flex-end;
        gap: 10px;
        width: 100%;
    }
    
    .comment-input-modal {
        flex: 1;
        padding: 12px 15px;
        border: 1px solid var(--secondary-font-color);
        border-radius: 20px;
        resize: none;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .comment-submit-modal {
        flex-shrink: 0;
        padding: 12px 16px;
        background: var(--primary-color) !important;
        color: white !important;
        border-radius: 20px;
        font-weight: 600;
        font-size: 14px;
        min-width: 60px;
        border: none;
    }
    
    .comment-submit-modal:disabled {
        background: var(--secondary-font-color) !important;
        color: var(--background-color) !important;
    }
    
    .comment-submit-modal:enabled:hover {
        background: #00A999 !important;
    }
}

/* Tablet responsive */
@media (max-width: 1024px) {
    .profile-container {
        padding: 20px 15px;
    }
    
    .profile-picture {
        width: 120px;
        height: 120px;
        margin-right: 50px;
    }
    
    .profile-stats {
        gap: 30px;
    }
}

/* ====== Mobile Responsive - Instagram Style Profile ====== */
@media (max-width: 768px) {
    .profile-container {
        max-width: 100%;
        padding: 20px 16px;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .profile-picture {
        width: 130px;
        height: 130px;
        margin-right: 0;
        margin-bottom: 20px;
        border-width: 2px;
    }
    
    .profile-info {
        max-width: 100%;
        width: 100%;
    }
    
    .profile-name-and-actions {
        justify-content: center;
        margin-bottom: 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .profile-name-and-actions h2 {
        font-size: 24px;
        margin-bottom: 0;
    }
    
    .profile-stats {
        justify-content: center;
        gap: 25px;
        margin-bottom: 16px;
    }
    
    .stat-count {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .profile-bio {
        text-align: center;
        margin-bottom: 16px;
        font-size: 14px;
    }
    
    .profile-links {
        justify-content: center;
        margin-bottom: 16px;
    }
    
    .profile-links a {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .profile-contact {
        text-align: center;
        padding: 12px;
    }
    
    .profile-contact h4 {
        font-size: 14px;
        justify-content: center;
    }
    
    .profile-contact p {
        justify-content: center;
        font-size: 12px;
    }
    
    .profile-tabs {
        margin-top: 15px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .profile-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .profile-tabs .tab {
        padding: 12px 16px;
        font-size: 11px;
        min-width: 80px;
        flex-shrink: 0;
    }
    
    .profile-tabs .tab i {
        font-size: 12px;
    }
    
    .profile-content {
        padding: 20px 0;
    }
}

/* ====== Small Mobile ====== */
@media (max-width: 480px) {
    .profile-container {
        padding: 15px 12px;
    }
    
    .profile-picture {
        width: 110px;
        height: 110px;
        margin-bottom: 16px;
    }
    
    .profile-name-and-actions h2 {
        font-size: 20px;
    }
    
    .profile-stats {
        gap: 20px;
    }
    
    .stat-count {
        font-size: 14px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .profile-bio {
        font-size: 13px;
    }
    
    .profile-links a {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .profile-tabs .tab {
        padding: 10px 12px;
        font-size: 10px;
        min-width: 70px;
    }
    
    .tm-action-btn {
        font-size: 12px;
        padding: 8px 14px;
    }
    
    /* Posts Grid Mobile */
    #posts-grid {
        gap: 2px;
        margin-top: 15px;
    }
    
    .post-thumbnail .post-overlay {
        display: none; /* Hide overlay on mobile for better performance */
    }
    
    .post-overlay-stat {
        font-size: 12px;
    }
}

/* ====== Posts Grid Responsive ====== */
@media (max-width: 768px) {
    #posts-grid {
        gap: 3px;
    }
    
    .post-thumbnail::after {
        top: 6px;
        right: 6px;
        width: 18px;
        height: 18px;
    }
    
    .post-thumbnail.has-video::after {
        font-size: 9px;
    }
    
    .post-thumbnail.has-multiple::after {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    #posts-grid {
        gap: 2px;
    }
    
    .post-thumbnail::after {
        top: 4px;
        right: 4px;
        width: 16px;
        height: 16px;
    }
    
    .post-thumbnail.has-video::after {
        font-size: 8px;
    }
    
    .post-thumbnail.has-multiple::after {
        font-size: 10px;
    }
}
@media (max-width: 768px) and (min-width: 481px) {
    .carousel-images img {
        max-height: 450px;
        min-height: 180px;
    }
    
    .business-carousel .carousel-images img:only-child {
        max-height: 550px;
    }
}
