/* Design Tokens - Color System */
:root {
    /* Primary Brand Colors (Romantic Rose/Red) */
    --primary-50: #FEF4F6;
    --primary-100: #FCE9EC;
    --primary-500: #F26C83;
    --primary-600: #E64562;
    --primary-700: #D92B4B;
    --primary-900: #8C1C30;
    
    /* Neutral Warm Grays with Pink tint */
    --neutral-50: #FFFBFB;
    --neutral-100: #F9F3F4;
    --neutral-200: #EAE3E4;
    --neutral-400: #C2B8BA;
    --neutral-700: #4D4647;
    --neutral-900: #211E1E;
    
    /* Semantic Colors */
    --semantic-success: #2D9147;
    --semantic-error: #D93025;

    /* Background System */
    --bg-page: var(--neutral-50);
    --bg-surface: #FFFFFF;
    --bg-elevated: #FFFFFF;
    
    /* Shadows */
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-modal: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-warm: 0 10px 15px rgba(91, 155, 213, 0.05), 0 4px 6px rgba(0, 0, 0, 0.08);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing */
    --spacing-1: 8px;
    --spacing-2: 16px;
    --spacing-3: 24px;
    --spacing-4: 32px;
    --spacing-6: 48px;
    --spacing-8: 64px;
    --spacing-12: 96px;
    --spacing-16: 128px;
    
    /* Animation */
    --duration-fast: 200ms;
    --duration-normal: 300ms;
    --duration-slow: 400ms;
    --ease-out: cubic-bezier(0.4, 0.0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0.0, 0.6, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--neutral-900);
    background-color: var(--bg-page);
    font-size: 16px;
    min-height: 100vh;
}

/* Responsive Typography */
.hero {
    font-size: 72px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.subtitle {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
}

.body-large {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.6;
}

.body {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.body-medium {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.small {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.caption {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

/* Mobile Typography */
@media (max-width: 768px) {
    .hero { font-size: 48px; }
    .title { font-size: 36px; }
    .subtitle { font-size: 28px; }
    .body-large { font-size: 18px; }
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

.container-medium {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.container-narrow {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.section {
    padding: var(--spacing-12) 0;
}

.section-tight {
    padding: var(--spacing-8) 0;
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-out);
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background-color: var(--primary-700);
    border-color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-600);
    border-color: var(--primary-600);
}

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

.btn-icon-only {
    flex-shrink: 0;
    width: 52px;
    height: 56px;
    padding: 0;
    border-radius: var(--radius-md);
    background-color: transparent;
    border: 1px solid var(--neutral-200);
    color: var(--neutral-700);
}
.btn-icon-only:hover {
    background-color: var(--neutral-100);
    border-color: var(--neutral-400);
    color: var(--neutral-900);
}
.btn-icon-only:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
}

.btn-text:hover {
    color: var(--primary-900);
    text-decoration: underline;
}

/* Mobile Button Adjustments */
@media (max-width: 768px) {
    .btn {
        height: 48px;
        font-size: 16px;
    }
}

/* Header/Navigation */
.header {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 1000;
    box-shadow: var(--shadow-card);
    height: 80px;
}

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

.logo {
    height: 40px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-600);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: var(--spacing-6);
    list-style: none;
}

.nav-links a {
    color: var(--neutral-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color var(--duration-fast) var(--ease-out);
}

.nav-links a:hover {
    color: var(--neutral-900);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

/* Mobile Navigation */
body.no-scroll {
    overflow: hidden;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 80vw;
    height: 100%;
    background-color: var(--bg-elevated);
    box-shadow: var(--shadow-modal);
    transform: translateX(100%);
    transition: transform var(--duration-normal) var(--ease-in-out);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-3);
}

.mobile-nav.is-open {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-4);
    height: 32px; /* Match mobile header height minus padding */
}

.mobile-nav .logo {
    font-size: 20px;
}

.mobile-nav-links {
    list-style: none;
    flex-grow: 1;
}

.mobile-nav-links li {
    margin-bottom: var(--spacing-2);
}

.mobile-nav-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-2);
    font-size: 18px;
    font-weight: 500;
    color: var(--neutral-900);
    text-decoration: none;
    border-radius: var(--radius-md);
}

.mobile-nav-links a:hover {
    background-color: var(--neutral-100);
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
    padding-top: var(--spacing-3);
    border-top: 1px solid var(--neutral-200);
}

.mobile-nav-badge {
    background-color: var(--primary-600);
    color: white;
    font-size: 12px;
    font-weight: 600;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-in-out), visibility 0s var(--duration-normal);
    z-index: 1199;
}

.mobile-nav-overlay.is-open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.mobile-only-block {
    display: none;
}
.mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--neutral-700);
    cursor: pointer;
    padding: var(--spacing-1);
    border-radius: var(--radius-full);
    transition: background-color var(--duration-fast);
}

