:root {
  --color-dark: #2F4569;
  --color-medium: #3A7AA8;
  --color-light: #42A5DA;

  --color-hdr-bkg: #222222;
  --color-hdr-frg: #F5F9FB;

  --color-surface: #FFFFFF;
  --color-muted: #F8F9FA;

  --color-text: #333333;
  --color-text-light: #FFFFFF;
  --color-bkg: #F5F9FB;

  --color-border: #CCCCCC;

  --color-accent: #303A49;
  --color-accent-hover-frg: #3A7AA8;
  --color-accent-hover-bkg: #DCDDE1;

  --color-close: #FF0000;

  --color-scroll-bkg: #F1F1F1;
  --color-scroll-hdl: #C1C1C1;
  --color-scroll-hvr: #A8A8A8;
}

body,
h1,
h2,
h3,
p,
ul,
li,
a,
button {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  min-width: 400px;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bkg);
  display: flex;
  flex-direction: column;
}

#layout {
  display: flex;
}

header {
  background-color: var(--color-hdr-bkg);
  color: var(--color-hdr-frg);
  height: auto;
  gap: 10px;
  padding: 10px 20px;
  position: relative;
}

.logo {
  width: fit-content;
  padding: 0;
  margin: 0 auto 0 auto;
  text-align: right;
}

#logo-image {
  display: block;
  max-width: 600px;
  max-height: 70px;

}

#moto {
  font-size: 0.9rem;
  color: var(--color-text-light);
  text-align: right;
}

/* Hamburger Menu Styles */
.menu-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-text-light);
  margin: 5px 0;
  border-radius: 2px;
}

