/* =====================================================
   YLEISET FONTIT
   ===================================================== */

/* Pääfontti koko sivustolle */
body {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: normal;
    color: #111; /* oletustekstiväri */
}

* {
    box-sizing: border-box;
}

/* Linkit */
a {
    font-family: inherit; /* perii body:n fontin */
    font-size: inherit;
    font-weight: inherit;
    color: black;
    transition: all 0.2s ease;
}

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

/* Painikkeet (poikkeus, jos halutaan eri paino) */
.btn-primary {
    font-family: inherit; /* perii body:n fontin */
    font-size: 16px;
    font-weight: 600;
}

/* Sivun otsikot */
h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    font-weight: normal; /* H1/H2 erikoispainot määritellään tarvittaessa erikseen */
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 24px;
}

/* Lihavointi */
b {
    font-weight: bold;
}

/* =====================================================
   YLEISET TYYLIT – EI RESOLUUTIORAJAUSTA
   ===================================================== */

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    background:white;
}

a.anchor {
    display: block;
    position: relative;
    top: -50px;
    visibility: hidden;
}

.arrow img {
    width: 50px;
}

.btn-primary {
    display: inline-block;
    background-color: #1f4f8b;
    color: #fff;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: 0.2s ease;
}

.btn-primary:hover {
    background-color: #163a66;
}

.google-map {
    width: 100%;
    border: 0;
}

.error {
    color: #c62828;
    font-size: 0.9em;
    margin: 4px 0 6px 0;
    display: block;
}

.success {
    color: #2e7d32; /* vihreä */
    font-size: 0.95em;
    margin: 8px 0 10px 0;
    display: block;
    font-weight: 500;
}

#contactForm {
    width: 100%;
    max-width: 600px;
    margin: 20px 0;
}

/* Labelit */
#contactForm label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Kentät */
#contactForm input[type="text"],
#contactForm input[type="email"],
#contactForm input[type="tel"],
#contactForm textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    background-color: #fff;
}

/* Focus-tila */
#contactForm input:focus,
#contactForm textarea:focus {
    outline: none;
    border-color: #1f4f8b;
    box-shadow: 0 0 0 2px rgba(31,79,139,0.15);
}

/* Lähetä-nappi */
#contactForm .btn-primary {
    margin-top: 20px;
    display: inline-block;
}

/* Virheilmoitukset */
#contactForm .error {
    color: #c62828;
    font-size: 0.85em;
    display: block;
    margin-bottom: 4px;
}

/* Viestikenttä suuremmaksi */
#contactForm textarea {
    resize: vertical;
}

input.error-field,
textarea.error-field {
    border: 1px solid #c62828;
    background-color: #fff5f5;
}

#main {
    position: relative;
    background-color: white;
    width: 100%;
    margin: 0 auto;
    height: auto;
    overflow: visible;
}

#menu {
    position: relative;
    width: 100%;
}

#container {
    position: relative;
    width: 100%;
    top: 0px;
}

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes ZoomImage {
  0% { -webkit-transform: scale(1.00); transform: scale(1.00); }
  100% { -webkit-transform: scale(1.2); transform: scale(1.2); }
}

.arrow {
	bottom: 0px;
	position: absolute;
	text-align: center;
	width: 100%;
	padding-top: 7px;
	padding-bottom: 7px;
      z-index:2;
}

#bottomcontainer {
	position:relative;
	width:75%;
       margin: 0 auto;
       text-align:center;
}

#bottom {
	clear: both;
	position:relative;
	width:100%;
	top:0px; 
	margin-top: -4px;
      background-color: #ededed;
      color: #111;
}

#bottom1 {
	width:100%;
	margin-left: 1%;
	margin-right: 1%;
	padding-top: 21px;
	padding-bottom: 40px;
}

#tjdesign {
        position: relative;
        height: 50px;
        clear:both;
        width: 100%;
        font-size: 17px;
        padding-top:0px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        margin-top: -16px;
        background-color: #fff;
}

/* ===============================
   NAV MENU
   =============================== */

#top-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#top-menu li {
    display: inline-block;
    margin-left: 25px;
}

#top-menu a {
    text-decoration: none;
    color: #111;
    font-weight: 500;
}

.top_esittely {
   z-index: 2;
   color: black;
   text-shadow: 
				-1px -1px 0 white, 
				1px -1px 0 white, 
				-1px 1px 0 white, 
				1px 1px 0 white, 
				-1px 0px 0 white, 
				1px 0px 0 white, 
				0px -1px 0 white, 
				0px 1px 0 white;
   animation: fadein 3s;
}

