/* ============================================================
   BASE RESET & GLOBAL STYLES
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: #f5f7fb;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img, video, canvas {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   HEADER
   ============================================================ */

header {
  background: #07152f;
  color: #ffffff;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-image img {
  width: 250px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.7);
}

nav a {
  margin-left: 1.5rem;
  font-size: 0.9rem;
  color: #e5e7eb;
}

nav a:hover {
  color: #ffffff;
  font-weight: 600;
}



/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
  box-sizing: border-box;
  max-width: 100%;
  background: radial-gradient(circle at top left, #1f4f8b 0, #07152f 45%, #020617 100%);
  color: #ffffff;
}

.sub-hero {
  display: flex;
  flex-direction: row;
  text-align: left;
}

.hero-text h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.02rem;
  text-align: justify;
  max-width: 670px;
  line-height: 1.6;
}

.hero-down {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.badge {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.3);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  background: #fbbf24;
  color: #111827;
  font-weight: 600;
  font-size: 0.9rem;
  width: 250px;
}

.hero-image img {
  width: 100%;
  margin-top: 2.5rem;
  border-radius: 1.25rem;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.5);
}

.hero::after {
 content: ""; 
 display: block; 
 grid-column: 1 / -1; 
}

/* ============================================================
   SECTION BASE STYLES
   ============================================================ */

.section {
  max-width: 100%;
  box-sizing: border-box;
  margin-left: 3rem;
  margin-right: 4rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  background: #f5f7fb;
}

.section.alt {
  background: #ffffff;
  display: flex;
  gap: 5rem;
}

.section-header {
  width: 100%;
  padding: 0.8rem 1.6rem;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: #6b7280;
}

.section-title {
  font-size: 1.8rem;
  margin: 0;
}

.section-subtitle {
  font-size: 0.98rem;
  color: #4b5563;
  max-width: 670px;
}

.img-extra {
  padding: 4rem 1.6rem;
}

.large-image img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 10px 10px 10px rgba(0, 100, 150, 0.5);
}



/* ============================================================
   GLOBE
   ============================================================ */

.global-presence {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;

  padding: 60px 0;

  overflow: hidden;
  z-index: 1;
}

#globeViz {
  position: relative;
  width: 100%;

  height: 650px;        /* 🔥 FIXED SAFE HEIGHT */
  min-height: 500px;
  

  overflow: hidden;     /* 🔥 CRITICAL */
  z-index: 1;
}

#globeViz canvas {
  position: absolute;
  inset: 0;

  width: 100% !important;
  height: 100% !important;

  display: block;
}

#globeViz:hover + #tooltip {
  display: block; 
}

.globe-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;   /* VERY IMPORTANT FOR FLEX CHILDREN */
}


#tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
}


.global-presence h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  margin-left: 3rem;
}

.global-presence p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  margin-left: 3rem;
  width: 90%;
  text-align: justify;
  opacity: 0.8;
}


#region-panel,
#info-panel {
  position: absolute;
  top: 400px;
  right: 40px;

  width: 320px;
  max-height: 70vh;
  overflow-y: auto;

  background: rgba(15, 20, 35, 0.96);
  backdrop-filter: blur(12px);

  border-radius: 14px;
  padding: 20px;
  color: pink;

  z-index: 9999;
}

.region-panel.hidden {
  display: none;
}

.region-panel h3 {
  margin-top: 0;
  color: #38bdf8;
}

.region-panel ul {
  padding-left: 1rem;
}

.region-panel li {
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

#globe-container:hover + #tooltip {
  display: block; 
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: red;
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-weight: bold;
  z-index: 10000;
}

/* Mobile */
@media (max-width: 767px) {

  /* Adjust global presence padding for mobile */
  .global-presence {
    padding: 40px 1rem;
  }

  /* Reduce globe height on small screens */
  #globeViz {
    height: 450px;
    min-height: 300px;

    overflow-y: visible;
    overflow-x: hidden;
  }

  #globeViz canvas {
    height: 100% !important;
  }

  /* Adjust headings and paragraph text */
 .global-presence h2, 
 .global-presence p { 
    margin: 0 auto;
    text-align: center;
    width: 100%; 
  }

  /* Panel full width at bottom for mobile */
  #region-panel {
    top: auto;
    bottom: 20px;
    right: 50%;
    transform: translateX(50%);
    width: 90%;
    max-height: 50vh;
    padding: 15px;
  }

  /* Close button larger and easier to tap */
  .close-btn {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
  }

  /* Optional: tooltip smaller font */
  #tooltip {
    font-size: 0.8rem;
  }
}



