/* ============================
   Local Font Declarations
   ============================ */
/* montserrat-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('../assets/fonts/montserrat-v31-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* montserrat-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  src: url('../assets/fonts/montserrat-v31-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* montserrat-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  src: url('../assets/fonts/montserrat-v31-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* montserrat-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  src: url('../assets/fonts/montserrat-v31-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}


/* nunito-sans-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 400;
  src: url('../assets/fonts/nunito-sans-v19-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* nunito-sans-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 500;
  src: url('../assets/fonts/nunito-sans-v19-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* nunito-sans-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 600;
  src: url('../assets/fonts/nunito-sans-v19-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* nunito-sans-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 700;
  src: url('../assets/fonts/nunito-sans-v19-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}


/* ============================
   CSS Variables for Consistency
   ============================ */
:root {
  --primary-color: #2c5f8d;
  --primary-light: #4a7ba7;
  --primary-dark:  #1a3f5f;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #fafafa;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --transition: all 0.3s ease;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  height: 100%;
}

/* Global sizing reset for predictability */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-top: 60px;
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  background: var(--bg-white);
  line-height: 1.6;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================
   Typography
   ============================ */
h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 1rem 0;
  letter-spacing: 0.4px;
  color: var(--primary-dark);
  font-family: 'Montserrat', 'Nunito Sans', sans-serif;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 1rem 0;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Montserrat', 'Nunito Sans', sans-serif;
}

h3 {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 0.75rem 0;
  color: var(--primary-color);
  font-family: 'Montserrat', 'Nunito Sans', sans-serif;
}

h4 {
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.6rem 0;
  color: var(--primary-color);
  font-family: 'Montserrat', 'Nunito Sans', sans-serif;
}

p {
  margin: 0 0 1rem 0;
  line-height: 1.7;
  color: var(--text-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
}

/* ============================
   Header
   ============================ */

/* Section Navigation Dots */
#section-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 100;
  opacity: 0;
  animation: fadeInNav 0.25s ease-out 0.25s forwards; /* Appear after intro animation */
}

@keyframes fadeInNav {
  to { opacity: 1; }
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(44, 95, 141, 0.3);
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.nav-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--primary-color);
  transition: all 0.3s ease;
}

.nav-dot:hover {
  background: rgba(44, 95, 141, 0.5);
  transform: scale(1.2);
}

.nav-dot.active {
  background: var(--primary-color);
}

.nav-dot.active::before {
  width: 6px;
  height: 6px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: auto 1fr auto; /* prevent overflow on small screens */
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 2rem;
  width: 100%;
  margin: 0 auto;
}

.brand {
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
  transition: var(--transition);
}

.brand:hover {
  color: var(--primary-color);
}

/* Brand label responsive variants */
.brand .brand-short { display: none; }
.brand .brand-long { display: inline; }

/* ============================
   Language Switcher
   ============================ */
#lang-switcher {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 8px;
  z-index: 10;
  margin-right: 0; /* avoid pushing header off-screen */
}

#lang-switcher button {
  padding: 6px 12px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
  transition: var(--transition);
}

#lang-switcher button:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ============================
   Main Content
   ============================ */
#content {
  flex: 1 0 auto;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Title is now scoped inside About section */

/* Decorative underline removed */

section {
  max-width: 1300px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

#about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: normal;
}

#about-section h1 {
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 0.75rem 0;
  letter-spacing: 0.3px;
  color: var(--primary-dark);
  -webkit-text-stroke: 0.3px var(--primary-dark);
  paint-order: stroke fill;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.about-text p {
  margin: 0;
  text-align: left;
}

#about-section-contact-link {
  margin-top: 1.1rem;
}

#about-section img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ============================
   Services Section
   ============================ */
#services-section {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-color);
}

#services-section h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 500;
  margin-bottom: 2.5rem;
  color: var(--primary-dark);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 2rem;
  row-gap: 2rem; /* Comfortable spacing between card rows */
  align-items: stretch;
}

