@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,300;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Catamaran:wght@200;300;400;600&family=Great+Vibes&display=swap');



::-webkit-scrollbar {
  width: 8px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #ffffff;
}
 
/* Handle */
::-webkit-scrollbar-thumb {
  background: #a7b7aa;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #95ab99; 
}

html, body {
    font-family: 'Catamaran', sans-serif;
    color: #1d1d1d;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6em;
    margin: 0;
    padding: 0;
    text-align: justify;
}

body {
    background-color: #f5f0f3;
    background-image: url('img/tausta.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.sisalto{
    box-shadow: 0 0 8px rgba(0,0,0,.3);
    max-width: 1050px;
    margin: 30px auto;
}

img {
    width: 100%;
}

/**********************
*     TYPOGRAFIA      *
**********************/

a {
    color: #4a5d3d;
    text-decoration: none;
}

a:hover {
   color: #a6b99a;
}

p {
    letter-spacing: 1px;
}


h1, h2, h3, h4, h5 {
    font-family: 'Lato', sans-serif;
}

h1 {
    color: #fff;
    font-size: 7em;
    text-shadow: 0 0 8px rgba(0,0,0,.8);
    font-weight: 100;
    text-align: center;
    letter-spacing: 1px;
    margin: 0 0;
    padding: 3.5rem 0 3rem 0;
    font-family: 'Great Vibes', cursive;
}
h2, h3, h4 {
    color: #304025;
    font-weight: 300;
}

h2 {
    font-size: 2.2em;
    line-height: 120%;
    text-align: center;
    overflow: hidden;
    font-style: italic;
    margin-bottom: 40px;
    margin-top: 10px;
}

h2.valiotsikko {
    margin-top: 2em;
}

h2:before, h2:after {
    background-color: #ccd4cc;
    content: "";
    display: inline-block;
    height: 1px;
    position: relative;
    vertical-align: middle;
    width: 50%;
}

h2:before {
    right: 30px;
    margin-left: -50%;
}

h2:after {
    left: 30px;
    margin-right: -50%;
}

h3 {
    font-size: 1.3em;
    text-transform: none;
}

.center {
    text-align: center;
}



/***************************
*      HEADER JA NAVI      *
***************************/

.ylapalkki, main, footer, .header {
    max-width: 1050px;
    margin: 0 auto;
}

.ylapalkki {
    width: 100%;
    margin: 0 auto;
    z-index: 9999;
    background-color: #4a5d3d;
}

.ylavari {
    width: 100%;
    opacity: .6;
    top: 0;
    position: absolute;
}


ul.navi {
    list-style-type: none;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    width: 100%;
}

ul.navi li {
    float: left;
    width: 20%;
    margin: 0;
    transition: 0.4s;
}

ul.navi li:hover {
    background-color: #5b714c;
}

ul.navi li a {
    display: block;
    color: #fff;
    text-align: center;
    padding: 14px 12px;
    text-decoration: none;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 300;
}

.header {
    background-image: url(img/header.jpg);
    background-position: center;
    height: 380px;
    margin-top: 0;
    width: 100%;
    background-size: cover;
    position: relative;
}

.otsikko {
    top: 50%;
    left: 85%;
    transform: translate(-85%, -50%);
    position: absolute;
    padding: 30px;
}


/*****************************
*         RAKENNE            *
*****************************/

main {
    margin: 0 auto;
    clear: both;
    overflow: hidden;
    margin: 0 auto;
}

.container {
    padding: 50px 50px;
    background-color: rgba(255,255,255,.7);
    clear: both;
    overflow: hidden;

}

.row {
    display: flex;
    flex-wrap: wrap;
    position: relative;
}


.harmaa {
    background-color: #f0f2f4;
}

/***********************
*        FOOTER        *
***********************/



footer {
    padding: 13px 0;
    width: 100%;
    background-color: #4a5d3d;
}

.footer-sisalto {
    margin: 0 auto;
    color: #bac4bd;
    text-align: center;
}

p.copyright {
    margin: 0 0;
    font-size: .7em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.copyright a {
    color: #bac4bd;
}

/***********************
*        ETUSIVU       *
***********************/


.puolikas {
    width: 50%;
}

.tekstipuoli{
    width: calc(60% - 20px);
    margin-right: 20px;
}

.kuvapuoli {
    width: calc(40% - 20px);
    margin-left: 20px;
}

.kuvapuoli img {
    width: 100%;
    border: 5px solid #fff;
    float: right;
    width: calc(100% - 10px);
    margin-block-start: 1em;
}


/****************************
*       HEVOSLISTA          *
****************************/

.hevoslistaus {
    display: flex;
    flex-wrap: wrap;
    margin-top: 40px;
}

.hevonen {
    width: 33%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 20px 0 45px 1px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ccd4cc;
    overflow: hidden;
    clear: both;
}

.hevoskuva {
    height: 100%;
    width: calc(35% - 14px);
    border: 7px solid #fff;
    box-shadow: 0 0 1px rgba(0,0,0,1);
    float: left;
    background-size: cover;
    background-position: center;
}

.tiedot {
    width: calc(65% - 30px);
    float: left;
    margin: 10px 15px;
}

.tiedot h3 {
    margin-top: 0;
    margin-top: 0;
    margin-bottom: .5em;
    font-size: 1em;
}

.tiedot a:hover {
    text-decoration: underline;
}

.tiedot p {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 200%;
}


/************************
*     HEVOSSIVU         *
************************/

.hevossivu h3 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.6em;
    font-style: italic;
    font-weight: 500;
}

h2:not(:first-child) {
    margin-top: 70px;
}

p.alaotsikko {
    text-align: center;
    margin-top: -35px;
    margin-bottom: 35px;
}

.hevostiedot {
    width: 65%;
}

.hevostiedot tr td {
    padding: 10px;
}

.hevostiedot tr td:first-child {
    background-color: #4a5d3d;
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-style: italic;
    font-weight: 500;
}

.hevostiedot tr td:nth-child(2) {
    background-color: #bbc7b4;
    background-color: #e2e5e2;
}

p.copy {
    margin: 20px auto 30px 0;
    color: #a3a3a3;
    font-size: .7em;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.paakuva {
    width: calc(35% - 36px);
    height: 100%;
    background-size: cover;
    height: 354px;
    background-position: center;
    border: 8px solid #fff;
    box-shadow: 0 0 1px rgba(0,0,0,1);
    margin-left: 20px;
}

/* Kuvagalleria ja lightbox */

#kuvagalleria {
    margin-top: 30px;
    margin-bottom: 20px;
}
#kuvagalleria img {
height: 200px;
width: auto;
}