.mobile-menu-toggle:hover {
    background-color: var(--neutral-100);
}

.mobile-menu-toggle svg {
    width: 32px;
    height: 32px;
    display: block;
}

@media (min-width: 1025px) {
    body.on-conversation-page .main-content {
        height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden; /* Prevents the main page from scrolling */
    }
    body.on-conversation-page .header {
        display: none;
    }
    body.on-conversation-page main,
    body.on-conversation-page .section,
    body.on-conversation-page .container-chat {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 0;
        max-width: none;
    }
    body.on-conversation-page .section-tight {
        padding: 0;
        flex-grow: 1;
        display: flex;
    }
    .main-layout-wrapper {
        display: flex;
    }
    .desktop-sidebar {
        width: 280px;
        flex-shrink: 0;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        background-color: var(--bg-surface);
        border-right: 1px solid var(--neutral-200);
        padding: var(--spacing-3);
        display: flex;
        flex-direction: column;
    }
    .main-content {
        flex-grow: 1;
        margin-left: 280px;
        width: calc(100% - 280px);
    }
    .header {
        background-color: transparent;
        box-shadow: none;
        border-bottom: none;
    }
    .logged-in .header .logo, .logged-in .nav-links, .logged-in .auth-buttons {
        display: none;
    }
    .bottom-nav {
        display: none;
    }
}

@media (max-width: 1024px) {
    body.on-conversation-page {
        height: 100svh; /* Use smallest viewport height to account for browser UI */
        overflow: hidden;
    }
    body.on-conversation-page .main-layout-wrapper,
    body.on-conversation-page .main-content {
        height: 100%;
    }
    body.on-conversation-page .main-content {
        display: flex;
        flex-direction: column;
    }
    body.on-conversation-page .header {
        flex-shrink: 0;
    }
    body.on-conversation-page main {
        height: calc(100svh - 64px); /* Full viewport minus header height */
        min-height: 0;
        padding-bottom: 0;
        display: flex;
        flex-direction: column;
    }
    body.on-conversation-page .bottom-nav {
        display: none;
    }
    .desktop-sidebar {
        display: none;
    }
    .container {
        padding: 0 32px;
    }
    .nav {
        gap: var(--spacing-2);
    }
    .nav .logo {
        margin-right: auto;
    }
    .nav-links {
        display: none;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only-block {
        display: block;
    }

    main {
        padding-bottom: 80px; /* Space for the bottom nav */
    }
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background-color: var(--bg-elevated);
        border-top: 1px solid var(--neutral-200);
        box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
        justify-content: space-around;
        z-index: 1000;
    }
    .bottom-nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex-grow: 1;
        text-decoration: none;
        color: var(--neutral-700);
        font-size: 12px;
        gap: 4px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }
    .header {
        height: 64px;
    }
    
    .logo {
        height: 32px;
        font-size: 20px;
    }
}

/* Hero Section */
.hero-section {
    min-height: 600px;
    background: linear-gradient(rgba(217, 43, 75, 0.3), rgba(140, 28, 48, 0.6)), url('../imgs/hero_couple_7.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-content {
    max-width: 720px;
    z-index: 2;
}

.hero h1 {
    margin-bottom: var(--spacing-3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    margin-bottom: var(--spacing-4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
}

.hero-cta {
    margin-top: var(--spacing-4);
}

.trust-indicator {
    margin-top: var(--spacing-2);
    opacity: 0.9;
}

/* How It Works */
.how-it-works {
    background-color: var(--bg-surface);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-8);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-3);
}

.step-card {
    background: var(--bg-elevated);
    padding: var(--spacing-6);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
}
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-card-hover);
}

