/* ============================================================
   Isumi's Kennel — Main Stylesheet
   Colors: Deep Red, Purple, Dark Blue + cream content
   ============================================================ */

:root {
  --red:         #8B0000;
  --red-light:   #C0392B;
  --red-dark:    #5a0000;
  --purple:      #5D2D82;
  --purple-light:#9B59B6;
  --blue:        #1A3A6B;
  --blue-light:  #2980B9;
  --bg:          #0a0f1e;
  --bg-mid:      #111827;
  --content-bg:  #faf8f4;
  --cream:       #f5f0e8;
  --border:      #8B0000;
  --text:        #1a1008;
  --text-light:  #f0ece4;
  --text-muted:  #6b5a4e;
  --link:        #7a1010;
  --link-hover:  #C0392B;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  color: var(--text);
  line-height: 1.65;
}

/* ── Background pattern ── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(139,0,0,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(93,45,130,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

#wrapper {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  background: var(--bg-mid);
  box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

/* ── HEADER ── */
#site-header {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 50%, var(--purple) 100%);
  border-bottom: 4px solid #c0a060;
  padding: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.header-logo h1 {
  font-size: 2rem;
  font-weight: normal;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.header-logo h1 a {
  color: inherit;
  text-decoration: none;
}

.header-logo .tagline {
  color: #f0c080;
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.header-deco .mon-circle {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(240,192,128,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.header-deco .mon-circle .mon-spitz {
  width: 52px; height: 52px;
  object-fit: contain;
  filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(10deg) brightness(0.9);
  opacity: 0.85;
}

/* ── NAV ── */
#main-nav {
  background: linear-gradient(90deg, var(--red-dark) 0%, var(--blue) 100%);
  border-bottom: 2px solid #c0a060;
  display: flex;
  align-items: center;
  padding: 0 12px;
}

#main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  flex: 1;
}

#main-nav ul li a {
  display: block;
  padding: 10px 13px;
  color: #e8d4c0;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
  border-right: 1px solid rgba(255,255,255,0.1);
}

#main-nav ul li a:hover,
#main-nav ul li.active a {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
}

.lang-switch a {
  color: #e8d4c0;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 0.75rem;
  padding: 2px 4px;
}
.lang-switch a.active { color: #fff; font-weight: bold; }
.lang-switch a:hover { color: #fff; }

/* ── CONTENT ── */
#content-wrap {
  background: var(--content-bg);
  padding: 0;
}

#main-content {
  padding: 28px 32px;
  min-height: 400px;
}

