@import url('https://fonts.googleapis.com/css2?family=Electrolize&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* BASE */
:root {
  --gold: #C49960;
  --red: #3b0d0d;
  --black: #0a0a0a;
  --text: #e8e8e8;
  --muted: #9a9a9a;
}

a:link, a:active, a:visited { color: var(--gold); }
a:hover { color: var(--muted); }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: url(prism.png);
  color: var(--text);
  font-family: 'Inter', sans-serif;
text-align:justify;
font-size: 15px;
}

/* CONTAINER SYSTEM */
.wrapper {
  width: 100%;
margin: 30px auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
border-bottom: 2px solid var(--gold);
}

/* HEADER */
.header {
background: var(--black);
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: center;
  height: 80px;
  border-bottom: 1px solid rgba(212,175,55,0.15);
}

.nav { text-align: center; }

.nav a {
  font-family: 'Electrolize', serif;
  margin: 0 16px;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s ease;
text-decoration:none;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0%;
  height: 1px;
  background: var(--gold);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  opacity: 0.8;
}

.nav a:hover {
  color: var(--gold);
}

.nav a:hover::after {
  width: 100%;
}


/* HERO */
.hero, .hero-horse {
  display: grid;
  padding: 20px 30px;
  background: linear-gradient(90deg, var(--red), var(--black));
  border-bottom: 1px solid rgba(212,175,55,0.15);
}

.hero {
  grid-template-columns: 3fr 2fr;
  gap: 30px;
}

.hero-horse {
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.divider {
  width: 120px;
  height: 1px;
  background: var(--gold);
  margin: 20px 0;
}

.divider.small { width: 80px; }

/* INFO */

.info { width:100%; }

.info td {
padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
text-align:left;
font-size: 15px;
}

.info b {
font-family: 'Electrolize', serif;
text-transform:uppercase;
color: var(--gold);
letter-spacing: 1px;
}

.info img { margin: 0 5px; }


/* IMAGE */
.hero-right {
  display: flex;
  justify-content: center;
}

/* ABOUT */
.about {
  padding: 40px 30px;
background: #FFF;
}

h1 {
  font-family: 'Electrolize', serif;
  color: var(--gold);
  font-size: 28px;
text-transform:uppercase;
letter-spacing: 2px;
}

h2 {
  font-family: 'Electrolize', serif;
  color: var(--gold);
  font-size: 24px;
}

h3 {
  font-family: 'Electrolize', serif;
  color: var(--gold);
  font-size: 24px;
margin-top: 50px;
}

p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: #333;
}

.border { border: 1px solid rgba(212,175,55,0.15); box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); }


/* RESULTS */
.results {
  background: linear-gradient(90deg, var(--red), var(--black));
  padding: 40px 30px;
}

.result {
  display: grid;
  grid-template-columns: 80px 1fr 140px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.kasvatit, .pkk {
width: 100%; border-collapse:collapse;
}

.kasvatit td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.pkk td { 
  padding: 14px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
color: var(--black); }

/* FOOTER */
.footer {
  padding: 30px 0;
  font-size: 13px;
letter-spacing: 2px;
text-transform:uppercase;
text-align:center;
}



#paivakirja {
        width: 100%;
        height: 400px;
        font-size: 15px;
        color: #535353;
        overflow: auto;
        padding: 10px 25px 10px 25px;
        behavior: url(ie-css3.htc);
	border-radius:20px
}

.paivamaara { font-family: 'Electrolize', serif;
  color: var(--gold); font-size: 18px; font-weight: 600; }



