:root {
    --bg-body: #05050A;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --text-main: #FFFFFF;
    --text-muted: #94A3B8;
    --primary: #7C3AED;
    --primary-glow: rgba(124, 58, 237, 0.5);
    --secondary: #FFFFFF;
    --accent: #38bdf8;
    --border: rgba(255, 255, 255, 0.1);
    --gradient-main: linear-gradient(135deg, #7C3AED 0%, #2563EB 100%);
    --font-main: 'Inter', sans-serif;
    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(124, 58, 237, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(37, 99, 235, 0.08), transparent 25%);
    min-height: 100vh;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 99px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

.btn-search {
    background: var(--gradient-main);
    color: white;
    border-radius: 99px;
    padding: 12px 30px;
    margin-left: 8px;
}

.btn-search:hover {
    filter: brightness(1.1);
}

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

.btn-outline:hover {
    background: rgba(124, 58, 237, 0.1);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.2);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* --- Navbar --- */
.navbar {
    background: rgba(5, 5, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.logo i {
    font-size: 1.8rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a:not(.btn) {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover:not(.btn) {
    color: white;
}

/* --- Hero --- */
.hero {
    padding: 140px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Vertical glowing lines background effect */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background:
        linear-gradient(90deg, transparent 0%, rgba(124, 58, 237, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, rgba(5, 5, 10, 0) 0%, rgba(124, 58, 237, 0.05) 50%, rgba(5, 5, 10, 0) 100%);
    background-size: 120px 100%, 100% 100%;
    z-index: -1;
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

/* Ambient glow animation behind hero */
.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    z-index: -2;
    animation: pulse-glow 8s infinite alternate ease-in-out;
}

@keyframes pulse-glow {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d8b4fe;
    padding: 8px 20px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 32px;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.1);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -1.5px;
    text-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.hero h1 br {
    display: block;
}

.text-gradient {
    background: linear-gradient(135deg, #FFFFFF 0%, #a78bfa 50%, #2563EB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.3));
}

.hero p {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 640px;
    margin: 0 auto 48px;
    font-weight: 300;
    line-height: 1.6;
}

.search-box {
    background: rgba(255, 255, 255, 0.05);
    max-width: 600px;
    margin: 0 auto 32px;
    border-radius: 99px;
    display: flex;
    border: 1px solid var(--border);
    padding: 6px;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 20px;
    font-size: 1rem;
    color: white;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-box i {
    align-self: center;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.tags-row {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 99px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tag:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--primary);
    color: white;
}

/* --- Main Layout --- */
.main-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 60px;
    margin-top: 60px;
    margin-bottom: 100px;
}

/* Sidebar */
.sidebar {
    padding-top: 20px;
}

.sidebar h3 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-weight: 600;
}

.filter-group {
    margin-bottom: 40px;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 32px;
    margin-bottom: 16px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted);
    user-select: none;
    transition: color 0.2s;
}

.checkbox-container:hover {
    color: white;
}

.checkbox-container input {
    visibility: hidden;
    position: absolute;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s;
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Listings */
.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.listings-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-box label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.sort-box select {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    outline: none;
    cursor: pointer;
}

.sort-box select option {
    background: #0f172a;
    color: white;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

/* Agency Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.card-header {
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.card-logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px;
}

.card-header h3 {
    font-size: 1.25rem;
    margin-bottom: 6px;
    color: white;
}

.verified {
    color: #4ade80;
    /* Green for verified */
    font-size: 0.9rem;
    margin-left: 6px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.rating i {
    color: #facc15;
}

.card-body {
    padding: 24px;
    flex: 1;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background: rgba(124, 58, 237, 0.1);
    color: #d8b4fe;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.card-footer {
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

.price span {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
}

.load-more-container {
    text-align: center;
    margin-top: 60px;
}

/* Footer */
footer {
    background: #020205;
    border-top: 1px solid var(--border);
    padding: 80px 0 40px;
    position: relative;
    overflow: hidden;
}

/* Subtle glow in footer */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.logo-footer {
    font-weight: 700;
    font-size: 1.25rem;
    display: block;
    margin-bottom: 20px;
    color: white;
}

.footer-col h4 {
    margin-bottom: 24px;
    color: white;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 0.95rem;
    transition: 0.2s;
}

.footer-col a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sidebar {
        display: none;
        /* Hide filters on mobile for mvp */
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Navbar Mobile Fix */
    .nav-links {
        display: none;
    }

    .logo span {
        display: none;
        /* Show only icon or short name if tight */
    }

    .logo {
        font-size: 1.1rem;
    }

    .nav-cta {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Ensure CTA is visible and styled properly outside nav-links if we moved it */
.nav-cta {
    display: inline-block;
}