/* RESET DE BAZĂ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
img { display: block; max-width: 100%; height: auto; }

/* BODY GLOBAL */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f6f9;
  color: #2c2c2c;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* CONTAINER GENERAL */
.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* MAIN FLEX pentru FOOTER jos */
main.contact-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}



/* =========================
   INTRO CONTACT (hero nou)
   ========================= */
.contact-intro{
  position: relative;
  overflow: hidden;
  padding: 60px 0;           /* mai înalt, ca un hero */
  text-align: center;
  margin-top: 0;
  color: #e6f0ff;
  isolation: isolate;

  /* fundal dark-fade clar, fără “halou” */
  background:
    radial-gradient(1100px 620px at 8% 18%, rgba(96,165,250,.06), transparent 60%),
    radial-gradient(900px 520px at 88% 12%, rgba(34,211,238,.05), transparent 60%),
    linear-gradient(180deg, #0f1726 0%, #0c1424 50%, #0b1220 100%);
}

/* text lizibil pe fundalul nou */
.contact-intro .container{
  position: relative;
  z-index: 2;
}
.contact-intro h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: #eaf2ff;
  text-shadow: 0 0 14px rgba(0,0,0,.35);
}
.contact-intro p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  font-style: italic;
  color: #cfe0ff;
  text-shadow: 0 0 10px rgba(0,0,0,.28);
}

/* PATTERN ICONS: plicuri pe stratul 1 (watermark discret) */
.contact-intro::before{
  content:"";
  position:absolute; inset:0; z-index:1;
  background:
    url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'>\
  <g fill='none' stroke='%23a6c8ff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.22'>\
    <rect x='14' y='18' width='36' height='28' rx='4'/>\
    <path d='M14 22l18 12L50 22'/>\
  </g>\
</svg>") repeat;
  background-size: 64px 64px;
  opacity:.22;
}

/* PHONE + CHAT pe stratul 2, mai rar și mai mare */
.contact-intro::after{
  content:"";
  position:absolute; inset:0; z-index:1;
  background:
    url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'>\
  <g fill='none' stroke='%23b3dbff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.16'>\
    <path d='M30 18h14a6 6 0 0 1 6 6v12a6 6 0 0 1-6 6H30a6 6 0 0 1-6-6V24a6 6 0 0 1 6-6z'/>\
    <path d='M26 30s2 10 14 22 22 14 22 14'/>\
    <path d='M56 56h18a10 10 0 0 1 10 10v6a10 10 0 0 1-10 10H75l-8 8v-8H56a10 10 0 0 1-10-10v-6a10 10 0 0 1 10-10z'/>\
  </g>\
</svg>") repeat;
  background-size: 140px 140px;
  background-position: 24px 24px;
  opacity:.18;
}

/* “SENDING LINE” discretă (linii subțiri care curg orizontal) */
.contact-intro{
  --send-color: rgba(96,165,250,.18);
  background-image:
    repeating-linear-gradient(90deg, transparent 0 120px, var(--send-color) 120px 122px, transparent 122px 240px),
    radial-gradient(1100px 620px at 8% 18%, rgba(96,165,250,.06), transparent 60%),
    radial-gradient(900px 520px at 88% 12%, rgba(34,211,238,.05), transparent 60%),
    linear-gradient(180deg, #0f1726 0%, #0c1424 50%, #0b1220 100%);
  background-size: 280px 100%, auto, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat;
  animation: send-flow 18s linear infinite;
}
@keyframes send-flow{
  0%   { background-position: 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: -280px 0, 0 0, 0 0, 0 0; }
}

/* fade mic între hero și secțiunea gri de dedesubt */
.contact-section{ position:relative; }
.contact-section::before{
  content:"";
  position:absolute; inset: -24px 0 auto 0; height:24px;
  background: linear-gradient(180deg, rgba(11,18,32,1) 0%, rgba(11,18,32,0) 100%);
  pointer-events:none;
}

/* =========================
   SECȚIUNE CONTACT
   ========================= */
.contact-section {
  background-color: #f1f5f9;
  padding: 60px 0;
}

.contact-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  justify-content: space-between;
  align-items: flex-start;
}

/* INFO BLOCK */
.info-block {
  flex: 1 1 360px;
  min-width: 300px;
  max-width: 460px;
}
.info-block h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #1e293b;
}
.info-block ul {
  list-style: none;
  font-size: 1.1rem;
  color: #374151;
  padding: 0;
}
.info-block li {
  margin-bottom: 10px;
}
.info-block a {
  color: #2563eb;
  text-decoration: none;
}

/* BUTOANE DE NAVIGARE */
.nav-links {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nav-links a {
  background: #1e3a8a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.3s ease;
}
.nav-links a:hover {
  background: #1e40af;
}

/* HARTA */
.map-block {
  flex: 1 1 760px;
  min-width: 460px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.map-block iframe {
  display: block;
  width: 100%;
  height: 580px;
  border: none;
  border-radius: 12px;
}

/* ====== Ecrane mici (telefoane până la ~560px) ====== */
@media (max-width: 560px) {
  /* container mai strâns, cu suport pentru notch */
  .container {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }

  .contact-intro {
    padding: 64px 0 70px;      /* puțin mai mic pe telefon */
  }
  .contact-intro h1 {
    font-size: 1.6rem;
  }
  .contact-intro p {
    font-size: 0.95rem;
  }

  .contact-section {
    padding: 32px 0;
  }

  /* eliminăm constrângerile care rup layout-ul pe lățimi mici */
  .contact-layout {
    gap: 28px;
  }
  .info-block,
  .map-block {
    min-width: 0;              /* IMPORTANT: înlocuiește min-width-ul mare din desktop */
    width: 100%;
    max-width: none;
  }

  .info-block h2 {
    font-size: 1.45rem;
  }
  .info-block ul {
    font-size: 0.98rem;
  }
  .info-block li {
    word-break: break-word;
  }

  .nav-links {
    gap: 10px;
  }
  .nav-links a {
    width: 100%;               /* butoane full-width pentru tap ușor */
    font-size: 0.98rem;
    padding: 12px 16px;
  }

  .map-block iframe {
    height: 320px;
  }
}

/* ====== Telefoane foarte mici (≤ 420px) ====== */
@media (max-width: 420px) {
  .container {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .contact-intro h1 {
    font-size: 1.45rem;
  }
  .contact-intro p {
    font-size: 0.92rem;
  }

  .info-block h2 {
    font-size: 1.35rem;
  }
  .info-block ul {
    font-size: 0.94rem;
  }

  .map-block iframe {
    height: 260px;
  }
}

/* Accesibilitate: oprim animația dacă utilizatorul preferă mișcare redusă */
@media (prefers-reduced-motion: reduce){
  .contact-intro{ animation: none !important; }
}
