*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --navy:       #1a2744;
      --navy-light: #243154;
      --gold:       #c9a84c;
      --gold-light: #e2c97e;
      --white:      #ffffff;
      --page-bg:    #f2f4f7;
      --off-white:  #f8f9fb;
      --text:       #2a2a2a;
      --text-light: #666;
      --border:     #dde1ea;
    }

    html { scroll-behavior: smooth; }

    body {
      font-family: 'Montserrat', sans-serif;
      color: var(--text);
      background: var(--page-bg);
      min-height: 100vh;
	  text-align: justify;
    }
	
	b { font-weight: 600;}

    /* ─── PAGE WRAPPER — everything centered, 1400px ─── */
    .site-wrap {
      width: 100%;
      max-width: 1300px;
      margin: 0 auto;
      background: var(--white);
      box-shadow: 0 0 60px rgba(0,0,0,0.10);
    }

/* ─── HEADER ─── */
.site-wrap > header {
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 52px;
  height: 74px;
  position: relative;
}

/* White left panel with a diagonal right edge via clip-path */
.site-wrap > header::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 50%;
  height: 100%;
  background: var(--white);
  clip-path: polygon(0 0, 100% 0, calc(100% - 60px) 100%, 0 100%);
  pointer-events: none;
}

    .logo {
      display: flex;
      align-items: center;
      gap: 14px;
      text-decoration: none;
      flex-shrink: 0;
      position: relative;
      z-index: 1;
    }

    .logo-emblem { width: 32px; height: 41px; }

    .logo-text { display: flex; flex-direction: column; line-height: 1.15; }

    .logo-name {
	  padding-left: 10px;
      font-family: 'Cormorant Garamond', serif;
      font-size: 24px;
      font-weight: 600;
      color: var(--navy);
      letter-spacing: 0.03em;
    }
	
    nav { display: flex; gap: 32px; align-items: center; position: relative; z-index: 1; }

    nav a {
      color: rgba(255,255,255,0.72);
      text-decoration: none;
      font-size: 10.5px;
      font-weight: 600;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      position: relative;
      padding-bottom: 4px;
      transition: color 0.2s;
    }

    nav a::after {
      content: '';
      position: absolute;
      bottom: 0; left: 0; right: 100%;
      height: 1px;
      background: var(--gold);
      transition: right 0.25s ease;
    }

    nav a:hover { color: var(--white); }
    nav a:hover::after, nav a.active::after { right: 0; }
    nav a.active { color: var(--white); }

    /* ─── HERO ─── */
    .hero {
      position: relative;
      height: 500px;
      display: flex;
      align-items: center;
      overflow: hidden;
      background: var(--navy);
    }
	
	.hero-horse {
      position: relative;
      height: 400px;
      display: flex;
      align-items: center;
      overflow: hidden;
      background: var(--navy);
    }

    .hero-bg {
      position: absolute;
      inset: 0;
      background: url('https://helmililja.net/merveilles/img/otsikko.jpg') right bottom no-repeat;
      opacity: 0.42;
    }
	
	.hero-bg-horse {
      position: absolute;
      inset: 0;
      background: url('https://helmililja.net/merveilles/img/tausta.jpg') right top no-repeat;
      opacity: 0.42;
    }

    .hero-bg::after,
	.hero-bg-horse:after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(
        to right,
        #1a2744 0%,
        #1a2744 29%,
        transparent 60%
      );
    }

    .hero-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(
        100deg,
        rgba(26,39,68,0.88) 0%,
        rgba(26,39,68,0.55) 55%,
        rgba(26,39,68,0.12) 100%
      );
    }

    .hero-content {
      position: relative;
      z-index: 2;
      padding: 0 54px;
      width: 100%;
      max-width: none;
    }

    .hero-eyebrow {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--gold);
      margin-bottom: 18px;
    }

    .hero h1 {
      font-family: 'Cormorant Garamond', serif;
      font-size: 76px;
      font-weight: 700;
      color: var(--white);
      line-height: 1.0;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-bottom: 10px;
    }
	
	.hero-horse h1.horse-name {
      font-family: 'Cormorant Garamond', serif;
      font-size: 36px;
      font-weight: 700;
      color: var(--white);
      line-height: 1.0;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-bottom: 10px;
    }

    .hero-sub {
      font-family: 'Cormorant Garamond', serif;
      font-size: 26px;
      font-weight: 400;
      font-style: italic;
      color: var(--gold-light);
      margin-bottom: 36px;
    }

    .btn-outline-white {
      display: inline-block;
      background: transparent;
      border: 2px solid rgba(255,255,255,0.85);
      color: var(--white);
      padding: 13px 34px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      text-decoration: none;
      transition: background 0.22s, border-color 0.22s, color 0.22s;
    }

    .btn-outline-white:hover {
      background: var(--gold);
      border-color: var(--gold);
      color: var(--navy);
    }

    .btn-gold {
      display: inline-block;
      background: var(--gold);
      border: 2px solid var(--gold);
      color: var(--navy);
      padding: 11px 28px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      text-decoration: none;
      transition: background 0.22s, color 0.22s;
    }

    .btn-gold:hover {
      background: var(--navy);
      border-color: var(--navy);
      color: var(--white);
    }

    .btn-navy {
      display: inline-block;
      background: var(--navy);
      border: 2px solid var(--navy);
      color: var(--white);
      padding: 11px 28px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      text-decoration: none;
      transition: background 0.22s, color 0.22s;
    }

    .btn-navy:hover {
      background: var(--gold);
      border-color: var(--gold);
      color: var(--navy);
    }

    /* ─── SECTION COMMONS ─── */
    .section-eyebrow {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--gold);
      margin-bottom: 12px;
    }

    .section-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 40px;
      font-weight: 600;
      color: var(--navy);
      line-height: 1.15;
      margin-bottom: 20px;
    }

    .section-title em { font-style: italic; color: var(--gold); }

    .gold-rule {
      width: 48px;
      height: 2px;
      background: var(--gold);
      margin-bottom: 28px;
    }

    /* ─── GENERIC SECTIONS ─── */
    .section-white,
    .section-offwhite,
    .section-navy {
      padding: 40px 54px;
    }

    .section-white   { background: var(--white); }
    .section-offwhite { background: var(--off-white); }
    .section-navy    { background: var(--navy); }

    /* Headings */
    .section-white h2,
    .section-offwhite h2 {
      font-family: 'Cormorant Garamond', serif;
      font-size: 40px;
      font-weight: 600;
      color: var(--navy);
      line-height: 1.15;
      margin-bottom: 20px;
    }

    .section-navy h2 {
      font-family: 'Cormorant Garamond', serif;
      font-size: 40px;
      font-weight: 600;
      color: var(--white);
      line-height: 1.15;
      margin-bottom: 20px;
    }

    .section-white h2 em,
    .section-offwhite h2 em,
    .section-navy h2 em { font-style: italic; color: var(--gold); }

    .section-white .gold-rule,
    .section-offwhite .gold-rule,
    .section-navy .gold-rule { margin-bottom: 28px; }

    /* Body text */
    .section-white p,
    .section-offwhite p {
      font-size: 13.5px;
      line-height: 1.85;
      color: var(--text-light);
      margin-bottom: 16px;
    }

    .section-navy p {
      font-size: 13.5px;
      line-height: 1.85;
      color: rgba(255,255,255,0.62);
      margin-bottom: 16px;
    }

    .section-white p:last-child,
    .section-offwhite p:last-child,
    .section-navy p:last-child { margin-bottom: 0; }

    /* ─── STALLIONS ─── */
    .stallions {
      padding: 72px 52px;
      background: var(--white);
    }

    .section-header-centered {
      text-align: center;
      margin-bottom: 48px;
    }

    .section-header-centered .gold-rule { margin: 0 auto 0; }

    .stallions-grid {
		margin-top: 15px;
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 18px;
    }

    .stallion-card {
      border-radius: 6px;
      overflow: hidden;
      background: var(--white);
      display: flex;
      flex-direction: column;
      box-shadow: 0 0 0 1px rgba(26,39,68,0.05);
      transition: box-shadow 0.2s, transform 0.2s;
      text-decoration: none;
      color: inherit;
	  border-top: 2px solid var(--border);
	  border-bottom: 2px solid var(--border);
    }
	
	.stallion-body a {
      color: inherit;
	  text-decoration: none;
    }

    .stallion-img-wrap {
      width: 100%;
      height: 151px;
      overflow: hidden;
      flex-shrink: 0;
    }

    .stallion-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      transition: transform 0.4s ease;
    }

    .stallion-body {
      padding: 10px 16px 12px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }

    .stallion-studbook {
	  padding-top: 10px;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.18em;
      color: var(--gold);
	  margin-bottom: 4px;
    }

    .stallion-name {
    font-size: 12.5px;
	font-weight: 600;
	color: var(--navy);
	line-height: 1.3;
	letter-spacing: 0.5px;
    }

    .stallion-merits {
      font-size: 12px;
      color: var(--text-light);
      letter-spacing: 0.04em;
      margin-bottom: 10px;
      line-height: 1.5;
    }
	
