/* Viva Spain Life — публичный сайт */
:root {
    --ink: #1d1a17;
    --ink-2: #5b544c;
    --paper: #fbf8f3;
    --card: #ffffff;
    --line: #e9e1d5;
    --accent: #c8102e;      /* испанский красный */
    --accent-2: #f1bf00;    /* испанский жёлтый */
    --accent-soft: #fdf1e6;
    --radius: 14px;
    --font-head: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.65; }
a { color: var(--accent); }
a:hover { color: #9a0c23; }
h1, h2, h3, .brand, .section-title { font-family: var(--font-head); letter-spacing: -.01em; }
img { max-width: 100%; height: auto; }
.accent { color: var(--accent); }
.text-muted-2 { color: #8a8278; }
.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 2000; background: #fff; padding: .5rem 1rem; }

/* шапка */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1020; }
.brand { font-size: 1.45rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand-logo { width: 38px; height: 38px; flex-shrink: 0; }
.brand-text { color: var(--ink); line-height: 1; }
.brand-viva { color: var(--accent); }
.tagline { color: var(--ink-2); font-size: .9rem; }
.search-form input { width: 260px; border-radius: 999px; background: var(--paper); }
.lang-switch { display: flex; gap: .4rem; font-size: .85rem; font-weight: 600; }
.lang-switch a, .lang-switch span { padding: .2rem .5rem; border-radius: 6px; text-decoration: none; color: var(--ink-2); border: 1px solid var(--line); }
.lang-switch .active { background: var(--ink); color: #fff; border-color: var(--ink); }
.main-nav { border-top: 1px solid var(--line); }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: .6rem 0; }
.nav-list a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; padding: .2rem 0; border-bottom: 2px solid transparent; }
.nav-list a:hover, .nav-list a.active { border-bottom-color: var(--accent); color: var(--ink); }
@media (max-width: 991px) {
    .nav-list { flex-direction: column; gap: .15rem; }
    .site-header { position: static; }
}

/* хлебные крошки */
.crumbs { padding-top: 1rem; font-size: .85rem; }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* секции */
.section { padding: 2.5rem 0; }
.section-title { font-size: 1.75rem; margin-bottom: 1.25rem; }
.small-title { font-size: 1.3rem; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page-head .lead { color: var(--ink-2); max-width: 760px; }

/* hero */
.hero { position: relative; border-bottom: 1px solid var(--line); padding: 5rem 0 6rem;
    background: linear-gradient(90deg, rgba(251,248,243,.97) 0%, rgba(251,248,243,.9) 42%, rgba(251,248,243,.15) 72%, rgba(251,248,243,0) 100%),
                url('/images/hero.webp') center bottom / cover no-repeat, var(--accent-soft); }
@media (max-width: 767px) {
    .hero { padding: 3rem 0 9rem;
        background: linear-gradient(180deg, rgba(251,248,243,.97) 0%, rgba(251,248,243,.88) 55%, rgba(251,248,243,0) 85%),
                    url('/images/hero-1200.webp') 70% bottom / cover no-repeat, var(--accent-soft); }
}
.hero-title { font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 820px; margin-bottom: 1.5rem; }
.hero-search { display: flex; gap: .5rem; max-width: 640px; }
.hero-search .form-control { border-radius: 999px; padding-left: 1.4rem; }
.btn-accent { background: var(--accent); color: #fff; border-radius: 999px; padding-left: 1.6rem; padding-right: 1.6rem; }
.btn-accent:hover { background: #9a0c23; color: #fff; }

/* категории */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem; }
.cat-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .15rem; transition: .15s; }
.cat-tile:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.05); }
.cat-icon { font-size: 1.6rem; }
.cat-name { font-weight: 600; }
.cat-count { font-size: .8rem; color: var(--ink-2); }

