html {
  background: url(../fp_img/bg5.webp) no-repeat fixed;
  background-size: 100%;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

img {
  max-width: 100%;
}

body, td, th {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #333;
  margin-left: 0px;
  margin-top: 0px;
  margin-right: 0px;
  margin-bottom: 0px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;  /* Changed from 20px */
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 100%);  /* Reduced from 0.2 to 0.15 */
    z-index: 9999;
    pointer-events: none;
}

hr {
  margin: 30px 0 -14px;
}

#outer1 {
    margin: 0 auto;  /* Changed from 30px auto 0 */
    padding: 20px 0 0;  /* Added top padding */
    width: 100%;
    max-width: 1001px;
    overflow: hidden;
    background-color: #fff;
}

/* Add mobile override */
@media (max-width: 768px) {
    #outer1 {
        padding-top: 0;  /* Changed from margin-top */
    }
}

#image_container1 {
  height: auto;
  width: calc(98% - 10px);
  max-width: 947px;
  margin: 15px auto 0;
  position: relative;
}

#images_left1 {
  width: 67.5%;
  float: left;
}

#images_right1 {
  max-width: 32.2%;
  float: right;
}

#mid1 {
  width: 0.4%;
  display: inline;
  text-align: center;
}

#mid1 img {
  opacity: 1;
  background-color: #fff;
}

#marimatic {
  max-width: 100%;
  float: left;
  margin-top: 5px;  /* Add spacing on large screens */
}

@media (max-width: 768px) {
    #marimatic {
        margin-top: 0;  /* Remove the extra spacing on mobile */
    }
}

#metrotaifun {
  max-width: 100%;
}

#metrosense {
  max-width: 100%;
  float: left;
}

#taifun {
  max-width: 100%;
}

.bottom {
  margin: 30px auto 0;
  padding: 5px 0 30px;
  width: 100%;
}

.contenttext {
  margin: 0 auto;
  width: 95%;
  max-width: 915px;
  padding: 2px 13px 15px;
  display: table;
  border: 1px solid #ccc;
}

.box-alpha {
  float: left;
  width: 30%;
  display: inline;
  margin-right: 20px !important;
  height: 100%;
}

.box-omega {
  float: right;
  width: 30%;
  display: inline;
  margin-left: 20px !important;
}

.box-mid {
  width: 24%;
  display: inline;
}

@media screen and (max-width: 750px) {
  #bottom {
    margin: 400px auto 0;
  }

  .box-alpha {
    float: left;
    width: 100%;
    display: block;
    margin-right: 20px !important;
    height: 100%;
  }

  .box-omega {
    float: right;
    width: 100%;
    display: block;
    margin-left: 20px !important;
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .box-mid {
    width: 99%;
    display: block;
  }
}

#outer {
  margin: 20px auto 40px;
  width: 100%;
  height: 100%;
  max-width: 1000px;
  overflow: hidden;
}

#image_container {
  position: relative;
  height: auto;
  width: 100%;
  max-width: 1000px;
}

#images_left {
  width: 50%;
  float: left;
}

#images_right {
  max-width: 50%;
  float: right;
}

#mid {
  position: absolute;
  z-index: 101;
  width: 50%;
  left: 50%;
  top: 52%;
  -webkit-transform: translate(-50%, 52%);
  transform: translate(-50%, 52%);
  opacity: 1;
}

#mid img {
  opacity: 1;
  background-color: #fff;
}

#mid img:hover {
  opacity: 0.7;
}

#commercial {
  max-width: 100%;
  float: left;
  margin: -5px 0 0;
  vertical-align: top;
  transition: all 0.3s ease;
}

#commercial img:hover {
  opacity: 0.7;
}

#commercial:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#local {
  max-width: 100%;
  margin: 0 0;
  vertical-align: top;
  transition: all 0.3s ease;
}

#local img:hover {
  opacity: 0.7;
}

#local:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#area {
  max-width: 100%;
  float: left;
  vertical-align: top;
  transition: all 0.3s ease;
}

