/* ══════════════════════════════════════
   Anunturi Locale – OLX-style Frontend
   ══════════════════════════════════════ */

:root {
    --al-primary: #002f34;
    --al-primary-light: #00505c;
    --al-accent: #3a77ff;
    --al-accent-hover: #2a5fd4;
    --al-success: #23e5db;
    --al-bg: #f2f4f5;
    --al-white: #ffffff;
    --al-text: #002f34;
    --al-text-light: #5b6970;
    --al-border: #c8c8c8;
    --al-border-light: #e0e0e0;
    --al-radius: 6px;
    --al-shadow: 0 1px 3px rgba(0,0,0,.08);
    --al-shadow-hover: 0 4px 12px rgba(0,0,0,.12);
    --al-price-color: #002f34;
    --al-max-width: 1200px;
}

/* ── Layout ── */

.al-wrap {
    max-width: var(--al-max-width);
    margin: 0 auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--al-text);
    background: var(--al-bg);
    min-height: 60vh;
}

/* ── Breadcrumbs ── */

.al-breadcrumbs {
    font-size: 13px;
    padding: 12px 0;
    color: var(--al-text-light);
    margin-bottom: 8px;
}

.al-breadcrumbs a {
    color: var(--al-accent);
    text-decoration: none;
}

.al-breadcrumbs a:hover { text-decoration: underline; }

.al-bc-sep {
    margin: 0 6px;
    color: var(--al-border);
}

.al-bc-current {
    color: var(--al-text);
    font-weight: 500;
}

/* ── Archive Header ── */

.al-archive-header {
    background: var(--al-white);
    padding: 24px;
    border-radius: var(--al-radius);
    margin-bottom: 20px;
    box-shadow: var(--al-shadow);
}

.al-archive-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--al-primary);
    margin: 0 0 8px;
    line-height: 1.3;
}

.al-archive-header .al-archive-desc {
    color: var(--al-text-light);
    font-size: 15px;
    margin: 0 0 6px;
    line-height: 1.5;
}

.al-archive-header .al-archive-count {
    color: var(--al-accent);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* ── Category Hero Cards ── */

.al-categories-hero {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.al-cat-hero-card {
    background: var(--al-white);
    border-radius: var(--al-radius);
    padding: 24px;
    text-align: center;
    text-decoration: none;
    color: var(--al-text);
    box-shadow: var(--al-shadow);
    transition: box-shadow .2s, transform .2s;
    border: 2px solid transparent;
}

.al-cat-hero-card:hover {
    box-shadow: var(--al-shadow-hover);
    transform: translateY(-2px);
    border-color: var(--al-accent);
}

.al-cat-hero-icon { font-size: 40px; margin-bottom: 8px; }

.al-cat-hero-card h2 {
    font-size: 18px;
    margin: 0 0 4px;
    color: var(--al-primary);
}

.al-cat-hero-card p {
    font-size: 14px;
    color: var(--al-text-light);
    margin: 0;
}

/* ── Section Title ── */

.al-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--al-primary);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--al-primary);
    display: inline-block;
}

/* ── Grid ── */

.al-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.al-grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ── Card ── */

.al-card {
    background: var(--al-white);
    border-radius: var(--al-radius);
    overflow: hidden;
    box-shadow: var(--al-shadow);
    transition: box-shadow .2s, transform .15s;
}

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

.al-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.al-card-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #e8ecee;
}

.al-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.al-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--al-border);
    background: #e8ecee;
}

.al-card-body { padding: 12px 14px; }

.al-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--al-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.al-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.al-card-location {
    font-size: 12px;
    color: var(--al-text-light);
}

.al-card-cat {
    font-size: 11px;
    background: #e7f0ff;
    color: var(--al-accent);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.al-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--al-border-light);
}

.al-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--al-price-color);
}

.al-card-date {
    font-size: 12px;
    color: var(--al-text-light);
}

/* ── Single Listing ── */

.al-single {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-bottom: 32px;
}

.al-single-gallery {
    border-radius: var(--al-radius);
    overflow: hidden;
    background: #e8ecee;
}

.al-single-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 450px;
    object-fit: cover;
}

.al-single-no-img {
    padding: 80px 20px;
    text-align: center;
    font-size: 18px;
    color: var(--al-text-light);
}

.al-single-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--al-primary);
    margin: 16px 0 12px;
    line-height: 1.3;
}

.al-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--al-text-light);
}

.al-single-meta a { color: var(--al-accent); text-decoration: none; }
.al-single-meta a:hover { text-decoration: underline; }

.al-single-content {
    background: var(--al-white);
    padding: 24px;
    border-radius: var(--al-radius);
    box-shadow: var(--al-shadow);
    font-size: 15px;
    line-height: 1.7;
}

.al-single-content h3 {
    font-size: 17px;
    color: var(--al-primary);
    margin: 20px 0 10px;
}

.al-single-content ul {
    padding-left: 20px;
    margin: 10px 0;
}

.al-single-content li { margin-bottom: 6px; }

/* ── Sidebar ── */

.al-single-sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}