.service-block {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  grid-template-columns: repeat(3, 1fr);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 2px solid var(--border-color);
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0.95;
}

.service-block:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 1;
}

.service-block h3 {
  margin-bottom: 1rem;
}

.service-block p {
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.service-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-block ul li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-color);
}

.service-block ul li::before {
  content: "✓";
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* ============================
   About & Team Section
   ============================ */
.about-us {
  padding: 3rem 0;
  grid-column: 1 / -1;
}

.about-us h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.about-us > p {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem auto;
  font-size: 1.1rem;
  color: var(--text-light);
}

.team-member {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  opacity: 0.95;
}

.team-member:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Team section: side-by-side layout using flexbox */
#team-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  border-top: 1px solid var(--border-color);
}

#team-section > h2 {
  flex-basis: 100%;
  text-align: center;
  font-size: 2.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

#team-section > p {
  flex-basis: 100%;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2.5rem auto;
  font-size: 1.15rem;
  color: var(--text-color);
  line-height: 1.8;
  font-weight: 500;
}

#team-section > .team-member {
  flex: 1 1 450px; /* two columns on wide screens, wrap on smaller */
  margin: 0; /* spacing handled by gap */
}

.team-member h3:first-of-type {
  color: var(--primary-dark);
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.team-member img {
  width: 40%;
  max-width: 300px;
  border-radius: var(--radius-md);
  margin: 0 1.5rem 1rem 0;
  box-shadow: var(--shadow-sm);
  float: left;
}

.team-member h3:nth-of-type(2) {
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.team-member p {
  color: var(--text-light);
  line-height: 1.8;
}

/* Ensure float doesn't escape the container */
.team-member::after {
  content: "";
  display: block;
  clear: both;
}

/* ============================
   Footer
   ============================ */
footer {
  margin-top: auto;
  padding: 2rem;
  background: var(--primary-dark);
  color: #fff;
}

.footer-content {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: flex-start;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

footer section {
  min-width: 200px;
  display: flex;
  flex-direction: column;
}

footer section p {
  margin: 0.3rem 0;
  color: rgba(255, 255, 255, 0.9);
}

footer section p[data-i18n$="_title"] {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

footer section a {
  color: rgba(255, 255, 255, 0.9);
  margin: 0.5rem 0;
  transition: var(--transition);
}

footer section a:hover {
  color: white;
}

footer #legal a {
  margin: 0.5rem 0;
}

/* ============================
   Legal Pages
   ============================ */

/* Legal disclaimer banner (hidden by default; shown for EN via JS) */
.legal-disclaimer {
  display: none;
  margin: 3rem auto 3rem;
  max-width: min(900px, 90vw);
  padding: 2.5rem;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  opacity: 0.95;
}

.legal-disclaimer:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.legal-section {
  max-width: min(900px, 90vw);
  line-height: 1.8;
}

.legal-section h1 {
  margin-bottom: 2rem;
}

.legal-section h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.legal-section h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.legal-section p {
  margin-bottom: 1.5rem;
}

/* Ensure long words wrap using hyphenation; avoid mid-word breaks by default */
.legal-section,
.legal-section p,
.legal-section li,
.legal-section h1,
.legal-section h2,
.legal-section h3 {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

/* Links (often long URLs) may break anywhere to prevent overflow */
.legal-section a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.legal-section b,
.legal-section strong {
  font-weight: 600;
}

.legal-section ol,
.legal-section ul {
  margin: 1rem 0 1.5rem 2rem;
  line-height: 1.8;
}

.legal-section div {
  margin-bottom: 2rem;
}

/* Soft content reveal (on initial load) */
#content {
  opacity: 0;
  animation: contentFadeUp 200ms ease-out 150ms forwards;
}

/* Keyframes */
@keyframes contentFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: inherit; transform: translateY(0); }
}


/* ============================
   Responsive Design
   ============================ */
@media (max-width: 1399px) {
  #section-nav {
    display: none;
  }
}