/* Ensure the wrapper link handles layout beautifully without changing content styling */
.stallions-grid > a {
  text-decoration: none !important;
  color: inherit !important;
  outline: none;
}

/* Hard reset to prevent any transforms or shadow changes on card hover/active states */
.stallions-grid > a:hover .stallion-card,
.stallions-grid > a:active .stallion-card,
.stallions-grid > a:focus .stallion-card {
  transform: none !important;
  box-shadow: 0 2px 12px rgba(26,39,68,0.10), 0 0 0 1px rgba(26,39,68,0.04) !important;
}

/* Prevent image scaling effects on hover */
.stallions-grid > a:hover .stallion-img {
  transform: none !important;
}

/* CRITICAL: Force all text colors to remain exactly as they are originally defined, even on hover */
.stallions-grid > a:hover .stallion-name {
  color: var(--navy) !important;
  text-decoration: none !important;
}

.stallions-grid > a:hover .stallion-studbook {
  color: var(--gold) !important;
}

.stallions-grid > a:hover .stallion-merits {
  color: var(--text-light) !important;
}

    /* ─── FOOTER ─── */
    footer {
      background: var(--navy);
      padding: 56px 52px 32px;
    }

    .footer-cols {
      display: grid;
      grid-template-columns: 0.65fr 1fr;
      gap: 68px;
    }

    .footer-col-left p,
    .footer-col-right p {
      font-size: 11.5px;
      color: rgba(255,255,255,0.5);
      line-height: 1.8;
      margin-bottom: 14px;
    }

    .footer-col-left p:last-child,
    .footer-col-right p:last-child { margin-bottom: 0; }

    .footer-col-left a,
    .footer-col-right a {
      color: inherit;
      text-decoration: none;
      transition: color 0.2s;
    }

    .footer-col-left a:hover,
    .footer-col-right a:hover { color: var(--gold); }

    .footer-col-right {
      border-left: 1px solid rgba(255,255,255,0.09);
      padding-left: 52px;
    }
    /* ─── GALLERY ─── */
    .galleria-section {
      background: var(--white);
      padding: 72px 52px 80px;
    }

    .galleria-heading {
      font-family: 'Cormorant Garamond', serif;
      font-size: 40px;
      font-weight: 600;
      color: var(--navy);
      line-height: 1.15;
      margin-bottom: 20px;
      text-align: center;
    }

    .galleria-heading em { font-style: italic; color: var(--gold); }

    .galleria {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-auto-rows: 220px;
      gap: 16px;
    }

    .galleria-kuva {
      position: relative;
      overflow: hidden;
      background: var(--navy-light);
	  border-radius: 6px;
	  box-shadow: 0 2px 12px rgba(26,39,68,0.10), 0 0 0 1px rgba(26,39,68,0.04);
    }

    .galleria-kuva img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    } 

    .galleria-kuva.laaja {
      grid-column: span 2;
    }

    .galleria-kuva.korkea {
      grid-row: span 2;
    }

    .galleria-kuva.laaja.korkea {
      grid-column: span 2;
      grid-row: span 2;
    }
	
	/** HORSE **/