.step-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--spacing-3);
    color: var(--primary-500);
}

.step-number {
    position: absolute;
    top: var(--spacing-2);
    right: var(--spacing-2);
    background: var(--primary-500);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.step-title {
    margin-bottom: var(--spacing-2);
    color: var(--neutral-900);
}

/* Mobile Steps Grid */
@media (max-width: 1024px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2);
    }
    
    .section {
        padding: var(--spacing-8) 0;
    }
}

/* Success Stories */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-4);
}

.story-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--duration-normal) var(--ease-out);
}

.story-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-card-hover);
}

.story-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.story-content {
    padding: var(--spacing-3);
}

.story-quote {
    font-style: italic;
    margin-bottom: var(--spacing-2);
    color: var(--neutral-700);
}

.story-names {
    font-weight: 600;
    color: var(--neutral-900);
}

/* Mobile Stories */
@media (max-width: 1024px) {
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Why Choose Us */
.why-choose {
    background-color: var(--neutral-100);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-3);
}

.feature-card {
    background: var(--bg-elevated);
    padding: var(--spacing-6);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: all var(--duration-normal) var(--ease-out);
}

.feature-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-card-hover);
}

.feature-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto var(--spacing-3);
    color: var(--primary-600);
}

.feature-title {
    margin-bottom: var(--spacing-2);
    color: var(--neutral-900);
}

.feature-description {
    color: var(--neutral-700);
}

/* Mobile Features */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Featured Members */
.members-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-3);
}

.member-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
    position: relative; /* Make link positioning work */
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.member-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.member-info {
    padding: var(--spacing-3);
}

.member-name {
    font-weight: 600;
    color: var(--neutral-900);
}

.member-name-container {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.member-location {
    font-size: 14px;
    color: var(--neutral-700);
}

.member-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sits on top of the content to make the whole card clickable */
}

/* Mobile Members */
@media (max-width: 1024px) {
    .members-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Blog Section */
.blog {
    background-color: var(--bg-surface);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-4);
}

.blog-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-card-hover);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: var(--spacing-3);
}

.blog-category {
    font-size: 12px;
    color: var(--primary-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-1);
}

.blog-title {
    margin-bottom: var(--spacing-2);
    color: var(--neutral-900);
}

.blog-excerpt {
    color: var(--neutral-700);
    margin-bottom: var(--spacing-2);
}

/* Mobile Blog */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Footer */
.footer {
    background-color: var(--neutral-900);
    color: var(--neutral-100);
    padding: var(--spacing-12) 0 var(--spacing-6);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: var(--spacing-6);
    margin-bottom: var(--spacing-8);
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-500);
    margin-bottom: var(--spacing-3);
    text-decoration: none;
}

.footer-tagline {
    margin-bottom: var(--spacing-4);
    color: var(--neutral-400);
}

.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-3);
    font-weight: 600;
}

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

.footer-section a {
    color: var(--neutral-400);
    text-decoration: none;
    display: block;
    margin-bottom: var(--spacing-1);
    transition: color var(--duration-fast) var(--ease-out);
}

.footer-section a:hover {
    color: var(--neutral-100);
}

.footer-bottom {
    border-top: 1px solid var(--neutral-700);
    padding-top: var(--spacing-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--neutral-400);
}

.social-links {
    display: flex;
    gap: var(--spacing-3);
}

.social-links a {
    color: var(--neutral-400);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background-color: var(--neutral-700); /* Darker than body for contrast */
    transition: all var(--duration-normal) var(--ease-out);
}

.social-links a:hover {
    background-color: var(--primary-600);
    color: white;
}

/* Mobile Footer */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr 1fr;
        gap: var(--spacing-4);
    }
}

@media (max-width: 768px) {
    .footer {
        padding: var(--spacing-8) 0 var(--spacing-4);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-4);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-3);
        text-align: center;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States for Accessibility */