#kuvagalleria img {
    border: 5px solid #fff;
    box-shadow: 0 0 1px #000;
}

#kuvagalleria img:hover {
    cursor: pointer;
}

.kuva-100 {
    width: 100%;
}
.kuva-50 {
    width: calc(50% - 30px);
    margin: 0 15px;
}

.kuva-33 {
    width: calc(33.333333333% - 30px);
    margin: 0 10px;
}

.pieni {
width: auto;
height: 230px;
margin: 0 10px;
}

.kuva-50:first-child, .kuva-33:first-child  {
    margin-left: 0;
}
.kuva-50:nth-child(2), .kuva-33:nth-child(3) {
    margin-right: 0;
}

.light-box {
    position: fixed;
    height: 100%;
    width: 100%;
    background: rgba(255,255,255,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 p {
    max-width: 80%;
    max-height: 80%;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    cursor: pointer;
}
 
 .light-box img:hover {
    cursor: pointer;
}

/* Suku */

#sukutaulu {
   width: 100%;
    margin: 0px auto 0px auto;
    border-radius: 0;
    border-spacing: 3px;
    border-collapse: separate;
}

#sukutaulu a {
    font-weight: 600;
    text-decoration: none;
}


#sukutaulu td {
    padding: 10px 15px;
    width: 33%;
    text-align: left;
    line-height: 130%;
    background-color: #e2e5e2;
}

#jalkelaiset, .kasvatit {
    width: 100%;
    border-collapse: collapse;
}

#jalkelaiset tr, .kasvatit tr {
    border-bottom: 2px solid #f6f6f6;
    background: #e2e5e2;
}

#jalkelaiset td, .kasvatit td {
    padding: 10px;
}

#jalkelaiset td:first-child {
    width: 20%;
}
#jalkelaiset td:nth-child(2), #jalkelaiset td:nth-child(3) {
    width: 40%;
}

.kasvatit td:first-child {
    width: 13%;
}

.kasvatit td:nth-child(2), .kasvatit td:nth-child(3), .kasvatit td:nth-child(4) {
    width: 29%;
}


#kilpailut {
    width: 100%;
}

#kilpailut td {
    width: 50%;
}

.paivakirja h3 {
    font-size: 1.2em;
}