/* ============================================================
   3‑COLUMN CARDS
   ============================================================ */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.75rem;
}

.card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.card p {
  font-size: 0.9rem;
  color: #4b5563;
}

.image-wrapper {
  display: flex;
  justify-content: center;
}

.image-wrapper img {
  width: 150px;
  height: 31px;
  position: static;
  top: 12px;
  left: auto;
  transition: transform 0.5s ease-in-out;
}

.image-wrapper:hover {
  transform: scale(1.1);
}



/* ============================================================
   MAP SECTION
   ============================================================ */


/* ============================================================
   PARTNERS GRID
   ============================================================ */

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}

.partner-card {
  background: #ffffff;
  border-radius: 0.9rem;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  font-size: 0.9rem;
}

.partner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.partner-country {
  font-weight: 600;
}

.partner-flag {
  font-size: 1.1rem;
}

.partner-meta {
  font-size: 0.78rem;
  color: #6b7280;
  margin-bottom: 0.3rem;
}

.partner-card a {
  color: #1d4ed8;
  font-size: 0.82rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: #020617;
  padding: 1.5rem 1.5rem;
  color: #9ca3af;
  font-size: 0.8rem;
}

.section-up {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}

.logo-footer img {
  width: 160px;
  height: 40px;
}

.footer-menu {
  text-align: right;
  margin-bottom: 0.5rem;
}

.footer-menu a {
  color: #e5e7eb;
  margin-left: 1.2rem;
  font-size: 0.8rem;
}

.footer-menu a:hover {
  color: #ffffff;
  font-size: 0.9rem;
}

.policy-own a {
  color: #e5e7eb;
  margin-left: 1.2rem;
  font-size: 0.6rem;
}

.policy-own a:hover {
  color: #ffffff;
  font-size: 0.7rem;
}