@media (max-width: 1109px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Let h1 span both grid columns by promoting about-text children */
  .about-text {
    display: contents;
  }

  /* Restore tighter vertical spacing between text rows */
  #about-section {
    column-gap: 2rem; /* keep your two-column spacing */
    row-gap: 1.5rem;  /* mimic previous flex gap between paragraphs */
  }

  #about-section h1 {
    grid-column: 1 / -1;
  }

  #about-section p {
    grid-column: 1;
  } 

  /* Keep the image anchored to the right column */
  #about-section img {
    grid-column: 2;
    grid-row: 2 / 6; /* span from second row to the last */
  }
}

@media (max-width: 840px) {
  #about-section {
    display: flex;
    flex-wrap: wrap;
  }

  .about-text {
    display: contents;
  }

  #about-section img {
    float: right;
  }
}


/* Laptop-first adjustments: second necessary breakpoint at ≤768px */
@media (max-width: 768px) {
  /* Ensure about-text children remain grid items at this breakpoint */
  .about-text { display: contents; }
  h1 {
    font-size: 2rem;
    letter-spacing: 0.3px;
  }

  h2 {
    font-size: 1.6rem;
  }

  section {
    padding: 1rem 1.5rem;
  }

  #about-section img {
    grid-row: 2 / 4;
  }

  #about-section .about-text > #about-section-contact-link {
    grid-column: 2;
    grid-row: 4;
    margin-bottom: 30px;
    align-self: end;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-block {
    padding: 1.5rem;
  }

  #team-section {
    padding-top: 64px;
    display: flex; /* stack children vertically on mobile */
    flex-direction: column;
    gap: 2rem;
  }

  .team-member {
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    display: block;
    width: 100% !important;
    margin-right: 0 !important;
  }

  .team-member img {
    max-width: 200px;
    width: 100%;
    float: none;
    margin: 1rem 0;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
  
  footer section {
    width: 100%;
  }
}

@media (max-width: 520px) {
  #services-section h2, #team-section h2 {
    font-size: 2rem;
  }

  #services-section h3, #team-section h3 {
    font-size: 1.3rem;
  }

  #services-section p, #team-section p {
    font-size: 0.9rem;
  }

  #services-section li, #team-section li {
    font-size: 0.9rem;
  }
}

@media (max-width: 500px) {
  .brand {
    font-size: 0.95rem;
    gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  #main-header {
    padding: 0.5rem 1rem;
    gap: 0.25rem;
  }

  #content {
    padding: 0 1rem;
  }

  section {
    padding: 1rem 1rem;
  }

  footer {
    padding: 1.5rem 1rem;
  }

  .service-block {
    padding: 1rem;
  }

  .team-member {
    padding: 1rem;
  }

  #lang-switcher button {
    padding: 5px 8px;
    font-size: 0.85rem;
  }

  .legal-section h1 {
    font-size: 1.6rem;
  }

  .legal-section h2 {
    font-size: 1.2rem;
  }

  .legal-section h3 {
    font-size: 1rem;
  }
}

@media (max-width: 450px) {
  .brand .brand-long { display: none; }
  .brand .brand-short { display: inline; }
}

@media (max-width: 420px) {
  #services-section h2, #team-section h2 {
    font-size: 1.6rem;
  }

  #services-section h3, #team-section h3 {
    font-size: 1.1rem;
  }

  #services-section p, #team-section p {
    font-size: 0.8rem;
  }

  #services-section li, #team-section li {
    font-size: 0.8rem;
  }
}

@media (max-width: 375px) {
  .legal-section h1 {
    font-size: 1.4rem;
  }

  .brand {
    font-size: 0.9rem;
    gap: 0.25rem;
  }

  /* On very narrow screens, allow more aggressive wrapping to avoid x-scroll */
  .legal-section h2,
  .legal-section h3,
  .legal-section p,
  .legal-section li {
    overflow-wrap: anywhere;
  }
}
