/* ==========================================================================
   Nalpa Silva – presentation layer
   Loaded AFTER the Mobirise/Bootstrap CSS. Restyles the existing markup only;
   no content or structure is added, removed or reordered.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* palette taken from the logo: deep indigo on soft white */
  --bg: #FAF9FD;
  --bg-alt: #EFECF9;
  --surface: #FFFFFF;
  --surface-hover: #F4F2FB;
  --line: #DDD8EE;
  --line-soft: #E8E4F4;

  --text: #170A42;
  --text-body: #3A3555;
  --text-muted: #625D7E;

  --accent: #4B3BAE;
  --accent-hover: #170A42;
  --accent-tint: rgba(75, 59, 174, .08);
  --accent-line: rgba(75, 59, 174, .22);

  --font-sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  --radius-sm: 12px;
  --radius-md: 20px;
  --shadow-panel: 0 18px 40px -26px rgba(23, 10, 66, .35);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: .18s;
  --t-base: .28s;

  --section-y: clamp(3.5rem, 8vw, 6.5rem);
  --gutter: clamp(1rem, 4vw, 1.5rem);

  color-scheme: light;
}

/* ---------- 2. Base ---------- */
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* safety net: no horizontal scroll on any viewport */
}

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

::selection { background: var(--accent); color: #fff; }

/* Visible, on-brand keyboard focus (replaces the template's red outline) */
*:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 3px !important;
  border-radius: 4px;
}

/* Section scaffolding */
body section {
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
}
body section:first-of-type { border-top: 0; }

