/* ==========================================================================
   Модул Кампании - тема "airbnb" (templates/campaign/airbnb/)
   Самостоятелен CSS - не зависи от theme.css на главния сайт.
   --cmp-primary и --cmp-cols се задават от campaign.php в <style> в <head>.
   ========================================================================== */
:root {
    --cmp-primary: #ff385c;
    --cmp-cols: 3;
    --cmp-text: #222222;
    --cmp-muted: #717171;
    --cmp-line: #e8e8e8;
    --cmp-bg: #ffffff;
    --cmp-radius: 14px;
    --cmp-shadow: 0 6px 20px rgba(0, 0, 0, .08);
    --cmp-max: 1280px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.cmp {
    margin: 0; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--cmp-text); background: #fafafa; font-size: 15px; line-height: 1.5;
}
body.cmp a { color: inherit; text-decoration: none; }
body.cmp img { display: block; max-width: 100%; }
body.cmp h1, body.cmp h2, body.cmp h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.material-icons-outlined { font-size: 20px; vertical-align: middle; line-height: 1; }

.cmp-container { max-width: var(--cmp-max); margin: 0 auto; padding: 0 24px; }
.cmp-has-bg .cmp-main .cmp-container { background: rgba(255,255,255,.94); border-radius: var(--cmp-radius); padding-top: 24px; padding-bottom: 24px; margin-top: 24px; margin-bottom: 24px; }

