﻿/* ===== AutoFlick Theme (Navy 650 / Clean Gray) =========================== */
/* Palette */
:root {
    --ae-bg: #f6f7fb; /* page background */
    --ae-surface: #ffffff; /* cards/surfaces */
    --ae-text: #0b1220; /* base text */
    --ae-muted: #6b7280; /* secondary text */

    --ae-primary: #224c9a; /* brand */
    --ae-primary-600: #1f4490;
    --ae-primary-700: #1a3a7e;
    --ae-accent: #3b82f6; /* tiny accents/badges */
    --ae-border: #e5e7eb; /* hairlines */
    --ae-ring: rgba(34,76,154,.25);
    --ae-nav: #0d1a2c; /* header top */
    --ae-nav-2: #162743; /* header bottom */
}

/* Reusable page title (same look as Compare) */
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ae-primary-700);
    margin: 5.5rem 3 3 5rem;
    text-align: center;
    letter-spacing: .015em;
}

/* Base */
html, body {
    background: var(--ae-bg);
    color: var(--ae-text);
}

a {
    color: var(--ae-primary);
}

    a:hover {
        color: var(--ae-primary-600);
    }

.text-muted {
    color: var(--ae-muted) !important;
}



/* =========================== CARDS / AD CARD ============================= */
.card {
    border: 1px solid var(--ae-border);
    background: var(--ae-surface);
}

.ad-card {
    transition: transform .12s ease, box-shadow .12s ease;

}


.ad-card .ad-badge-promovat {
    /* lighter-than-theme blue, harmonized with Bootstrap primary (#0d6efd) */
    background: #e7f1ff; /* light blue chip */
    color: #0d6efd;
}


    .ad-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(17,24,39,.06);
    }

    /* image ratio container already from bootstrap; just keep image crisp */
    .ad-card .ratio > img {
        object-fit: cover;
    }

    /* overlay action buttons (heart / compare) */
    .ad-card .btn.btn-light {
        background: #fff;
        border-color: var(--ae-border);
    }

        .ad-card .btn.btn-light:hover {
            background: #f3f6ff;
        }

    /* compare active state */
    .ad-card .compare-toggle.active {
        background: var(--ae-primary) !important;
        color: #fff !important;
        border-color: var(--ae-primary) !important;
    }

/* ad tier badges (positioned inside the link area, bottom-left of image) */
.ad-badge {
    position: absolute;
    left: .5rem;
    top: .5rem;
    display: inline-block;
    font-weight: 700;
    font-size: .65rem;
    letter-spacing: .03em;
    padding: .25rem .4rem;
    border-radius: .35rem;
    box-shadow: 0 4px 8px rgba(0,0,0,.12);
}

.badge-premium {
    background: #facc15;
    color: #1f2937;
}
/* warm gold-ish */
.badge-promoted {
    background: #3b82f6;
    color: #fff;
}
/* blue */

/* =========================== BUTTONS (brand) ============================= */
.btn-primary {
    --bs-btn-bg: var(--ae-primary);
    --bs-btn-border-color: var(--ae-primary);
    --bs-btn-hover-bg: var(--ae-primary-600);
    --bs-btn-hover-border-color: var(--ae-primary-600);
    --bs-btn-active-bg: var(--ae-primary-700);
    --bs-btn-active-border-color: var(--ae-primary-700);
}

.btn-outline-primary {
    --bs-btn-color: var(--ae-primary);
    --bs-btn-border-color: var(--ae-primary);
    --bs-btn-hover-bg: var(--ae-primary);
    --bs-btn-hover-border-color: var(--ae-primary);
}

/* ============================== FOOTER ================================== */
footer {
    background: #fff;
    border-top: 1px solid var(--ae-border);
}

/* ============================ UTILITIES ================================= */
.container-narrow {
    max-width: 980px;
}

/* ============================ FILTER BAR ============================ */
.ae-filters {
    border: 1px solid var(--ae-border);
    box-shadow: 0 14px 36px rgba(2, 6, 23, .06);
    backdrop-filter: saturate(120%) blur(2px);
}

/* Bigger, rounded controls */
    .ae-filters .form-control,
    .ae-filters .form-select {
        height: 44px;
        padding: .5rem .8rem;
        border-radius: 12px;
        border-color: var(--ae-border);
        min-width: 2px; /* makes the inputs wider */
        flex: 1 1 auto; /* allows them to expand naturally */
    }

.ae-filters .form-control:focus,
.ae-filters .form-select:focus {
    border-color: var(--ae-primary);
    box-shadow: 0 0 0 .2rem var(--ae-ring);
}

/* Input-group chips */
.ae-filters .input-group-text {
    height: 44px;
    padding: 0 .75rem;
    color: #4b5563;
    background: #f8fafc;
    border: 1px solid var(--ae-border);
    border-right: 0;
    border-radius: 12px 0 0 12px;
}

    .ae-filters .input-group .form-control + .input-group-text {
        border-left: 0;
        border-radius: 0 12px 12px 0;
    }

    /* Buttons bigger & rounded */
    .ae-filters .btn {
        height: 44px;
        border-radius: 12px;
        font-weight: 600;
    }

    .ae-filters .btn-outline-secondary {
        --bs-btn-color: #334155;
        --bs-btn-border-color: var(--ae-border);
        --bs-btn-hover-bg: #eef2ff;
        --bs-btn-hover-border-color: #c7d2fe;
    }