.btn:focus,
a:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}
input:focus,
textarea:focus,
select:focus {
    outline: none; /* Keep outline off for form fields to use border instead */
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

/* Forms & Alerts */
.form-container {
    padding: var(--spacing-6);
    background-color: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

@media (max-width: 768px) {
    .form-container {
        padding: var(--spacing-4);
    }
}

.form-group {
    margin-bottom: var(--spacing-3);
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--spacing-1);
}

.form-control {
    display: block;
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    font-size: 16px;
    background-color: var(--bg-surface);
    font-family: inherit;
    color: var(--neutral-900);
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

textarea.form-control {
    height: auto;
    padding: 16px;
}

select.form-control {
    appearance: none;
    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='%234A4A48' 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 1rem center;
    background-size: 1.5em;
}

.btn-full {
    width: 100%;
}

.alert {
    padding: var(--spacing-2);
    margin-bottom: var(--spacing-3);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    text-align: center;
}
.alert-success {
    color: #267A3C;
    background-color: #EBF4FA;
    border-color: #D6E9F5;
}
.alert-error {
    color: #D93025;
    background-color: #FDF6F3;
    border-color: #FAE8E0;
}

.alert-notice {
    color: var(--primary-900);
    background-color: var(--primary-50);
    border-color: var(--primary-100);
}

.form-group-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: var(--spacing-2);
}
.form-group-checkbox input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.form-group-checkbox label {
    font-size: 14px;
    font-weight: 400;
    color: var(--neutral-700);
    margin-bottom: 0;
}
.form-group-checkbox label a {
    color: var(--primary-600);
    text-decoration: underline;
}

/* New Desktop Sidebar Styles */
.sidebar-header {
    margin-bottom: var(--spacing-4);
}
.sidebar-profile {
    margin-bottom: var(--spacing-3);
}
.sidebar-profile-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-1);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: background-color var(--duration-fast);
}
.sidebar-profile-link:hover {
    background-color: var(--neutral-100);
}
.sidebar-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}
.sidebar-profile-info {
    display: flex;
    flex-direction: column;
}
.sidebar-profile-name {
    font-weight: 600;
    font-size: 16px;
}
.sidebar-profile-action {
    font-size: 14px;
    color: var(--neutral-700);
}
.sidebar-nav {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar-nav hr {
    border: none;
    border-top: 1px solid var(--neutral-200);
    margin: var(--spacing-1) 0;
}
.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--neutral-700);
    font-weight: 500;
    position: relative;
}
.sidebar-nav-link:hover {
    background-color: var(--neutral-100);
    color: var(--neutral-900);
}
.sidebar-nav-link.active {
    background-color: var(--primary-50);
    color: var(--primary-700);
    font-weight: 600;
}
.sidebar-nav-link svg {
    width: 24px;
    height: 24px;
}
.sidebar-count-badge {
    position: absolute;
    right: 12px;
    background-color: var(--primary-600);
    color: white;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--primary-600); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--spacing-2); }
.mb-3 { margin-bottom: var(--spacing-3); }
.mb-4 { margin-bottom: var(--spacing-4); }
.mt-4 { margin-top: var(--spacing-4); }

.feature-box {
    background: var(--primary-50); 
    padding: var(--spacing-3); 
    border-radius: var(--radius-md);
}

.dashboard-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-2);
    margin-top: var(--spacing-4);
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .dashboard-actions {
        flex-direction: column;
    }
    .dashboard-actions .btn {
        width: 100%;
    }
}

.income-input-group {
    display: flex;
    gap: 16px;
}
.income-input-group input { flex: 2; }
.income-input-group select { flex: 1; }
@media (max-width: 480px) {
    .income-input-group { flex-direction: column; }
    .income-input-group input, .income-input-group select { flex: auto; }
}

/* Toast notification styles */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 100px);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-modal);
    color: white;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.4s var(--ease-in-out), opacity 0.4s var(--ease-in-out);
    max-width: 90%;
}
.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}
.toast-success {
    background-color: var(--primary-600);
}
.toast-error {
    background-color: var(--semantic-error);
}