/* General sidebar styles */
.sidebar {
  position: fixed;
  display: block;
  top: 0;
  left: 0;
  width: 250px;
  height: calc(100% - 50px - 20px);
  color: var(--color-text);
  background-color: var(--color-muted);
  padding: 50px 20px 20px 0px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  z-index: 1000;transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.sidebar-visible .sidebar {
  transform: translateX(0);
}
.sidebar-visible main {
  margin-left: 250px;
  /* Pushes the main content */
  transition: margin-left 0.3s ease;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  font-weight: bold;
  color: var(--color-primary);
  cursor: pointer;
}

.close-btn:hover {
  color: var(--color-close);
}

/* Navigation menu styles */
.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu>li {
  margin-bottom: 10px;
}

/* Links inside the menu */
.nav-menu a {
  width: 90%;
  display: inline-block;
  text-decoration: none;
  color: var(--color-accent);
  font-size: 1rem;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

.nav-menu a:hover {
  background-color: var(--color-accent-hover-bkg);
}

/* Toggle symbol for submenus */
.toggle-symbol {
  font-size: 1.2rem;
  color: var(--color-text);
  cursor: pointer;
  margin-left: 10px;
  display: inline-block;
  user-select: none;
  transition: transform 0.3s ease;
}

/* Rotate the "+" to "x" when submenu is expanded */
.toggle-symbol.open {
  transform: rotate(45deg);
}

/* Submenu styles */
.nav-submenu {
  list-style: none;
  padding-left: 20px;
  margin: 0;
  display: none;
  /* Hidden by default */
}

.nav-submenu li {
  margin-bottom: 5px;
}

.nav-submenu a {
  font-size: 0.9rem;
  padding: 8px 15px;
  border-radius: 3px;
}

.language-selector {
  position: absolute;
  bottom: 10px;
  left: 0px;
  width: 100%;
  text-align: center;
}

.lang-dropdown {
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid var(--color-border);
  background-color: var(--color-bkg);
  color: var(--color-text);
  font-size: 0.9rem;
  cursor: pointer;
}

.lang-dropdown:hover {
  color: var(--color-text-light);
  background-color: var(--color-medium);
}

/* Scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: var(--color-scroll-bkg);
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--color-scroll-hdl);
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--color-scroll-hvr);
}

main {
  flex-grow: 1;
  padding: 20px;
  text-align: center;
  transition: margin-left 0.3s ease;
}

.tab-content {
  display: none;
  padding: 15px;
  margin: 15px auto;
  max-width: 1000px;
  border-radius: 5px;
  text-align: left;
}

.tab-content.active {
  display: block;
}

.tab-content h2 {
  margin: 0px 0px 20px 0px;
  text-align: left;
}
.tab-content h3 {
  margin: 20px 0px 10px 0px;
  text-align: left;
}
.tab-content p {
  margin: 5px 0px 20px 20px;
  text-align: justify;
  text-justify: inter-character;
}

.tab-content-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0 auto;
}
.tab-content-wrap img {
  width: 300px;
  margin-right: 20px;
}
.tab-content-text p {
  flex: 1;
  margin: 0;
}
.tab-content p.centered {
  text-align: center !important;
  margin: 20px 0;
}

.tab-content ul {
  margin-left: 20px;
  padding-left: 30px;
  margin-bottom: 20px;
}

.tab-content ul li {
  padding-left: 0px;
  text-align: justify;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--color-dark);
  color: var(--color-text-light);
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 5px;
  margin: 20px 0 0 0;
}

.btn:hover, .btn:focus {
  background-color: var(--color-medium);
  text-decoration: none;
  outline: none;
}

.btn:active {
  background-color: var(--color-light);
  transform: scale(0.98);
}

.btn-contact {
  background-color: var(--color-light) !important;
  color: var(--color-text) !important;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.btn-contact:hover,
.btn-contact:focus {
  background-color: var(--color-medium) !important;
  color: var(--color-text-light) !important;
  box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.15) !important;
}

.btn-contact:active {
  background-color: var(--color-light) !important;
  box-shadow: inset 0px 4px 6px rgba(0, 0, 0, 0.2) !important;
}

.services-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 20px 0;
  width: 100%;
  flex-wrap: wrap;
}

.service-item {
  max-width: 280px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: var(--color-muted);
  padding: 15px;
  border-radius: 5px;
}

.service-item:hover {
  background-color: var(--color-accent-hover-bkg);
}

.service-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.service-item h3 {
  margin: 0;
}

.service-item-img {
  margin: 20px 0 10px 0;
}
.service-item-img img {
  width: 100%;
}
.service-item p {
  margin: 0;
}

footer {
  background: var(--color-hdr-bkg);
  color: var(--color-hdr-frg);
  padding: 10px 20px;
  text-align: center;
  margin-top: auto;
  width: calc(100% - 40px);
}

.overlaybox {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  background: var(--color-hdr-bkg);
  opacity: 0.95;
  color: var(--color-hdr-frg);
  margin: 0;
  padding: 0;
  z-index: 1001;
  overflow-y: auto;
}

#cookie-consent .aligned {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

#cookie-consent .aligned .singleline {
  max-width: calc(100% - 100px);
}

#cookie-consent .aligned button {
  background-color: var(--color-light) !important;
  color: var(--color-text) !important;
  border: none;
  flex-shrink: 0;
  cursor: pointer;
  padding: 15px 15px;
  font-size: 1rem;
  font-weight: bold;
}

@media (max-width: 768px) {
  .logo {
    width: fit-content;
    margin: 0 auto 0 0;
  }

  .services-container {
    flex-direction: column;
    align-items: center;
  }

  .service-item {
    width: 90%;
    margin-bottom: 15px;
  }
  
  .tab-content-wrap{
    flex-direction: column;
  }

  .tab-content-wrap img {
    width: 100%;
    margin: 20px 0 0 0;
  }

  .tab-content-wrap .tab-content-text {
    order: -1;
  }
}

@media (max-width: 600px) {
  .logo {
    width: calc(100% - 50px);
    margin: 0 40px 0 0;
  }
  #logo-image {
    width: 100%;
  }
}