:root {
    /* Colors */
    --primary-color: #1E293B;
    /* User requested predominant blue */
    --secondary-color: #334155;
    /* Slate */
    --accent-color: #0056D2;
    /* Bright Blue - Buttons/Links */
    --highlight-color: #FF8C00;
    /* Dark Orange - Details/Badges */
    --bg-light: #F0F4F8;
    /* Very light blueish gray */
    --white: #FFFFFF;
    --text-main: #1E293B;
    /* Slate 800 */
    --text-muted: #64748B;
    /* Slate 500 */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    /* padding-bottom: var(--spacing-lg); Removed to fix bottom gap */

    /* Sticky Footer Setup */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    /* Pushes footer to bottom */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    filter: brightness(110%);
    transform: translateY(-1px);
}

.btn-outline {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--white);
}

.btn-highlight {
    background: var(--highlight-color);
    color: var(--white);
}

.btn-highlight:hover {
    filter: brightness(110%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-premium {
    background: var(--highlight-color);
    color: var(--white);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Header & Nav */
.main-header {
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--white);
}

.header-logo .highlight {
    color: var(--highlight-color);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    font-weight: 500;
    opacity: 0.9;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--highlight-color);
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.menu-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Home Hero */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.hero p {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Box */
.search-container {
    background: var(--white);
    max-width: 700px;
    margin: 0 auto;
    border-radius: var(--radius-full);
    padding: var(--spacing-xs);
    display: flex;
    box-shadow: var(--shadow-lg);
}

.search-input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--radius-full);
    outline: none;
}

.search-btn {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #0284c7;
}

/* Categories Grid */
.categories-section {
    padding: var(--spacing-lg) 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-main);
}

.categories-grid {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding: var(--spacing-sm) var(--spacing-xs);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    cursor: grab;
    /* Indicate draggable */
}

/* Hide scrollbar Webkit */
.categories-grid::-webkit-scrollbar {
    display: none;
}

.categories-grid.active {
    cursor: grabbing;
}

.category-card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid #e2e8f0;

    /* Carousel specific properties */
    min-width: 160px;
    /* Fixed width for carousel items */
    flex-shrink: 0;
    /* Prevent shrinking */
    scroll-snap-align: start;
    /* Snap alignment */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.category-icon {
    font-size: 2rem;
    color: var(--highlight-color);
    margin-bottom: var(--spacing-sm);
}

.category-name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Listings Layout */
.listings-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    /* Sidebar | Main */
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-lg);
}

.main-content {
    /* Main ads area */
    min-width: 0;
}

/* Sidebar */
.sidebar {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    align-self: start;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--accent-color);
}

/* Ad Card */
.ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.ad-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
    border: 1px solid #f1f5f9;
}

.ad-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.ad-card-featured {
    border: 2px solid var(--highlight-color);
}

.ad-card-image {
    height: 180px;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.ad-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--highlight-color);
    color: var(--white);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.ad-card-logo {
    position: absolute;
    bottom: -20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.ad-card-content {
    padding: 30px 20px 20px;
}

.ad-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.ad-category,
.ad-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.btn-card {
    display: block;
    width: 100%;
    text-align: center;
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    margin-top: var(--spacing-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.btn-card:hover {
    background: var(--secondary-color);
    color: var(--white);
}

/* Footer */
.main-footer {
    background: #1e293b;
    color: #cbd5e1;
    padding-top: var(--spacing-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

.footer-col h3,
.footer-col h4 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    background: #0f172a;
    padding: var(--spacing-sm) 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-nav {
        display: none;
        /* simple native hide */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-color);
        padding: 1rem;
    }

    .header-nav.active {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
    }

    .menu-toggle {
        display: block;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .listings-container {
        grid-template-columns: 1fr;
    }

    .header-actions .btn {
        display: none;
        /* Hide 'Advertise' button on mobile header to save space, relies on footer */
    }
}

/* Company Profile */
.company-header {
    background: #fff;
    padding: var(--spacing-lg) 0;
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid #e2e8f0;
}

.company-header-grid {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.company-logo-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    background: #f8fafc;
}

.company-logo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-info {
    flex: 1;
}

.company-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.company-meta {
    display: flex;
    gap: var(--spacing-md);
    color: var(--text-muted);
    font-size: 1rem;
    flex-wrap: wrap;
}

.company-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
    color: white;
}

.btn-instagram {
    background: #E1306C;
    color: white;
}

.btn-instagram:hover {
    background: #C13584;
    color: white;
}

/* Company Content Grid */
.company-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

.content-box {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
}

.content-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.map-container {
    width: 100%;
    height: 300px;
    background: #e2e8f0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.contact-list li {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-list i {
    color: var(--accent-color);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .company-header-grid {
        flex-direction: column;
        text-align: center;
    }

    .company-meta {
        justify-content: center;
    }

    .company-grid {
        grid-template-columns: 1fr;
    }
}

/* Pricing Plans */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.plan-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.plan-card.featured {
    border: 2px solid var(--highlight-color);
    transform: scale(1.05);
    z-index: 10;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.plan-features {
    text-align: left;
    margin-bottom: 2rem;
}

.plan-features li {
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.plan-features li i {
    color: #10b981;
    /* Green check */
}

/* Forms */
.form-box {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}

.form-control:focus {
    border-color: var(--accent-color);
}

/* Banners */
.exclusive-banner-section {
    padding: 2rem 0;
}

.exclusive-banner {
    position: relative;
    background: linear-gradient(90deg, #111, #333);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: white;
    display: flex;
    align-items: center;
    min-height: 250px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.exclusive-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--highlight-color, #F59E0B);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.exclusive-content {
    flex: 1;
    padding: 3rem;
    position: relative;
    z-index: 2;
    max-width: 60%;
}

.exclusive-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.exclusive-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.exclusive-img {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-size: cover;
    background-position: center;
    mask-image: linear-gradient(to right, transparent, black 50%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 50%);
    z-index: 1;
}

/* Premium Rotating Banner */
.premium-banner-section {
    overflow: hidden;
}

.premium-carousel {
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.premium-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
}

.premium-slide {
    min-width: 300px;
    height: 180px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.premium-slide:hover {
    transform: scale(1.03);
}

.premium-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.premium-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.premium-overlay h4 {
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .exclusive-banner {
        flex-direction: column;
        text-align: center;
    }

    .exclusive-content {
        max-width: 100%;
        padding: 2rem;
    }

    .exclusive-img {
        position: relative;
        width: 100%;
        height: 200px;
        mask-image: none;
        -webkit-mask-image: none;
        order: -1;
    }

    .exclusive-badge {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Modern File Uploads */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed #e2e8f0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    text-align: center;
}

.file-upload-label:hover {
    border-color: var(--accent-color);
    background: #f1f5f9;
}

.file-upload-label i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.file-upload-label span {
    font-weight: 500;
    color: var(--text-main);
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.preview-item .remove-btn:hover {
    background: #dc2626;
}

.current-img-preview {
    max-width: 100%;
    max-height: 100px;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    border: 1px solid #e2e8f0;
    object-fit: contain;
    background: #f8fafc;
}