/* Smart Cedra — digital contact cards.
   Self-contained: no Bootstrap, no icon font. Shared by every team member. */

:root {
  --primary: #2b8fda;
  --secondary: #032542;
  --accent: #0a457c;
  --light: #f8f9fa;
  --whatsapp: #25d366;
  --card-shadow: 0 20px 40px rgba(0, 0, 0, .15);
  --transition: all .4s cubic-bezier(.175, .885, .32, 1.275);
  --radius: 16px;
}

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

body {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  background-attachment: fixed;
  font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: var(--light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Arabic sets its own stack and reading direction. */
html[dir="rtl"] body {
  font-family: 'Segoe UI', 'Noto Naskh Arabic', 'Geeza Pro', 'Traditional Arabic', system-ui, sans-serif;
}

a { color: inherit; }

/* Visible keyboard focus everywhere — the old build had none. */
:focus-visible {
  outline: 3px solid #7cc4f5;
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The sprite is a definitions block, never rendered itself. */
.sprite { display: none !important; }

/* Inline sprite icons replace the Font Awesome webfont. */
.icon {
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -.125em;
}

/* ---------------------------------------------------------------- backdrop */
.orbital-bg,
.particles,
.circuit-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.orbital-bg { z-index: -1; overflow: hidden; }
.particles  { z-index: -1; }

.orbit {
  position: absolute;
  border: 1px solid rgba(43, 143, 218, .3);
  border-radius: 50%;
  animation: orbit linear infinite;
}

.orbit:nth-child(1) { width: 300px; height: 300px; top: 20%; left: 10%; animation-duration: 30s; }
.orbit:nth-child(2) { width: 500px; height: 500px; top: -10%; right: -5%; animation-duration: 40s; animation-direction: reverse; }
.orbit:nth-child(3) { width: 700px; height: 700px; bottom: -20%; left: -10%; animation-duration: 50s; }

.satellite {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  top: 50%; left: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px 2px rgba(43, 143, 218, .7);
}

@keyframes orbit { to { transform: rotate(360deg); } }

.particle {
  position: absolute;
  width: 4px; height: 4px;
  background: rgba(43, 143, 218, .7);
  border-radius: 50%;
  animation: float-up linear infinite;
}

@keyframes float-up {
  0%   { transform: translateY(100vh) translateX(0); opacity: 0; }
  10%, 90% { opacity: 1; }
  100% { transform: translateY(-20px) translateX(20px); opacity: 0; }
}

.circuit-pattern {
  background-image:
    linear-gradient(rgba(43, 143, 218, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 143, 218, .05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -2;
  opacity: .3;
}

/* ------------------------------------------------------------------ header */
.container-wrapper {
  max-width: 1200px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  margin-bottom: 30px;
  animation: fadeInDown 1s ease;
}

.company-logo {
  padding: 10px;
  background: linear-gradient(45deg, var(--primary), var(--light));
  border-radius: 18px;
  /* Block-level flex with no width: it spans the wrapper as a banner, exactly
     as the original did, and the inline-block h1 below still starts a new
     line. (An inline-flex logo would sit beside the heading.) */
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
  position: relative;
  overflow: hidden;
}

.company-logo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, .3) 49%, rgba(255, 255, 255, .3) 51%, transparent 52%);
  background-size: 10px 10px;
  animation: circuitFlow 1s linear infinite;
}

@keyframes circuitFlow { to { background-position: 10px 0; } }

.company-logo img { position: relative; z-index: 1; display: block; height: auto; }

.header h1 {
  font-weight: 700;
  font-size: 2.2rem;
  margin-bottom: 5px;
  background: linear-gradient(to right, #fff, #a0d2ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
}

.header h1::after {
  content: "";
  position: absolute;
  bottom: -5px; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(to right, transparent, var(--primary), transparent);
  animation: pulseUnderline 2s infinite;
}

@keyframes pulseUnderline {
  0%, 100% { opacity: .5; width: 0; }
  50%      { opacity: 1; width: 100%; }
}

.header p { font-size: 1.1rem; opacity: .9; max-width: 600px; margin: 0 auto; }

/* -------------------------------------------------------------------- card */
.card-container {
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  margin: 0 auto;
  max-width: 1100px;
  animation: fadeInUp 1s ease;
  border: 1px solid rgba(255, 255, 255, .1);
  position: relative;
  overflow: hidden;
}

.card-container::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(43, 143, 218, .1) 0%, transparent 70%);
  animation: pulse 8s infinite alternate;
  pointer-events: none;
}

@keyframes pulse {
  0%   { transform: scale(.8); opacity: .3; }
  100% { transform: scale(1.2); opacity: .1; }
}

.card-row { display: flex; flex-wrap: wrap; min-height: 500px; }

.profile-section {
  flex: 0 0 40%;
  max-width: 40%;
  background: linear-gradient(160deg, var(--primary), var(--secondary));
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.profile-section::before,
.profile-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
}

.profile-section::before { width: 300px; height: 300px; top: -100px; right: -100px; }
.profile-section::after  { width: 200px; height: 200px; bottom: -80px; left: -80px; background: rgba(255, 255, 255, .08); }

/* One definition, shared by every card — the two old copies had drifted apart. */
.profile-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(43, 143, 218, .6);
}

