@import url('https://fonts.googleapis.com/css2?family=Abel&family=Exo:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

@font-face {
  font-family: Malline; /* set name */
  src: url(Malline.otf); /* url of the font */
font-weight:400;
}


:root {
    --black: #0b0b0b;
    --wine: #7b0f19;
    --red: #a61c2b;
    --white: #ffffff;
    --gray: #bfbfbf;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
font-size: 15px;
line-height: 1.8;

    overflow-x: hidden;

	background-image: url('bg.png');
	background-repeat: no-repeat;
	background-attachment:fixed;
	background-size:cover;
}

a {
    color: #a61c2b;
text-decoration:none;
}

.maintext h1 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
text-transform:uppercase;
color: var(--wine);
text-align:center;
}

/* CONTAINER */
.container {
    width: 100%;
    margin: auto;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    position: sticky;
    top: 0;
    background: var(--black);
    z-index: 1000;
text-transform:uppercase;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
color: var(--white);
}

.logo img {
    height: 50px;
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    letter-spacing: 2px;
text-transform:uppercase;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    position: relative;
    color: var(--white);
    font-size: 13px;
    letter-spacing: 2px;
    text-decoration: none;
    transition: 0.3s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* HERO */
.hero {
    display: flex;
    align-items: center;
    min-height: 50vh;
    max-height: 455px;
    background: linear-gradient(90deg, rgba(0,0,0,0.5) 1%, rgba(255,255,255,0.01)), url('headerimg.png');
    background-size: cover;
    background-position: top right;
position:relative;
}

.hero-content {
    padding: 10px 0 0 80px;
max-width: 800px;
    animation: fadeUp 1s ease;
    font-family: 'Open Sans', serif;
    font-size: 16px;
color: var(--white);
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 60px;
    line-height: 1.1;
text-transform:uppercase;
}

.hero p {
    margin-top: 20px;
    color: var(--gray);
    line-height: 1.6;
}

.hero h2 span, .hero_hev h2 span {
font-size: 80px;
font-weight:400;
    font-family: 'Malline';
    color: var(--red);
    font-style: italic;
text-transform:none;
}

.hero h2 small, .hero_hev h2 small {
font-size: 18px;
font-weight:400;
    font-family: 'Open Sans', serif;
    color: var(--red);
    font-style: italic;
text-transform:none;
}



/* HERO HEVONEN */

.hero_hev {
    display: flex;
    align-items: center;
    min-height: 50vh;
    background: linear-gradient(90deg, rgba(0,0,0,0.5) 1%, rgba(255,255,255,0.01)), url('headerimg2.png');
    background-size: cover;
    background-position: top right;
position:relative;
}

.perustiedot {
width:80%;
max-width: 1300px;
margin: 0 auto;
    display: flex;
}

.hero_hev-content {
    padding: 70px 0 70px 0;
    width: 100%;
    animation: fadeUp 1s ease;
    font-family: 'Open Sans', serif;
    font-size: 16px;
    color: var(--white);
}

.hero_hev-img {
    display: flex;
    padding: 0;
    width: 45%;
    animation: fadeUp 1s ease;
}

.hevoskuva {
    max-width: 60%;
    height: 450px;
    float: right;
    /* margin: -50px 0 0 0; */
    background: #fff;
    padding: 20px;
    padding-bottom: 45px;
    transform: rotate(-2deg);
    box-shadow: 4px 4px 10px rgb(0, 0, 0, .4);
}

.hero_hev h2 {
    font-family: 'Playfair Display', serif;
    font-size: 50px;
    line-height: 65%;
text-transform:uppercase;
}

.hero_hev p {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    margin-top: 20px;
    color: var(--gray);
    line-height: 1.6;
font-style:italic;
}


/* STATS */
.stats {
position:relative;
    display: flex;
    justify-content: space-around;
    background: rgba(91,11,19,0.6);
    padding: 20px 15px 30px 15px;
    text-align: center;
color: var(--white);
line-height: 1.6;
}

.stat {
    animation: fadeUp 1s ease; width:33%;
}

.stat h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
}

.stat h3 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
}

.stats-inner {
    display: flex;
    max-width: 1200px;
}

.stat p {
    font-size: 14px;
text-align:justify;
padding: 0 30px;
}

/* FEATURES */
.main {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    background: #FFFFFF;
    border-radius: 5px;
}

