body {
    margin: 0;
	font-family: Georgia;
}

header {
	text-align: center;
}

nav {
	display: flex;
	margin: 0 auto;
	justify-content: center;
	gap: 1rem;
}

nav a {
	flex: 1;
	text-align: center;
	padding: 15px;
	box-sizing: border-box;
	font-size: clamp(1rem, 2vw, 1.5rem);
}

h3 {
	font-size: clamp(0.7rem, 2vw, 1.5rem);
}

a:link { 
	color: #1a4929;
	text-decoration: none;
}

a:visited {
	color: #104267;
}

a:hover {
  text-decoration: underline;
  color: darkblue;
}

a:active {
	text-decoration: underline;
}

main {
	text-align: center;
	margin-left: 5%;
    margin-right: 5%;
    color: black;
}

.luettelo {
	margin-left:15%;
	margin-right:10%;
	text-align:left;
}

.somet {
	text-align: left;
	background-color: lightblue;
	margin-left: 20px;
}

.sivusto {
	/* background-color: ; */
	/* background-image: ; */
	background-repeat: no-repeat, no-repeat;
	background-size: 600px, cover;
	background-position: right -3% bottom 9%, left top;
}

#tekija {
    background-color: lavender;
    display: flow;
    margin: 0;
   /*  text-shadow: ; */
	font-size: 10pt;
}

.somet {
	background-color: lavender;
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
  clear: both; /* Est�� floatin vaikutuksen */
}

.somet img {
    max-width: 170px;
    height: auto;
    transition: transform 0.2s; /* Hover-efekti� varten */
}

.somet img:hover {
    transform: scale(1.2); /* Logojen suurennus hover-tilassa */
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 17px; /* V�lit logoille */
    background-color: lavender;
    clear: both; /* Est�� floatin vaikutuksen */
    width: 100%;
    margin-top: 2vh;
    flex-wrap: wrap;
}

.logo-container img {
    max-width: 170px;
    height: auto;
    transition: transform 0.2s; /* Hover-efekti� varten */
}

.logo-container img:hover {
    transform: scale(1.2); /* Logojen suurennus hover-tilassa */
}

/* KUVAGALLERIA: pikkukuvien ruudukko ja suurennettu lightbox-kuva */
.history-gallery-wrapper {
    width: 100%;
    margin: 1.5rem auto 2rem;
}

.history-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.history-gallery-item {
    aspect-ratio: 4 / 3;
    margin: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 4px;
    background-color: #f1f1f1;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.history-gallery-item:hover,
.history-gallery-item:focus-visible {
    border-color: #1a4929;
    box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
    outline: none;
    transform: translateY(-2px);
}

.history-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-lightbox {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: rgb(0 0 0 / 80%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.history-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.history-lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 95vh;
}

#history-lightbox-image {
    display: block;
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border: 4px solid white;
    background-color: white;
}

.history-lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 50%;
    color: white;
    background-color: rgb(0 0 0 / 65%);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.history-lightbox-close:hover,
.history-lightbox-close:focus-visible {
    background-color: #1a4929;
    outline: 2px solid white;
    outline-offset: 2px;
}

@media only screen and (max-width: 768px) {
    .logo-container {
        gap: 5px; /* Pienemm�t v�lit mobiilissa */
    }

    .logo-container img {
        max-width: 115px; /* Pienempi logo mobiilissa */
    }

    #tekija {
        font-size: 15px;
    }
}

/* Keskikokoisille n�yt�ille (n�yt�n leveys alle 1300px) */
@media only screen and (min-width: 1300px) {
    .logo-container img {
        max-width: 200px;
    }
}

.responsive {
    height: auto;
}