#area img:hover {
  opacity: 0.7;
}

#area:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#total {
  max-width: 100%;
  vertical-align: top;
  margin: -5px 0 0;
  transition: all 0.3s ease;
}

#total img:hover {
  opacity: 0.7;
}

#total:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#mid img {
	border:3px solid #fff !important;
}
#commercial {
	border:2px solid #fff !important;
}
#local {
	border:2px solid #fff !important;
}
#area {
	border:2px solid #fff !important;
}
#total {
	border:2px solid #fff !important;
}

a.yellow-button {
  font-size: 18px;
  padding: 10px 30px;
  background: #ffdd58;
  color: black !important;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
}

/* Base button styles */
a.yellow-button {
    font-size: 16px;
    padding: 8px 20px;
    margin: 10px;
    background: #ffdd58;
    color: black !important;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    text-align: center;
}

@media only screen and (max-width: 1230px) {
  a.yellow-button {
    font-size: 14px;
    padding: 7px 12px;
    border-radius: 5px;
  }
}

a:hover.yellow-button {
  background: #ffe78a;
  color: black !important;
}

/* Position buttons for large screens */
#metrotaifun, #taifun {
  position: relative;
}

#metrotaifun .yellow-button, 
#taifun .yellow-button {
  position: absolute;
  bottom: 10px;
  left: 10px;
}

/* Desktop button positioning */
#metrotaifun .yellow-button, 
#taifun .yellow-button {
    position: absolute;
    bottom: 15px;
    left: 15px;
    min-width: 120px;
}

/* Mobile overrides */
@media (max-width: 768px) {
    #metrotaifun .yellow-button, 
    #taifun .yellow-button {
        left: auto;
        right: 15px;
        min-width: auto;
        font-size: 14px;
        padding: 6px 15px;
        text-align: right;
    }
}

@media (max-width: 768px) {
  #image_container1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
  }

  /* Left images container (metrotaifun and taifun) */
  #images_left1 {
    width: 100%;
    max-width: 100%;
    float: none;
  }

  /* Right images container (metrosense and marimatic) */
  #images_right1 {
    width: 70%;
    max-width: 70%;
    float: none;
    margin: 0 auto;
  }

  /* Common styles */
  #images_left1 > div, #images_right1 > div {
    margin-bottom: 20px;
    position: relative;
  }

  #metrotaifun .yellow-button, #taifun .yellow-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
  }

  #images_left1, #images_right1 {
    width: 80%;
    max-width: 80%;
    float: none;
  }

  #images_left1 > div, #images_right1 > div {
    margin-bottom: 20px;
    position: relative;
    width: 100% !important;
  }

  #metrotaifun, #taifun, #metrosense, #marimatic {
    width: 100%;
  }

  #metrotaifun .yellow-button, #taifun .yellow-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
  }

  #metrosense, #marimatic {
    width: 100%;
  }

  #metrosense img, #marimatic img {
    width: 100%;
    height: auto;
  }

  #images_right1 img {
    width: 100%;
    height: auto;
  }

  #images_right1 #metrosense, 
  #images_right1 #marimatic {
    width: 100%;
  }

  #images_right1 #metrosense img, 
  #images_right1 #marimatic img {
    width: 100%;
    max-width: none;
  }

  #images_right1 {
    width: 100%;
  }

  #images_right1 #metrosense,
  #images_right1 #marimatic {
    width: 100%;
    max-width: 100%;
  }

  #images_right1 #metrosense a,
  #images_right1 #marimatic a {
    display: block;
    width: 100%;
  }

  #images_right1 #metrosense img,
  #images_right1 #marimatic img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  #image_container1 {
    display: block;
    width: 100%;
  }

  #images_right1 {
    width: 100%;
    max-width: none;
  }

  #images_right1 #metrosense,
  #images_right1 #marimatic {
    float: none;
    width: 100vw;
    max-width: 100vw;
    margin: 0 -1rem;
  }

  #images_right1 #metrosense img,
  #images_right1 #marimatic img {
    width: 100%;
    max-width: none;
    display: block;
  }

  /* Force all images in images_right1 to be exactly 80% width */
  #images_right1 #metrosense,
  #images_right1 #marimatic {
    width: 80%;
    max-width: 80%;
    margin: 0 auto;
  }

  #images_right1 #metrosense img,
  #images_right1 #marimatic img {
    width: 100%;
    max-width: 100%;
  }

  /* Specific override for metrotaifun and taifun containers */
  #images_left1 {
    width: 100%;
    max-width: 100%;
  }

  #images_left1 #metrotaifun,
  #images_left1 #taifun {
    width: 100%;
    max-width: none;
  }

  #images_left1 #metrotaifun img,
  #images_left1 #taifun img {
    width: 100%;
    max-width: 100%;
  }

  #images_right1 {
    width: 70%;
    max-width: 70%;
  }

  #images_right1 #metrosense,
  #images_right1 #marimatic {
    margin-bottom: 20px;
    width: 100%;
    margin: 0 auto 20px;
  }

  #images_right1 #metrosense img,
  #images_right1 #marimatic img {
    width: 100%;
    height: auto;
  }

  #marimatic {
    margin-bottom: 0 !important;  /* Remove bottom margin */
    margin-bottom: -30px !important;  /* Negative margin to reduce space */
  }

  #image_container1 {
    margin-bottom: 0;  /* Remove container bottom margin */
  }

  /* Remove any extra spacing from the last image */
  #images_right1 #marimatic {
    margin-bottom: 0;
  }

  /* Adjust banner spacing */
  #banner {
    margin: 50px 0 45px !important;  /* Reduce top margin from 130px to 50px */
  }
}