/* Notification Bell Styles */
.notification-area {
    position: relative;
}
.notification-bell {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--neutral-700);
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
}
.notification-bell:hover {
    background-color: var(--neutral-100);
    color: var(--neutral-900);
}
.notification-count {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: var(--semantic-error);
    color: white;
    font-size: 11px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}
.notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-width: 90vw;
    background-color: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--duration-normal) var(--ease-out);
    z-index: 1100;
}
.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.notification-dropdown-header {
    padding: 12px var(--spacing-2);
    border-bottom: 1px solid var(--neutral-200);
}
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}
.notification-item {
    display: block;
    padding: var(--spacing-2);
    text-decoration: none;
    color: var(--neutral-900);
    border-bottom: 1px solid var(--neutral-100);
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item:hover {
    background-color: var(--neutral-100);
}
.notification-item.unread {
    background-color: var(--primary-50);
}
.notification-item p {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}
.notification-item small {
    color: var(--neutral-400);
}
.no-notifications {
    padding: var(--spacing-4);
    text-align: center;
    color: var(--neutral-400);
}

/* Verified Badge */
.verified-badge, .vip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-weight: 600;
    flex-shrink: 0;
}

.verified-badge {
    width: 20px;
    height: 20px;
    color: var(--primary-500);
}

.vip-badge {
    gap: 4px;
    font-size: 12px;
    padding: 2px 8px;
    background: linear-gradient(45deg, #d4af37, #ffd700);
    color: #4a2c00;
    border: 1px solid #c8a42e;
}

.vip-badge .level {
    font-style: italic;
}

/* For larger badges in profile header */
.profile-header-info .verified-badge,
.profile-header-info .vip-badge {
    width: auto;
    height: auto;
    padding: 4px 10px;
}
.profile-header-info .verified-badge {
    color: white;
    background-color: var(--primary-500);
}
.profile-header-info .verified-badge svg {
    width: 16px;
    height: 16px;
}

.message-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 1;
}
.message.sent .message-actions {
    left: 4px;
    right: auto;
}
.btn-delete-msg {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.5;
    transition: opacity var(--duration-fast);
}
.message:hover .btn-delete-msg {
    opacity: 1;
}
.btn-delete-msg svg {
    width: 16px;
    height: 16px;
    color: var(--neutral-400);
}
.message.sent .btn-delete-msg svg {
    color: rgba(255,255,255,0.7);
}

/* Profile Menu Dropdown (Desktop) */
.profile-menu-area {
    position: relative;
}
.profile-menu-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--neutral-700);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
}
.profile-menu-button:hover {
    background-color: var(--neutral-100);
    color: var(--neutral-900);
}
.profile-menu-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 240px;
    background-color: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--duration-normal) var(--ease-out);
    z-index: 1100;
    padding: var(--spacing-1) 0;
}
.profile-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.profile-menu-link {
    display: block;
    padding: 10px var(--spacing-2);
    text-decoration: none;
    color: var(--neutral-900);
    font-size: 14px;
    font-weight: 500;
}
.profile-menu-link:hover {
    background-color: var(--neutral-100);
}
.profile-menu-dropdown hr {
    border: none;
    border-top: 1px solid var(--neutral-100);
    margin: var(--spacing-1) 0;
}

/* Bottom Navigation (Mobile) */
.bottom-nav-link svg {
    width: 24px;
    height: 24px;
}
.bottom-nav-link {
    position: relative;
}
.bottom-nav-link.active {
    color: var(--primary-600);
}
.bottom-nav-link:focus {
    outline: none;
}

/* Profile Options Menu */
.profile-options {
    position: relative;
}
.profile-options-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--neutral-700);
    display: flex; /* Aligns icon inside */
    align-items: center;
    justify-content: center;
}
.profile-options-btn:hover {
    background-color: var(--neutral-100);
}
.profile-options-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background-color: var(--bg-elevated);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-modal);
    min-width: 200px;
    z-index: 100;
    padding: var(--spacing-1) 0;
    overflow: hidden;
}
.profile-options-menu.show {
    display: block;
}
.profile-options-menu button,
.profile-options-menu a {
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
    width: 100%;
    text-align: left;
    padding: 10px var(--spacing-2);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--neutral-900);
    text-decoration: none;
    font-family: inherit;
    font-weight: 500;
}
.profile-options-menu button:hover,
.profile-options-menu a:hover {
    background-color: var(--neutral-100);
}
.profile-options-menu .text-danger {
    color: var(--semantic-error);
}
.blocked-overlay {
    text-align: center;
    padding: var(--spacing-8);
    background-color: var(--neutral-100);
    border-radius: var(--radius-lg);
}
.blocked-overlay .subtitle {
    font-size: 24px;
}

