/*
Theme Name: Rinaldi
Theme URI: https://rinaldi.ru
Author: Rinaldi
Description: Фирменная тема сети мини-отелей «Ринальди»: mobile-first, RU/EN (Polylang), отели/номера/акции как отдельные типы записей. Порт дизайн-системы Astro-прототипа 2026-08.
Version: 1.0.0
Requires PHP: 8.1
License: proprietary
Text Domain: rinaldi
*/

/* ============================================================
   Design tokens — ported 1:1 from the approved Astro prototype.
   Mobile-first; breakpoints: 640px, 960px.
   ============================================================ */

:root {
  --c-brand: #990033;
  --c-brand-dark: #720026;
  --c-brand-tint: #f7ecf0;
  --c-ink: #26221f;
  --c-ink-soft: #5c5651;
  --c-paper: #faf7f2;
  --c-card: #ffffff;
  --c-line: #e5ddd3;
  --c-accent: #a97e2f;
  --c-good: #2e6b3f;

  --font-serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --font-sans: 'PT Sans', 'Segoe UI', Arial, sans-serif;

  --radius: 10px;
  --shadow: 0 1px 3px rgb(38 34 31 / 0.08), 0 4px 16px rgb(38 34 31 / 0.06);
  --shadow-lift: 0 2px 6px rgb(38 34 31 / 0.10), 0 10px 28px rgb(38 34 31 / 0.10);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  --header-h: 3.5rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-paper);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  margin: 0 0 var(--space-4);
  color: var(--c-ink);
  text-wrap: balance;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
@media (min-width: 960px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.85rem; }
  h3 { font-size: 1.3rem; }
}

p { margin: 0 0 var(--space-4); }
a { color: var(--c-brand); text-underline-offset: 3px; }
a:hover { color: var(--c-brand-dark); }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 640px) { .container { padding-inline: var(--space-6); } }