/* --- preview --- */
.cmp-preview-bar { background: #ffb300; color: #222; text-align: center; padding: 8px 16px; font-weight: 600; font-size: 14px; }

/* --- header --- */
.cmp-header { background: var(--cmp-bg); border-bottom: 1px solid var(--cmp-line); position: relative; }
.cmp-nav { max-width: var(--cmp-max); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cmp-brand img { height: 44px; width: auto; }
.cmp-brand-text { font-size: 20px; font-weight: 700; color: var(--cmp-primary); }
.cmp-header-html { flex: 1; min-width: 200px; color: var(--cmp-muted); font-size: 14px; }
.cmp-header-html a { color: var(--cmp-text); font-weight: 500; margin-right: 14px; }
.cmp-nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cmp-contact { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; padding: 8px 12px; border: 1px solid var(--cmp-line); border-radius: 999px; }
.cmp-contact:hover { border-color: var(--cmp-text); }
.cmp-langs { display: inline-flex; border: 1px solid var(--cmp-line); border-radius: 999px; overflow: hidden; }
.cmp-langs a { padding: 7px 11px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--cmp-muted); }
.cmp-langs a.is-active { background: var(--cmp-text); color: #fff; }

.cmp-hero { min-height: 440px; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; color: #fff; }
.cmp-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.25) 50%, rgba(0,0,0,.6) 100%); }
.cmp-hero-inner h1 { font-weight: 700; }
.cmp-hero-inner .cmp-hero-cta { display: inline-flex; margin-top: 22px; background: #fff; color: #222; border-radius: 999px; padding: 12px 22px; font-weight: 600; font-size: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.cmp-hero-inner { position: relative; padding: 48px 24px; max-width: 820px; }
.cmp-hero h1 { font-size: clamp(28px, 4.5vw, 48px); text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.cmp-hero p { font-size: clamp(16px, 2vw, 20px); margin: 12px 0 0; opacity: .95; }

/* --- title / intro --- */
.cmp-title-block { padding: 36px 0 8px; }
.cmp-title-block h1 { font-size: clamp(26px, 3.5vw, 38px); }
.cmp-subtitle { color: var(--cmp-muted); font-size: 17px; margin: 8px 0 0; }
.cmp-intro { max-width: 860px; margin: 20px 0 8px; color: #444; font-size: 16px; }
.cmp-intro p { margin: 0 0 10px; }

/* --- filter --- */
.cmp-filter { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; background: var(--cmp-bg); border: 1px solid var(--cmp-line); border-radius: 999px; padding: 10px 14px 10px 20px; margin: 24px 0 28px; box-shadow: var(--cmp-shadow); }
.cmp-filter-field { display: flex; flex-direction: column; gap: 2px; min-width: 180px; flex: 1; }
.cmp-filter-field label { font-size: 12px; font-weight: 600; color: var(--cmp-text); display: flex; align-items: center; gap: 4px; }
.cmp-filter-field label .material-icons-outlined { font-size: 16px; }
.cmp-filter-field input, .cmp-filter-field select { border: 0; background: transparent; font: inherit; font-size: 14px; padding: 4px 0; outline: none; color: var(--cmp-text); }
.cmp-filter-actions { display: flex; gap: 8px; align-items: center; }

/* --- buttons --- */
.cmp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; padding: 12px 20px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; border: 1px solid transparent; transition: transform .1s ease, box-shadow .15s ease, background .15s ease; }
.cmp-btn:active { transform: scale(.98); }
.cmp-btn--primary { background: var(--cmp-primary); color: #fff; }
.cmp-btn--primary:hover { filter: brightness(.95); box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.cmp-btn--primary[disabled] { opacity: .6; cursor: default; }
.cmp-btn--ghost { background: transparent; border-color: var(--cmp-line); color: var(--cmp-text); }
.cmp-btn--ghost:hover { border-color: var(--cmp-text); }
.cmp-btn--block { width: 100%; border-radius: 10px; padding: 14px; font-size: 15px; }

/* --- grid / cards --- */
.cmp-grid { display: grid; grid-template-columns: repeat(var(--cmp-cols), minmax(0, 1fr)); gap: 28px 22px; margin: 8px 0 32px; }
.cmp-card { display: flex; flex-direction: column; min-width: 0; }
.cmp-card.is-hidden { display: none; }
.cmp-card-media { position: relative; border-radius: var(--cmp-radius); overflow: hidden; aspect-ratio: 20 / 19; background: #eee; }
.cmp-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cmp-card:hover .cmp-card-media img { transform: scale(1.03); }
.cmp-card-media swiper-container, .cmp-card-media swiper-slide, .cmp-card-media a { display: block; height: 100%; }
.cmp-card-swiper { --swiper-pagination-color: #fff; --swiper-pagination-bullet-inactive-color: #fff; --swiper-pagination-bullet-inactive-opacity: .55; --swiper-pagination-bullet-size: 6px; --swiper-pagination-bottom: 10px; }
.cmp-card-swiper::part(pagination) { text-shadow: 0 1px 2px rgba(0,0,0,.4); }
/* стрелки: собствени бутони извън shadow DOM - бял кръг, черен заоблен шеврон */
.cmp-card-nav { position: absolute; top: 50%; z-index: 3; width: 30px; height: 30px; margin-top: -15px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: #222; box-shadow: 0 2px 8px rgba(0,0,0,.22); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transform: scale(.9); transition: opacity .18s ease, transform .18s ease, background .15s ease; }
.cmp-card-nav--prev { left: 10px; } .cmp-card-nav--next { right: 10px; }
.cmp-card-nav svg { display: block; }
.cmp-card-nav:hover { background: #fff; transform: scale(1.06); }
.cmp-card:hover .cmp-card-nav { opacity: 1; transform: scale(1); }
.cmp-card:hover .cmp-card-nav:hover { transform: scale(1.06); }
.cmp-card-nav.swiper-button-disabled { opacity: 0 !important; pointer-events: none; }
@media (hover: none) { .cmp-card-nav { opacity: 1; transform: none; width: 28px; height: 28px; } }
.cmp-card-noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: #bbb; }
.cmp-card-noimg .material-icons-outlined { font-size: 56px; }
.cmp-badge { position: absolute; top: 12px; left: 12px; z-index: 2; background: #fff; color: var(--cmp-text); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.cmp-badge--inline { position: static; display: inline-block; margin-left: 8px; background: var(--cmp-primary); color: #fff; }
.cmp-card-body { display: block; padding: 12px 2px 0; }
.cmp-card-title { font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmp-card-loc { color: var(--cmp-muted); font-size: 14px; margin-top: 3px; }
.cmp-card-meta { color: var(--cmp-muted); font-size: 13px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.cmp-card-price { margin-top: 8px; font-size: 15px; }
.cmp-card-price strong { color: var(--cmp-primary); font-size: 16px; }
.cmp-card-price .cmp-from { color: var(--cmp-muted); font-size: 13px; }
.cmp-card-price .cmp-unit { color: var(--cmp-muted); font-size: 13px; }
.cmp-empty { text-align: center; color: var(--cmp-muted); padding: 40px 0; }

/* --- pagination --- */
.cmp-pagination { display: flex; justify-content: center; gap: 6px; margin: 8px 0 40px; }
.cmp-pagination a, .cmp-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; border-radius: 50%; font-weight: 600; font-size: 14px; }
.cmp-pagination a:hover { background: #f0f0f0; }
.cmp-pagination span.is-active { background: var(--cmp-text); color: #fff; }

/* --- ad page --- */
.cmp-back { display: inline-flex; align-items: center; gap: 4px; margin: 22px 0 10px; font-size: 14px; color: var(--cmp-muted); }
.cmp-back:hover { color: var(--cmp-text); }
.cmp-ad-head h1 { font-size: clamp(22px, 3vw, 30px); }
.cmp-ad-sub { color: var(--cmp-muted); font-size: 14px; margin: 6px 0 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cmp-ad-sub .material-icons-outlined { font-size: 18px; }
.cmp-ad-ref { margin-left: auto; font-size: 13px; }

/* галерия като Airbnb: една голяма + четири малки, общо 16:9-ish, заоблени ъгли */
.cmp-gallery { display: grid; gap: 8px; border-radius: 16px; overflow: hidden; position: relative; margin-bottom: 32px; height: clamp(300px, 42vw, 520px); }
.cmp-gallery--5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.cmp-gallery--5 .cmp-gallery-item:first-child { grid-row: span 2; }
.cmp-gallery--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.cmp-gallery--3 .cmp-gallery-item:first-child { grid-row: span 2; }
.cmp-gallery--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.cmp-gallery-item { display: block; overflow: hidden; background: #eceff1; position: relative; cursor: zoom-in; }
.cmp-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.cmp-gallery-item::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0); transition: background .2s; }
.cmp-gallery-item:hover::after { background: rgba(0,0,0,.08); }
.cmp-gallery-item:hover img { transform: scale(1.02); }
.cmp-gallery-item.is-hidden { display: none; }
.cmp-gallery-more { position: absolute; right: 18px; bottom: 18px; background: #fff; color: var(--cmp-text); border: 1px solid #222; border-radius: 8px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.15); transition: background .15s; }
.cmp-gallery-more:hover { background: #f7f7f7; }
.cmp-gallery-more .material-icons-outlined { font-size: 16px; }

.cmp-ad-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; margin-bottom: 48px; }
.cmp-params { list-style: none; margin: 0 0 8px; padding: 0 0 20px; border-bottom: 1px solid var(--cmp-line); display: flex; flex-wrap: wrap; gap: 10px 22px; color: #333; font-size: 15px; }
.cmp-params li { display: inline-flex; align-items: center; gap: 6px; }
.cmp-params .material-icons-outlined { color: var(--cmp-muted); }
.cmp-section { padding: 22px 0; border-bottom: 1px solid var(--cmp-line); }
.cmp-section:last-child { border-bottom: 0; }
.cmp-section h2 { font-size: 20px; margin-bottom: 12px; }
.cmp-text { color: #333; font-size: 15.5px; line-height: 1.65; }
.cmp-text p { margin: 0 0 10px; }
.cmp-chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.cmp-chips li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.cmp-chips .material-icons-outlined { color: var(--cmp-primary); font-size: 18px; }
.cmp-map { width: 100%; height: 320px; border: 0; border-radius: 12px; overflow: hidden; background: #eee; }
.cmp-note { display: flex; gap: 10px; background: #fff8e1; border-radius: 10px; padding: 12px 14px; margin-top: 14px; font-size: 14px; color: #5d4037; }
.cmp-note .material-icons-outlined { color: #f9a825; flex: none; }
.cmp-broker-card { display: flex; align-items: center; gap: 14px; }
.cmp-broker-card img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.cmp-broker-card a { display: block; color: var(--cmp-muted); font-size: 14px; }

/* --- panel / form --- */
.cmp-ad-side { position: sticky; top: 24px; }
.cmp-panel { background: var(--cmp-bg); border: 1px solid var(--cmp-line); border-radius: var(--cmp-radius); box-shadow: var(--cmp-shadow); padding: 22px; }
.cmp-panel-head { margin-bottom: 14px; }
.cmp-panel-price { font-size: 22px; }
.cmp-panel-price strong { color: var(--cmp-primary); }
.cmp-panel-price span { color: var(--cmp-muted); font-size: 14px; }
.cmp-panel-head h2 { font-size: 15px; color: var(--cmp-muted); font-weight: 500; margin-top: 2px; }
.cmp-form .cmp-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.cmp-form label { font-size: 12px; font-weight: 600; color: #444; }
.cmp-form input, .cmp-form select, .cmp-form textarea { border: 1px solid #c9c9c9; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px; background: #fff; color: var(--cmp-text); width: 100%; }
.cmp-form input:focus, .cmp-form select:focus, .cmp-form textarea:focus { outline: none; border-color: var(--cmp-text); box-shadow: 0 0 0 2px rgba(0,0,0,.06); }
.cmp-form input[readonly] { background: #f7f7f7; }
.cmp-form .is-invalid { border-color: #d32f2f !important; }
.cmp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp-err { display: none; color: #d32f2f; font-size: 12px; }
.cmp-err.is-visible { display: block; }
.cmp-err--form { margin: 6px 0; font-size: 13px; }
.cmp-check { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: #444; margin: 10px 0 4px; cursor: pointer; }
.cmp-check input { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.cmp-hp { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }
.cmp-calc { border-top: 1px solid var(--cmp-line); border-bottom: 1px solid var(--cmp-line); padding: 12px 0; margin: 6px 0 14px; font-size: 14px; }
.cmp-calc-row { display: flex; justify-content: space-between; color: #444; }
.cmp-calc-total { display: flex; justify-content: space-between; margin-top: 8px; font-size: 15px; }
.cmp-calc small { display: block; color: var(--cmp-muted); font-size: 11.5px; margin-top: 8px; line-height: 1.4; }
.cf-turnstile { margin: 10px 0; }

.cmp-thanks { text-align: center; padding: 10px 4px; }
.cmp-thanks-icon { font-size: 56px; color: #43a047; }
.cmp-thanks h2 { font-size: 20px; margin: 10px 0 8px; }
.cmp-thanks p { color: #444; }
.cmp-thanks-ref { color: var(--cmp-muted); font-size: 13px; }
.cmp-thanks .cmp-btn { margin-top: 10px; }

/* --- footer --- */
.cmp-footer { background: var(--cmp-bg); border-top: 1px solid var(--cmp-line); margin-top: 20px; }
.cmp-footer-image img { width: 100%; max-height: 260px; object-fit: cover; }
.cmp-footer-inner { max-width: var(--cmp-max); margin: 0 auto; padding: 28px 24px; }
.cmp-footer-html { color: #444; font-size: 14px; margin-bottom: 14px; }
.cmp-footer-html p { margin: 0 0 6px; }
.cmp-footer-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--cmp-muted); font-size: 13px; }
.cmp-footer-meta a:hover { color: var(--cmp-text); }
.cmp-powered { margin-left: auto; }

/* flatpickr accent */
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover { background: var(--cmp-primary); border-color: var(--cmp-primary); }
.flatpickr-day.inRange { background: #ffe9ee; border-color: #ffe9ee; box-shadow: -5px 0 0 #ffe9ee, 5px 0 0 #ffe9ee; }

/* --- responsive --- */
@media (max-width: 1100px) { .cmp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
    .cmp-ad-layout { grid-template-columns: 1fr; gap: 24px; }
    .cmp-ad-side { position: static; }
    .cmp-gallery { height: clamp(260px, 48vw, 420px); }
    .cmp-filter { border-radius: 16px; }
}
@media (max-width: 600px) {
    .cmp-container { padding: 0 16px; }
    .cmp-nav { padding: 12px 16px; gap: 12px; }
    .cmp-header-html { display: none; }
    .cmp-contact span:last-child { display: none; }
    .cmp-contact { padding: 8px; }
    .cmp-grid { grid-template-columns: 1fr; }
    .cmp-hero { min-height: 260px; }
    .cmp-gallery { height: 260px; border-radius: 12px; } .cmp-gallery--5, .cmp-gallery--3 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
    .cmp-gallery--5 .cmp-gallery-item:not(:first-child), .cmp-gallery--3 .cmp-gallery-item:not(:first-child) { display: none; }
    .cmp-gallery--5 .cmp-gallery-item:first-child, .cmp-gallery--3 .cmp-gallery-item:first-child { grid-row: span 1; }
    
    .cmp-gallery-more { display: inline-flex !important; }
    .cmp-chips { grid-template-columns: 1fr; }
    .cmp-field-row { grid-template-columns: 1fr; gap: 0; }
    .cmp-filter-field { min-width: 100%; }
    .cmp-filter-actions { width: 100%; }
    .cmp-filter-actions .cmp-btn { flex: 1; }
    .cmp-ad-ref { margin-left: 0; width: 100%; }
    .cmp-powered { margin-left: 0; }
}

/* lightgallery иконки: нов адрес на шрифта (?v=cors), защото кешираните в Cloudflare копия са без CORS заглавка */
@font-face { font-family: lg; src: url(../../vendor/lightgallery/fonts/lg.woff2?v=cors) format("woff2"), url(../../vendor/lightgallery/fonts/lg.woff?v=cors) format("woff"), url(../../vendor/lightgallery/fonts/lg.ttf?v=cors) format("truetype"); font-weight: normal; font-style: normal; font-display: block; }

/* периодът на кампанията под календара в заявката */
.cmp-hint{display:block;margin-top:4px;font-size:12px;color:#717171;}

/* hero - текстът вляво, на една линия с логото и съдържанието; тъмен преход отляво за четимост */
.cmp-hero { justify-content: flex-start; text-align: left; }
.cmp-hero::before { background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,0) 85%), linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.35) 100%); }
.cmp-hero-inner { width: 100%; max-width: var(--cmp-max); margin: 0 auto; box-sizing: border-box; }
.cmp-hero-inner > * { max-width: 640px; }
.cmp-hero-inner > .cmp-hero-cta { max-width: none; }