.maintext {
padding: 50px 50px 20px 50px;
color: #333;
}

.feature:hover {
    transform: translateY(-10px);
}

.feature h4 {
    margin-top: 15px;
    letter-spacing: 2px;
}

.maintext p {
    margin-bottom: 20px;
}

/* FOOTER */
.footer {
    font-family: 'Playfair Display', serif;
text-transform:uppercase;
letter-spacing: 2px;
font-size: 12px;

    background: rgba(0,0,0,0.7);
    color: var(--white);
    padding: 20px;
    text-align: center;
    margin-top: 0px;
}

/* ANIMATIONS */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}





.maintext h2 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    text-transform: uppercase;
    text-align: center;
    color: var(--wine);
    margin: 50px 0 15px;
    letter-spacing: 2px;
}





.pikkuinfo {
    display: inline-block;
    padding: 1px 3px;
    font-size: 16px;
    line-height: 1.5em;
    border-radius: 3px;
    margin-left: 2px;
    color: #83857E;
}

.pikkuinfo:before, .kilpailuinfo:before {
    content: "[ ";
}

.pikkuinfo:after, .kilpailuinfo:after {
    content: " ]";
}

img.lippu {
    max-height: 16px;
    width: auto;
    margin-left: 3px;
    box-shadow: 0 0 2px rgb(0 0 0 / 50%);
    display: inline;
    margin-left: 0;
}


/* ============================
   ELEGANT PEDIGREE TABLE
============================ */

/* Table wrapper */
.pedigree-table {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 12px;
    font-family: 'Open Sans', sans-serif;
}

.pedigree-table th {
    background: var(--wine);
    color: var(--white);
    padding: 14px 10px;
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* General cell */
.pedigree-table td {
    background: #FFF;
    padding: 14px 28px;
    border-left: 4px solid var(--wine);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 15px;
width:33%;
line-height: 160%;
}

/* Main horse box */
.pedigree-main {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
    border-left-width: 6px;
}

/* 2nd generation parents */
.pedigree-parent {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--red);
    font-weight: 600;
}

/* 3rd generation (parents of parents) */
.pedigree-parent2 {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    color: var(--black);
    font-weight: 600;
}

/* 4th generation (ancestors) */
.pedigree-ancestor {
font-family: 'Playfair Display', serif;
    font-size: 16px;
    color: var(--black);
    font-weight: 600;
}


/* Hover highlight effect */
.pedigree-table td:hover {
    background: #F4F4F4;
    border-left-color: var(--wine);
    /*transform: translateX(6px);*/
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease-in-out;
}

/* Keep parent labels readable on hover */
.pedigree-parent:hover,
.pedigree-parent2:hover,
.pedigree-main:hover {
    color: var(--black) !important;
}

/* Smooth transitions for all pedigree cells */
.pedigree-table td {
    transition: all 0.25s ease-in-out;
}



.pedigree-ancestor small,
.pedigree-parent2 small,
.pedigree-parent small {
        font-family: 'Open Sans', sans-serif;
        font-weight: 300;
        color: #000;
}

.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;
}

.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%;
}




/* Kuvagalleria */


#kuvagalleria {
    clear: both;
    overflow: hidden;
    padding-bottom: 0;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    display: flex;
    margin-top: 40px;
        justify-content: space-between;
}

#kuvagalleria img {
    float: left;
    border: 7px solid #eee;
}
#kuvagalleria img:hover {
    cursor: pointer;
}
#kuvagalleria p {
        margin: 0 auto;
}


#kuvagalleria .kuva-rakenne {
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    height: auto;
    display: block;
}


.gallerii {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.kuva.paa {
    width: calc(31.8% - 31px);
    margin: 0 15px;
}

.kuva.rakenne {
    width: calc(68.2% - 31px);
    margin: 0 15px;
}


.kuva:first-child  {
    margin-left: 0;
}
.kuva:last-child {
    margin-right: 0;
}



/* Lightbox */

.light-box {
    position: fixed;
    height: 100%;
    width: 100%;
    background: rgba(0,0,0,0.6);
    top: 0;
    left: 0;
    cursor: pointer;
}

.light-box img {
    max-width: 80%;
    max-height: 80%;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    cursor: pointer;
    width: auto;
}
 
 .light-box img:hover {
    cursor: pointer;
}

#kuvagalleria img {
    height: 360px;
    margin: 0 10px;
    width: auto;
        max-width: 100%;
}