/* Move marimatic image down on desktop */
#images_right1 #marimatic {
    padding-top: 7px;  /* Slightly more than 5px to account for existing margins */
}

/* Remove padding on mobile */
@media (max-width: 768px) {
    #images_right1 #marimatic {
        padding-top: 0;
    }
}

/* Move marimatic image down on desktop */
#images_right1 #marimatic {
    margin-top: 5px;
}

/* Reset margin on mobile */
@media (max-width: 768px) {
    #images_right1 #marimatic {
        margin-top: 0;
    }
}

#marimatic, #metrotaifun, #metrosense, #taifun,
#images_left1 .jarvenpaanews img,  /* Add Jarvenpaa news banner */
#images_left1 .marinesolutions img {  /* Add marine solutions image */
    transition: transform 0.3s ease;
    position: relative;
    display: block;
    margin: 5px;
    box-shadow: 0 0 8px rgba(0,0,0,0.08);  /* Simple, uniform shadow */
}

#marimatic:hover, #metrotaifun:hover, #metrosense:hover, #taifun:hover,
#images_left1 .jarvenpaanews img:hover,
#images_left1 .marinesolutions img:hover {
    transform: scale(1.01);  /* Reduced from 1.02 to 1.01 */
    box-shadow: 0 0 12px rgba(0,0,0,0.12);  /* Slightly stronger on hover */
}

/* Add effects to the specific images */
img[src*="Jarvenpaa_news_banner_web_frontpage_03.webp"],
img[src*="marine-solutions.webp"] {
    transition: transform 0.3s ease;
    position: relative;
    display: block;
    margin: 5px;
    box-shadow: 0 0 8px rgba(0,0,0,0.08);
}

img[src*="Jarvenpaa_news_banner_web_frontpage_03.webp"]:hover,
img[src*="marine-solutions.webp"]:hover {
    transform: scale(1.01);
    box-shadow: 0 0 12px rgba(0,0,0,0.12);
}

@media screen and (min-width: 1024px) {
    #banner {
        margin: 40px 0 45px !important;  /* Reduced from 110px to 40px */
    }
}

/* Center banner and marine solutions */
#banner, #marine {
    display: flex;
    justify-content: center;
    width: 100%;
}

#banner img, #marine img {
    margin: 5px auto;  /* Replace individual margin with auto left/right */
}