.al-price-box {
    background: var(--al-white);
    padding: 20px;
    border-radius: var(--al-radius);
    box-shadow: var(--al-shadow);
    text-align: center;
    margin-bottom: 16px;
}

.al-price-label {
    display: block;
    font-size: 13px;
    color: var(--al-text-light);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.al-price-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--al-price-color);
}

.al-contact-box {
    background: var(--al-white);
    padding: 20px;
    border-radius: var(--al-radius);
    box-shadow: var(--al-shadow);
    margin-bottom: 16px;
}

.al-contact-box h3 {
    font-size: 16px;
    margin: 0 0 12px;
    color: var(--al-primary);
}

.al-phone-btn {
    display: block;
    background: var(--al-accent);
    color: white;
    text-decoration: none;
    text-align: center;
    padding: 14px;
    border-radius: var(--al-radius);
    font-size: 18px;
    font-weight: 700;
    transition: background .2s;
}

.al-phone-btn:hover {
    background: var(--al-accent-hover);
    color: white;
}

.al-contact-note {
    font-size: 12px;
    color: var(--al-text-light);
    margin: 8px 0 0;
    text-align: center;
}

.al-details-box,
.al-sidebar-quick {
    background: var(--al-white);
    padding: 16px;
    border-radius: var(--al-radius);
    box-shadow: var(--al-shadow);
    margin-bottom: 16px;
}

.al-details-box h3,
.al-sidebar-quick h3 {
    font-size: 15px;
    margin: 0 0 10px;
    color: var(--al-primary);
}

.al-details-box ul,
.al-sidebar-quick ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.al-details-box li,
.al-sidebar-quick li {
    padding: 6px 0;
    border-bottom: 1px solid var(--al-border-light);
    font-size: 14px;
}

.al-details-box li:last-child,
.al-sidebar-quick li:last-child { border-bottom: none; }

.al-sidebar-quick a { color: var(--al-accent); text-decoration: none; }
.al-sidebar-quick a:hover { text-decoration: underline; }

/* ── Related & Internal Links ── */

.al-related,
.al-internal-links {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--al-border-light);
}

.al-related h3,
.al-internal-links h3 {
    font-size: 18px;
    color: var(--al-primary);
    margin: 0 0 16px;
}

.al-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.al-link-item {
    display: inline-block;
    background: var(--al-white);
    border: 1px solid var(--al-border-light);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--al-accent);
    text-decoration: none;
    transition: all .2s;
}

.al-link-item:hover {
    background: var(--al-accent);
    color: white;
    border-color: var(--al-accent);
}

.al-link-item .al-count {
    color: var(--al-text-light);
    font-size: 12px;
}

.al-link-item:hover .al-count { color: rgba(255,255,255,.8); }

/* ── Cross Category ── */

.al-cross-link-box,
.al-cross-category {
    background: #e7f0ff;
    padding: 16px 20px;
    border-radius: var(--al-radius);
    margin: 20px 0;
    font-size: 15px;
}

.al-cross-link-box a,
.al-cross-category a {
    color: var(--al-accent);
    text-decoration: none;
}

.al-cross-link-box a:hover,
.al-cross-category a:hover { text-decoration: underline; }

/* ── Location Category Cards ── */

.al-location-cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.al-loc-cat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--al-white);
    padding: 16px;
    border-radius: var(--al-radius);
    text-decoration: none;
    color: var(--al-primary);
    font-weight: 600;
    font-size: 15px;
    box-shadow: var(--al-shadow);
    transition: all .2s;
    border: 2px solid transparent;
}

.al-loc-cat-card:hover {
    border-color: var(--al-accent);
    box-shadow: var(--al-shadow-hover);
}

.al-loc-cat-icon { font-size: 28px; }

/* ── Section Links (Județe grid) ── */

.al-section-links {
    margin: 32px 0;
    padding: 24px;
    background: var(--al-white);
    border-radius: var(--al-radius);
    box-shadow: var(--al-shadow);
}

.al-section-links h2 {
    font-size: 20px;
    color: var(--al-primary);
    margin: 0 0 16px;
}

.al-judete-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.al-judet-link {
    display: inline-block;
    padding: 8px 14px;
    background: var(--al-bg);
    border: 1px solid var(--al-border-light);
    border-radius: 20px;
    font-size: 13px;
    color: var(--al-text);
    text-decoration: none;
    transition: all .2s;
}

.al-judet-link:hover {
    background: var(--al-accent);
    color: white;
    border-color: var(--al-accent);
}

.al-judet-link span {
    font-size: 12px;
    color: var(--al-text-light);
}

.al-judet-link:hover span { color: rgba(255,255,255,.8); }

/* ── Sidebar Links ── */

.al-sidebar-links {
    background: var(--al-white);
    padding: 16px;
    border-radius: var(--al-radius);
    box-shadow: var(--al-shadow);
}

.al-sidebar-links h3 {
    font-size: 16px;
    color: var(--al-primary);
    margin: 0 0 12px;
}

.al-sidebar-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 12px;
}

.al-sidebar-links li {
    padding: 4px 0;
    font-size: 13px;
}

.al-sidebar-links a { color: var(--al-accent); text-decoration: none; }
.al-sidebar-links a:hover { text-decoration: underline; }