/* ── PAGE TITLE ── */
.page-title {
  font-size: 1.6rem;
  color: var(--red);
  border-bottom: 2px solid var(--red);
  padding-bottom: 8px;
  margin-bottom: 20px;
  font-weight: normal;
  letter-spacing: 0.03em;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { color: var(--red); font-weight: normal; margin: 1em 0 0.5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; border-bottom: 1px solid #ddd; padding-bottom: 4px; }
h3 { font-size: 1.1rem; }

p { margin-bottom: 1em; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }

ul, ol { margin: 0.5em 0 1em 1.5em; }
li { margin-bottom: 0.3em; }

/* ── TABLES ── */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.9rem;
}
table.data-table th {
  background: var(--red);
  color: #fff;
  padding: 8px 10px;
  text-align: left;
  font-weight: normal;
  letter-spacing: 0.03em;
}
table.data-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #ddd;
}
table.data-table tr:nth-child(even) td { background: #f5ede6; }
table.data-table tr:hover td { background: #ede0d4; }

/* ── DOG GRID ── */
.dog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin: 16px 0;
}

.dog-card {
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
}
.dog-card:hover {
  border-color: var(--red);
  box-shadow: 0 2px 12px rgba(139,0,0,0.15);
}
.dog-card a { text-decoration: none; color: inherit; display: block; }
.dog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.dog-card .no-photo {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #f5ede6, #ead8cc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #c0a090;
}
.dog-card-info {
  padding: 10px;
}
.dog-card-name {
  font-size: 0.95rem;
  color: var(--red);
  font-weight: bold;
  display: block;
  margin-bottom: 3px;
  line-height: 1.3;
}
.dog-card-titles {
  font-size: 0.72rem;
  color: var(--purple);
  font-style: italic;
  display: block;
  line-height: 1.4;
  word-break: break-word;
}
.dog-card-nickname {
  font-size: 0.82rem;
  color: var(--purple);
  font-style: italic;
  margin-bottom: 2px;
}
.dog-card-reg {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.dog-profile-nickname {
  font-size: 0.65em;
  color: var(--purple);
  font-style: italic;
  font-weight: normal;
  vertical-align: middle;
}
.dog-profile-titles {
  margin-bottom: 8px;
}

/* ── LITTER LIST ── */
.litter-list { list-style: none; margin: 0; padding: 0; }
.litter-item {
  background: #fff;
  border-left: 4px solid var(--red);
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 0 4px 4px 0;
}
.litter-item h3 { margin: 0 0 4px; font-size: 1rem; color: var(--red); }
.litter-item p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.litter-item a { color: var(--red); }

/* ── PEDIGREE TABLE ── */
.pedigree-wrap {
  overflow-x: auto;
  margin: 16px 0;
}
table.pedigree {
  border-collapse: collapse;
  font-size: 0.75rem;
  min-width: 700px;
}
table.pedigree td {
  border: 1px solid #8B0000;
  padding: 4px 8px;
  vertical-align: middle;
}
table.pedigree .ped-dog { background: #5a0000; color: #fff; font-weight: bold; }
table.pedigree .ped-sire { background: #1A3A6B; color: #e8f0ff; }
table.pedigree .ped-dam  { background: #5D2D82; color: #f0e8ff; }
table.pedigree .ped-g1   { background: #0d2444; color: #cce0ff; }
table.pedigree .ped-g2   { background: #3a1a5a; color: #e8d8ff; }
table.pedigree .ped-gg   { background: #1a1a2e; color: #d0d8ff; }
table.pedigree .ped-empty { background: #2a2a3a; color: #666; font-style: italic; }
table.pedigree a { color: inherit; text-decoration: underline; }
table.pedigree .ped-reg    { font-size: 0.65rem; opacity: 0.75; display: block; }
table.pedigree .ped-name   { display: block; font-weight: bold; }
table.pedigree .ped-titles { font-size: 0.68rem; opacity: 0.85; display: block; margin-top: 2px; color: #f0c080; word-break: break-word; }
table.pedigree .ped-title  { font-size: 0.7rem; color: #f0c080; display: block; }

/* ── SKK DATA TABLES (kullsyskon, avkommor) ── */
table.skk-data-table {
  border-collapse: collapse;
  font-size: 0.88rem;
  width: 100%;
  margin-bottom: 8px;
}
table.skk-data-table th {
  background: var(--purple);
  color: #fff;
  padding: 5px 10px;
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
}
table.skk-data-table td { padding: 4px 10px; border-bottom: 1px solid #e8e0f0; }
table.skk-data-table tr.odd td { background: #f8f4fc; }

/* ── PHOTO GALLERY ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border: 2px solid #ddd;
  cursor: pointer;
  transition: border-color 0.2s;
}
.gallery-item img:hover { border-color: var(--red); }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 8px 18px;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red-dark);
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.btn-purple { background: var(--purple); border-color: #3a1a5a; }
.btn-purple:hover { background: #3a1a5a; }
.btn-blue { background: var(--blue); border-color: #0d2040; }
.btn-blue:hover { background: #0d2040; }

/* ── DIVIDER ── */
hr.fancy {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), var(--purple), transparent);
  margin: 20px 0;
}

/* ── FOOTER ── */
#site-footer {
  background: linear-gradient(135deg, var(--red-dark), var(--blue));
  border-top: 3px solid #c0a060;
  padding: 16px 24px;
  text-align: center;
  color: #c0a070;
  font-size: 0.8rem;
}
#site-footer a { color: #d4b088; }
#site-footer a:hover { color: #fff; }
.footer-jp { font-size: 1.1rem; margin-top: 6px; color: rgba(240,192,128,0.6); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .header-inner { flex-direction: column; gap: 10px; text-align: center; }
  .header-logo h1 { font-size: 1.4rem; }
  #main-nav { flex-direction: column; align-items: stretch; }
  #main-nav ul { justify-content: center; }
  #main-content { padding: 16px; }
  .dog-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── DOG PROFILE PAGE ── */
.dog-profile { display: flex; gap: 24px; flex-wrap: wrap; }
.dog-profile-photos { flex: 0 0 260px; }
.dog-profile-photos img { width: 100%; border: 2px solid var(--red); margin-bottom: 6px; }
.dog-profile-info { flex: 1; min-width: 200px; }
.dog-profile-info dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.dog-profile-info dt { font-weight: bold; color: var(--red); font-size: 0.85rem; white-space: nowrap; }
.dog-profile-info dd { font-size: 0.9rem; }
.dog-titles-badge {
  display: inline-block;
  background: var(--purple);
  color: #fff;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 2px;
  margin: 1px;
  cursor: default;
}