.hevonen-info-table {
    width: 101.5%;
    border-collapse: separate;
    border-spacing: 0 4px;
    margin-top: 18px;
    table-layout: fixed;
}

.hevonen-info-table td {
    padding: 7px 14px;
    font-size: 13.5px;
    line-height: 1.85;
    vertical-align: middle;
    overflow: hidden;
}

.hevonen-info-table td.kysymys {
    width: 17.5%;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.1);
    border-right: 2px solid var(--border);
    border-radius: 6px;
    padding-left: 12px;
    white-space: nowrap;
}

.hevonen-info-table td.vastaus {
    color: rgba(255,255,255,0.82);
    padding-left: 18px;
}

.hevonen-info-table td.vastaus a {
    color: var(--gold);
    text-decoration: none;
	font-weight: 500;
}

.hevonen-info-table td.vastaus small {
    font-size: 10px;
    opacity: 0.6;
    margin-left: 4px;
}
/* ─── HERO HORSE IMAGE ─── */
.horse-name-image-wrap {
    display: flex;
    align-items: stretch;
    gap: 50px;
}

.horse-name-table-col {
    flex: 1 1 auto;
    min-width: 0;
	order: 2;
}

.horse-hero-img-col {
    flex: 0 0 320px;
	order: 1;
}

.horse-hero-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 6px;
}