.footer-bottom {
  text-align: left;
  line-height: 1.5;
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.footer-copy {
  font-size: 0.75rem;
}

.footer-subtext {
  font-size: 0.72rem;
  text-align: right;
  opacity: 0.7;
}



/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */


/* ------------------------------
   LARGE DESKTOP (1440px+)
   ------------------------------ */
@media (min-width: 1440px) {
  header {
    padding: 1rem 5rem;
  }

  .hero {
    padding: 3rem 5rem 4rem;
    grid-template-columns: 1.5fr 1fr;
  }

  .hero-text h1 {
    font-size: 2.8rem;
  }

  .section.alt {
    gap: 6rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .large-image img {
    max-width: 380px;
  }

  .map {
    max-width: 700px;
    margin: 0 auto;
  }

  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer {
    padding: 2rem 5rem;
  }

  .footer-menu a {
    margin-left: 1.5rem;
  }

  .footer-bottom {
    justify-content: space-between;
  }
}



/* ------------------------------
   DESKTOP (1024px – 1439px)
   ------------------------------ */
@media (min-width: 1024px) and (max-width: 1439px) {
  header {
    padding: 1rem 3rem;
  }

  nav a {
    margin-left: 1.2rem;
  }

  .hero {
    padding: 2.5rem 3rem 3rem;
    grid-template-columns: 1.4fr 1fr;
  }

  .hero-text h1 {
    font-size: 2.4rem;
  }

  .section.alt {
    gap: 4rem;
  }

  .large-image img {
    max-width: 330px;
  }

  .map {
    max-width: 600px;
    margin: 0 auto;
  }

  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer {
    padding: 2rem 3rem;
  }

  .footer-menu a {
    margin-left: 1.2rem;
  }

  .footer-bottom {
    justify-content: space-between;
  }
}



/* ------------------------------
   TABLET / SMALL DESKTOP (≤1023px)
   ------------------------------ */
@media (max-width: 1023px) {

  header {
    padding: 1rem 1.5rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }

  nav a {
    margin: 0 !important;
    padding: 0.4rem 0.6rem;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
    text-align: center;
  }

  .sub-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-text p {
    max-width: 100%;
    text-align: center;
  }

  .hero-down {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-badges {
    justify-content: center;
    gap: 0.7rem;
    margin-top: 1.2rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.2rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 280px;
  }

  .hero-image img {
    width: 100%;
    height: auto;
    margin-top: 1.5rem;
  }

  /* Orthofix */
  .section.alt {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .section-subtitle {
    max-width: 100%;
    text-align: center;
  }

  .large-image img {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  /* Cards */
  .grid-3 {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .card {
    text-align: center;
  }

  .image-wrapper img {
    left: 0;
    margin: 0 auto;
    display: block;
  }

  /* Map */
  .map {
    width: 100%;
    padding: 0;
    border-radius: 20px;
  }

  .map img {
    width: 100%;
    height: auto;
    border-radius: 20px;
  }

  /* Partners */
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .partner-card {
    text-align: left;
  }

  /* Footer */
  .site-footer {
    padding: 1.8rem 1.5rem;
  }

  .section-up {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .logo-footer img {
    margin: 0 auto;
    display: block;
  }

  .footer-menu {
    text-align: center;
  }

  .footer-menu a {
    margin: 0.4rem 0.6rem;
    display: inline-block;
  }

  .policy-own a {
    margin: 0.3rem 0.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.6rem;
  }
}



/* ------------------------------
   MOBILE (≤767px)
   ------------------------------ */
@media (max-width: 767px) {

  header {
    padding: 1rem 1rem;
  }

  .logo-image img {
    width: 200px;
    height: auto;
  }

  nav {
    gap: 0.6rem;
  }

  nav a {
    font-size: 0.9rem;
    margin: 0 !important;
  }

  .hero-text h1 {
    font-size: 1.9rem;
    line-height: 1.3;
  }

  .hero-text p {
    font-size: 0.95rem;
  }

  .badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.7rem;
  }

  /* Cards */
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.2rem;
  }

  .image-wrapper img {
    width: 140px;
    left: 0;
  }

  #globeViz {
           height: 350px; 
      }

  /* Partners */
  .partners-grid {
    grid-template-columns: 1fr;
  }

  .partner-card {
    padding: 1.2rem;
  }

  .partner-header {
    flex-direction: row;
    justify-content: space-between;
  }

  /* Footer */
  .site-footer {
    padding: 1.5rem 1.2rem;
  }

  .footer-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
  }

  .footer-menu a {
    margin: 0 !important;
    font-size: 0.85rem;
  }

  .policy-own a {
    margin: 0 !important;
    font-size: 0.7rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .footer-copy,
  .footer-subtext {
    text-align: center;
  }
}



/* ------------------------------
   SMALL MOBILE (≤424px)
   ------------------------------ */
@media (max-width: 424px) {

  header {
    padding: 0.8rem 0.8rem;
  }

  .logo-image img {
    width: 170px;
  }

  nav {
    gap: 0.5rem;
  }

  nav a {
    font-size: 0.85rem;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .badge {
    font-size: 0.6rem;
  }

  .btn-primary,
  .btn-secondary {
    max-width: 240px;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  .large-image img {
    max-width: 100%;
  }

  .card {
    padding: 1rem;
  }

  .image-wrapper img {
    width: 130px;
  }

  .partner-card {
    padding: 1rem;
  }

  .partner-meta {
    font-size: 0.75rem;
  }

  .partner-card a {
    font-size: 0.78rem;
  }

  .logo-footer img {
    width: 140px;
    height: auto;
  }

  .footer-menu a {
    font-size: 0.8rem;
  }

  .policy-own a {
    font-size: 0.65rem;
  }

  .footer-copy {
    font-size: 0.7rem;
  }

  .footer-subtext {
    font-size: 0.68rem;
  }
}



/* ------------------------------
   TOUCH DEVICES
   ------------------------------ */
@media (hover: none) and (pointer: coarse) {

  nav a {
    padding: 0.5rem 0.7rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.9rem 1.2rem;
  }

  .card {
    border-radius: 1rem;
  }

  .image-wrapper img {
    transition: none;
  }

  .partner-card {
    border-radius: 1rem;
  }

  .footer-menu a,
  .policy-own a {
    padding: 0.4rem 0.6rem;
  }
}



/* ============================================================
   COOKIE POPUP (KEPT AT BOTTOM AS REQUESTED)
   ============================================================ */

.cookie-popup {
  position: fixed;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
  background: #1b263b;
  color: #fff;
  text-align: center;
  display: none;
  z-index: 9999;
  font-size: 0.85rem;
}

.cookie-popup a {
  color: #38bdf8;
  text-decoration: underline;
}

.cookie-popup button {
  background: #38bdf8;
  border: none;
  padding: 8px 15px;
  color: #fff;
  cursor: pointer;
  margin-left: 10px;
  border-radius: 6px;
}