#kuvagalleria.dante img {
    height: 300px;
    margin-bottom: 20px;
}

p.kuvacopy {
    margin: 10px auto 0 auto;
    font-size: .8em;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    margin: 15px auto 0 auto;
    font-size: .7em;
}


.kuvagalleriakuva {
    width: calc(33% - 10px);
    border: 5px solid #eee;
    height: 250px;
    margin: 0;
    background-size: cover;
    background-position: center;
}

.kuvagalleriakuva:hover {
    cursor: pointer;
}



/* ========================= FOAL LISTING ========================= */

.horse-list {
width: 80%;
max-width: 1300px;
margin: 20px auto;
}

.foal-list {
    width: 100%;
    padding: 40px 20px;
}

.foal-title {
    font-family: 'Playfair Display', serif;
    font-size: 34px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    color: var(--black);
    border-left: 5px solid var(--wine);
    padding-left: 15px;
}

.foal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 30px;
}

.foal-card {
    background: rgba(255,255,255,0.92);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transition: 0.3s ease;
    border-top: 6px solid var(--wine);
    display: flex;
    flex-direction: column;
}

.foal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
background: #F4F4F4;
}

.foal-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.foal-info {
    padding: 20px;
    font-size: 15px;
}

.foal-name {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: var(--wine);
    margin-bottom: 10px;
}

.foal-info p {
    margin: 4px 0;
    color: #444;
}

.foal-titles {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.foal-titles span {
    background: var(--wine);
    color: var(--white);
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 4px;
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
}







/* ========================= CAROUSEL ========================= */

.carousel-container {
    position: relative;
    width: 50%;
    max-width: 900px;
    margin: 40px auto;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.carousel-track {
    display: flex;
    transition: transform 0.6s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 450px;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(123,15,25,0.7);
    color: var(--white);
    border: none;
    padding: 12px 18px;
    font-size: 26px;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(123,15,25,1);
}

.prev { left: 10px; }
.next { right: 10px; }

/* Dots */
.carousel-dots {
    text-align: center;
    padding: 14px 0;
    background: #7b0f19;
}

.carousel-dots .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 4px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s ease;
}

.carousel-dots .dot.active {
    background: var(--black);
}






/* ========================= COMPETITION RESULTS TABLE ========================= */

.results-table {
    width: 100%;
    margin: 20px 0;
    border-collapse: separate;
    border-spacing: 0 5px;
    font-size: 15px;
}

.results-table thead th {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 15px;
    background: var(--wine);
    color: var(--white);
text-align:left;
}

.results-table tbody tr {
    background: rgba(255,255,255,0.85);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transition: 0.3s ease;
}

.results-table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Hover effect */
.results-table tbody tr:hover {
    background: #F4F4F4;
    color: var(--black);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.kilpailuinfo {
    display: inline-block;
    padding: 1px 3px;
    font-size: 15px;
    line-height: 1.5em;
    border-radius: 3px;
    margin-left: 10px;
    color: #83857E;
}
.results-table img {
    height: 12px;
    width: auto;
    box-shadow: 0 0 3px rgba(0, 0, 0, .4);
    margin-right: 5px;
}




/* Responsive adjustments */
@media (max-width: 900px) {
    .pedigree-table {
        font-size: 13px;
        border-spacing: 0 8px;
    }
    .pedigree-main {
        font-size: 18px;
    }
    .pedigree-parent {
        font-size: 15px;
    }
    .pedigree-parent2 {
        font-size: 14px;
    }
}











/* =========================
   RESPONSIVE DESIGN
========================= */

/* TABLET */
@media (max-width: 1024px) {
    .hero h2 {
        font-size: 50px;
    }

    .features {
        flex-direction: column;
        text-align: center;
    }

    .cards {
        flex-direction: column;
    }
}

/* MOBILE */
@media (max-width: 768px) {

    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .hero {
        background-position: center;
        text-align: center;
    }

    .hero-content {
        padding: 40px 20px;
    }

    .hero h2 {
        font-size: 36px;
    }

    .buttons {
        flex-direction: column;
        align-items: center;
    }

    .stats {
        flex-direction: column;
        gap: 20px;
    }

    .features {
        padding: 40px 20px;
    }

    .stallions {
        padding: 40px 20px;
    }
}