/* Custom resets for nested HTML generated from your database variables */
.horse-history-quote p,
.horse-history-quote {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 23px !important;
    font-style: italic !important;
    font-weight: 400 !important;
    color: var(--navy) !important;
    line-height: 1.7 !important;
    text-align: center !important;
	padding: 0px 8px 25px !important;
}

/* Formats the body paragraphs under the quote box cleanly */
.horse-behavior-text p,
.horse-behavior-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--text-light);
    text-align: justify;
    margin-bottom: 16px;
}

/* Forces the container to wrap its inner text and quotes on the same line layer */
.horse-history-quote {
    position: relative;
    text-align: center;
    width: 100%;
    padding: 0 48px;
}

/* Opening quote styles */
.horse-history-quote::before {
    content: open-quote;
    color: var(--gold);
    font-size: 52px;
    font-style: normal;
    line-height: 1;
    position: absolute;
    left: 0;
    top: 0;
}

/* Closing quote styles — flows inline so it sits right after the last word */
.horse-history-quote::after {
    content: close-quote;
    color: var(--gold);
    font-size: 52px;
    font-style: normal;
    line-height: 0;
    vertical-align: -0.35em;
    display: inline;
    margin-left: 4px;
}

/* Make the last paragraph inline so ::after tucks onto the same line */
.horse-history-quote p:last-of-type {
    display: inline;
}

/* Fixes the typography consistency for the history section */
.historia p, 
.historia {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem; /* Or your preferred size, e.g., 15px */
    line-height: 1.6;
    color: var(--text);
}

/** PEDIGREE */

.pedigree-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 auto 22px;
    table-layout: fixed;
    background: var(--white);
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(26,39,68,0.04);
}

.pedigree-table a {
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
}

.pedigree-table a:hover {
  color: var(--navy);
  text-decoration: none;
}

.pedigree-table td {
    padding: 13px 20px;
    font-size: 13.5px;
    line-height: 1.55;
    vertical-align: middle;
    overflow: hidden;
    white-space: nowrap;
    border: none;
    border-radius: 0;
}

.pedigree-table tr + tr td {
    border-top: 1px solid rgba(221,225,234,0.55);
}

.pedigree-table td small {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    opacity: 0.62;
    margin-top: 2px;
}

.pedigree-table td.pedigree-ancestor small {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: none !important;
    opacity: 0.62;
	margin-left: 10px;
}

.pedigree-parent {
    width: 34%;
    color: var(--text-light);
}

.pedigree-parent2 {
    width: 33%;
    color: var(--text-light);
}

.pedigree-ancestor {
    width: 33%;
    color: var(--text-light);
}

.ori {
	background: rgba(26,39,68,0.04);
}

.tamma {
}

/* ─── FOALS ─── */
.foal-simple {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-light);
  margin-top: 18px;
}

.foal-number {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-right: 6px;
}

.foal-simple a,
.foals-list a {
  color: var(--navy);
  font-weight: inherit;
  text-decoration: none;
  font-weight: 500;
}

.horse-pedigree-desc {
    height: 150px;
    overflow: hidden;
}

.horse-pedigree-desc-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.horse-pedigree-desc-wrapper label {
    position: absolute;
    top: 100%;
    font-family: 'Playfair Display', serif;
	font-size: 17px;
    font-style: normal;
	font-weight:bold;
    color: var(--wine);
    width: 100%;
    text-align: center;
    background: rgb(255,255,255);
    background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    margin-top: -100px;
    padding-top: 100px;
}

.evm-tag {
  display: inline-block;
  vertical-align: calc(middle - 2px);
  position: relative;
  top: -2px;
  margin-left: 10px;
  padding: 6px;
  background: #EDEDF1;
  color: var(--text-light);
  font-size: 8.5px;
  font-weight: 600;
  border-radius: 2px;
  letter-spacing: 0.10em;
  line-height: 1;
  text-transform: uppercase;
}

