@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

/* Website template by freewebsitetemplates.com, modified by Kirsiina */

*,
*::before,
*::after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box;
}

a:link, a:visited {
	color: #408fb8;
	transition: 0.4s all ease;
}

a:hover, a:active {
	color: #26546c;
	transition: 0.4s all ease;
}

h1, h2, h3, h4, h5, h6 {
    text-transform: uppercase;
	font-weight: normal;
}

h2 {
    color: #383836;
    padding: 5px;
    margin-left: 1em;
	text-transform: uppercase;
}

p {
	margin: 20px auto;
}

body {
	background-color: #234f68;
	background-image: url(kuvat/mirrored-squares.png);
	background-attachment: fixed;
	font-family: "Quicksand", sans-serif;
    line-height: 1.8;
    letter-spacing: 0.5px;
    color:#383836;
	font-size: 0.9em;
}

pre {
    font-family: "Quicksand", sans-serif;
    line-height: 1.8;
    letter-spacing: 0.5px;
    color:#383836;
	font-size: 0.9em;
}

.page {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 950px;
    margin-inline: auto;
}

.sidebar {
    flex: 1 1 160px;
    align-self: flex-start;
    margin-top: 45px;
}

.logo {
	display: block;
	margin: 0 auto 55px;
	width: 147px;
}

.navigation {
	list-style: none;
    margin-left: -10px;
}

.navigation li {
	margin: 0 0 11px;
	padding: 0;
	text-align: left;
}

.navigation li a {
	background-color: #d88d30;
	color: #fbf6f2;
	display: block;
	font-size: 1em;
	height: 2em;
	line-height: 2em;
	padding: 0 0 0 10px;
	text-decoration: none;
	text-transform: uppercase;
	font-weight: 400;
}

.navigation li a:hover {
	background-color: #458393;
	color: #1a1918;
}

.body {
    flex: 3 1 790px;
    background-color:#dccfaf;
	padding: 0 0 3px;
}

img {
    width: 100%;
    height: auto;
    display: inline-block;
}

.textbox {
	margin: 26px 0 35px;
	padding: 0 20px;
}

.footer {
	padding: 0 0 5px;
}

.footer .row {
	margin: 0 auto;
	background: url(kuvat/bg-footer.jpg)!important;
    color: #4c3212;
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 1em;
	padding: 26px 40px 35px 40px;
}

.column {
    flex: 1 1 0px;
}

.footer ul {
    list-style: none;
}

.footer h3 {
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
    margin: 0;
}

.footer h4 {
	margin: 0 !important;
	line-height: 1.8em;
	font-weight: 700;
}

.footer-bottom {
    background: transparent;
}