body .container {
  width: 100%;
  max-width: 1120px;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Neutralise the template's 2rem radius on media/cards; we set our own below */
body img,
body .card-wrapper,
body .google-map iframe {
  border-radius: 0 !important;
}

/* ---------- 3. Hero ---------- */
body .header2 {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(4rem, 9vw, 7rem);
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  text-align: center;
}

body .header2 .row { padding: 0; }

body .header2 .title-wrapper {
  max-width: 44rem;
  margin: 0 auto;
}

body .header2 .title-wrapper .image-wrapper {
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

/* inline width/height on the <img> are overridden here for fluid sizing */
body .header2 .title-wrapper .image-wrapper img {
  display: block;
  margin: 0 auto;
  width: clamp(220px, 34vw, 320px) !important;
  height: auto !important;
  aspect-ratio: 700 / 669;
  object-fit: cover;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 24px 50px -28px rgba(23, 10, 66, .6);
}

body .header2 .title-wrapper .mbr-section-title {
  margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-align: center;
  padding-left: .22em; /* optically re-centres tracked caps */
}
body .header2 .title-wrapper .mbr-section-title strong { font-weight: inherit; }

/* short gold rule under the heading (decorative, no content) */
body .header2 .title-wrapper .mbr-section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin: clamp(1.25rem, 3vw, 1.75rem) auto 0;
  background: var(--accent);
  border-radius: 2px;
}

body .header2 .title-wrapper .mbr-text {
  margin: 0 auto;
  max-width: 40rem;
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: clamp(1rem, .94rem + .3vw, 1.1875rem);
  font-weight: 400;
  line-height: 1.8;
  text-align: center;
  text-wrap: pretty;
}
/* the copy is wrapped in <strong>; keep semantics, render as regular body weight */
body .header2 .title-wrapper .mbr-text strong { font-weight: 400; }

/* ---------- 4. Contact sections ---------- */
body .contact2 {
  padding: var(--section-y) 0;
  background: var(--bg);
}

/* Heading block: "REACH US IN" reads as an eyebrow, the region as the title.
   DOM order and heading levels (h3 → h4) are unchanged. */
body .contact2 .mbr-section-head {
  margin: 0 0 clamp(2rem, 5vw, 3rem);
  text-align: center;
}

body .contact2 .mbr-section-head .mbr-section-title {
  margin: 0 0 .75rem;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-align: center;
  padding-left: .24em;
}
body .contact2 .mbr-section-head .mbr-section-title strong { font-weight: inherit; }

body .contact2 .mbr-section-head .mbr-section-subtitle {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  padding-left: .12em;
}

/* Two-column layout: details panel + map (DOM order = reading order) */
body .contact2 .row {
  flex-direction: row;
  align-items: stretch;
  --bs-gutter-x: clamp(1.25rem, 3vw, 2rem);
  --bs-gutter-y: clamp(1.25rem, 3vw, 2rem);
}

/* Details panel */
body .contact2 .card-container {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  height: 100%;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

body .contact2 .card-wrapper {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  padding: 1.375rem clamp(1.1rem, 3vw, 1.75rem);
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  transition: background-color var(--t-base) var(--ease);
}
body .contact2 .card-wrapper:last-child { border-bottom: 0; }
body .contact2 .card-wrapper:hover { background: var(--surface-hover); }

/* Icon tile */
body .contact2 .image-wrapper {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  transition: transform var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}
body .contact2 .card-wrapper:hover .image-wrapper {
  background: rgba(75, 59, 174, .14);
  transform: translateY(-1px);
}
body .contact2 .mbr-iconfont {
  padding: 0;
  color: var(--accent);
  font-size: 1.375rem;
  line-height: 1;
}

body .contact2 .text-wrapper {
  flex: 1 1 auto;
  min-width: 0;                 /* lets long emails/addresses wrap instead of overflowing */
}

/* Label */
body .contact2 .card-title {
  margin: 0 0 .375rem !important;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .16em;
  text-transform: uppercase;
}
body .contact2 .card-title strong { font-weight: inherit; }

/* Value */
body .contact2 .mbr-text {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* Links */
body .contact2 .mbr-text a,
body .contact2 .mbr-text a.text-white {
  color: var(--text) !important;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  padding-bottom: 2px;
  transition: color var(--t-fast) ease, background-size var(--t-base) var(--ease);
}
body .contact2 .mbr-text a:hover,
body .contact2 .mbr-text a.text-white:hover {
  color: var(--accent-hover) !important;
  background-size: 100% 1px;
}
body .contact2 .mbr-text a:active { color: var(--accent) !important; }

/* Map */
body .contact2 .map-wrapper { display: flex; }

body .contact2 .google-map {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 22rem;
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
}
body .contact2 .google-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: grayscale(.2) brightness(.95) contrast(1.02);
  transition: filter var(--t-base) ease;
}
body .contact2 .google-map:hover iframe { filter: none; }

/* ---------- 4b. Single "Reach us in" container with country switcher ---------- */
body .contact-switch { background: var(--bg-alt); }

/* Title: "REACH US IN" now leads, the tabs complete the sentence */
body .contact-switch .mbr-section-head { margin-bottom: clamp(1.5rem, 4vw, 2.25rem); }
body .contact-switch .mbr-section-head .mbr-section-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
  font-weight: 600;
  letter-spacing: .22em;
  padding-left: .22em;
}
body .contact-switch .mbr-section-head .mbr-section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin: clamp(1rem, 2.5vw, 1.4rem) auto 0;
  background: var(--accent);
  border-radius: 2px;
}

