/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --primary: #0ea5e9;
    --secondary: #6366f1;
    --accent: #f43f5e;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --card-bg: rgba(255, 255, 255, 0.6);
}

.admin-status-bar {
    background: #ef4444;
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.user-status-bar {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pulse-icon {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
    padding: 0;
}

/* Navbar */
.navbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

@media (min-width: 1024px) {
    .navbar {
        padding: 1rem 2%;
    }
}

@media (min-width: 1400px) {
    .navbar {
        padding: 1rem 1.5%;
    }
}

.logo {
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-main a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0;
}
.nav-main a:hover {
    color: var(--primary);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nav-auth a:hover,
.nav-profile-link:hover {
    color: var(--primary);
}

.nav-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.4rem 0.5rem;
}

.nav-logout-form {
    display: inline;
}

.nav-btn {
    min-height: 44px;
    padding: 0.5rem 1rem !important;
}

/* Nav menu wrapper (desktop: inline; mobile: dropdown) */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}
.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-color);
    border-radius: 1px;
    transition: transform 0.25s, opacity 0.25s;
}
.navbar.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.navbar.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.navbar.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile: compact navbar + hamburger dropdown */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 0.5rem 1rem;
        align-items: center;
    }

    .logo {
        font-size: 1.15rem;
        padding: 0.4rem 0;
    }

    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    .nav-menu {
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        max-height: 0;
        overflow: hidden;
        padding: 0 0;
        gap: 0;
        background: var(--glass-bg);
        border-top: 1px solid var(--glass-border);
        transition: max-height 0.3s ease-out;
    }

    .navbar.nav-open .nav-menu {
        max-height: 80vh;
        overflow-y: auto;
        padding: 0.75rem 0;
    }

    .nav-main {
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--glass-border);
        gap: 0;
    }

    .nav-main a {
        padding: 0.75rem 1rem;
        min-height: 44px;
        font-weight: 500;
    }

    .nav-auth {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 0.75rem;
        gap: 0.5rem;
    }

    .nav-auth .lang-toggle {
        margin-left: 0;
        align-self: flex-start;
        margin-top: 0.25rem;
    }

    .nav-profile-link {
        justify-content: flex-start;
    }

    .nav-logout-form {
        width: 100%;
    }
    .nav-logout-form .btn {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }
    .nav-auth .btn.nav-btn {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Container – smaller side padding on large screens for bigger images */
.container {
    padding: 2rem 5%;
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .container {
        padding: 2rem 2%;
    }
}

@media (min-width: 1400px) {
    .container {
        padding: 2rem 1.5%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1.25rem 1rem;
    }
}

/* Listing create/edit page – less top/side padding, form uses full width */
.container:has(.listing-form-page) {
    max-width: none;
    padding: 1rem 0.75rem;
}
@media (min-width: 768px) {
    .container:has(.listing-form-page) {
        padding: 1.25rem 0.5rem;
    }
}
@media (min-width: 1024px) {
    .container:has(.listing-form-page) {
        padding: 1rem 0.5rem;
    }
}
@media (min-width: 1400px) {
    .container:has(.listing-form-page) {
        padding: 1rem 0.4rem;
    }
}

/* Listing detail page – 10% side padding on big screens for consistent width */
.container:has(.listing-detail-layout) {
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 768px) {
    .container:has(.listing-detail-layout) {
        padding-left: 10%;
        padding-right: 10%;
    }
}

/* Wanted list/detail – prevent cards shrinking when content is short */
.container:has(.wanted-page) .wanted-page,
.container:has(.wanted-detail-page) .wanted-detail-page {
    width: 100%;
    min-width: 0;
}
.container:has(.wanted-page) .wanted-list {
    width: 100%;
    min-width: 0;
}
.container:has(.wanted-page) .wanted-card,
.container:has(.wanted-detail-page) .wanted-detail-card {
    width: 100%;
    min-width: 0;
}

/* Listing grid: more columns on large screens, single column on mobile */
.listing-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

@media (min-width: 1024px) {
    .listing-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Saved listings page – use full width and same grid as listing list */
.saved-listings-page .saved-listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.saved-listings-page .saved-listings-header h2 {
    margin: 0;
}

@media (max-width: 768px) {
    .listing-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.listing-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s;
    position: relative;
}

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

@media (max-width: 768px) {
    .listing-card {
        border-radius: 12px;
    }
    .listing-card .listing-card-image {
        height: 180px !important;
    }
    .listing-card .listing-card-body {
        padding: 1rem !important;
    }
    .listing-card .listing-card-title {
        font-size: 1.1rem !important;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Listing list page: header, filters, map */
.listing-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.listing-page-header h2 {
    margin: 0;
}

.listing-page-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.listing-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.listing-filters-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: end;
}

.listing-filters-form > div {
    flex: 1;
    min-width: 120px;
}

.listing-map {
    height: 400px;
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 12px;
    z-index: 1;
}

@media (max-width: 768px) {
    .listing-page-header {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 1.5rem;
    }

    .listing-page-actions {
        justify-content: stretch;
    }

    .listing-page-actions .btn {
        flex: 1;
    }

    .listing-filters {
        padding: 1rem;
        margin-bottom: 1.5rem;
        border-radius: 10px;
    }

    .listing-filters-form > div {
        min-width: 0;
        flex: 1 1 45%;
    }

    .listing-filters-form .btn,
    .listing-filters-form a.btn {
        flex: 1 1 100%;
    }

    .listing-map {
        height: 250px;
        margin-bottom: 1.5rem;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .listing-filters-form > div {
        flex: 1 1 100%;
    }
}

/* Listing pagination (always visible when page_obj exists) */
.listing-pagination {
    margin-top: 3rem;
}

.listing-pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.listing-pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

.listing-pagination-current {
    background: var(--primary);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
}

.listing-pagination-num {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.listing-pagination-num:hover {
    background: var(--primary);
    color: white;
}

.listing-pagination-info {
    text-align: center;
    color: #64748b;
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .listing-pagination {
        margin-top: 2rem;
    }
}

/* Subscribe page: on mobile, plan and form just under description */
@media (max-width: 768px) {
    .subscribe-page .subscribe-description {
        margin-bottom: 1rem !important;
    }
    .subscribe-page .subscribe-plan {
        margin-top: 0;
    }
}

/* Listing detail: consistent layout across all listings */
.listing-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.listing-detail-main {
    min-width: 0; /* prevent grid blowout */
}

/* Image/placeholder block: fixed height so layout doesn't jump */
/* Listing detail: gallery and image – one fixed box, image always contained */
.listing-detail-gallery-wrap {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    max-width: 100%;
}

.listing-detail-main-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
    cursor: pointer;
    touch-action: pan-y; /* allow vertical scroll, we handle horizontal swipe in JS */
}

.listing-detail-main-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Dots hidden on desktop (thumbs shown instead) */
.listing-detail-gallery-dots {
    display: none;
}

/* Mobile: no overflow, comfortable height, swipe + dots */
@media (max-width: 768px) {
    .listing-detail-gallery-wrap {
        margin-left: 0;
        margin-right: 0;
        border-radius: 12px;
    }
    .listing-detail-main-image {
        height: 280px;
        max-height: 50vh;
        -webkit-user-select: none;
        user-select: none;
    }
    .listing-detail-main-image img {
        pointer-events: none;
    }
    .listing-detail-gallery-dots {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    .listing-detail-gallery-dots span {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #cbd5e1;
        transition: background 0.2s;
    }
    .listing-detail-gallery-dots span.active {
        background: var(--primary);
    }
    .listing-detail-thumbs {
        display: none;
    }
}

.listing-detail-no-image {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    font-size: 1rem;
}

.listing-detail-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    flex-wrap: wrap;
}

.listing-detail-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    flex-shrink: 0;
    display: block;
}

.listing-detail-thumbs img:hover {
    border-color: var(--primary);
}

/* Consistent section spacing in main column */
.listing-detail-main .listing-detail-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.listing-detail-main .listing-detail-location {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.listing-detail-main .listing-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.listing-detail-main .listing-detail-section {
    margin-top: 2rem;
}

.listing-detail-main .listing-detail-section:first-of-type {
    margin-top: 0;
}

.listing-detail-main .listing-detail-section h3 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.listing-detail-sidebar .form-container {
    position: sticky;
    top: 1.5rem;
}

@media (max-width: 768px) {
    .listing-detail-layout {
        grid-template-columns: 1fr;
    }
    .listing-detail-sidebar {
        order: 2;
    }
    .listing-detail-main {
        order: 1;
    }
    .listing-detail-sidebar .form-container {
        position: static;
    }
    .listing-detail-main-image,
    .listing-detail-no-image {
        height: 320px;
    }
}

/* Unlock Contact CTA: smaller text on anything but large screens */
.detail-unlock-cta {
    font-size: 1rem;
}
.detail-unlock-title {
    font-size: 1rem !important;
}
.detail-unlock-desc {
    font-size: 0.85rem !important;
}
.detail-unlock-btn {
    font-size: 0.9rem !important;
    padding: 0.5rem 0.75rem !important;
}
.detail-unlock-note {
    font-size: 0.8rem !important;
}

@media (min-width: 1024px) {
    .detail-unlock-cta {
        font-size: inherit;
    }
    .detail-unlock-title {
        font-size: 1.1rem !important;
    }
    .detail-unlock-desc {
        font-size: inherit !important;
    }
    .detail-unlock-btn {
        font-size: inherit !important;
        padding: 0.6rem 1.2rem !important;
    }
    .detail-unlock-note {
        font-size: 0.85rem !important;
    }
}

/* Profile page – Bootstrap-style wide cards */
.profile-page {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    box-sizing: border-box;
}

/* Profile & Contact card: avatar + agency + edit + contact */
.profile-identity-card {
    display: flex;
    flex-direction: column;
}

.profile-identity-top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    flex-shrink: 0;
}

.profile-avatar img,
.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 2px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profile-avatar-placeholder {
    background: linear-gradient(145deg, #e2e8f0 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.profile-identity-info {
    flex: 1;
    min-width: 0;
}

.profile-agency-name {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.profile-agency-meta {
    margin: 0 0 0.5rem;
}

.profile-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.profile-badge-verified {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.profile-badge-pending {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.profile-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.profile-edit-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Row of cards: actions + contact (Bootstrap card-deck style) */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1.75rem;
    margin-bottom: 1.75rem;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* Bootstrap-style cards */
.profile-card {
    padding: 1.75rem 2rem;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
}

.profile-card-heading,
.profile-card-title {
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
    letter-spacing: -0.01em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.profile-actions-card {
    min-height: 0;
}

/* Quick actions – 2 columns on wide screens */
.profile-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 576px) {
    .profile-actions-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.profile-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.375rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.profile-action-card:hover {
    border-color: rgba(14, 165, 233, 0.35);
    color: var(--primary);
    background: rgba(14, 165, 233, 0.05);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.1);
    transform: translateY(-1px);
}

.profile-action-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.profile-action-svg {
    width: 22px;
    height: 22px;
}

/* Colorful icons per action */
.profile-action--listings .profile-action-icon-wrap { background: rgba(14, 165, 233, 0.15); }
.profile-action--listings .profile-action-svg { color: #0ea5e9; }
.profile-action--listings:hover .profile-action-icon-wrap { background: rgba(14, 165, 233, 0.25); }

.profile-action--saved .profile-action-icon-wrap { background: rgba(245, 158, 11, 0.18); }
.profile-action--saved .profile-action-svg { color: #d97706; }
.profile-action--saved:hover .profile-action-icon-wrap { background: rgba(245, 158, 11, 0.28); }

.profile-action--messages .profile-action-icon-wrap { background: rgba(34, 197, 94, 0.15); }
.profile-action--messages .profile-action-svg { color: #16a34a; }
.profile-action--messages:hover .profile-action-icon-wrap { background: rgba(34, 197, 94, 0.25); }

.profile-action--wanted .profile-action-icon-wrap { background: rgba(139, 92, 246, 0.15); }
.profile-action--wanted .profile-action-svg { color: #7c3aed; }
.profile-action--wanted:hover .profile-action-icon-wrap { background: rgba(139, 92, 246, 0.25); }

.profile-action--password .profile-action-icon-wrap { background: rgba(100, 116, 139, 0.15); }
.profile-action--password .profile-action-svg { color: #475569; }
.profile-action--password:hover .profile-action-icon-wrap { background: rgba(100, 116, 139, 0.25); }

.profile-action-label {
    flex: 1;
    min-width: 0;
}

.profile-action-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.4rem;
    margin-left: 0.35rem;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    vertical-align: middle;
}

/* Contact card */
.profile-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.profile-contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-contact-item:first-child {
    padding-top: 0;
}

.profile-contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.profile-contact-icon svg {
    width: 22px;
    height: 22px;
}

.profile-contact-icon--email {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

.profile-contact-icon--phone {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.profile-contact-block {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.profile-contact-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-contact-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    word-break: break-all;
}

/* Posts card – full width */
.profile-posts-card {
    margin-bottom: 1.75rem;
    padding: 1.75rem 2rem;
}

/* Subscription card – full width */
.profile-subscription {
    margin-bottom: 0;
}

.profile-subscription .profile-card-heading {
    margin-bottom: 1rem;
}

.profile-sub-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    border-radius: 0.5rem;
    border: 1px solid;
    transition: box-shadow 0.2s ease;
}

.profile-sub-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.profile-sub-active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.04) 100%);
    border-color: rgba(34, 197, 94, 0.35);
}

.profile-sub-inactive {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.03) 100%);
    border-color: rgba(251, 191, 36, 0.4);
}

.profile-sub-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
}

.profile-sub-active .profile-sub-icon-wrap {
    background: rgba(34, 197, 94, 0.2);
    color: #15803d;
}

.profile-sub-icon-wrap svg {
    width: 26px;
    height: 26px;
}

.profile-sub-inactive .profile-sub-icon-wrap.profile-sub-icon-lock {
    background: rgba(251, 191, 36, 0.2);
    color: #b45309;
}

.profile-sub-text {
    flex: 1;
    min-width: 0;
}

.profile-sub-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.profile-sub-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-color);
}

.profile-sub-desc {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
}

.profile-sub-btn {
    flex-shrink: 0;
    border-radius: 10px;
}

@media (min-width: 768px) {
    .profile-page {
        padding: 2.5rem 2rem 3rem;
    }
    .profile-avatar img,
    .profile-avatar-placeholder {
        width: 96px;
        height: 96px;
    }
    .profile-agency-name {
        font-size: 1.5rem;
    }
    .profile-card {
        padding: 1.75rem 2rem;
    }
}

@media (min-width: 1200px) {
    .profile-page {
        max-width: 1140px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Listing create/edit form – wider on large screens, smaller side padding */
.form-container.listing-form-page {
    width: 100%;
    max-width: 1200px;
    margin-top: 0;
    margin-bottom: 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.listing-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.listing-form-field-full {
    grid-column: 1 / -1;
}

.listing-form-page #map-picker {
    height: 300px;
}

@media (min-width: 768px) {
    .form-container.listing-form-page {
        max-width: 1200px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 1024px) {
    .form-container.listing-form-page {
        max-width: 95vw;
        padding: 2rem 0.6rem;
    }
    .listing-form-title {
        margin-bottom: 1.5rem;
        font-size: 1.5rem;
    }
    .listing-form-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1.75rem;
    }
    .listing-form-field-full {
        grid-column: 1 / -1;
    }
    .listing-form-page #map-picker {
        height: 400px;
    }
}

@media (min-width: 1200px) {
    .form-container.listing-form-page {
        max-width: min(98vw, 2200px);
        padding: 2rem 0.75rem;
    }
    .listing-form-grid {
        gap: 2rem;
    }
    .listing-form-page #map-picker {
        height: 450px;
    }
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 4rem auto;
    padding: 2.5rem;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .form-container {
        margin: 2rem auto;
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }
}

/* Login / Register – wider on desktop */
@media (min-width: 768px) {
    .form-container:not(.listing-form-page) {
        max-width: 540px;
        padding: 2.5rem 2.25rem;
    }
}
@media (min-width: 1024px) {
    .form-container:not(.listing-form-page) {
        max-width: 620px;
        padding: 2.5rem 3rem;
    }
}
@media (min-width: 1200px) {
    .form-container:not(.listing-form-page) {
        max-width: 720px;
        padding: 3rem;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #94a3b8;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

@media (max-width: 768px) {
    input, select, textarea, .btn {
        min-height: 44px;
        font-size: 16px; /* avoids zoom on focus on iOS */
    }
}

.helptext {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
    display: block;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #475569;
    border-top: 1px solid var(--glass-border);
}

footer .play-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

footer .play-store-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    color: #fff;
}

footer .play-store-icon {
    width: 1.5rem;
    height: 1.5rem;
}

@media (max-width: 768px) {
    footer {
        padding: 1.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    margin-left: 0.5rem;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: #94a3b8;
    font-family: inherit;
    transition: all 0.2s;
}

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

.lang-btn:hover:not(.lang-active) {
    color: var(--text-color);
    background: rgba(0, 0, 0, 0.03);
}