/* ─── MERITS ─── */
.horse-merits {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 40px 54px 0;
  background: var(--white);
  text-align: center;
  margin-bottom: -10px;
}

.horse-merit,
.horse-merit:hover {
  min-width: 96px;
  padding: 12px 18px;
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(26,39,68,0.04);
  text-decoration: none;
  color: inherit;
}

.horse-merit strong,
.horse-merit strong:hover {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.horse-merit span,
.horse-merit span:hover {
  display: block;
  margin-top: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold);
}

/* TABS */

ul.tabs {
    width: 100%;
    padding: 48px 54px 0;
    font-size: 0;
    list-style-type: none;
    text-align: center;
    border-bottom: 2px solid var(--border);
    background: var(--white);
}

ul.tabs li {
    display: inline-block;
    margin-right: 4px;
}

ul.tabs li a {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-light);
    background: transparent;
    padding: 12px 22px 13px;
    border: 2px solid transparent;
    border-bottom: none;
    border-radius: 0;
    position: relative;
    top: 2px;
    outline: none;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

ul.tabs li a:hover {
    color: var(--navy);
    background: var(--white);
    border-color: var(--border);
}

ul.tabs li.selected a {
    color: var(--navy);
    background: var(--white);
    border-color: var(--border);
    border-bottom-color: transparent;
}



/* ─── RESULTS ─── */

.results-layout {
  display: grid;
  grid-template-columns: 0.85fr 90px 1.8fr;
  align-items: start;
}

.results-layout-divider {
  background: var(--border);
  width: 1px;
  margin: 0 auto;
  height: 100%;
  align-self: stretch;
}

.results-summary {
  padding-right: 0;
}

.results-summary p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-light);
  margin-bottom: 26px;
}

.results-score {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-light);
}

.results-score strong {
  font-weight: 600;
  color: var(--text-light);
}

.results-score b {
  color: var(--gold);
  font-weight: 600;
}

.results-progress {
  height: 18px;
  margin-top: 18px;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(26,39,68,0.08);
  overflow: hidden;
}

.results-progress-fill {
  min-width: 42px;
  height: 100%;
  border-radius: inherit;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.results-progress-fill span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--white);
}

.results-section-row th {
  padding: 8px 18px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(26,39,68,0.04);
  border-top: 1px solid rgba(221,225,234,0.75);
  border-bottom: 1px solid rgba(221,225,234,0.75);
}

.results-table tbody .results-section-row:first-child th {
  border-top: none;
}

.results-section-row + tr td {
  background: var(--white);
}

.results-table-wrap {
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(26,39,68,0.04);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13.5px;
  color: var(--text-light);
}

.results-table th,
.results-table td {
  padding: 12px 16px;
  text-align: left;
  line-height: 1.2;
}

.results-table td a {
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
}

.results-table th {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(26,39,68,0.04);
}

.results-col-date {
  width: 16%;
}

.results-col-place {
  width: 25%;
}

.results-col-result {
  width: 35%;
}

.results-col-extra {
  width: 19%;
}

.results-table tbody tr + tr {
  border-top: 1px solid rgba(221,225,234,0.65);
}

.results-table tbody tr:not(.results-section-row) {
  background: var(--white);
}

@media (max-width: 820px) {
  .results-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .results-layout-divider {
    display: none;
  }

  .results-summary {
    padding-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 28px;
  }

  .results-table-wrap {
    overflow-x: auto;
  }

  .results-table {
    min-width: 680px;
  }
}

/* ─── DIARY ─── */
.diary-list {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.diary-entry {
  margin-bottom: -10px;
}

.diary-entry:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.diary-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
  border-radius: 6px;
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 0 0 1px rgba(26,39,68,0.04);
  background: rgba(26,39,68,0.04);
  overflow: visible;
}

.diary-meta::before {
  content: none;
}

.diary-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 13px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}

.diary-meta .diary-date {
  color: var(--gold);
}

.diary-meta .diary-type {
  color: var(--navy);
}

.diary-meta .diary-author {
  gap: 5px;
  color: var(--navy);
}

.diary-meta .diary-author i {
  color: var(--gold);
  font-size: 11px;
}

.diary-text {
  max-width: 980px;
}

.diary-text p,
.diary-entry > p {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text-light);
  margin-bottom: 16px;
  text-align: justify;
}

