/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --gold:        #C8860A;
  --gold-light:  #E9A820;
  --gold-pale:   #FDF3DC;
  --brown:       #6B3D14;
  --brown-dark:  #3E200A;
  --cream:       #FFF9F0;
  --white:       #ffffff;
  --text:        #2C1A0E;
  --muted:       #7A6050;
  --border:      #E8D8C0;
  --success:     #2E7D32;
  --error:       #C62828;
  --radius:      10px;
  --shadow:      0 2px 12px rgba(100,50,0,.10);
  --transition:  .2s ease;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--border); }
h1, h2, h3, h4, h5, h6 { font-family: 'Comfortaa', sans-serif; }
body { font-family: 'Geologica', sans-serif; background: var(--cream); color: var(--text); line-height: 1.7; max-width: 1280px; margin: 0 auto; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.container  { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.section { padding: 4rem 0; }
.section-light { background: var(--gold-pale); }
.section-title { text-align: center; font-size: 2rem; color: var(--brown); margin-bottom: 2rem; }
.section-lead  { max-width: 700px; margin: 0 auto 2.5rem; text-align: center; font-size: 1.1rem; color: var(--muted); }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: .6rem 1.5rem; border-radius: 30px; font-size: .95rem;
  font-family: 'Comfortaa', sans-serif; cursor: pointer; border: 2px solid transparent; transition: var(--transition);
  text-decoration: none !important;
}
.btn-primary  { background: var(--gold); color: var(--white); border-color: var(--gold); }
.btn-primary:hover { background: var(--brown); border-color: var(--brown); }
.btn-outline  { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--white); }
.btn-danger   { background: var(--error); color: var(--white); border-color: var(--error); }
.btn-danger:hover { opacity: .85; }
.btn-sm       { padding: .3rem .8rem; font-size: .82rem; border-radius: 20px; }
.btn-full     { width: 100%; text-align: center; }
.btn-link-danger { background: none; border: none; color: var(--error); cursor: pointer; font-size: .9rem; padding: 0; font-family: inherit; }
.btn-link-danger:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header { background: var(--brown-dark); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: .75rem; padding-bottom: .75rem; gap: 1rem; }
.logo { display: flex; flex-direction: column; }
.logo-title { color: var(--gold-light); font-size: 1.25rem; font-weight: bold; letter-spacing: .03em; }
.logo-sub   { color: rgba(255,255,255,.55); font-size: .75rem; margin-top: .1rem; }
.logo:hover { text-decoration: none; }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; }
.main-nav a  { color: rgba(255,255,255,.85); font-size: .88rem; padding: .35rem .65rem; border-radius: 6px; transition: var(--transition); font-family: 'Comfortaa', sans-serif; }
.main-nav a:hover { background: rgba(255,255,255,.12); color: var(--gold-light); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav   { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--brown-dark); padding: 1rem; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a  { display: block; padding: .6rem .8rem; }
  .header-inner { flex-wrap: wrap; }
}

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown) 100%);
  padding: 5rem 0 4.5rem;
  text-align: center;
}
.hero h1 { color: var(--white); font-size: clamp(1.8rem, 5vw, 3rem); margin-bottom: .6rem; }
.hero-tagline { color: var(--gold-light); font-size: 2rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Feature cards ──────────────────────────────────────────────────────────── */
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.card-feature { background: var(--white); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; box-shadow: var(--shadow); }
.card-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.card-feature h3 { color: var(--brown); margin-bottom: .5rem; }
.card-feature p  { color: var(--muted); font-size: .95rem; }

/* ── Dogs grid ───────────────────────────────────────────────────────────────── */
.dogs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.dog-card  { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition); color: inherit; }
.dog-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(100,50,0,.18); text-decoration: none; }
.dog-card img  { width: 100%; height: 220px; object-fit: cover; }
.dog-card-placeholder { width: 100%; height: 220px; display: flex; align-items: center; justify-content: center; font-size: 4rem; background: var(--gold-pale); }
.dog-card-placeholder.large { height: 380px; }
.dog-card-body { padding: 1rem; }
.dog-card-body h3 { color: var(--brown); margin-bottom: .3rem; font-size: 1.1rem; }
.dog-sex   { color: var(--muted); font-size: .85rem; }
.dog-titles { color: var(--gold); font-size: .82rem; margin-top: .25rem; }
.dog-birth  { color: var(--muted); font-size: .82rem; }
.dog-price  { color: var(--brown); font-weight: bold; margin-top: .4rem; }

