body {
   height: 100%;
   display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: "MyFont", sans-serif;
    background-color: black;  
}

/* NAVBAR (sticky top) */
.navbar {
  background-color: black;
  position: sticky;
  top: 0;
  z-index: 1200;

  border-top: 1px solid white;
  border-bottom: 1px solid white;

  transition: all 300ms ease;
}

.navbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0.75rem 1rem;
  transition: padding 300ms ease;
}

.nav-logo img {
  height: 50px;
  width: auto;
  display: block;

  transition: height 300ms ease, transform 300ms ease;
  
}

.navbar.expanded .navbar-header {
  padding: 1.5rem 1rem;   /* ~50% taller */
}

.navbar.expanded .nav-logo img {
  height: 52px;
  transform: scale(1.1);
}

.navbar.shrink .navbar-header {
  padding: 0.75rem 1rem;
}

.navbar.shrink .nav-logo img {
  height: 32px;
  transform: scale(1);
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-right {
  margin-left: auto;
}

.menu-toggle {
  position: relative;
  width: 30px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  cursor: pointer;
  z-index: 1201; /* above overlay */
  background-color: black;
  border: none;               /* remove default button border */
  border-radius: 50%;          /* makes it circular if you like */
  outline: none; 
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  position: absolute;
  left: 0;
}

.menu-toggle span:nth-child(1) {
  top: 0;
}

.menu-toggle span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.menu-toggle span:nth-child(3) {
  bottom: 0;
}

.menu-toggle.active span:nth-child(1) {
  top: 50%;
  transform: rotate(45deg) translateY(-50%);
}

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

.menu-toggle.active span:nth-child(3) {
  top: 50%;
  transform: rotate(-45deg) translateY(-50%);
}

/* FULL SCREEN OVERLAY */
.menu-overlay {
  position: fixed;
  inset: 0;                 /* top:0 right:0 bottom:0 left:0 */
  background-color: black;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 5.5rem;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-100%);
  transition: opacity 300ms ease, transform 300ms ease;
}

/* When open */
.navbar.open .menu-overlay {
  opacity: 0.85;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  
}

/* Centered menu list */
.menu-overlay ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.menu-overlay ul li {
  margin: 1.5rem;
}

.menu-overlay ul li a {
  color: white;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 700;
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #222;
  color: white;
  display: none; /* default hidden */
  z-index: 9999;
  font-size: 0.9rem;
  box-sizing: border-box;
  width: 100%;
  padding: 1rem 0.75rem;
  transform: translate3d(0, 0, 0);
  will-change: transform;

  /* For devices with safe areas (iPhone X, iPad Pro) */
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
}
  

.cookie-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  gap: 0.75rem;
}

#cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  width: 100%;
}

#accept-cookies, #refuse-cookies {
  
  background-color: black;
  color: white;
  border: 1px solid white;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}

.footer {
  background-color: black;
  width: 100%;
  border-top: 2px solid white;
  padding: 20px;
  box-sizing: border-box;
}

/* Main container: strictly vertical flow */
.footer-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: white;
  font-weight: 500;
}

/* Reset lists */
.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Each section behaves as a block */
.footer-content > ul,
.footer-content > nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* spacing between items */
.footer li {
  margin-bottom: 10px;
}

/* links */
.footer a {
  text-decoration: none;
  font-family: sans-serif;
  color: white;
}

/* widget block (ANPC images) */
.footer .tc-text .widget-link {
  display: block;
  max-width: 220px;
  border-radius: 12px;
  background-color: #fff;
  margin-top: 10px;
}

.footer .tc-text .widget img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* copyright */
.rights-reserved {
  text-align: center;
  width: 100%;
  margin-top: 30px;
  font-size: 1rem;
}

/*RESPONSIVENESS MEDIA QUERY - NAVBAR:*/