.section { padding-block: var(--space-8); }
@media (min-width: 960px) { .section { padding-block: var(--space-12); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  min-height: 3rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: 600 1rem var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--c-brand); color: #fff; }
.btn--primary:hover { background: var(--c-brand-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--c-brand); border-color: var(--c-brand); }
.btn--ghost:hover { background: var(--c-brand-tint); color: var(--c-brand-dark); }
.btn--block { width: 100%; }

.price-from { font-family: var(--font-sans); font-weight: 700; color: var(--c-ink); white-space: nowrap; }
.price-from small { font-weight: 400; color: var(--c-ink-soft); }

.card {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.muted { color: var(--c-ink-soft); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden;
}
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--c-brand); color: #fff; padding: var(--space-2) var(--space-4); z-index: 100; }
.skip-link:focus { left: 0; color: #fff; }

/* ---- grids shared by home/catalogue/metro pages ---- */
.hotel-grid { display: grid; gap: var(--space-6); margin-top: var(--space-6); }
@media (min-width: 640px) { .hotel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .hotel-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- WP editor content niceties ---- */
.entry-content ul { padding-left: 1.4rem; }
.alignwide, .alignfull { max-width: 100%; }

/* ============================================================
   Header (ported from Header.astro)
   ============================================================ */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--c-card); border-bottom: 1px solid var(--c-line); }
.hdr__row { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: var(--space-3); }
.hdr__brand { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; }
.hdr__logo { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 6px; background: var(--c-brand); color: #fff; font: 700 1.2rem var(--font-serif); }
.hdr__name { font: 700 1.25rem var(--font-serif); color: var(--c-ink); letter-spacing: 0.02em; }
.hdr__side { display: flex; align-items: center; gap: var(--space-3); }
.hdr__phones { display: none; flex-direction: column; align-items: flex-end; line-height: 1.35; }
.hdr__phone { font-weight: 700; font-size: 0.95rem; text-decoration: none; color: var(--c-ink); white-space: nowrap; }
.hdr__phone--sub { font-weight: 400; font-size: 0.85rem; color: var(--c-ink-soft); }
.hdr__lang-wrap ul, .hdr__lang-wrap li { list-style: none; margin: 0; padding: 0; display: inline; }
.hdr__lang-wrap a { font: 700 0.85rem var(--font-sans); text-decoration: none; text-transform: uppercase; border: 1px solid var(--c-line); border-radius: 6px; padding: 0.35rem 0.55rem; color: var(--c-ink-soft); }
.hdr__burger { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; background: none; border: 0; cursor: pointer; }
.hdr__burger-bar, .hdr__burger-bar::before, .hdr__burger-bar::after { content: ''; display: block; width: 1.4rem; height: 2px; background: var(--c-ink); position: relative; transition: transform 0.15s ease; }
.hdr__burger-bar::before { position: absolute; top: -6px; }
.hdr__burger-bar::after { position: absolute; top: 6px; }
.hdr__burger[aria-expanded='true'] .hdr__burger-bar { background: transparent; }
.hdr__burger[aria-expanded='true'] .hdr__burger-bar::before { transform: translateY(6px) rotate(45deg); }
.hdr__burger[aria-expanded='true'] .hdr__burger-bar::after { transform: translateY(-6px) rotate(-45deg); }
.hdr__nav { border-top: 1px solid var(--c-line); background: var(--c-card); }
.hdr__list { list-style: none; margin: 0; padding: var(--space-2) var(--space-4); display: flex; flex-direction: column; }
.hdr__list a { display: block; padding: var(--space-3) 0; text-decoration: none; color: var(--c-ink); font-weight: 600; border-bottom: 1px solid var(--c-line); }
.hdr__list li:last-child a { border-bottom: 0; }
@media (min-width: 960px) {
  .hdr__phones { display: flex; }
  .hdr__burger { display: none; }
  .hdr__nav { border-top: 0; }
  .hdr__list { flex-direction: row; gap: var(--space-6); max-width: 72rem; margin-inline: auto; padding: 0 var(--space-6) var(--space-2); }
  .hdr__list a { border-bottom: 0; padding: var(--space-2) 0; }
}

/* ============================================================
   Footer (ported from Footer.astro)
   ============================================================ */
.ftr { margin-top: var(--space-12); background: var(--c-ink); color: #d9d2ca; padding-block: var(--space-8) var(--space-4); }
.ftr a { color: #fff; }
.ftr .muted { color: #a89f95; }
.ftr__brand { font: 700 1.3rem var(--font-serif); color: #fff; margin-bottom: var(--space-1); }
.ftr__grid { display: grid; gap: var(--space-6); }
.ftr__messengers { display: flex; gap: var(--space-4); }
.ftr__legal { border-top: 1px solid rgb(255 255 255 / 0.12); margin-top: var(--space-6); padding-top: var(--space-4); }
@media (min-width: 640px) { .ftr__grid { grid-template-columns: 2fr 1fr 1fr; } }

/* ============================================================
   Hotel card (ported from HotelCard.astro)
   ============================================================ */
.hcard { display: flex; flex-direction: column; }
.hcard__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--c-brand-tint); }
.hcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.hcard:hover .hcard__media img { transform: scale(1.03); }
.hcard__ph { width: 100%; height: 100%; }
.hcard__body { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); flex: 1; }
.hcard__title { margin: 0; font-size: 1.15rem; }
.hcard__title a { color: var(--c-ink); text-decoration: none; }
.hcard__title a:hover { color: var(--c-brand); }
.hcard__addr { margin: 0; font-size: 0.9rem; }
.hcard__metro { margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hcard__station { font-size: 0.85rem; color: var(--c-ink-soft); }
.hcard__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: auto; padding-top: var(--space-3); }


/* ---- Site logo (Внешний вид → Настроить → Свойства сайта) ----
   The supplied artwork is white ink on its own crimson ground (#990033),
   so it needs no recolouring: it sits as a small block in the light header
   and on the dark footer alike. Height is capped in rem so it tracks the
   header; the 250px source is then ~2x for crispness on retina screens. */
.hdr__logo-img {
  height: 2.4rem;
  width: auto;
  border-radius: 6px;
  display: block;
}
@media (min-width: 960px) { .hdr__logo-img { height: 2.6rem; } }

.ftr__logo-img {
  height: 2.6rem;
  width: auto;
  border-radius: 6px;
  margin-bottom: var(--space-3);
}

/* Focus ring: the gold ring is too faint on the brand-red and dark grounds
   (2.4:1), so those surfaces get a white ring instead (8.7:1). */
.home-hero :focus-visible,
.hero :focus-visible,
.ftr :focus-visible {
  outline-color: #fff;
}