.top_esittely H1 {
    	padding: 0px;
    	
}

.leipateksti {
    position: relative;
    float: left;
    text-align: left;
    padding: 10px;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.8);
}

#logocontainer img {
    	border-style: none;
    	padding-top: 7px;
    	filter: drop-shadow(0px 0px 7px #fff);
      animation: fadein 3s;
}

.yhteystiedot {
	position:relative;
	width:100%;
	margin: auto;
	background-color: #ededed;
	overflow: auto;
}

#topcontainer{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1001;
}

#etusivu_teksti {
    position: relative;
    width: 100%;
    background: url(../images/etusivu.jpg) no-repeat center top;
    background-size: cover;
    color: #000;  /* Tekstin väri mustaksi */

}

/* Overlay kuvan päälle */
#etusivu_teksti::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.0); /* tumma läpinäkyvä peite 40% */
    z-index: 1; /* overlay tekstin alapuolelle */
}

#yritys {
    position: relative;
    width: 100%;
    background: #fff;
    overflow: auto;
    padding-top: 0px;
    padding-bottom: 0px;
}

#palvelut {
    position: relative;
    width: 100%;
    background: #fff;
    overflow: auto;
    padding-top: 0px;
    padding-bottom: 20px;
}

.laatikko1_palsta,
.laatikko2_palsta {
    position: relative;
    float: left;
    text-align: left;
}

/* ====== STICKY (yhteensopiva custom.js kanssa) ====== */

#top-bar {
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1),
  box-shadow 350ms ease,
  background 250ms ease;
  will-change: transform;
}

/* will-sticky: asetetaan JS:llä -> position fixed mutta piilotettuna ylhäällä */
#top-bar.will-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(-100%);
  z-index: 20000;
  background: #fff;
  box-shadow: none;
}

#top-bar.is-sticky {
  position: fixed;
  scroll-margin-top: 0px;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(0);
  z-index: 20000;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,0.06);  
}

/* will-unstick: kun piilotetaan -> liu'uta ylös (vain, jos oli kiinnitetty) */
#top-bar.will-unstick {
  transform: translateY(-100%);
}

#top-menu a.active {

    color: #1f4f8b;
}










/* =====================================================
   DESKTOP min 1200px
   ===================================================== */



@media only screen and (min-width: 1200px) {

a.anchor {
        top: 0px;
}

#top-bar {
    position: relative;
    width: 100%;
    padding-right: 12%;   
    padding-top: 70px;
    box-sizing: border-box;
    text-align: right;
}

#top-bar.is-sticky {
    padding-bottom: 15px;

}

#top-bar.is-sticky #logocontainer img {
    max-height: 95px;
}

#top-menu {
    display: inline-block;
    margin-bottom: 10px;
}

#menucontainer {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
}

#menu-toggle {
    display: none !important;
}

#topcontainer{
    position: relative; 
    height: 123px;
    background-color: rgba(255,255,255,1);
}

#logocontainer {
  position: absolute;   /* irrottaa logon dokumentin flow'sta */
  top: 3px;            /* NOSTA tätä jos haluat logoa ylemmäs -> pienennä arvoa */
  left: 12%;            /* säilyttää vaakasijainnin kuten alkuperäisessä */
  width: auto;
  z-index: 1002;        /* alle top-bar.is-sticky (20000) — logo EI ole sticky */
  transform: none;
}

#logocontainer img {
  display: block;
  max-height: 116px;     /* säädä kokoon tarvittaessa (esim. 44px tai 50px) */
  width: auto;
  height: auto;
  transition: max-height 0.3s cubic-bezier(.22,1,.36,1);}

.top_esittely {
    	position:relative;
    	width:100%;
    	top: 77px;
    	background: transparent;
    	margin-left: 0;
    	float: left;
    	font-size: 20px;
    	text-align: center;
}

.yhteystiedot {
	padding-bottom:30px;

}

.laatikko1_palsta {
        width: 35%;
        margin-left: 10%;
        margin-right: 0%;
        margin-top: 29px;
}

.laatikko2_palsta {
        width: 35%;
        margin-left: 11%;
        margin-right: 1%;
        margin-top: 29px;
    }

#etusivu_teksti {
      min-height: 500px;   /* koko näkymän korkeus */
}

#yritys {
      margin-top: 43px;    /* etäisyys edellisestä osasta */
}

.leipateksti {
       width: 57%;
       margin-left: 23%;
}


}














/* =====================================================
   SMALL SCREEN 1199px - 800px
   ===================================================== */


