/* ============================================================
   planlove.ru — стиль в духе LovePlanet
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font: 14px/1.45 "Roboto Flex", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #1d2129;
    background: #f0f2f5;
    min-height: 100vh;
}
a { color: #1565c0; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
ul, ol { padding: 0; margin: 0; }
li { list-style: none; }

/* ===== HEADER ===== */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e1e4e8;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.brand {
    font-weight: 800;
    font-size: 22px;
    color: #1d2129;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.brand:hover { text-decoration: none; color: #1d2129; }
.brand::before {
    content: "♥";
    color: #ff6e0a;
    font-size: 24px;
}
.topnav {
    display: flex;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
}
.topnav a {
    color: #444;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}
.topnav a:hover { background: #f0f2f5; text-decoration: none; color: #1d2129; }
.topnav a.active { color: #ff6e0a; }

.topcta {
    display: flex;
    gap: 8px;
}
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    border: 0;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #1565c0; color: #fff; }
.btn-primary:hover { background: #0d4e9b; color: #fff; }
.btn-warning { background: #ff6e0a; color: #fff; }
.btn-warning:hover { background: #e65d00; color: #fff; }
.btn-light { background: #f0f2f5; color: #1d2129; }
.btn-light:hover { background: #e4e6eb; color: #1d2129; }
.btn-outline { background: #fff; color: #1565c0; border: 1px solid #cfd6dc; }
.btn-outline:hover { background: #f5f9ff; }
.btn-big { padding: 11px 26px; font-size: 15px; }
.btn-block { display: block; width: 100%; }

/* ===== LAYOUT ===== */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 16px 60px;
}
.layout-2col {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}
.layout-2col > .main-col,
.layout-2col > .sidebar { min-width: 0; }  /* чтобы grid item не растягивался за viewport */
@media (max-width: 900px) {
    .layout-2col { grid-template-columns: 1fr; }
    .sidebar { order: 2; }
}

/* ===== SIDEBAR ===== */
.sidebar > .panel { margin-bottom: 16px; }
.panel {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.panel-title {
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    font-size: 15px;
}
.panel-cta {
    text-align: center;
    padding: 18px 14px;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe9cc 100%);
    border: 1px solid #ffd9a8;
    border-radius: 10px;
}
.panel-cta h3 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #1d2129;
}
.panel-cta p {
    margin: 0 0 14px;
    color: #555;
    font-size: 13px;
}

/* ===== SEARCH FORM ===== */
.searchpanel {
    background: #fff;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 18px;
}
.searchpanel-wide { padding: 18px 22px; }
.searchform-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px 14px;
    align-items: end;
}
.searchform-grid .field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.searchform-grid label { font-size: 12px; color: #666; }
.searchform-grid select,
.searchform-grid input[type="text"],
.searchform-grid input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #cfd6dc;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* размещение: ряд 1 — 5 фильтров + чекбокс; ряд 2 — Город/Имя/кнопка */
.field-sex    { grid-column: span 2; }
.field-region { grid-column: span 3; }
.field-goal   { grid-column: span 3; }
.field-zodiac { grid-column: span 2; }
.field-age    { grid-column: span 2; }

.field-online { grid-column: span 2; padding-bottom: 8px; }
.field-city   { grid-column: span 5; }
.field-name   { grid-column: span 3; }
.field-submit { grid-column: span 2; }
.field-submit button { width: 100%; }

.checklabel { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #444; cursor: pointer; }

/* двойной слайдер возраста */
.age-slider { position: relative; height: 28px; padding-top: 12px; }
.age-track { position: relative; height: 4px; background: #d8dde3; border-radius: 2px; }
.age-fill  { position: absolute; height: 4px; background: #ff6e0a; border-radius: 2px; }
.age-slider input[type="range"] {
    position: absolute; left: 0; right: 0; top: 6px; width: 100%;
    -webkit-appearance: none; appearance: none;
    background: transparent; pointer-events: none;
    height: 16px; margin: 0; padding: 0;
}
.age-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; border: 2px solid #ff6e0a;
    cursor: pointer; pointer-events: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.age-slider input[type="range"]::-moz-range-thumb {
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; border: 2px solid #ff6e0a;
    cursor: pointer; pointer-events: auto;
}
#age_lbl { color: #ff6e0a; font-weight: 600; }

/* autocomplete dropdown */
.field-ac { position: relative; }
.ac-wrap  { position: relative; }
.ac-drop  {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid #cfd6dc; border-radius: 6px;
    margin-top: 2px; max-height: 280px; overflow-y: auto; z-index: 30;
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.ac-drop.open { display: block; }
.ac-item {
    padding: 8px 12px; cursor: pointer; font-size: 14px;
    border-bottom: 1px solid #f0f2f5;
}
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.active { background: #fff5e6; }
.ac-item .reg { color: #9aa1ad; font-size: 12px; margin-left: 8px; }

/* tablet */
@media (max-width: 1024px) {
    .searchform-grid { grid-template-columns: repeat(6, 1fr); }
    .field-sex    { grid-column: span 2; }
    .field-region { grid-column: span 4; }
    .field-goal   { grid-column: span 3; }
    .field-zodiac { grid-column: span 3; }
    .field-age    { grid-column: span 4; }
    .field-online { grid-column: span 2; }
    .field-city   { grid-column: span 6; }
    .field-name   { grid-column: span 4; }
    .field-submit { grid-column: span 2; }
}
/* mobile */
@media (max-width: 600px) {
    .searchpanel-wide { padding: 12px; }
    .searchform-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .field-sex, .field-region, .field-goal, .field-zodiac,
    .field-age, .field-online, .field-city, .field-name, .field-submit {
        grid-column: span 2;
    }
}

/* ===== HERO / GALLERY STRIP ===== */
.gallery-strip {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}
.gallery-strip-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gallery-strip-title a { font-size: 13px; font-weight: 400; }
.gallery-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    /* критично, чтобы flex item не растягивал родителя за viewport */
    min-width: 0;
    max-width: 100%;
}
.gallery-list::-webkit-scrollbar { height: 6px; }
.gallery-list::-webkit-scrollbar-thumb { background: #cfd6dc; border-radius: 3px; }
.gallery-item {
    flex: 0 0 110px;
    scroll-snap-align: start;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f2f5;
    position: relative;
}
.gallery-item img {
    width: 110px;
    height: 130px;
    object-fit: cover;
}
.gallery-item .tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 12px;
}
.gallery-item .tag b { display: block; font-weight: 600; }

/* социальные иконки в сайдбаре — выровнены по центру, 3 круглые иконки */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 8px 0 4px;
}
.soc-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; text-decoration: none;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
    transition: transform .15s, box-shadow .15s;
}
.soc-icon:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.soc-icon svg { width: 24px; height: 24px; fill: currentColor; display: block; }
.soc-vk { background: #0077FF; }
.soc-ok { background: #ee8208; }
.soc-tg { background: #229ED9; }

/* кнопки магазинов приложений (стиль LP) */
.app-buttons { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.app-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 14px; border-radius: 8px;
    background: #000; color: #fff;
    text-decoration: none;
    border: 1px solid #000;
    transition: background .12s, transform .12s, box-shadow .12s;
}
.app-btn:hover {
    background: #1f1f1f;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.app-btn .app-logo {
    width: 28px; height: 28px;
    flex-shrink: 0;
    display: block;
}
.app-btn-text {
    display: flex; flex-direction: column; line-height: 1.1;
}
.app-btn small {
    font-size: 10px;
    opacity: .85;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.app-btn strong { font-size: 14px; font-weight: 600; }

/* стрелки навигации галереи */
.gallery-strip { position: relative; }
.gallery-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 50%;
    background: #fff; border: 1px solid #cfd6dc;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    color: #333; font-size: 24px; line-height: 32px;
    cursor: pointer; z-index: 5;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    transition: opacity .15s, background .15s, transform .12s;
}
.gallery-arrow:hover { background: #ff6e0a; color: #fff; border-color: #ff6e0a; }
.gallery-arrow-prev { left: 4px; }
.gallery-arrow-next { right: 4px; }
.gallery-arrow.hidden { opacity: 0; pointer-events: none; transform: translateY(-50%) scale(.8); }

/* кнопка Загрузить ещё */
.load-more-wrap { display: flex; justify-content: center; margin: 24px 0 12px; }
.load-more-btn {
    min-width: 280px;
    background: #fff;
    color: #1565c0;
    border: 2px solid #1565c0;
    font-weight: 600;
    transition: background .15s, color .15s, transform .12s;
}
.load-more-btn:hover {
    background: #1565c0;
    color: #fff;
    transform: translateY(-1px);
}
.load-more-btn:disabled { opacity: .6; cursor: wait; }

/* ===== PROFILE GRID ===== */
.h1 {
    font-size: 22px;
    margin: 4px 0 4px;
    line-height: 1.2;
}
.lead {
    color: #5b6275;
    margin: 0 0 18px;
    font-size: 14px;
}
.empty {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    color: #5b6275;
}
.section-title {
    margin: 24px 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1d2129;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}
.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.12s, box-shadow 0.12s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.card a { display: block; color: inherit; }
.card a:hover { text-decoration: none; }
.card .ph {
    aspect-ratio: 1/1;
    background: #e9ebee;
    overflow: hidden;
    position: relative;
}
.card .ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card .ph::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 70%, rgba(0,0,0,0.25));
    pointer-events: none;
}
.card .meta {
    padding: 10px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.card .name {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    color: #1d2129;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card .city {
    color: #5b6275;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card .online {
    color: #27ae60;
    font-size: 12px;
    margin-top: 2px;
}
.card .cta {
    margin-top: 8px;
    padding: 7px 0;
    background: #f0f2f5;
    text-align: center;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #1d2129;
    transition: background 0.15s;
}
.card:hover .cta { background: #ff6e0a; color: #fff; }

/* ===== PROFILE PAGE ===== */
.profile {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    align-items: start;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
@media (max-width: 700px) {
    .profile { grid-template-columns: 1fr; }
}
.profile .left img.main {
    width: 100%;
    border-radius: 10px;
    aspect-ratio: 3/4;
    object-fit: cover;
}
.profile .thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 10px;
}
.profile .thumbs img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 6px;
    cursor: zoom-in;
}
.profile h1 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 700;
}
.profile .sub {
    color: #5b6275;
    margin-bottom: 16px;
    font-size: 14px;
}
.profile .ai-intro {
    font-size: 15px;
    line-height: 1.5;
    color: #1d2129;
    margin: 8px 0 16px;
    padding: 12px 14px;
    background: #fff8f0;
    border-left: 3px solid #ff6e0a;
    border-radius: 6px;
}
.profile dl.fields {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px 16px;
    margin: 14px 0 18px;
    font-size: 14px;
}
.profile dl.fields dt { color: #5b6275; }
.profile dl.fields dd { margin: 0; color: #1d2129; }
.cta-write {
    display: inline-block;
    background: #ff6e0a;
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    margin: 8px 0;
    box-shadow: 0 2px 8px rgba(255,110,10,0.3);
}
.cta-write:hover {
    background: #e65d00;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(255,110,10,0.4);
}
.box.search-text {
    background: #f0f5fc;
    border-left: 3px solid #1565c0;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.box.about {
    margin: 14px 0;
    color: #1d2129;
    font-size: 14px;
    line-height: 1.55;
}
.crumbs {
    font-size: 13px;
    color: #5b6275;
    margin-bottom: 12px;
}
.crumbs a { color: #5b6275; }
.crumbs a:hover { color: #1565c0; }

/* ===== CITIES / REGIONS LIST ===== */
.cities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 4px 16px;
    margin: 12px 0 26px;
    background: #fff;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.cities a {
    padding: 4px 0;
    font-size: 14px;
    color: #1565c0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cities a span {
    color: #9aa1ad;
    font-size: 12px;
    margin-left: 4px;
}

/* ===== PAGER ===== */
.pager {
    display: flex;
    gap: 8px;
    margin: 24px 0 0;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.pager a {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    background: #fff;
    color: #1565c0;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.pager a:hover { background: #1565c0; color: #fff; text-decoration: none; }
.pager span { color: #5b6275; font-size: 14px; }

/* ===== SEO TEXT BOTTOM ===== */
.seo-bottom {
    background: #fff;
    border-radius: 10px;
    padding: 18px 22px;
    margin: 24px 0;
    color: #444;
    font-size: 14px;
    line-height: 1.55;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.seo-bottom h2, .seo-bottom h3 {
    color: #1d2129;
    margin-top: 16px;
}

/* ===== FOOTER ===== */
.footer {
    background: #fff;
    border-top: 1px solid #e1e4e8;
    padding: 28px 0;
    margin-top: 40px;
    color: #5b6275;
    font-size: 13px;
}
.footer .container { padding-top: 0; padding-bottom: 0; }
.footer p { margin: 4px 0; }
.footer a { color: #5b6275; }
.footer a:hover { color: #1565c0; }
.footer-cta {
    background: linear-gradient(135deg, #1565c0 0%, #0d4e9b 100%);
    color: #fff;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}
.footer-cta h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 20px;
}
.footer-cta p { color: #d1e0f5; margin: 0 0 16px; }

.footer-tags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px 28px;
    margin: 24px 0 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e4e8;
}
.footer-tags-col strong {
    display: block;
    color: #1d2129;
    font-size: 14px;
    margin-bottom: 6px;
}
.footer-tags-col a {
    display: block;
    padding: 2px 0;
    color: #1565c0;
    font-size: 13px;
}
.footer-tags-col a:hover { color: #ff6e0a; }

.footer-legal { margin-top: 8px; opacity: .85; }
.footer-legal a { color: #cfd6dc; text-decoration: underline; font-size: 13px; }
.footer-legal a:hover { color: #ff6e0a; }

/* статические страницы (politika, soglashenie) */
.static-page {
    background: #fff;
    padding: 28px 32px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    line-height: 1.6;
    color: #333;
}
.static-page h1 { font-size: 28px; margin: 0 0 6px; line-height: 1.2; }
.static-page .lead { color: #888; font-size: 14px; margin-bottom: 24px; }
.static-page h2 { font-size: 18px; margin: 28px 0 10px; color: #1565c0; }
.static-page p, .static-page ul { font-size: 14px; }
.static-page ul { padding-left: 22px; }
.static-page ul li { margin-bottom: 4px; }
.static-page a { color: #1565c0; }
.static-page a:hover { color: #ff6e0a; }
.static-page code { background: #f0f2f5; padding: 1px 6px; border-radius: 3px; font-size: 13px; }

/* ===== photo badge на карточках (как у LP) ===== */
.card .ph,
.gallery-item { position: relative; }
.photo-badge {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,.55); color: #fff;
    padding: 3px 8px; border-radius: 12px;
    font-size: 12px; line-height: 1;
    display: inline-flex; align-items: center; gap: 4px;
    z-index: 2; pointer-events: none;
}
.photo-badge svg { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .topnav { display: none; }
    .h1 { font-size: 20px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
    .card .meta { padding: 8px 10px 10px; }
    .card .name { font-size: 14px; }
    .card .city { font-size: 12px; }
    .profile h1 { font-size: 22px; }
    .profile { padding: 16px; }
}