/* The slowly rotating dashed ring around the portrait. Pinned to the element's
   own bounds rather than a fixed 180px, so it also fits the smaller avatars on
   the team index. */
.profile-img::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(255, 255, 255, .3);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.profile-img img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.profile-info {
  margin-top: 20px;
  position: relative;
  z-index: 2;
}

.profile-info h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

.profile-info h2::after {
  content: "";
  position: absolute;
  bottom: -5px;
  inset-inline-start: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--primary), transparent);
}

.profile-info .title {
  font-size: 1.1rem;
  opacity: .9;
  margin-bottom: 25px;
  position: relative;
}

.profile-info .title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--primary);
}

.profile-bio {
  font-size: .92rem;
  line-height: 1.6;
  opacity: .85;
  margin-bottom: 22px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.social-links a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.social-links a:hover {
  background: #fff;
  color: var(--secondary);
  transform: translateY(-5px);
}

/* ------------------------------------------------------------- QR block */
.qr-container {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 16px 12px;
  max-width: 190px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  transition: var(--transition);
  color: var(--secondary);
}

.qr-container:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, .2); }

.qr-container svg { display: block; width: 100%; height: auto; margin: 0 auto; }

.qr-container p {
  text-align: center;
  margin-top: 10px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
}

/* --------------------------------------------------------------- content */
.content-section {
  flex: 0 0 60%;
  max-width: 60%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.content-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 48%, rgba(43, 143, 218, .05) 49%, rgba(43, 143, 218, .05) 51%, transparent 52%),
    linear-gradient(45deg, transparent 48%, rgba(43, 143, 218, .05) 49%, rgba(43, 143, 218, .05) 51%, transparent 52%);
  background-size: 20px 20px;
  opacity: .2;
  pointer-events: none;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
  z-index: 1;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 60px; height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 26px;
  z-index: 1;
}

.info-card {
  background: rgba(255, 255, 255, .05);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, .07);
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
}

.info-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 5px; height: 100%;
  background: var(--primary);
  transition: var(--transition);
}

.info-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .15);
}

.info-card:hover::before { width: 100%; opacity: .1; }

.info-card .icon {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  display: block;
}

.info-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.info-card p,
.info-card span.value {
  color: rgba(255, 255, 255, .82);
  font-size: .95rem;
  position: relative;
  z-index: 1;
  word-break: break-word;
  display: block;
}

a.info-card:hover span.value { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------- action buttons */
.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
  position: relative;
  z-index: 1;
}

.btn-group { display: flex; gap: 15px; flex-wrap: wrap; position: relative; z-index: 1; }

.btn {
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: .95rem;
  font-family: inherit;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  line-height: 1.2;
}

.btn .icon { font-size: 18px; }

.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
  transition: .5s;
}

.btn:hover::before { left: 100%; }

.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--secondary); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(10, 107, 255, .3); }

.btn-whatsapp { background: var(--whatsapp); color: #04301a; }
.btn-whatsapp:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(37, 211, 102, .3); }

.btn-outline { background: transparent; border: 2px solid rgba(255, 255, 255, .2); }
.btn-outline:hover { background: rgba(255, 255, 255, .1); transform: translateY(-3px); border-color: rgba(255, 255, 255, .35); }

/* Bootstrap used to stretch this button to fill the column via
   `.btn-group > .btn { flex: 1 1 auto }`; this reproduces that width. */
.btn-block { width: 100%; }