/* ── Status badges ───────────────────────────────────────────────────────────── */
.status-badge { display: inline-block; padding: .2rem .7rem; border-radius: 20px; font-size: .78rem; font-weight: bold; margin-top: .4rem; }
.status-available { background: #E8F5E9; color: #2E7D32; }
.status-reserved  { background: #FFF8E1; color: #F57F17; }
.status-sold      { background: #FFEBEE; color: #B71C1C; }

/* ── Dog detail page ─────────────────────────────────────────────────────────── */
.dog-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 1.5rem; align-items: start; }
@media (max-width: 700px) { .dog-detail { grid-template-columns: 1fr; } }
.dog-main-img { width: 100%; border-radius: var(--radius); object-fit: cover; max-height: 480px; }
.dog-thumbs   { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.dog-thumb    { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: border-color var(--transition); }
.dog-thumb.active, .dog-thumb:hover { border-color: var(--gold); }
.dog-info h1  { color: var(--brown-dark); margin-bottom: 1rem; }
.dog-meta     { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.dog-meta th  { text-align: left; color: var(--muted); font-weight: normal; padding: .35rem .5rem .35rem 0; white-space: nowrap; width: 130px; }
.dog-meta td  { padding: .35rem 0; }

/* ── News ────────────────────────────────────────────────────────────────────── */
.news-list   { display: grid; gap: 1.5rem; }
.news-card   { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-columns: 180px 1fr; }
@media (max-width: 560px) { .news-card { grid-template-columns: 1fr; } }
.news-card img { width: 180px; height: 130px; object-fit: cover; }
@media (max-width: 560px) { .news-card img { width: 100%; height: 200px; } }
.news-card-body { padding: 1.25rem; }
.news-date  { color: var(--muted); font-size: .82rem; display: block; margin-bottom: .4rem; }
.news-card-body h2, .news-card-body h3 { font-size: 1.1rem; color: var(--brown-dark); }
.news-hero-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.5rem; }
.news-full h1 { color: var(--brown-dark); margin: .5rem 0 .25rem; }

/* ── Gallery ─────────────────────────────────────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.gallery-item { cursor: pointer; overflow: hidden; border-radius: 8px; position: relative; aspect-ratio: 1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption { position: absolute; bottom: 0; left: 0; right: 0; padding: .4rem .6rem; background: rgba(0,0,0,.5); color: #fff; font-size: .8rem; }

/* ── Lightbox ────────────────────────────────────────────────────────────────── */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 9999; align-items: center; justify-content: center; flex-direction: column; }
.lightbox.open { display: flex; }
#lightboxImg   { max-height: 85vh; max-width: 90vw; border-radius: 8px; }
#lightboxCaption { color: #ddd; margin-top: .75rem; font-size: .95rem; }
.lightbox-close { position: absolute; top: 1rem; right: 1.5rem; background: none; border: none; color: #fff; font-size: 2.5rem; cursor: pointer; }

/* ── Videos ──────────────────────────────────────────────────────────────────── */
.videos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-item h3 { margin-top: .75rem; color: var(--brown); }

/* ── Useful info ─────────────────────────────────────────────────────────────── */
.toc { background: var(--gold-pale); border-left: 4px solid var(--gold); padding: 1rem 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 2.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.toc a { color: var(--brown); font-size: .95rem; padding: .25rem .75rem; background: var(--white); border-radius: 20px; border: 1px solid var(--border); }
.toc a:hover { background: var(--gold); color: var(--white); text-decoration: none; }
.info-article { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.info-article h2 { color: var(--brown); font-size: 1.5rem; margin-bottom: 1rem; }
.back-top { display: inline-block; margin-top: 1rem; color: var(--muted); font-size: .85rem; }

/* ── Rich text ───────────────────────────────────────────────────────────────── */
.rich-text h2, .rich-text h3 { color: var(--brown); margin: 1.5rem 0 .5rem; }
.rich-text p  { margin-bottom: 1rem; }
.rich-text ul, .rich-text ol { margin: .5rem 0 1rem 1.5rem; }
.rich-text li { margin-bottom: .3rem; }

/* ── Page content wrapper ────────────────────────────────────────────────────── */
.page-content { padding-top: 2.5rem; padding-bottom: 4rem; }
.page-title   { color: var(--brown-dark); font-size: clamp(1.6rem,4vw,2.4rem); margin-bottom: 2rem; border-bottom: 3px solid var(--gold); padding-bottom: .6rem; display: inline-block; }
.back-link    { display: inline-block; color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.back-link:hover { color: var(--gold); }
.empty-state  { color: var(--muted); font-size: 1.1rem; margin-top: 2rem; }

/* ── Contacts ─────────────────────────────────────────────────────────────────── */
.contacts-intro { margin-bottom: 2rem; }
.contacts-list  { display: flex; flex-direction: column; gap: 1rem; max-width: 560px; }
.contact-item   {
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--white); border-radius: var(--radius); padding: 1.1rem 1.5rem;
  box-shadow: var(--shadow); color: var(--text); text-decoration: none !important;
  transition: transform var(--transition), box-shadow var(--transition);
}
.contact-item:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(100,50,0,.15); }
.contact-icon   {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; color: var(--white);
}
.contact-icon--phone    { background: var(--gold); }
.contact-icon--telegram { background: #2AABEE; }
.contact-icon--whatsapp { background: #25D366; }
.contact-icon--email    { background: var(--brown); }
.contact-icon--vk       { background: #4680C2; }
.contact-info   { display: flex; flex-direction: column; gap: .15rem; }
.contact-label  { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.contact-value  { font-size: 1.05rem; color: var(--brown-dark); font-weight: 500; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer  { background: var(--brown-dark); color: rgba(255,255,255,.7); text-align: center; padding: 2.5rem 1rem; margin-top: 0; }
.footer-name  { color: var(--gold-light); font-size: 1.1rem; font-weight: bold; }
.footer-tagline { font-size: .9rem; margin: .3rem 0 1rem; }
.footer-nav   { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.footer-nav a { color: rgba(255,255,255,.65); font-size: .88rem; font-family: 'Comfortaa', sans-serif; }
.footer-nav a:hover { color: var(--gold-light); text-decoration: none; }
.footer-copy  { font-size: .8rem; color: rgba(255,255,255,.4); }
.footer-contacts { display: flex; gap: .6rem; justify-content: center; margin-bottom: 1rem; }
.footer-contact-link {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.8);
  transition: background var(--transition), color var(--transition);
  text-decoration: none !important;
}
.footer-contact-link:hover                  { background: var(--gold); color: var(--white); }
.footer-contact-link--telegram:hover        { background: #2AABEE; }
.footer-contact-link--whatsapp:hover        { background: #25D366; }
.footer-contact-link--vk:hover              { background: #4680C2; }

/* ── Alerts ───────────────────────────────────────────────────────────────────── */
.alert { padding: .85rem 1.25rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: .95rem; }
.alert-success { background: #E8F5E9; color: var(--success); border: 1px solid #A5D6A7; }
.alert-error   { background: #FFEBEE; color: var(--error); border: 1px solid #FFCDD2; }

/* ════════════════════════════════════════════════════════
   ADMIN STYLES
═══════════════════════════════════════════════════════════ */
.admin-body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #F5F0EB; }

/* Layout */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
@media (max-width: 700px) { .admin-layout { grid-template-columns: 1fr; } }

/* Sidebar */
.admin-sidebar { background: var(--brown-dark); padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 0; }
.admin-logo a  { color: var(--gold-light); font-weight: bold; font-size: 1rem; display: block; margin-bottom: 1.5rem; text-decoration: none; }
.admin-nav     { display: flex; flex-direction: column; gap: .15rem; }
.admin-nav a   { color: rgba(255,255,255,.8); padding: .55rem .75rem; border-radius: 6px; font-size: .9rem; transition: var(--transition); }
.admin-nav a:hover { background: rgba(255,255,255,.12); color: var(--gold-light); text-decoration: none; }
.admin-nav hr  { border: none; border-top: 1px solid rgba(255,255,255,.15); margin: .75rem 0; }

/* Main */
.admin-main { padding: 2rem; }
.admin-page-title { font-size: 1.5rem; color: var(--brown-dark); margin-bottom: 1.5rem; }
.admin-toolbar    { margin-bottom: 1.25rem; }
.admin-quick-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.stat-card  { background: var(--white); border-radius: var(--radius); padding: 1.5rem; text-align: center; box-shadow: var(--shadow); text-decoration: none !important; transition: transform var(--transition); display: flex; flex-direction: column; align-items: center; }
.stat-card:hover { transform: translateY(-3px); }
.stat-num   { font-size: 2.5rem; font-weight: bold; color: var(--gold); }
.stat-label { color: var(--muted); font-size: .9rem; margin-top: .3rem; }

/* Table */
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th { background: var(--gold-pale); color: var(--brown); padding: .7rem 1rem; text-align: left; font-size: .85rem; }
.admin-table td { padding: .7rem 1rem; border-top: 1px solid var(--border); font-size: .9rem; }
.table-actions  { display: flex; gap: .5rem; align-items: center; }

/* Forms */
.admin-form { max-width: 760px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: .4rem; }
.form-group input[type=text],
.form-group input[type=number],
.form-group input[type=date],
.form-group input[type=url],
.form-group input[type=password],
.form-group select,
.form-group textarea {
  width: 100%; padding: .6rem .9rem; border: 1.5px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: .95rem; background: var(--white); color: var(--text);
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--gold);
}
.form-group textarea { resize: vertical; }
.form-group small { display: block; color: var(--muted); font-size: .8rem; margin-top: .3rem; }
.form-row  { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.form-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }

/* Photo manage grid */
.photo-manage-grid { display: flex; flex-wrap: wrap; gap: .75rem; }
.photo-manage-item { position: relative; }
.photo-manage-item img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; }
.photo-manage-actions { display: flex; gap: .3rem; margin-top: .4rem; flex-wrap: wrap; }

/* Gallery manage */
.gallery-manage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; margin-top: 1.5rem; }
.gallery-manage-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.gallery-manage-actions { margin-top: .4rem; }

/* Info edit */
.info-edit-block { background: var(--white); border-radius: var(--radius); padding: 1rem; margin-bottom: .75rem; box-shadow: var(--shadow); }
.info-edit-block summary { cursor: pointer; font-size: 1rem; color: var(--brown); padding: .25rem 0; }

/* Badge */
.badge { display: inline-block; background: var(--gold); color: var(--white); padding: .15rem .5rem; border-radius: 12px; font-size: .75rem; }

/* Offspring section on dog detail */
.offspring-section { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--border); }
.offspring-title   { color: var(--brown); font-size: 1.5rem; margin-bottom: 1.5rem; }

/* Checkbox label */
.checkbox-label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .95rem; color: var(--text); }
.checkbox-label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }

/* Parent tabs */
.parent-tabs { display: flex; gap: .35rem; margin-bottom: .25rem; flex-wrap: wrap; }
.parent-tab  { background: var(--white); border: 1.5px solid var(--border); color: var(--muted); padding: .3rem .9rem; border-radius: 20px; font-size: .85rem; cursor: pointer; font-family: inherit; transition: var(--transition); }
.parent-tab:hover  { border-color: var(--gold); color: var(--gold); }
.parent-tab.active { background: var(--gold); border-color: var(--gold); color: var(--white); }

/* Login */
.login-wrap { max-width: 360px; margin: 6rem auto; background: var(--white); padding: 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.login-wrap h1 { font-size: 1.4rem; color: var(--brown-dark); margin-bottom: .3rem; }
.login-sub { color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.login-form { text-align: left; }
.login-form label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.login-form input { display: block; width: 100%; margin-top: .35rem; padding: .65rem .9rem; border: 1.5px solid var(--border); border-radius: 8px; font-size: 1rem; }
.login-form .btn { margin-top: 1rem; }

/* Hero cover */
.hero-cover { width: 100%; overflow: hidden; max-height: 340px; }
.hero-cover img { width: 100%; height: 340px; object-fit: cover; display: block; }
@media (max-width: 600px) { .hero-cover img { height: 200px; } }

/* About section image */
.about-image-wrap { margin: 1.25rem 0; }
.about-image-wrap img { width: auto; max-width: 100%; max-height: 320px; border-radius: var(--radius); display: block; margin: 0 auto; }