@media (max-width: 768px) {
}
/* --- Logo Image Sizing --- */
.logo img {
    height: 30px; /* يمكنك تعديل هذا الرقم ليناسبك */
    width: auto;  /* هذا يحافظ على أبعاد الشعار صحيحة */
    display: block; /* هذا يزيل أي مسافات بيضاء إضافية */
}

/* تعديل حجم الشعار في القائمة الجانبية لسطح المكتب */
.sidebar-header .logo img {
    height: 40px; /* نجعله أكبر قليلاً هنا */
}

/* تعديل حجم الشعار في قائمة الهاتف المنسدلة */
.mobile-nav .logo img {
    height: 32px; /* نجعله أصغر قليلاً هنا */
}

/* --- Support Ticket Styles --- */
.back-link {
    display: inline-block;
    margin-bottom: var(--spacing-2);
    color: var(--neutral-700);
    text-decoration: none;
    font-weight: 500;
}
.back-link:hover {
    text-decoration: underline;
}
.title-small {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
}
.ticket-conversation {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
    padding: var(--spacing-3);
    background-color: var(--neutral-100);
    border-radius: var(--radius-lg);
}
.message-bubble {
    padding: var(--spacing-2);
    border-radius: var(--radius-md);
    max-width: 80%;
}
.message-sender {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}
.message-time {
    font-size: 12px;
    color: var(--neutral-400);
}
.user-message .message-time {
    color: var(--primary-100);
}
.message-content p {
    margin: 0;
    word-wrap: break-word;
}
.user-message {
    background-color: var(--primary-600);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.admin-message {
    background-color: var(--bg-surface);
    color: var(--neutral-900);
    border: 1px solid var(--neutral-200);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.view-attachment-link {
    color: var(--primary-100);
    font-weight: 500;
    text-decoration: underline;
}
.admin-message .view-attachment-link {
    color: var(--primary-600);
}
.mt-6 { margin-top: 3rem; }
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.card-header {
    padding: var(--spacing-2) var(--spacing-3);
    border-bottom: 1px solid var(--neutral-200);
}
.card-body {
    padding: var(--spacing-3);
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th, .table td {
    padding: var(--spacing-2);
    text-align: left;
    border-bottom: 1px solid var(--neutral-200);
}
.table thead th {
    font-weight: 600;
    color: var(--neutral-700);
}
.status-badge {
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--radius-full);
    color: #fff;
}
.status-open { background-color: #0d6efd; }
.status-answered { background-color: var(--semantic-success); }
.status-closed { background-color: var(--neutral-700); }
.badge-new {
    background-color: var(--primary-600);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    vertical-align: middle;
}
.btn-sm { height: auto; padding: 6px 12px; font-size: 14px; }
.table-responsive {
    overflow-x: auto;
}

/* --- Choices.js Custom Styles --- */
.choices { 
    margin-bottom: 0; 
}
.choices__inner { 
    background-color: var(--bg-surface); 
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    min-height: 56px;
    font-size: 16px;
    width: 100%;
    display: flex;
    align-items: center;
    line-height: 1.5;
}
.choices[data-type*="select-one"] .choices__inner {
    padding-bottom: 8px;
}
.choices.is-focused .choices__inner {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}
.choices[data-type*="select-multiple"] .choices__inner { 
    padding-bottom: 4px; 
}
.choices__list--dropdown {
    border-radius: var(--radius-md); 
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-card);
    margin-top: 4px;
    z-index: 10;
}
.choices__list--dropdown .choices__item--selectable.is-highlighted { 
    background-color: var(--primary-100); 
    color: var(--neutral-900); 
}
.choices__input { 
    font-size: 16px; 
    margin-bottom: 4px; 
    background-color: var(--bg-surface);
    color: var(--neutral-900);
}
.choices .choices__list--multiple .choices__item {
    background-color: var(--primary-500);
    border: 1px solid var(--primary-600);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: white;
}
.choices__button {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='18px' height='18px'%3e%3cpath d='M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7A.996.996 0 1 0 5.7 7.11L10.59 12 5.7 16.89a.996.996 0 1 0 1.41 1.41L12 13.41l4.89 4.89a.996.996 0 1 0 1.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z'/%3e%3c/svg%3e");
    margin-left: 8px;
    opacity: 0.7;
    border: none;
    height: 18px;
    width: 18px;
    border-radius: var(--radius-full);
}
.choices__button:hover { 
    opacity: 1; 
    background-color: var(--primary-700);
}
.choices[data-type*="select-one"]::after {
    content: '';
    height: 0;
    width: 0;
    border-style: solid;
    border-width: 5px 5px 0 5px;
    border-color: var(--neutral-700) transparent transparent transparent;
    position: absolute;
    right: 17.5px;
    top: 50%;
    margin-top: -2.5px;
    pointer-events: none;
    transition: transform var(--duration-fast) ease-in-out;
}
.choices[data-type*="select-one"].is-open::after {
    margin-top: -2.5px;
    transform: rotate(180deg);
}
.choices__list--single .choices__item {
    color: var(--neutral-900);
}
/* Placeholder color */
.choices__placeholder {
    color: var(--neutral-400);
}

/* --- Discover Filter Panel --- */
.filter-panel {
    display: none; /* Hidden by default */
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 420px;
    max-width: 100%;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    z-index: 100;
}
.filter-form {
    display: flex;
    flex-direction: column;
    max-height: 55vh; /* Limit the total height */
}
.filter-panel-body {
    padding: var(--spacing-3);
    overflow-y: auto;
    flex-grow: 1;
}
.filter-panel .form-group label {
    margin-bottom: 0; /* Override default margin inside filter sidebar */
}
.filter-panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-2) var(--spacing-3);
    border-top: 1px solid var(--neutral-200);
    background-color: var(--bg-elevated);
    flex-shrink: 0;
}