/* One outer card holds the switcher and the active country */
.ns-contact {
  position: relative;
  padding: clamp(1rem, 2.6vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 30px 60px -40px rgba(23, 10, 66, .35);
}

/* Segmented switch with sliding gold thumb */
.ns-tablist {
  position: relative;
  display: flex;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto clamp(1.1rem, 2.6vw, 1.75rem);
  padding: 5px;
  gap: 2px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.ns-tablist[hidden] { display: none; }

.ns-thumb {
  position: absolute;
  top: 5px; bottom: 5px; left: 0;
  width: 0;
  background: var(--text);
  border-radius: 999px;
  box-shadow: 0 6px 18px -8px rgba(23,10,66,.6);
  transition: transform .38s var(--ease), width .38s var(--ease);
  pointer-events: none;
}

.ns-tab {
  position: relative;
  z-index: 1;
  min-height: 2.75rem;
  padding: .55rem clamp(1.1rem, 4vw, 2rem);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--t-base) var(--ease);
}
.ns-tab:hover { color: var(--text); }
.ns-tab[aria-selected="true"] { color: #fff; }
.ns-tab:active { transform: scale(.98); }
.ns-tab:focus-visible { outline-offset: 2px !important; }

/* Panels */
.ns-panel[hidden] { display: none; }
.ns-panel.is-entering { animation: ns-swap .45s var(--ease) both; }
@keyframes ns-swap {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Inside the unified card the details panel & map sit as inner tiles */
.ns-panel .row { margin: 0; --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.ns-panel .row > * { padding-left: 0; padding-right: 0; }
.ns-panel .row { gap: 1rem; flex-wrap: nowrap; }
.ns-panel .row > .col-md-6 { flex: 1 1 0; min-width: 0; margin-top: 0; }
.ns-panel .card-container,
.ns-panel .google-map {
  border-radius: 20px;
  box-shadow: none;
  background-color: var(--surface);
}
.ns-panel .google-map { background: var(--bg-alt); }
@media (max-width: 767.98px) {
  .ns-panel .row { flex-wrap: wrap; }
  .ns-panel .row > .col-md-6 { flex: 1 1 100%; }
}

/* Panel heading: visible only as a fallback when JS is off; screen-reader label when JS is on */
.ns-panel > .mbr-section-subtitle {
  margin: 0 0 1rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
}
.js .ns-panel > .mbr-section-subtitle {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* no-JS: stack the two countries with spacing */
html:not(.js) .ns-panel + .ns-panel { margin-top: 2.5rem; }

@media (max-width: 479.98px) {
  .ns-contact { border-radius: 22px; padding: .75rem; }
  .ns-tablist { width: 100%; }
  .ns-tab { flex: 1 1 0; padding-left: .5rem; padding-right: .5rem; letter-spacing: .1em; font-size: .75rem; }
}

/* ---------- 5. Footer ---------- */
body .footer2 {
  padding: 1.75rem 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
}
body .footer2 .media-container-row { margin: 0; }
body .footer2 .mbr-text {
  margin: 0;
  color: var(--text-muted) !important;
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .02em;
  text-align: center;
}

/* ---------- 6. Responsive ---------- */

/* Tablet & below: stack panel above map */
@media (max-width: 767.98px) {
  body .contact2 .google-map { min-height: 18rem; }
  body .contact2 .card-container { height: auto; }
}

/* Small phones */
@media (max-width: 479.98px) {
  body .contact2 .card-wrapper { gap: 1rem; padding: 1.125rem 1rem; }
  body .contact2 .image-wrapper { width: 2.75rem; height: 2.75rem; }
  body .contact2 .mbr-iconfont { font-size: 1.25rem; }
  body .contact2 .google-map { min-height: 16rem; }
  body .header2 .title-wrapper .mbr-section-title { letter-spacing: .16em; padding-left: .16em; }
}

/* ---------- 7. Motion (subtle, purposeful, reduced-motion safe) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes ns-rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
  }
  body .header2 .title-wrapper > * {
    animation: ns-rise .7s var(--ease) both;
  }
  body .header2 .title-wrapper > :nth-child(2) { animation-delay: .08s; }
  body .header2 .title-wrapper > :nth-child(3) { animation-delay: .16s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 8. Print ---------- */
@media print {
  body, body section { background: #fff !important; }
  body, body .mbr-text, body .mbr-text a, body .mbr-section-title,
  body .mbr-section-subtitle, body .card-title { color: #000 !important; }
  body .google-map { display: none; }
}