#paivakirja::-webkit-scrollbar { width: 0px; height: 3px; }
#paivakirja::-webkit-scrollbar-button { width: 0px; height: 0px; }
#paivakirja::-webkit-scrollbar-thumb { background: #ECEEF0; border: 0px dotted #ffffff; border-radius: 50px; }
#paivakirja::-webkit-scrollbar-thumb:hover { background: #ECEEF0; }
#paivakirja::-webkit-scrollbar-thumb:active { background: #ECEEF0; }
#paivakirja::-webkit-scrollbar-track { background: #ECEEF0; border: 0px none #ffffff; border-radius: 50px; }
#paivakirja::-webkit-scrollbar-track:hover { background: #ECEEF0; }
#paivakirja::-webkit-scrollbar-track:active { background: #ECEEF0; }
#paivakirja::-webkit-scrollbar-corner { background: transparent; }


.ruusukkeet { text-align:center; }
.ruusukkeet img { max-height: 130px; margin: 0 5px; }


.sukutaulu { text-transform: none; border-style: solid; }
.sukutaulu td { line-height: 1.4; }
.sukutaulu b { font-weight: 700; }
.sukutaulu small { text-transform: none; font-style: italic; color: var(--muted); }

.hs { vertical-align: bottom; border-bottom: solid 1px rgba(255,255,255,0.08); margin: 0; padding: 10px 10px 10px 15px; }
.hs2 { vertical-align: top; margin: 0; padding: 10px 10px 10px 15px; }
.hs3 { vertical-align: bottom; border-bottom: solid 1px rgba(255,255,255,0.08); margin: 0; padding: 10px 10px 10px 15px; }
.hs4 {vertical-align: top; margin: 0; padding: 10px 10px 10px 15px; }

.leftborder { border-left: solid 1px rgba(255,255,255,0.08); }



.horse-pedigree-desc {
    height: 160px;
    overflow: hidden;
}

.horse-pedigree-desc-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.horse-pedigree-desc-wrapper label {
    position: absolute;
    top: 100%;
  font-family: 'Electrolize', serif;
  color: var(--gold);
font-weight:600;
font-size: 18px;
text-transform:uppercase;
    width: 100%;
    text-align: center;
    background: rgb(238,238,238);
    background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    margin-top: -100px;
    padding-top: 100px;
}

.horse-pedigree-desc-wrapper input {
    display: none;
}

.horse-pedigree-desc-wrapper label:after {
    content: "Näytä lisää";
}

.horse-pedigree-desc-wrapper input:checked + label:after {
    content: "Näytä vähemmän";
}

.horse-pedigree-desc-wrapper input:checked + label {
    background: none;
    margin-top: 0px;
    padding-top: 0px;
}

.horse-pedigree-desc-wrapper input:checked ~ div {
    height: 100%;
}



.card-container {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.card {
    background: #f1f1f1;
    color: #000;
    width: 23.3%;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
line-height: 1.3;
text-align:center;
}

.card-content h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 8px;
}


.btn {
  font-family: 'Electrolize', serif;
  color: var(--gold);
	text-transform:uppercase;
	letter-spacing: 1px;
    display: inline-block;
    text-decoration: none;
    margin-top: 15px;
font-size: 14px;
font-weight: 600;
}

.btn:hover {
  color: var(--red);
}



@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply staggered animation */
.hero-left > * {
  opacity: 0;
  animation: fadeRise 0.8s ease forwards;
}

.hero-left h1 { animation-delay: 0.1s; }
.divider { animation-delay: 0.2s; }
.subtitle { animation-delay: 0.3s; }
.info { animation-delay: 0.4s; }

.hero-right img {
  opacity: 0;
  animation: fadeRise 1s ease forwards;
  animation-delay: 0.5s;
}

/* ABOUT + RESULTS subtle entrance */
.about,
.results,
.footer {
  opacity: 0;
  animation: fadeRise 1s ease forwards;
  animation-delay: 0.3s;
}

/* =========================
   RESULT ROW HOVER
========================= */

.result {
  transition: color 0.3s ease, border-color 0.3s ease;
}

.result:hover {
  color: #ffffff;
  border-bottom: 1px solid rgba(212,175,55,0.3);
}

/* =========================
   BUTTON-LIKE TEXT FEEL
========================= */