/* --- Discover Page Controls --- */
#filter-toggle-btn {
    background-color: var(--bg-surface);
    border: 1px solid var(--neutral-200);
    color: var(--neutral-700);
    height: 56px;
    gap: 8px;
    flex-shrink: 0;
}
#filter-toggle-btn:hover {
    background-color: var(--neutral-100);
}
#filter-toggle-btn.filters-active {
    background-color: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-500);
    font-weight: 600;
}
.filter-count-badge {
    background-color: var(--primary-500);
    color: white;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* --- Locked / VIP Filter Styles --- */
input:disabled,
select:disabled,
textarea:disabled,
.choices.is-disabled .choices__inner {
    background-color: var(--neutral-100);
    cursor: not-allowed;
    opacity: 0.7;
}

.choices.is-disabled .choices__inner * {
    cursor: not-allowed;
}

.form-label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-1);
}
.filter-sidebar-body .form-group label {
    margin-bottom: 0; /* Override default margin inside filter sidebar */
}

.vip-lock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}
.vip-lock svg {
    width: 14px;
    height: 14px;
    color: var(--neutral-400);
}
.vip-lock a {
    color: var(--primary-600);
    text-decoration: underline;
    font-weight: 500;
}
.vip-lock a:hover {
    color: var(--primary-700);
}

/* --- Subscription Page Styles --- */
.current-plan-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    background-color: var(--primary-50);
    color: var(--primary-700);
    font-weight: 600;
    border: 1px solid var(--primary-100);
}
.current-plan-indicator svg {
    width: 20px;
    height: 20px;
}
.cancel-form {
    margin-top: 12px;
    text-align: center;
}
.btn-text-danger {
    background: none;
    border: none;
    color: var(--neutral-400);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    transition: color var(--duration-fast);
}
.btn-text-danger:hover {
    color: var(--semantic-error);
}
