/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BASE */
body {
  min-height: 100vh;
  font-family: system-ui, sans-serif;
  color: #ffffff;
  margin: 0;
  width: 100%;

  /* standard block layout to avoid mobile width issues */
  display: block;
  
  /* align-items: stretch; */
  /* justify-content: center; */
  overflow-x: hidden; /* prevent horizontal overflow on mobile */

  background-image: url("vptranslations_768.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /*fix the picture moving with clicking on diffeerent nav buttons */
}

html, body { /* On some smartphones, background-attachment: fixed is ignored. So we set full height */
  height: 100%;
}

/* Sticky glass header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;

  /*padding: 0.5rem 0.3rem;  slightly tighter on mobile */
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.25s ease, border-bottom-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(0, 0, 0, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

/* Hero = container il titolo in grande Italian ⇌ English */
.hero-overlay {
  width: 100%;
  box-sizing: border-box;
  flex: 1;
  display: flex;
  flex-direction: column;      /* stack hero box ABOVE tiles */
  align-items: center;         /* center horizontally */
  justify-content: flex-start; /* start from top, not middle */
  padding: 4.5rem 1.5rem 2rem;
  margin-top: 60px;
}

/* Content Box */
.hero-content { 
  text-align: center;
  padding: 0.4rem;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 14px;
  /* backdrop-filter: blur(2px); */
}

/* Navbar inside header */
.navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* gap: 0.5rem; */
}

.navbar .nav-link {
  padding: 0.25rem 0.75rem;
  border-radius: 999999px;
  /* border: 1px solid rgba(255,255,255,0.6); */
  /* background: rgba(0, 0, 0, 0.055); */
  color: #fff;
  font-size: 1.4rem;   /* smaller, readable mobile size */
  font-weight: 700;
  text-decoration: none;
  text-shadow: #020202 1px 0 3px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.navbar .nav-link:hover {
  /* background: rgba(255,255,255,0.15); */
  transform: scale(1.10);
}

.navbar .nav-link.active {
  /* background: #ffffffa2; */
  color: #ff8142;
  /* border-color: #ffffff; */
}

/* Headings & Tagline */
.main-title {
  font-size: clamp(1.8rem, 1vw + 2rem, 3rem);
  margin-bottom: 0.1rem;
  font-weight: 700;
  /* text-shadow: 0px 2px 4px rgba(0,0,0,0.3); */
}

.hero-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
    text-shadow: #020202 1px 0 2px;
}

.tagline { /* professional quality - 19+ years of experience - 100% success rate */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 0.6rem;
  font-size: 0.9rem;
  opacity: 0.9;
  /* margin-bottom: 0.8rem; */
    padding: 0.6rem;
    /* background-color: cornflowerblue; */
  text-shadow: #020202 1px 0 2px;
}

.tagline span::after {
  content: "·";
  /* margin-left: 0.4rem; */
}

.tagline span:last-child::after {
  content: "";
}

/* Dynamic paragraphs */
#content-paragraphs p {
  font-size: 1.1rem;
  text-align: left;
  margin-top: 0.8rem;
  line-height: 1.25;
  opacity: 0.95;
}

.hero-content .cta {
  margin-top: 1.5rem;
  font-weight: 600;
}

.hero-content .cta a {
  color: #ffffff;
  text-decoration: underline;
}

/* Content section below hero box */
.content-section {
  max-width: 1024px;
  margin: 1.8rem auto 2.4rem;
  /* padding: 0 1.4rem; */
}

/* Tiles layout */
#content-paragraphs {
  margin-top: 0.4rem;
}

.tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.4rem;
}

.tile {
    background: rgba(0, 0, 0, 0.8);

  border-radius: 12px;
  padding: 1rem 1.1rem;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
  text-shadow: #000000 1px 0 3px;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.28);
}