@media only screen and (max-width: 1199px) and (min-width: 800px) {

a.anchor {
        top: 0px;
}

#top-bar {
    width: 100%;
    padding-right: 3%;   
    padding-top: 70px;
    box-sizing: border-box;
    text-align: right;
}

#top-bar.is-sticky {
    padding-bottom: 15px;

}

#top-bar.is-sticky #logocontainer img {
    max-height: 95px;
}

#top-menu {
    display: inline-block;
    margin-bottom: 10px;
}

#menucontainer {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
}

#menu-toggle {
    display: none !important;
}

#topcontainer{
    position: relative;
    height: 123px;
    background-color: rgba(255,255,255,1);
}

#logocontainer {
  position: absolute;
  top: 0px;             /* hieman pienempi arvo pienemmälle näytölle */
  left: 1%;             /* kuten alkuperäinen small-screen asetuksissa */
  width: auto;
  z-index: 1002;
  transform: none;
}

#logocontainer img {
  display: block;
  max-height: 111px;     /* säädä / pienennä tarpeen mukaan */
  width: auto;
  height: auto;
  transition: max-height 0.3s cubic-bezier(.22,1,.36,1);}

.top_esittely {
    	position:relative;
    	width:100%;
    	top: 150px;
    	background-color:
    	rgba(255, 255, 255, 0.00);
    	margin-left: 00;
    	float: left;

    	text-align: center;
}

.yhteystiedot {
	padding-left: 5%;
	padding-top: 25px;
	padding-bottom:30px;
}


.laatikko1_palsta,
.laatikko2_palsta {
      width: 46%; 
      margin-top: 10px;
}

.laatikko1_palsta {
     margin-left: 1%;
      margin-right: 0%;
}

.laatikko2_palsta {
     margin-left: 4%;
     margin-right: 1%;
}

#etusivu_teksti {
     min-height: 80vh;  /* hieman pienempi korkeus kuin desktopissa */
}

#yritys {
     margin-top: 30px;  /* vähän pienempi marginaali */
}

.leipateksti {
     width: 70%;     
     margin-left: 15%; 
}


}









/* =====================================================
   MOBILE max 799px
   ===================================================== */

@media only screen and (max-width: 799px) {

a.anchor {
        top: 0px; 
}

#menucontainer {
    position: relative;
    width: 100%;
    margin-top: 0;
    z-index: 5000;
}

#topcontainer {
    position: relative;
    z-index: 4000;
}

#logocontainer {
    position: relative;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

#logocontainer img {
    display: block;
margin: 7px 7px 9px 30px;
    max-height: 100px;
    height: auto;
}

#top-bar {
    position: relative;
    min-height: 64px;       /* sama kuin nyt */
    display: flex;
    align-items: center;    /* keskittää sisällön pystysuunnassa */
}

.leipateksti {
    width: 90%;
    margin-left: 5%;
}

H1 { font-size: 30px; }
H2 { font-size: 25px; }

.top_esittely {
    position: relative;
    width: 90%;
	min-height: 600px;
    top: 170px;
    margin: 0 auto;
    text-align: center;

}

.yhteystiedot {
    padding-left: 3%;
    padding-bottom: 50px;
}

.laatikko1_palsta,
.laatikko2_palsta {
    width: 95%;
    margin: 10px auto;
}

#etusivu_teksti {
    min-height: 680px;
    margin-left: 0;
    margin-right: 0;
}

#yritys {
    padding-top: 15px;
    padding-bottom: 15px;
}

/* ===============================
   MOBIILIMENU
   =============================== */

#menu-toggle {
    display: block;
    position: absolute;
    top: 50%;        /* säädä tarvittaessa 16–22px */
    right: 7%;
    transform: translateY(-50%);
    z-index: 6000;
}

/* Hamburger nappi */
#hamburger {
    width: 30px;
    height: 22px;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
}

#hamburger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: #000;
    transition: all 0.3s ease;
}

#hamburger span:nth-child(1) { top: 0; }
#hamburger span:nth-child(2) { top: 9px; }
#hamburger span:nth-child(3) { top: 18px; }

#menu.is-active #hamburger span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

#menu.is-active #hamburger span:nth-child(2) {
    opacity: 0;
}

#menu.is-active #hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

#top-menu {
    width: 100%;
    background: #fff;
    box-sizing: border-box;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 5500;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(.22, 1, .36, 1),
    opacity 0.28s ease;
}

#menu.is-active #top-menu {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

#top-menu li {
    display: block;
    margin: 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

#top-menu a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #000;
}