.footer-bottom ul li {
	float:left;
	margin:0 10px 0 0;
}
.footer-bottom ul li:first-child a {
	border: 0;
}
.footer-bottom ul li a {
	border-color:#c4cfd1;
	border-style:none none none solid;
	border-width:2px;
	color:#fff;
	font-size:10px;
	padding:0 0 0 10px;
	text-decoration:none;
	text-transform:uppercase;
	outline:none;
}
.footer-bottom  {
	color:#fff;
	font-size:10px;
	padding: 20px;
	text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.grid-item {
    text-align: center;
    padding: 10px;
	line-height: 1.2em;
}

.grid-item img {
    width: 200px;
    height: 133px;
    object-fit: cover;
    border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.grid-item .flag { 
    width: 20px;
    height: 12px;
    object-fit: contain;
    margin-top: 5px;
	border-radius: 0;
}

table {
    max-width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table td, table th {
    word-wrap: break-word;
}

.bred-table, .show-table, .progeny-table, .sukutaulu {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 20px;
    max-width: 100%;
    table-layout: fixed;
    overflow-x: auto; 
}

.bred-table th, .bred-table td, .show-table th, .show-table td, .progeny-table th, .progeny-table td {
    padding: 10px;
    text-align: left;
}

.bred-table th, .show-table th, .progeny-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

.bred-table tbody tr:nth-child(even), .show-table tbody tr:nth-child(even), .progeny-table tbody tr:nth-child(even) {
    background-color: rgba(249, 249, 249, 0.2); /* Vaalea taustaväri parille riveille */
}

.bred-table td a, .show-table td a, .progeny-table td a {
    text-decoration: none;
}

.bred-table td a:hover, .show-table td a:hover, .progeny-table td a:hover {
    text-decoration: underline;
}

.bred-table td small, .show-table td small, .progeny-table td small {
    color: #888;
    font-size: 0.85em;
}

.bred-table td strong, .show-table td strong, .progeny-table td strong {
    font-size: 1.1em;
    color: #333;
}

.sales-item {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 15px;
	line-height: 1.4em;
}

.sales-item-img {
    margin-right: 20px;
    flex-shrink: 0;
}

.sales-item-img img {
    width: 298px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sales-item-info {
    max-width: 500px;
}

.sales-item-info p {
    margin: 5px 0;
    font-size: 1em;
}

.sales-item-info small {
    font-size: 0.9em;
    color: #666;
}

/* Tabit */

.tab {
	overflow: hidden;
	margin: 10px auto;
}

.tablinks {
    font-family: "Quicksand", sans-serif;
    font-weight: 300;
    transition: background-color 0.3s ease, color 0.3s ease;
	background-color: rgba(69, 131, 147, 0.8);
	float: left;
	cursor: pointer;
	border: none;
	outline: none;
	padding: 14px 16px;
	color: #fff;
	margin: 2px;
	font-size: 13pt;
    transition: 0.4s;
}

.tab button:hover {
	opacity: 0.6;
}

.tabcontent {
	display: none;
	width: 100%;
    padding: 20px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.tabcontent.active {
    display: block;
    opacity: 1;
}

.evaluation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.evaluation-item {
    flex: 1 1 20%;
    min-width: 200px;
    text-align: center;
}

.evaluation-item img {
    width: 100%;
    max-width: 120px;
    height: auto;
}

.evaluation-item b {
    font-weight: bold;
}

.evaluation-item small {
    font-size: 0.9em;
}

.perustiedot { margin:0 auto; width: 100%; border-collapse: collapse; border-spacing: 0; }
.sukutaulu { margin: 0 auto; padding-left: 20px; border: 0px solid #000; border-collapse: collapse; border-spacing: 0; }
.sukutaulu td.s { border-bottom: 1px solid #295970; text-align: center; padding-left: 20px; }
.sukutaulu td.s2 { text-align: center; padding-left:20px; }
.kisat { margin: 0 auto; padding-left: 20px; width: 100%; border-collapse: collapse; border-spacing: 0; }
.center { display: flex; justify-content: center; margin-block: 1rem; }
.allekirjoitus { height: 40px; width: 130px; }

.horse-gallery {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.horse-gallery img { max-height: 150px; }

.img2 { border-radius: 10px; }

.porrastetut {
    display: flex;
    align-items: center;
    justify-content: center;
}

.porr-column {
    flex: 1 1;
}

/* Aikajanan tyylit */
.level-bar {
    width: 98%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 8px;
    margin: 10px 0;
    position: relative;
}

.level-bar-inner {
    height: 100%;
    background-color: rgba(69, 131, 147, 1); /* Vihreä väri edustaa hevosen tasoa */
    border-radius: 8px;
    position: relative;
}

.level-bar-inner span {
    position: absolute;
    color: white;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    transform: translateY(-50%) translateX(-50%); /* Keskittää tekstin */
    font-size: 14px;
    font-weight: bold;
}

/* Ympyrän tyylit */
.level-circle {
    width: 150px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(#458393 0%, #f0f0f0 100%);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    border: 4px solid #ccc;
}

.level-circle span {
    position: absolute;
    font-size: 14px;
    color: #000;
    font-weight: bold;
}

@media (max-width: 768px) {
    .sales-item {
        flex-direction: column;
        align-items: center;
    }

    .sales-item-img {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .sales-item-info {
        max-width: 100%;
    }
	
	.grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .evaluation {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.8em;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 949px) {
    .page { max-width: 70%; }
    .navigation { margin: 0 auto; width: 100%; }
	.navigation li a { text-align: center; }
}

@media (max-width: 800px) {
    .page { max-width: 98%; }
}