/* ------------------------------------------------------------- brochure */
.brochure-section {
  background: rgba(255, 255, 255, .05);
  border-radius: var(--radius);
  padding: 25px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, .07);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.brochure-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 45%, rgba(43, 143, 218, .05) 46%, rgba(43, 143, 218, .05) 54%, transparent 55%),
    linear-gradient(45deg, transparent 45%, rgba(43, 143, 218, .05) 46%, rgba(43, 143, 218, .05) 54%, transparent 55%);
  background-size: 30px 30px;
  opacity: .3;
  pointer-events: none;
}

.brochure-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.brochure-icon {
  width: 50px; height: 50px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex: none;
  transition: var(--transition);
}

.brochure-icon:hover { transform: rotate(15deg); box-shadow: 0 5px 15px rgba(10, 69, 124, .4); }

.brochure-header h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 4px; }
.brochure-header p  { opacity: .8; font-size: .9rem; }
.brochure-content p { opacity: .8; margin-bottom: 20px; font-size: .95rem; position: relative; z-index: 1; }

/* --------------------------------------------------------------- footer */
.footer {
  text-align: center;
  margin-top: 30px;
  font-size: .9rem;
  opacity: .75;
  animation: fadeIn 1.5s ease;
  position: relative;
  z-index: 1;
}

.footer a { color: #a0d2ff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.footer .lang-switch { margin-top: 10px; display: flex; gap: 10px; justify-content: center; align-items: center; }
.footer .lang-switch a { padding: 4px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .18); }
.footer .lang-switch a[aria-current="true"] { background: rgba(255, 255, 255, .15); color: #fff; }

/* ------------------------------------------------------- team index page */
.team-title {
  text-align: center;
  max-width: 1100px;
  margin: 0 auto 10px;
}

.team-title::after { inset-inline-start: 50%; transform: translateX(-50%); }

.team-intro {
  text-align: center;
  opacity: .85;
  margin-bottom: 30px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.team-member {
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: var(--card-shadow);
  display: block;
}

.team-member:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, .13);
  border-color: rgba(43, 143, 218, .5);
}

.team-member .profile-img { width: 140px; height: 140px; }
.team-member h2 { font-size: 1.35rem; margin-bottom: 4px; }
.team-member .title { opacity: .85; font-size: .98rem; margin-bottom: 14px; }

.team-member .go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 600;
  color: #a0d2ff;
}

/* ------------------------------------------------------------- feedback */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(120%);
  background: rgba(3, 37, 66, .96);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: .92rem;
  font-weight: 600;
  z-index: 100;
  transition: transform .35s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.is-visible { transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------------------ animations */
@keyframes fadeIn     { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp   { from { opacity: 0; transform: translateY(30px); }  to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }

/* ------------------------------------------------------------ responsive */
@media (max-width: 992px) {
  .profile-section,
  .content-section { flex: 0 0 100%; max-width: 100%; }
  .profile-section { padding: 30px; border-radius: 24px 24px 0 0; }
  .content-section { padding: 30px; border-radius: 0 0 24px 24px; }
  .info-grid { grid-template-columns: 1fr; }
  .card-row { min-height: 0; }
}

@media (max-width: 576px) {
  body { padding: 14px; }
  .header h1 { font-size: 1.8rem; }
  .header p { font-size: 1rem; }
  .profile-section,
  .content-section { padding: 25px 20px; }
  .btn-group { flex-direction: column; }
  .btn-group .btn { width: 100%; }
  .actions { grid-template-columns: 1fr 1fr; }
  .profile-img { width: 150px; height: 150px; }
}

/* Respect the OS "reduce motion" setting — the old build animated regardless. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  /* The orbits and particles stay on screen — they are the backdrop, not an
     animation. Only the movement stops. */
  .particles .particle { animation: none !important; opacity: .65; }

  /* This one ends its keyframes at width:0, so pin it open instead. */
  .header h1::after { animation: none !important; width: 100%; opacity: .8; }
}

/* A card someone prints should be a card, not a screenshot of a dark website. */
@media print {
  body { background: #fff; color: #000; display: block; padding: 0; }
  .orbital-bg, .particles, .circuit-pattern, .toast, .actions, .brochure-section, .footer .lang-switch { display: none !important; }
  .card-container, .profile-section, .content-section, .info-card {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    backdrop-filter: none !important;
  }
  .card-container::before, .content-section::before, .profile-section::before, .profile-section::after { display: none !important; }
  .profile-info h2, .section-title, .info-card h3 { color: #032542 !important; }
  .info-card p, .info-card span.value { color: #222 !important; }
  .header h1 { color: #032542 !important; -webkit-text-fill-color: #032542; }
  .qr-container { border: 1px solid #ccc; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .75em; color: #555; }
}