.tile-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.tile-body {
  font-size: 1.3rem;
  line-height: 1.35;
  opacity: 0.96;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Hide scrollbars on tiles but keep content scrollable */
.tile,
.tile-body {
  overflow: visible;
}

/* Make embedded iframe show full content and hide its scrollbars */
.tile iframe {
  width: 100%;
  height: 1650px;      /* increase if the form is taller */
  border: 0;
  display: block;
  overflow: hidden;    /* hide iframe scrollbars in the parent */
  box-sizing: border-box;
}

/* Text colors for different languages */
.ita-green { color: #6aff6a;}
.ita-red { color: #ff6a6a; }
.en-blue { color: #6ca6fd; }
.sh-red { color: #ff6a6a; }


.quote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.quote-btn:hover {
  transform: translateY(-1px) scale(1.03);
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 1);
}

.quote-btn-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: block;
}

.contact-form-button {
  display: inline-block;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.contact-form-iframe {
  display: none;
  width: 100%;
  border: none;
}

.centered-link {
    display: flex;        /* Enables Flexbox layout */
    align-items: center;  /* Centers items vertically (along the cross-axis) */
    flex-wrap: wrap;      /* Allow wrapping on small screens */
    max-width: 100%;
    text-decoration: none; /* Optional: removes default link underline */
    color: black;
    /* Add other styles like padding, gap, or width as needed */
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  color: #000;
  font-weight: bold;
  font-size: 14px;
}

.form-group input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: #ff8142;
  box-shadow: 0 0 4px rgba(255, 129, 66, 0.4);
}


/* =================== MEDIA QUERIES =================== */

/* Optional: reduce min-height on very small screens to avoid collapse */
@media (max-width: 420px) {
  .tile {
    min-height: 100px;
  }
}

/* MOBILE FIRST: Adjust layout to prevent horizontal overflow on small screens */
@media (max-width: 600px) {
  /* Prevent any horizontal scrolling */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* Give main hero/content some horizontal padding instead of allowing elements to stick out */
  .hero-overlay,
  .hero-content,
  .content-section,
  #content-paragraphs,
  .tiles-grid {
    /* padding-left: 12px;
    padding-right: 12px; */
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  .hero-overlay {
    padding: 0;
    margin-top: 160px;
  }

  /* Make tiles fluid and avoid fixed widths or negative margins */
  .tiles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0;
  }

  .tile {
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden; /* avoid inner content creating overflow */
  }

  /* Ensure forms, inputs, buttons and images never exceed the viewport */
  .contact-form,
  .contact-form input,
  .contact-form textarea,
  .contact-form button,
  .tile img,
  img {
    max-width: 100%;
    width: 100%;
    height: auto;
    box-sizing: border-box;
  }

  /* Make the top navbar scrollable horizontally instead of overflowing the page */
  .site-header .navbar {
    /* padding-left: 8px;
    padding-right: 8px; */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .nav-link {
    display: inline-block;
    vertical-align: middle;
  }

}

/* 1 tile per row on smaller screens */
@media (max-width: 720px) {
  .tiles-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    margin-top: 1.4rem;
    /* padding: 0; */
  }

  .contact-form-button {
    display: inline-block;
  }

  .contact-form-iframe {
    display: none;
  }  
}
/* Tablet and up: more air, larger type in navbar */
@media (min-width: 768px) {
  body {
    background-image: url("vptranslations_1024.webp");
  }

  .site-header {
    padding: 0.8rem 1.8rem;
  }

  .navbar {
    gap: 0.75rem;
  }

  .hero-overlay {
    padding: 5rem 2.5rem 2.5rem;
  }

  .contact-form-button {
    display: none;
  }

  .contact-form-iframe {
    display: inline-block;
  }

  .tile:has(.contact-form-iframe) {
    /* If parent is a CSS grid container */
    grid-column: span 2;

  /* If parent is a flex container */
    flex: 2 1 0;
  }
}

/* Desktop: even more spacing and slightly larger nav text */
@media (min-width: 1200px) {
  body {
    background-image: url("vptranslations_1600.webp");
  }

  .site-header {
    padding: 1rem 3rem;
  }

  .navbar {
    gap: 1rem;
  }

  .navbar .nav-link {
    /* font-size: 1.02rem; */
    padding: 0.45rem 1.15rem;
  }

  .hero-overlay {
    padding: 5.5rem 3rem 3rem;
  }
}