.diary-text p:last-child,
.diary-entry > p:last-child {
  margin-bottom: 0;
}

/* ─── HORSE GALLERY ─── */
.kuvagalleria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 240px));
  justify-content: center;
  gap: 18px;
  margin: 4px auto 18px;
}

.kuvagalleria a {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 0 0 1px rgba(26,39,68,0.04);
}

.kuvagalleria img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.section-white .kuvagalleria-copy {
  margin-top: 14px;
  margin-bottom: 0;
  text-align: center;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--text-light);
  opacity: 0.72;
}

.section-white .kuvagalleria-copy a {
  color: var(--gold);
  text-decoration: none;
}

.section-white .kuvagalleria-copy a:hover {
  color: var(--navy);
}

/* ─── LIGHTBOX ─── */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background: rgba(26,39,68,0.88);
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox img {
  display: block;
  max-width: min(100%, 1100px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

.gallery-lightbox-close {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox-close:hover {
  color: var(--gold);
}

/* ── Sukuselvitys toggle ── */
.sukuselvitys-toggle-wrap {
  margin: 1.5rem 0 1rem;
}
 
.sukuselvitys-btn {
  align-items: center;
  gap: 0.45em;
  border-radius: 6px;
  border-top: 2px solid var(--border);
  border-right: none;
  border-bottom: 2px solid var(--border);
  border-left: none;
  background: rgba(26,39,68,0.04);
  font-family: 'Montserrat', sans-serif;
  color: var(--navy);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 11px 12px;
  cursor: pointer;
}
 
.sukuselvitys-btn::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.18s;
  margin-right: 6px;
}
 
.sukuselvitys-btn[aria-expanded="true"]::before {
  transform: rotate(90deg);
}
 
.sukuselvitys-content {
  margin-top: 1rem;
}
 
.sukuselvitys-content b {
  color: var(--gold);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

/* KASVATUS */

h3 {
	font-size: 9.5px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--gold);
	margin-bottom: 10px;
}

.koristekuva {
	margin: 20px 0 5px 0;
    border-radius: 6px;
	border-top: 2px solid var(--border);
	border-bottom: 2px solid var(--border);
	box-shadow: 0 0 0 1px rgba(26,39,68,0.05);
	height: 259px;
}

.koristekuva:not(:first-child) {
    margin-left: 28px;
}

.kasvatus {
	display: flex;
	text-align: left;
	margin: 30px 0 20px 0;
}

.kasvatus a,
.kasvatit a {
	color: var(--navy);
    text-decoration: none;
	font-weight: 500;
}

.kasvatus > div {
	border-radius: 6px;
	border-top: 2px solid var(--border);
	border-bottom: 2px solid var(--border);
	box-shadow: 0 0 0 1px rgba(26,39,68,0.05);
	padding: 30px 40px 25px 40px;
}

.kasvatus > div:first-child {
	width: 66%;
}

.kasvatus > div:last-child {
	width: 30%;
	margin-left: auto;
}

.kasvatit {
	width: 100%;
	overflow: hidden;
	border-radius: 6px;
	border-top: 2px solid var(--border);
	border-bottom: 2px solid var(--border);
	box-shadow: 0 0 0 1px rgba(26,39,68,0.05);
	margin: 32px 0 0 0;
	font-size: 13.5px;
	line-height: 1.2;
	color: var(--text-light);
}

.kasvatit thead {
	font-size: 9.5px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--navy);
	background: rgba(26,39,68,0.04);
}

.kasvatit th {
	font-weight: 700;
}

.kasvatit th,
.kasvatit td {
	padding: 12px 20px;
	border-bottom: 1px solid rgba(221,225,234,0.75);
}

.kasvatit td.numero {
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gold);
	margin-right: 6px;
}

/* ─── OWNER SIGNATURE ─── */
.owner-signature {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: -10px;
}

.owner-signature-name {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 28px;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.owner-signature-name a {
  font: inherit;
  color: inherit;
  text-decoration: none;
}

.owner-signature-id {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 3px;
}

.owner-signature-mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.owner-signature-mail svg {
  color: var(--gold);
  flex-shrink: 0;
}

.owner-signature-mail:hover {
  color: var(--navy);
}

@media (max-width: 600px) {
  .owner-signature {
    flex-wrap: wrap;
  }

  .owner-signature-mail {
    margin-left: 0;
    width: 100%;
  }
}