/* ── FAQ ── */

.al-faq {
    margin: 32px 0;
    padding: 24px;
    background: var(--al-white);
    border-radius: var(--al-radius);
    box-shadow: var(--al-shadow);
}

.al-faq h2 {
    font-size: 20px;
    color: var(--al-primary);
    margin: 0 0 20px;
}

.al-faq-item {
    border-bottom: 1px solid var(--al-border-light);
    padding: 14px 0;
}

.al-faq-item:last-child { border-bottom: none; }

.al-faq-q {
    font-size: 16px;
    font-weight: 600;
    color: var(--al-primary);
    margin: 0 0 8px;
}

.al-faq-a {
    font-size: 14px;
    color: var(--al-text-light);
    line-height: 1.6;
    margin: 0;
}

/* ── SEO Text ── */

.al-seo-text {
    background: var(--al-white);
    padding: 24px;
    border-radius: var(--al-radius);
    box-shadow: var(--al-shadow);
    margin: 24px 0;
}

.al-seo-text h2 {
    font-size: 20px;
    color: var(--al-primary);
    margin: 0 0 12px;
}

.al-seo-text p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--al-text);
    margin: 0 0 12px;
}

/* ── Pagination ── */

.al-pagination {
    text-align: center;
    margin: 24px 0;
}

.al-pagination ul {
    display: inline-flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.al-pagination li a,
.al-pagination li span {
    display: inline-block;
    padding: 10px 16px;
    background: var(--al-white);
    border: 1px solid var(--al-border-light);
    border-radius: var(--al-radius);
    font-size: 14px;
    color: var(--al-text);
    text-decoration: none;
    transition: all .2s;
}

.al-pagination li a:hover {
    background: var(--al-accent);
    color: white;
    border-color: var(--al-accent);
}

.al-pagination li .current {
    background: var(--al-accent);
    color: white;
    border-color: var(--al-accent);
    font-weight: 600;
}

/* ── No results ── */

.al-no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--al-text-light);
    font-size: 16px;
    background: var(--al-white);
    border-radius: var(--al-radius);
}

.al-no-results a { color: var(--al-accent); }

/* ── Footer Internal Links ── */

.al-footer-links {
    background: var(--al-primary);
    color: #b0bec5;
    padding: 32px 16px;
    margin-top: 40px;
    font-size: 13px;
}

.al-footer-inner {
    max-width: var(--al-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.al-footer-links h4 {
    font-size: 16px;
    color: var(--al-success);
    margin: 0 0 12px;
}

.al-footer-links h4 a {
    color: var(--al-success);
    text-decoration: none;
}

.al-footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 16px;
}

.al-footer-links li {
    padding: 3px 0;
}

.al-footer-links a {
    color: #b0bec5;
    text-decoration: none;
    font-size: 12px;
}

.al-footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* ── Responsive ── */

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

    .al-single-sidebar {
        position: static;
    }

    .al-categories-hero {
        grid-template-columns: 1fr;
    }

    .al-location-cats {
        grid-template-columns: 1fr;
    }

    .al-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .al-archive-header h1 {
        font-size: 20px;
    }

    .al-single-title {
        font-size: 20px;
    }

    .al-footer-inner {
        grid-template-columns: 1fr;
    }

    .al-sidebar-links ul {
        columns: 1;
    }

    .al-footer-links ul {
        columns: 1;
    }
}

@media (max-width: 480px) {
    .al-wrap {
        padding: 10px;
    }

    .al-grid {
        grid-template-columns: 1fr;
    }

    .al-card-image {
        height: 160px;
    }

    .al-price-value {
        font-size: 22px;
    }
}

/* ── OLX-style Promoted Badge ── */

.al-card-promoted {
    border: 2px solid var(--al-accent);
    position: relative;
}

.al-badge-promoted {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--al-accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 2;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.al-card-firma {
    font-size: 12px;
    color: var(--al-text-light);
    margin-bottom: 8px;
    font-style: italic;
}

/* ── OLX-style Topbar for archive ── */

.al-topbar {
    background: var(--al-primary);
    padding: 10px 16px;
    margin: -16px -16px 16px;
    border-radius: var(--al-radius) var(--al-radius) 0 0;
}

.al-topbar-inner {
    max-width: var(--al-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.al-topbar a {
    color: var(--al-success);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.al-topbar a:hover {
    color: white;
}

/* ── Improved card hover ── */

.al-card {
    position: relative;
}

.al-card-link:focus {
    outline: 2px solid var(--al-accent);
    outline-offset: 2px;
}

/* ── Stats bar ── */

.al-stats-bar {
    display: flex;
    gap: 24px;
    padding: 12px 20px;
    background: var(--al-white);
    border-radius: var(--al-radius);
    margin-bottom: 16px;
    box-shadow: var(--al-shadow);
    font-size: 14px;
}

.al-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--al-text-light);
}

.al-stat-item strong {
    color: var(--al-primary);
}

/* ── Print styles ── */

@media print {
    .al-footer-links,
    .al-internal-links,
    .al-cross-category,
    .al-sidebar-links,
    .al-pagination {
        display: none;
    }
}