/* Make the filter bar stick nicely under header (already using .filter-bar) */
.filter-bar {
    position: sticky;
    top: var(--header-offset);
    z-index: 1040;
    transition: box-shadow .2s ease;
}

    .filter-bar.is-stuck {
        box-shadow: 0 10px 28px rgba(17,24,39,.08);
    }


/* ===== Results top bar ===== */
.results-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    margin: .75rem 0 1rem;
    background: var(--ae-surface);
    border: 1px solid var(--ae-border);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(17,24,39,.06);
}

.results-count .label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ae-muted);
    margin-bottom: .15rem;
}

.results-count .value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ae-primary-700);
    line-height: 1.1;
}

.results-count .sub {
    font-size: .9rem;
    color: var(--ae-muted);
}

/* Sort area */
.results-sort .sort-label {
    font-size: .85rem;
    font-weight: 600;
    color: #e5ecff; /* on dark header it still looks fine if reused elsewhere */
    color: var(--ae-muted); /* primary use here */
    margin: 0 .25rem 0 0;
}

/* AutoFlick big rounded select */
.ae-select {
    height: 44px;
    padding: .5rem .9rem;
    border-radius: 12px;
    border: 1px solid var(--ae-border);
    background: #fff;
    font-weight: 600;
    min-width: 180px;
}

    .ae-select:focus {
        border-color: var(--ae-primary);
        box-shadow: 0 0 0 .2rem var(--ae-ring);
    }

/* ===== Pagination on-brand ===== */
.pagination {
    gap: .4rem;
}

    .pagination .page-link {
        border: 1px solid var(--ae-border);
        border-radius: 10px;
        padding: .6rem .9rem;
        color: var(--ae-primary-700);
        background: #fff;
        box-shadow: 0 2px 8px rgba(2,6,23,.06);
    }

        .pagination .page-link:hover {
            background: #f3f6ff;
            color: #0b1220;
        }

    .pagination .page-item.active .page-link {
        background: var(--ae-primary);
        color: #fff;
        border-color: var(--ae-primary);
        box-shadow: 0 8px 16px rgba(34,76,154,.25);
    }

    .pagination .page-item.disabled .page-link {
        opacity: .45;
        pointer-events: none;
    }

/* Tighten card grid spacing on small screens slightly (optional) */
@media (max-width: 576px) {
    .results-top {
        padding: .7rem .8rem;
    }

    .ae-select {
        height: 40px;
    }
}


/* Turn OFF sticky for filters if you had it */
.filter-bar, .ae-filters {
    position: static !important;
}
/* Back-to-top button — centered, bold, visible */
.ae-topfab {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    z-index: 1060;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    border: none;
    background: var(--ae-primary);
    color: #fff;
    font-size: 1.75rem; /* bigger arrow */
    font-weight: 900; /* thicker */
    line-height: 1;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 28px rgba(34,76,154,.4);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

    .ae-topfab:hover {
        background: var(--ae-primary-600);
        transform: translateX(-50%) translateY(-2px);
    }

    .ae-topfab.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

/* optional pulse to catch attention briefly */
@keyframes pulseOnce {
    0% {
        box-shadow: 0 0 0 0 rgba(34,76,154,.4);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(34,76,154,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34,76,154,0);
    }
}

.ae-topfab.is-visible {
    animation: pulseOnce 1.4s ease-out;
}


/* ===== Promoted CTA button (homepage) ===== */
.btn-promoted-cta {
    display: inline-block;
    width: 100%;
    max-width: 620px;
    background: var(--ae-primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 0.9rem 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--ae-primary-700);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(34,76,154,.25);
    transition: all .2s ease;
}

    .btn-promoted-cta:hover {
        background: var(--ae-primary-600);
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 14px 28px rgba(34,76,154,.35);
    }

    .btn-promoted-cta:active {
        transform: translateY(0);
        box-shadow: 0 8px 16px rgba(34,76,154,.25);
    }


.ad-card .ad-meta {
    font-size: 0.83rem;
    color: var(--ae-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

    /* AdCard meta refined colors */
    .ad-card .ad-meta i {
        font-size: 0.9rem;
        margin-right: 4px;
        opacity: 0.9;
    }

    /* Red location pin */
    .ad-card .ad-meta .icon-location {
        color: #ef4444; /* soft red — same tone as "Golește" button */
    }

    /* Custom calendar icon */
    .ad-card .ad-meta .icon-calendar {
        color: #000000; /* deeper red, visually distinct but coordinated */
    }

    .ad-card .ad-meta:hover i {
        color: var(--ae-primary-600); /* subtle blue on hover only */
    } 

    .ad-card .ad-meta span {
        opacity: .5;
    }



/* ----- Favorite toggle ----- */
.favorite-toggle i {
    color: #9ca3af; /* neutral gray when inactive */
    transition: color .2s ease, transform .15s ease;
}

.favorite-toggle:hover i {
    color: #ef4444; /* red on hover */
}

.favorite-toggle.active i {
    color: #ef4444; /* bright red when favorited */
    transform: scale(1.15);
}

.stretched-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.ad-card button,
.ad-card .btn {
    position: relative;
    z-index: 2;
}


.favorite-remove-one i {
    font-size: 1.15rem; /* slightly larger */
    font-weight: 900; /* thicker stroke */
    opacity: 0.95; /* richer color */
    text-shadow: 0 0 1px rgba(239,68,68,.5); /* subtle glow for visual boldness */
}

#searchTabs .nav-link {
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color:darkblue;
}

#searchTabs .nav-link i {
    font-size: 1rem;
}

    #searchTabs .nav-link.active {
        background: darkblue;
        color: #fff;
        box-shadow: 0 0.15rem 0.4rem #11233f;
    }

