@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,200;0,300;0,400;1,200;1,300&family=Jost:wght@200;300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; }

html {
    background: #2A2C27;
    color: #2A2822;
    font: 300 15.5px/1.9 'Jost', sans-serif;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
}

::selection {
    background-color: rgba(200, 168, 75, 0.55);
    color: #2A2822;
}

a {
    font-weight: 500;
    color: #C8A84B;
    text-decoration: none;
}

a:hover {
    color: #C8A84B;
    border-bottom-color: #C8A84B;
}

.sisalto {
    margin: 0 auto;
    width: 1100px;
    background: #F7F5F0;
    box-shadow: -4px 0 40px rgba(0,0,0,0.2), 4px 0 40px rgba(0,0,0,0.2);
}

/* ── HEADER ── */

header {
    width: 100%;
    background: #3D4039;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    padding: 0 50px;
    position: relative;
}

header::after, .otsikko::after, .vihree::after, .valkoinen::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #C8A84B, transparent);
}

.title { margin: 0; }

h1 {
    font-family: 'Spectral', serif;
    font-size: 33px;
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #C8A84B;
    margin: 0;
    text-shadow: 0 1px 6px rgba(200, 168, 75, 0.25), 0 2px 16px rgba(0, 0, 0, 0.35);
}

nav {
    display: flex;
    gap: 0;
}

nav a {
    display: inline-block;
    text-decoration: none;
    border-bottom: none;
    margin: 0;
    padding: 10px 22px;
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(247,245,240,0.7);
    transition: color 0.4s, background 0.4s;
    position: relative;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 22px; right: 22px;
    height: 1px;
    background: rgba(200, 168, 75, 0.6);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: center;
}

nav a:hover {
    color: #F7F5F0;
    border-bottom: none;
}

nav a:hover::after {
    transform: scaleX(1);
}

/* ── HERO ── */

.otsikko {
    height: 330px;
    background: url('../img/otsikko.jpg');
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.otsikko::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(42,40,34,0.55) 0%,
        rgba(61,64,57,0.3) 50%,
        rgba(200,168,75,0.12) 100%
    );
    z-index: 1;
}

/* ── SECTIONS ── */

h2 {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0;
    margin-bottom: -10px;
    padding-left: 40px;
    position: relative;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2), 0 2px 12px rgba(0, 0, 0, 0.1);
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 1px;
    background: #C8A84B;
}

.section-inner {
    display: flex;
    gap: 40px;
    padding: 24px 50px;
    align-items: flex-start;
}

.section-content {
    flex: 1;
    text-align: justify;
}

.vihree {
    background: #3D4039;
	position: relative;
}

.vihree .section-content { color: rgba(247,245,240,0.82); }
.vihree h2 { color: #C8A84B; }

.valkoinen {
    background: #F7F5F0;
	position: relative;
}

.valkoinen h2 { color: #3D4039; }

.valkoinen .section-content {
    
}

.alapalkki {
    background-color: #3D4039;
    position: relative;
}

.alapalkki::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #C8A84B, transparent);
}

.alapalkki-sisalto {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: 12.5px;
    line-height: 1.8;
    letter-spacing: 0.4px;
    color: rgba(247, 245, 240, 0.4);
    display: flex;
    align-items: center;
    gap: 0;
    padding: 36px 50px;
}

.alapalkki-sisalto a {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: 12.5px;
    color: rgba(200, 168, 75, 0.7);
    transition: color 0.3s;
}

.alapalkki-sisalto a:hover {
    color: #C8A84B;
}

.alapalkki-vasen {
    flex: 1;
    text-align: left;
}

.alapalkki-vasen p {
    margin: 0 0 6px;
}

.alapalkki-vasen p:last-child {
    margin-bottom: 0;
}

.alapalkki-viiva {
    width: 1px;
    align-self: stretch;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(200, 168, 75, 0.2) 20%,
        rgba(200, 168, 75, 0.2) 80%,
        transparent 100%
    );
    margin: 0 48px;
    flex-shrink: 0;
}

.alapalkki-oikea {
    flex: 1;
    text-align: right;
}

.alapalkki-oikea p {
    margin: 0 0 8px;
}

.alapalkki-oikea p:last-child {
    margin-bottom: 0;
}

.copy {
    color: rgba(247, 245, 240, 0.28);
}

.copy a {
    font-size: 12.5px;
    color: rgba(200, 168, 75, 0.5);
}

.copy a:hover {
    color: #C8A84B;
}

.virtuaali {
    margin-top: 10px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 10px;
}

.virtuaali a { font: inherit; color: inherit; }

/* hevosen sivu */

.meriitit { 
	float: right; 
	font-size: 16px; 
	letter-spacing: 2px; 
	font-weight: 400;
	vertical-align: middle;
	line-height: 1;
	display: inline-block;
	margin-top: 0.15em;
}

.tiedot {
    width: 50%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: 'Jost', sans-serif;
}

.tiedot tr {
    border-bottom: 1px solid rgba(200, 168, 75, 0.15);
}

.tiedot tr:last-child {
    border-bottom: none;
}

.tieto {
    text-align: left;
    width: 25%;
    text-transform: uppercase;
    padding: 11px 40px 11px 0;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(200, 168, 75, 0.65);
    vertical-align: middle;
    white-space: nowrap;
}