/* карточки статей */
.card-article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: .15s; }
.card-article:hover { box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.card-img-link img, .img-placeholder { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.img-placeholder { background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.card-body-a { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--accent); text-decoration: none; }
.card-title-a { font-size: 1.15rem; line-height: 1.3; margin: 0; }
.card-title-a a { color: var(--ink); text-decoration: none; }
.card-title-a a:hover { color: var(--accent); }
.card-excerpt { color: var(--ink-2); font-size: .93rem; margin: 0; }
.card-meta { margin-top: auto; font-size: .8rem; color: #8a8278; }
.card-lg .card-title-a { font-size: clamp(1.4rem, 3vw, 2rem); }
.card-sm { flex-direction: row; }
.card-sm .card-img-link { flex: 0 0 110px; }
.card-sm .card-img-link img, .card-sm .img-placeholder { height: 100%; aspect-ratio: auto; min-height: 90px; font-size: 1.6rem; }
.card-sm .card-body-a { padding: .65rem .8rem; }
.card-sm .card-title-a { font-size: .95rem; font-family: var(--font-body); font-weight: 600; }

.popular-list { padding-left: 1.2rem; display: grid; gap: .7rem; }
.popular-list a { color: var(--ink); text-decoration: none; font-weight: 500; }
.popular-list a:hover { color: var(--accent); }

/* статья */
.article-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); line-height: 1.18; margin: .4rem 0 .8rem; }
.article-lead { font-size: 1.18rem; color: var(--ink-2); }
.article-meta { font-size: .85rem; color: #8a8278; display: flex; flex-wrap: wrap; gap: .3rem; }
.article-figure { margin: 1.5rem 0; }
.article-figure img { border-radius: var(--radius); width: 100%; }
.article-body { font-size: 1.06rem; }
.article-body h2 { font-size: 1.7rem; margin: 2.2rem 0 .9rem; }
.article-body h3 { font-size: 1.3rem; margin: 1.6rem 0 .7rem; }
.article-body ul, .article-body ol { padding-left: 1.3rem; }
.article-body li { margin-bottom: .35rem; }
.article-body blockquote { border-left: 4px solid var(--accent-2); background: #fffbea; padding: .9rem 1.2rem; border-radius: 0 10px 10px 0; margin: 1.4rem 0; }
.article-body .table-responsive { margin: 1.2rem 0; border: 1px solid var(--line); border-radius: 10px; }
.article-body table { margin: 0; font-size: .95rem; }
.article-body th { background: var(--accent-soft); }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.3rem; margin: 1.5rem 0; }
.toc summary { font-weight: 600; cursor: pointer; font-family: var(--font-head); font-size: 1.15rem; }
.toc ol { margin: .7rem 0 0; padding-left: 1.2rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.faq { margin-top: 2.5rem; }
.faq h2 { font-size: 1.7rem; margin-bottom: 1rem; }
.faq .accordion-button { font-weight: 600; font-family: var(--font-body); }
.faq .accordion-button:not(.collapsed) { background: var(--accent-soft); color: var(--ink); box-shadow: none; }
.disclaimer { font-size: .85rem; color: #8a8278; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2rem; }
.share { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .9rem; margin: 1rem 0; }
.share a { border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem; text-decoration: none; color: var(--ink); background: #fff; }
.share a:hover { border-color: var(--accent); color: var(--accent); }
.sidebar { top: 110px; }

/* реклама */
.ad-slot { margin: 1.8rem 0; min-height: 90px; text-align: center; }

/* пагинация */
.pagination .page-link { color: var(--ink); }
.pagination .active > .page-link { background: var(--accent); border-color: var(--accent); }

/* подвал */
.site-footer { background: var(--ink); color: #d9d2c7; padding: 3rem 0 1.5rem; margin-top: 3rem; }
.site-footer .brand-text { color: #fff; }
.footer-title { font-size: 1rem; color: #fff; font-family: var(--font-body); font-weight: 600; margin-bottom: .8rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; font-size: .92rem; }
.footer-links.two-cols { grid-template-columns: 1fr 1fr; }
.footer-links a { color: #d9d2c7; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #3a352f; margin-top: 2rem; padding-top: 1rem; font-size: .8rem; color: #8a8278; }

/* автоматические внутренние ссылки — как обычные, без навязчивости */
.article-body a.auto-link { text-decoration: underline; text-decoration-color: rgba(200,16,46,.35); text-underline-offset: 3px; }
.article-body a.auto-link:hover { text-decoration-color: var(--accent); }
