/* style.css - HelloCallGirl Premium Design System */

:root {
    /* Color Palette - Vibrant Dark Mode */
    --clr-bg: #0B0E14;
    --clr-surface: #151A23;
    --clr-surface-light: #1F2633;
    
    --clr-primary: #7C3AED;      /* Violet */
    --clr-primary-glow: rgba(124, 58, 237, 0.4);
    
    --clr-accent: #06B6D4;       /* Cyan */
    --clr-accent-glow: rgba(6, 182, 212, 0.4);
    
    --clr-text: #F8FAFC;
    --clr-text-muted: #94A3B8;
    
    --clr-danger: #EF4444;
    --clr-success: #10B981;
    --clr-warning: #F59E0B;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Effects */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;
    
    --shadow-glow: 0 0 20px var(--clr-primary-glow);
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--clr-accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--clr-primary);
    text-shadow: 0 0 10px var(--clr-primary-glow);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.highlight {
    color: var(--clr-primary);
}

/* Typography Classes */
.text-center { text-align: center; }
.text-muted { color: var(--clr-text-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* Navigation */
.navbar {
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: var(--transition);
}

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

.brand-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--clr-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo i {
    color: var(--clr-accent);
    filter: drop-shadow(0 0 8px var(--clr-accent-glow));
}

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

.nav-link {
    font-weight: 500;
    color: var(--clr-text-muted);
}

.nav-link:hover {
    color: var(--clr-text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--clr-primary-glow), 0 0 10px var(--clr-accent-glow);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--clr-primary);
    color: var(--clr-text);
}

.btn-outline:hover {
    background: var(--clr-primary);
    box-shadow: var(--shadow-glow);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--clr-text-muted);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--clr-text);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
    background-color: rgba(255, 255, 255, 0.06);
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%2394A3B8' 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: 1rem;
    padding-right: 2.5rem;
}

select.form-control option {
    background-color: var(--clr-surface-light);
    color: var(--clr-text);
}

/* Auth Cards */
.auth-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.auth-card {
    background: var(--clr-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--clr-primary), var(--clr-accent), transparent);
    animation: authShimmer 3s linear infinite;
}

@keyframes authShimmer {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Invisible bridge prevents mouse hover from dropping in the gap */
.dropdown::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1rem;
    bottom: -1rem;
    left: 0;
    background: transparent;
}

.dropdown-btn {
    background: transparent;
    border: none;
    color: var(--clr-text);
    font-family: var(--font-heading);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--clr-surface-light);
    min-width: 200px;
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
    overflow: hidden;
    margin-top: 0.5rem;
}

.dropdown-content.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-content a {
    color: var(--clr-text);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--clr-primary);
}

/* Toasts */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    background: var(--clr-surface-light);
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-card);
    z-index: 1000;
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
}

.toast-success {
    border-color: var(--clr-success);
}
.toast-success i { color: var(--clr-success); }

.toast-error {
    border-color: var(--clr-danger);
}
.toast-error i { color: var(--clr-danger); }

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

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

/* Hero Section */
.hero {
    position: relative;
    padding: 6rem 0;
    text-align: center;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--clr-primary-glow) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, var(--clr-text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--clr-text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Footer */
.footer {
    background: var(--clr-surface);
    padding: 3rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

.footer-links a {
    color: var(--clr-text-muted);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--clr-text-muted);
    font-size: 0.875rem;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--clr-text);
    font-size: 1.5rem;
}

/* Cards (Ads) */
.ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.ad-card {
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ad-card:hover {
    transform: translateY(-5px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: var(--shadow-glow);
}

.ad-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ad-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ad-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clr-accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ad-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--clr-text);
}