.vastaus {
    letter-spacing: 0.2px;
    line-height: 1.5;
    padding: 11px 0px 11px 10px;
    color: rgba(247, 245, 240, 0.82);
    vertical-align: middle;
}

/* ── HORSE PHOTO ── */

.hevonen-kuva {
    float: right;
    margin-left: 30px;
    margin-bottom: 10px;
	margin-top: 20px;
    padding: 10px;
    margin-right: -10px;
    margin-top: 10px;
}

.hevonen-kuva img {
    display: block;
    margin: 0 auto;
    height: 290px;
    border: 1px solid rgba(200, 168, 75, 0.3);
    outline: 4px solid rgba(61, 64, 57, 0.8);
    outline-offset: -5px;
    box-shadow:
        0 0 0 1px rgba(200, 168, 75, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.4);
}

.kuvagalleria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.kuvagalleria a {
    position: relative;
    display: block;
}

.kuvagalleria img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(200, 168, 75, 0.9);
    outline: 4px solid rgba(61, 64, 57, 0.6);
    outline-offset: -5px;
	box-shadow:
        0 0 0 1px rgba(200, 168, 75, 0.05),
        0 0px 8px rgba(0, 0, 0, 0.3);
}

.suku {
	margin: 25px 0 0 0px;
	padding: 0px;
    border-collapse: collapse;
	width: 100%;
    border-top: 1px solid rgba(200, 168, 75, 0.15);
    border-bottom: 1px solid rgba(200, 168, 75, 0.15);
}

.td3 {
    width: 35%;
	padding: 6px 10px;
	text-align: center;
	border-right: 1px solid rgba(200, 168, 75, 0.15);
    border-bottom: 1px solid rgba(200, 168, 75, 0.15);;
}

.td4 {
	width: 30%;
	padding: 12px 30px;
    text-align: left;
	border-left: 1px solid rgba(200, 168, 75, 0.15);
    border-bottom: 1px solid rgba(200, 168, 75, 0.15);
}

.tdvarsa {
	padding: 11px;
    text-align: left;
	font-size: 15px;
	border-bottom: 1px solid rgba(200, 168, 75, 0.15);
}

.table2 {
	margin-bottom: 20px;
	padding: 0px;
    border-collapse: collapse;
	width: 100%;
    border-bottom: 1px solid rgba(200, 168, 75, 0.15);
}

.sukutiedot {
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 1px;
}

/* ── KILPAILUTULOKSET ── */

.kilpailu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 16px;
}

.kilpailu-col:first-child {
    border-right: 1px solid rgba(200, 168, 75, 0.2);
}

.col-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(200, 168, 75, 0.2);
    background: rgba(200, 168, 75, 0.05);
}


.col-header-title {
    font-weight: 500;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #C8A84B;
}

.col-body {
    padding: 14px 20px;
    min-height: 60px;
}

.result-row {
    font-size: 14px;
    line-height: 1.8;
    color: #2A2822;
}

.result-row strong {
    font-weight: 500;
}

.r-label {
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #C8A84B;
    margin-right: 4px;
}

.result-row.empty {
    color: rgba(42, 40, 34, 0.35);
    font-size: 13px;
}

/* ── BADGES ── */

.badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.badge {
    display: inline-block;
    padding: 7px 20px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
    border: 1px solid rgba(200, 168, 75, 0.3);
    color: rgba(42, 40, 34, 0.55);
    background: transparent;
    transition: color 0.3s, border-color 0.3s, background 0.3s;
    user-select: none;
}

.badge:hover {
    color: #3D4039;
    border-color: rgba(200, 168, 75, 0.6);
    background: rgba(200, 168, 75, 0.07);
}

.badge-aktiivinen {
    color: #C8A84B;
    border-color: #C8A84B;
    background: rgba(200, 168, 75, 0.08);
}

.badge-aktiivinen:hover {
    color: #C8A84B;
    border-color: #C8A84B;
    background: rgba(200, 168, 75, 0.13);
}

.hevoslistaus {
    width: 100%;
    overflow: hidden;
    margin: 30px 0;
    border-collapse: collapse;
    border-top: 1px solid rgba(200, 168, 75, 0.2);
    border-bottom: 1px solid rgba(200, 168, 75, 0.2);
}

.hevoslistaus thead {
    border-bottom: 1px solid rgba(200, 168, 75, 0.2);
}

.hevoslistaus thead th {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #C8A84B;
    padding: 12px 0 12px 26px;
	text-align: left;
}

.hevoslistaus tbody tr {
    border-bottom: 1px solid rgba(200, 168, 75, 0.1);
    transition: background 0.2s;
}

.hevoslistaus tbody tr:last-child {
    border-bottom: none;
}

.hevoslistaus tbody tr:hover {
    background: rgba(200, 168, 75, 0.05);
}

.hevoslistaus td {
    padding: 10px 0 10px 26px;
    font-size: 15px;
    vertical-align: middle;
	text-align: left;
}

.listakuva {
    display: block;
    height: 60px;
    width: 80px;
    object-fit: cover;
    border: 1px solid rgba(200, 168, 75, 0.25);
}