.footer-right div,
.footer-center div {
  transition: color 0.3s ease;
}

.footer-right div:hover {
  color: var(--gold);
}

/* =========================
   GLOBAL SMOOTHNESS
========================= */

html {
  scroll-behavior: smooth;
}











.tooltip-image {
  display: inline-block;
  color: var(--gold);
}

.tooltip-content {
  display: none;
  position: absolute;
  top: 10%;
  left: 88%;
  transform: translate(-50%, -50%);
  z-index: 999999;
  background: #fff;
  padding: 8px;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,.45);
}

.tooltip-content img {
  display: block;
  max-width: 240px;
  max-height: 60vh;
  object-fit: contain;
}

.tooltip-image:hover .tooltip-content,
.tooltip-image:focus .tooltip-content {
  display: block;
}





/* =========================
   RESPONSIVE / MOBILE
========================= */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

.logo img {
  max-height: 62px;
  width: auto;
}

.container {
  width: min(100%, 1200px);
}

.hero-right img,
.mySlides img {
  max-width: 100%;
}

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Make data tables scroll rather than breaking the page */
.kasvatit,
.pkk,
.sukutaulu {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.kasvatit tbody,
.pkk tbody,
.sukutaulu tbody {
  display: table;
  width: 100%;
  min-width: 650px;
}

@media (max-width: 980px) {
  .wrapper {
    margin: 18px auto;
  }

  .header {
    grid-template-columns: 1fr;
    height: auto;
    gap: 18px;
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center;
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
  }

  .nav a {
    margin: 0;
  }

  .hero,
  .hero-horse {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-right {
    justify-content: center;
  }

  .card {
    width: calc(50% - 13px);
  }
}

@media (max-width: 720px) {
  body {
    text-align: left;
    font-size: 14px;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero,
  .hero-horse,
  .about,
  .results {
    padding: 28px 16px;
  }

  h1 {
    font-size: clamp(24px, 8vw, 34px);
    line-height: 1.15;
  }

  h2,
  h3 {
    font-size: clamp(20px, 6vw, 26px);
  }

  p {
    line-height: 1.65;
  }

  .info,
  .info tbody,
  .info tr,
  .info td {
    display: block;
    width: 100%;
  }

  .info td {
    padding: 8px 0;
    border-bottom: 0;
  }

  .info tr {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .mySlides {
    height: auto;
    min-height: 0;
  }

  .mySlides img,
  .mySlides a img,
  .mySlides img[style] {
    width: 100% !important;
    height: auto !important;
    max-height: 70vh;
    object-fit: contain;
  }

  .prev,
  .next {
    top: 45%;
    padding: 10px;
    font-size: 22px;
  }

  #paivakirja {
    height: 320px;
    padding: 10px 14px;
  }

  .ruusukkeet img {
    max-height: 95px;
  }
}

@media (max-width: 560px) {
  .wrapper {
    margin: 0 auto;
  }

  .container {
    border-bottom-width: 1px;
  }

  .header {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .logo img {
    max-height: 54px;
  }

  .nav {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .nav a {
    font-size: 13px;
    letter-spacing: 1.2px;
  }

  .divider {
    width: 90px;
    margin: 16px 0;
  }

  .divider.small {
    width: 64px;
  }

  .card-container {
    gap: 18px;
  }

  .card {
    width: 100%;
  }

  .card img {
    height: auto;
    max-height: 260px;
  }

  .horse-pedigree-desc-wrapper label {
    font-size: 16px;
  }

  .kasvatit tbody,
  .pkk tbody,
  .sukutaulu tbody {
    min-width: 560px;
  }

  .footer {
    padding: 24px 16px;
    line-height: 1.6;
  }
}

@media (max-width: 380px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero,
  .hero-horse,
  .about,
  .results {
    padding-left: 12px;
    padding-right: 12px;
  }

  .kasvatit tbody,
  .pkk tbody,
  .sukutaulu tbody {
    min-width: 500px;
  }
}