.ad-location {
    font-size: 0.875rem;
    color: var(--clr-text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ad-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    font-size: 0.875rem;
    color: var(--clr-text-muted);
}

/* =====================================
   RESPONSIVE — MOBILE FIRST
   ===================================== */

/* Medium/Tablet: ≤ 1024px */
@media (max-width: 1024px) {
    .ad-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: ≤ 768px */
@media (max-width: 768px) {

    /* ----- NAV ----- */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--clr-surface);
        padding: 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        z-index: 1000;
        gap: 1rem;
        box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links .btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-toggle {
        display: block;
    }

    .mobile-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* ----- SEARCH (hidden until toggled) ----- */
    .search-bar {
        display: none !important;
    }
    .search-bar.active {
        display: flex !important;
        flex-direction: column !important;
    }
    .search-sidebar {
        display: none !important;
    }
    .search-sidebar.active {
        display: block !important;
    }

    /* ----- HERO ----- */
    .hero {
        padding: 3rem 0;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* ----- AD GRID (homepage) → 1 col stacked list ----- */
    .ad-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ad-card {
        flex-direction: row;
        min-height: 110px;
        border-radius: var(--radius-md);
    }

    .ad-image {
        width: 110px;
        min-width: 110px;
        height: 100%;
        border-bottom: none;
        border-right: 1px solid rgba(255,255,255,0.05);
        border-radius: var(--radius-md) 0 0 var(--radius-md);
    }

    .ad-content {
        padding: 0.75rem 1rem;
    }

    .ad-title {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .ad-location {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .ad-meta {
        font-size: 0.7rem;
        padding-top: 0.5rem;
    }

    /* ----- SEARCH LIST CARDS ----- */
    .ad-list {
        gap: 0.875rem;
    }

    .ad-list-card {
        flex-direction: row;
        min-height: 100px;
        border-radius: var(--radius-md);
    }

    .ad-list-image-wrapper {
        width: 110px;
        min-width: 110px;
        height: auto;
    }

    .ad-list-image {
        height: 100%;
        border-radius: var(--radius-md) 0 0 var(--radius-md);
    }

    .ad-list-content {
        padding: 0.75rem 0.875rem;
    }

    .ad-list-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }

    .ad-list-footer {
        flex-direction: row;
        gap: 0.5rem;
        padding-top: 0.5rem;
        flex-wrap: wrap;
    }

    .ad-list-footer .ad-meta {
        font-size: 0.7rem;
        gap: 0.5rem;
    }

    .ad-list-footer .ad-location {
        font-size: 0.75rem;
        margin-bottom: 0;
    }

    /* ----- SEARCH RESULTS PAGE LAYOUT ----- */
    .search-page-container {
        grid-template-columns: 1fr !important;
        padding: 1rem !important;
    }

    /* ----- AUTH CARDS ----- */
    .auth-card {
        padding: 1.5rem;
    }

    /* ----- FOOTER ----- */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
    }

    /* ----- SECTIONS ----- */
    .section {
        padding: 2rem 0;
    }

    /* ----- CONTENT SECTION ----- */
    .content-section {
        padding: 2rem 0 !important;
    }
}

/* LIGHT THEME OVERRIDES */
html[data-theme="light"] {
    --clr-bg: #F8FAFC;
    --clr-surface: #FFFFFF;
    --clr-surface-light: #F1F5F9;
    --clr-text: #0F172A;
    --clr-text-muted: #64748B;
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .form-control {
    background-color: #FFFFFF;
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .form-control:focus {
    background-color: #F8FAFC;
    border-color: var(--clr-primary);
}

html[data-theme="light"] .auth-card,
html[data-theme="light"] .search-bar,
html[data-theme="light"] .search-sidebar,
html[data-theme="light"] hr,
html[data-theme="light"] .ad-card,
html[data-theme="light"] .ad-meta,
html[data-theme="light"] .ad-image,
html[data-theme="light"] .footer,
html[data-theme="light"] .footer-bottom,
html[data-theme="light"] .dropdown-content,
html[data-theme="light"] .table-responsive table th,
html[data-theme="light"] .table-responsive table td,
html[data-theme="light"] table tr {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .dropdown-content a:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Ad List Layout (Horizontal Cards) */
.ad-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ad-list-card {
    display: flex;
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    min-height: 180px;
}

.ad-list-card:hover {
    transform: translateX(5px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: var(--shadow-glow);
}

.ad-list-image-wrapper {
    width: 260px;
    min-width: 260px;
    position: relative;
    overflow: hidden;
}

.ad-list-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ad-list-card:hover .ad-list-image {
    transform: scale(1.1);
}

.ad-list-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ad-list-header {
    margin-bottom: 0.5rem;
}

.ad-list-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ad-list-footer .ad-meta {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    gap: 1rem;
}

/* Responsive List Cards — override for desktop only */
@media (max-width: 768px) {
    .ad-list-card:hover {
        transform: none;
    }
}

/* =====================================
   AD DETAIL PAGE
   ===================================== */

/* Desktop: two-column layout */
.ad-detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    align-items: start;
}

.ad-detail-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.ad-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--clr-text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.875rem;
}

/* Mobile inline contact card is hidden on desktop */
.contact-card-mobile {
    display: none;
}

/* Mobile overrides */
@media (max-width: 768px) {
    /* Stack the two columns */
    .ad-detail-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Hide the desktop sidebar */
    .ad-detail-sidebar {
        display: none;
    }

    /* Show the inline contact card */
    .contact-card-mobile {
        display: block;
    }

    /* Compact title */
    .ad-detail-title {
        font-size: 1.35rem;
        margin-bottom: 0.75rem;
    }

    /* Compact meta */
    .ad-detail-meta {
        gap: 0.5rem;
        font-size: 0.78rem;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    /* Reduce description font */
    .description-body {
        font-size: 0.9rem !important;
        padding: 1rem !important;
    }
}
