:root {
  --nav-bg: #ffffff;
  --nav-link: #555;
  --fz-body: clamp(14px, 1vw + 10px, 18px);
}

body{
  margin: 0px; 
  padding: 0px;
  background-color:#F8F8F8;
  font-family: sans-serif;
  font-size: var(--fz-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

p,
li {
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.first{
  margin-top: 10px;
  padding: 0px 0px 9px 0px;
  color: #758694;
  font-size: 1rem;
}

.page-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    background-color: white
}

/* NAVIGATE BAR */
#navigation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 2rem;
}

#navigation-bar-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* IMAGE OF LOGO DEFENDER */
a > img{
  width: 198px;
  height: 52px;
}

/* BUTTONS OF NAVIGATION BAR */
.nav-links{
  list-style-type: none;
  padding: 0px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav ul li a{
  text-decoration: none;
  color: grey;
  font-size: 1.3rem;
}

nav ul li a:hover {
  border-bottom: 2px solid #A6A6A6;
}

.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* LANGUAGE SWITCHER */
.language-switcher {
  position: relative;
  display: flex;
  align-items: center;
}

.selected-language {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

/* MAIN FLAG */
.selected-language .fi {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px #ccc;
}

/* DROPDOWN */
.language-dropdown {
  display: none;
  position: absolute;
  top: 35px;
  right: 0;
  min-width: 100px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  overflow: hidden;
}

.language-dropdown.show {
  display: block;
}

/* ITEMS */
.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 0.9rem;
  text-decoration: none; 
  color: black; 
}

.language-option:hover {
  background: #f4f4f4;
}

/* FLAGS IN MENU */
.language-option .fi {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-block;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px #ccc;
}

hr {
  margin: 0px;
}

/* SECTION IMPORT */
.container-header{
  text-align: center;
}

.header-text{
  font-size: 3rem;
  color: black;
  margin: 15px 0px;
} 

/* FIRST SECTION */
.card-flex{
  display: flex;
  justify-content: center;
  align-items: center;
  background-color:#F8F8F8;
}

.card-grid-first{
  display: grid;
  width: 90%;
  background-color: white;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto auto;
  box-shadow: 0 0.5rem 1.5625rem rgba(0,0,0,.1);
  margin: 0px 20px 35px 20px;
  gap: 30px;
  padding: 35px 50px
}

.first-img-card{
  grid-area: 1/1/2/3;
}

.first-img-card img{
  width: 100%;
}

.first-text-card{
  grid-area:1/3/2/5;
  padding: 0px 0px 60px 30px;
  text-align: justify;
}

.second-img-card{
  grid-area: 2/1/3/2;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.second-img-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.third-img-card{
  grid-area: 2/2/3/3;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.third-img-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.forth-img-card{
  grid-area: 2/3/3/4;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.forth-img-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fifth-img-card{
  grid-area: 2/4/3/5;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.fifth-img-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sixth-img-card{
  grid-area: 3/1/4/2;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.sixth-img-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.seventh-img-card{
  grid-area: 3/2/4/3;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.seventh-img-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eight-img-card{
  grid-area: 3/3/4/4;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.eight-img-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ninth-img-card{
  grid-area: 3/4/4/5;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.ninth-img-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* FOOTER */
.footer-wrapper {
  margin-top: auto;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.footer-left {
  display: flex;
  text-align: left;
}

.footer-text{
  color: black;
  font-size: 1.7rem;
  margin: 0
}

.socials {
  display: flex;
  gap: 15px;
  font-size: 24px;
}

.socials i {
  font-size: 30px;
  color: black;
}

.socials a:hover {
  color: #0077ff;
  transform: scale(1.2);
}

/* OPEN GALLERY */
.renovation-card img{
  cursor: pointer;
}

.renovation-card img:focus{
  outline: 3px solid #A6A6A6;
  outline-offset: 4px;
}

.lightbox-open{
  overflow: hidden;
}

.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px 90px;
  z-index: 3000;
}

.lightbox.active{
  display: flex;
}

.lightbox-content{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lightbox-content img{
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 0.5rem 1.5625rem rgba(0,0,0,.35);
}

.lightbox-btn,
.lightbox-close{
  position: absolute;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.92);
  color: #111;
  transition: transform 0.2s ease, background 0.2s ease;
}

.lightbox-btn:hover,
.lightbox-close:hover{
  background: #fff;
  transform: scale(1.05);
}

.lightbox-btn{
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.lightbox-btn:hover{
  transform: translateY(-50%) scale(1.05);
}

.lightbox-btn i{
  margin-left: 0;
  font-size: 24px;
}

.lightbox-prev{
  left: 26px;
}

.lightbox-next{
  right: 26px;
}

.lightbox-close{
  top: 22px;
  right: 22px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
}

/* ===== Global image behavior ===== */
img,
.image-container img{
  max-width: 100%;
}

img,
.image-container img {
  display: block;
  height: auto;
}

/* Prevent overflow from editor-generated inline image sizes */
.wnd-image-container img {
  width: 100% !important;
  height: auto !important;
  position: static !important;
}

/* ===== Content containment ===== */
.card-grid-first,
.card-flex,
section {
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.card-grid-first > *,
.card-flex > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.renovation-card {
  position: relative;
  overflow: hidden;
  cursor: pointer
}

.renovation-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.renovation-card:hover img {
  transform: scale(1.06);
}

.first{
  margin-top: 0px;
}

/* ===== Tablet / smaller desktop ===== */
@media (max-width: 1145px) {
  #navigation-bar {
    padding: 0.75rem 1rem;
  }

  #logo-img img,
  a > img,
  #navigation-bar img {
    width: clamp(140px, 25vw, 200px);
    height: auto;
  }

  nav ul.nav-links {
    position: absolute;
    top: 64px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--nav-bg);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
  }

  nav ul.nav-links.active {
    display: flex;
  }

  nav ul li a {
    font-size: 1rem;
    color: var(--nav-link);
  }

  .hamburger {
    display: block;
    font-size: 3rem;
  }

  /* Stack main content blocks vertically */
  .card-grid-first,
  .row,
  .columns,
  .cards,
  .section-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px;
  }

  .card-grid-first > *,
  .row > *,
  .columns > *,
  .cards > *,
  .section-row > * {
    max-width: 100% !important;
  }

  /* Neutralize old float/column systems */
  .left,
  .right,
  .column,
  .col,
  [class*="col-"] {
    float: none !important;
    width: 100% !important;
  }

  /* Comfortable padding for text/image blocks */
  /*.first-text-card{
    padding: 0px 50px 20px 50px !important;
  }*/

  .first-text-card{
    padding: 0px;
  }

  .first-img-card img{
    width: 100% !important;
  }
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
  #logo-img img,
  a > img,
  #navigation-bar img {
    width: clamp(110px, 33vw, 160px);
    height: auto;
  }

  p,
  li {
    font-size: 0.8rem !important;
  }

  .header-text {
    font-size: 1.4rem !important;
  }
}

/* ===== Small spacing adjustments ===== */
@media (max-width: 768px) {
  .first-text-card{
    padding: 0px;
  }
}