@media (min-width: 950px) {

  .navbar {
    position: sticky;
    top: 0;
    z-index: 1200;

    background-color: black;
    border-top: 1px solid white;
    border-bottom: 1px solid white;
  }

  /* FIXED HEIGHT HEADER */
  .navbar-header {
    width: min(96vw, 1800px);
    margin: 0 auto;

    height: 88px;
    padding: 0 2rem;

    display: flex;
    align-items: center;
    position: relative;
  }

  /* neutralize mobile height states */
  .navbar.expanded .navbar-header,
  .navbar.shrink .navbar-header {
    height: 88px;
    padding: 0 2rem;
  }

  .nav-left {
    flex: 0 0 auto;
    z-index: 2;
  }

  .nav-logo img {
    height: 54px;
    width: auto;
    display: block;
    transform: none;
  }

  .navbar.expanded .nav-logo img,
  .navbar.shrink .nav-logo img {
    height: 54px;
    transform: none;
  }

  .nav-right,
  .menu-toggle {
    display: none;
  }

  .menu-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    padding: 0;
    margin: 0;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .menu-overlay ul {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 3.5rem;

    list-style: none;
    margin: 0;
    padding: 0;
  }

  .menu-overlay li {
    margin: 0;
    padding: 0;
  }

  .menu-overlay ul li a {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    padding: 0 0.5rem;

    color: white;
    text-decoration: none;

    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;

    
  }

  .menu-overlay ul li a:hover {
    color: rgb(207, 17, 17);
  }

  .navbar.open .menu-overlay {
    transform: translate(-50%, -50%);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

}

/*TEST FOR TARGETING DEPRECATED BROWSER BEHAVIOUR*/

@supports not (height: 100dvh) {

  .menu-overlay {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    height: 100%;

    /* critical iOS fix */
    transform: none !important;

    /* avoid scroll-offset weirdness */
    inset: 0;

    /* keep stacking stable */
    z-index: 1200;
  }

}

/*RESPONSIVENESS MEDIA QUERY - FOOTER*/

@media (min-width: 950px) {

  .footer-content {
    width: min(99vw, 1800px);
    margin: 0 auto;

    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;

    padding-left: 75px;
    padding-right: 75px;
    box-sizing: border-box;;          /* allows copyright to drop */
  }

  /* 3 columns */
  .footer-content > ul.adresa-contact-text,
  .footer-content > nav {
    flex: 1;
  }

  /* LEFT */
  .footer-content > ul.adresa-contact-text {
    align-items: flex-start;
    text-align: left;
  }

  /* CENTER (first nav) */
  .footer-content > nav:nth-of-type(1) {
    align-items: center;
    text-align: left;
  }

  .footer-content > nav:nth-of-type(1) ul {
    align-items: center;
  }

  /* RIGHT (second nav) */
  .footer-content > nav:nth-of-type(2) {
    align-items: flex-end;
    text-align: left;
  }

  .footer-content > nav:nth-of-type(2) ul {
    align-items: flex-end;
  }

  /* COPYRIGHT: full width row */
  .rights-reserved {
    flex: 0 0 100%;
    text-align: center;
    margin-top: 40px;
    font-size:1.5rem;
  }
}

/*MEDIA QUERY FOOTER - TABLETS*/
@media (min-width: 712px) and (max-width: 949px) {

  .footer-content {
    display: grid;

    /* left side visually heavier */
    grid-template-columns: 1.55fr 1fr;

    grid-template-areas:
      "address nav"
      "policies policies"
      "rights rights";

    column-gap: 90px;
    row-gap: 34px;

    padding: 0 42px;
    align-items: start;
  }

  /* ADDRESS */
  .adresa-contact-text {
    grid-area: address;
    text-align: left;
    line-height: 1.65;
    max-width: 420px;
  }

  /* NAVIGATION */
  .footer-content > nav:nth-of-type(1) {
    grid-area: nav;
    justify-self: end;
    text-align: left;
  }

  .footer-content > nav:nth-of-type(1) ul {
    align-items: flex-start;
  }

  .footer-content > nav:nth-of-type(1) li {
    margin-bottom: 12px;
  }

  /* POLICIES */
  .footer-content > nav:nth-of-type(2) {
    grid-area: policies;
    justify-self: start;
    text-align: start;
    width: 100%;
    max-width: 520px;
  }

  .footer-content > nav:nth-of-type(2) ul {
    align-items: flex-start;
  }

  .footer-content > nav:nth-of-type(2) li {
    margin-bottom: 10px;
  }

  /* TRUST BADGES */
  .footer .tc-text .widget-link {
    margin-left: auto;
    margin-right: auto;
  }

  /* COPYRIGHT */
  .rights-reserved {
    grid-area: rights;
    text-align: center;
    margin-top: 8px;
    padding-top: 8px;
    font-size: 1.08rem;
    opacity: 0.88;
  }
}

/*MEDIA QUERY - COOKIE BANNER, TABLETS AND OVER*/

@media (min-width: 700px) {

  #cookie-banner {
    padding: 1rem 2rem;
  }

  .cookie-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  #cookie-banner p {
    margin: 0;
    text-align: left;
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
  }

  .cookie-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    flex-shrink: 0;
  }

  #accept-cookies,
  #refuse-cookies {
    width: auto;
    min-width: 120px;
    padding: 0.7rem 1.1rem;
    font-size: 1rem;
  }
}