/* TOP BAR */
#topbar {
    background: #071938; /* darker than nav */
    color: #e8efff;
    padding: 10px 0; /* increase height */
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

    #topbar .topbar-inner {
        max-width: 1240px;
        display: flex;
        align-items: center;
        justify-content: center; /* centered by default */
        gap: 2rem;
        text-align: center;
    }

.topbar-message {
    font-weight: 500;
}

#topbar .topbar-link {
    white-space: nowrap;
    color: #e8efff;
    text-decoration: none !important;
    font-weight: 600;
}

    #topbar .topbar-link:hover {
        opacity: 0.8;
    }

/* Smaller screens */
@media (max-width: 768px) {
    #topbar .topbar-inner {
        flex-direction: column;
        gap: 0.5rem;
    }
}


.price-euro {
    white-space: nowrap;
    vertical-align: middle;
    font-size: 1.15rem;
    font-weight: 700;
}

/* Logo size in navbar – DESKTOP */
.navbar-brand .site-logo {
    max-height: 100px; /* tweak 56–72px if you want */
    width: auto;
}

/* LOGO on mobile navbar */
@media (max-width: 767.98px) {
    .mobile-brand .site-logo {
        max-height: 80px !important; /* increase here */
        width: auto !important;
        margin: 0 auto !important;
    }

    .mobile-brand {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 4px 0 !important;
    }
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 18px 20px;
    background: #0d4fd9;
    color: #ffffff;
    display: none;
    flex-direction: column;
    text-align: center;
    gap: 12px;
    z-index: 9999;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}

    .cookie-banner p {
        margin: 0;
        font-size: 0.95rem;
        line-height: 1.4;
    }

.cookie-link {
    color: #e6eeff;
    text-decoration: underline;
    font-weight: 500;
}

    .cookie-link:hover {
        color: #ffffff;
        text-decoration-thickness: 2px;
    }

.cookie-btn {
    background: #ffffff;
    color: #0d4fd9;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
    transition: background 0.2s ease;
}

    .cookie-btn:hover {
        background: #f2f6ff;
    }

/* Desktop: text + buton pe un singur rând dar CENTRAT */
@media (min-width: 768px) {
    .cookie-banner {
        flex-direction: row;
        justify-content: center;
        text-align: center;
    }
}



/* ===== Pagini legale comune (privacy / terms / cookies) ===== */

.legal-page {
    max-width: 900px;
    padding: 2.5rem 1rem 3rem;
    margin: 2rem auto 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

    /* Titlul mare de pagină */
    .legal-page h1 {
        font-size: 1.9rem;
        font-weight: 700;
        margin-bottom: 1rem;
        color: #0a53be; /* albastrul tău principal */
    }

    /* Subtitluri / secțiuni */
    .legal-page h2 {
        font-size: 1.3rem;
        font-weight: 600;
        margin-top: 2rem;
        margin-bottom: 0.75rem;
        color: #0b1f3b;
    }

    .legal-page h3 {
        font-size: 1.05rem;
        font-weight: 600;
        margin-top: 1.2rem;
        margin-bottom: 0.5rem;
        color: #102a43;
    }

    /* Paragrafe, liste */
    .legal-page p {
        margin-bottom: 0.75rem;
        color: #374151;
        line-height: 1.7;
        font-size: 0.96rem;
    }

    .legal-page ul,
    .legal-page ol {
        margin-bottom: 0.9rem;
        padding-left: 1.2rem;
    }

    .legal-page li {
        margin-bottom: 0.25rem;
    }

    /* Linkuri din text (ex: dataprotecton / email) */
    .legal-page a {
        color: #0d4fd9;
        text-decoration: none;
        font-weight: 500;
    }

        .legal-page a:hover {
            text-decoration: underline;
        }

/* Spațiere față de footer pe ecrane mici */
@media (max-width: 768px) {
    .legal-page {
        margin-top: 1.5rem;
        padding: 1.75rem 1.1rem 2.5rem;
        border-radius: 10px;
    }

        .legal-page h1 {
            font-size: 1.6rem;
        }
}
