:root {
  --navy: #0f2744;
  --navy-2: #1e3a5f;
  --navy-3: #0a1b30;
  --gold: #c9a961;
  --gold-light: #e5c88f;
  --gold-dark: #a8894a;
  --cream: #faf7f2;
  --cream-2: #f5efe4;
  --white: #ffffff;
  --text: #1f2937;
  --text-2: #6b7280;
  --border: rgba(15, 39, 68, 0.08);
  --shadow-sm: 0 2px 8px rgba(15, 39, 68, 0.06);
  --shadow-md: 0 10px 40px rgba(15, 39, 68, 0.12);
  --shadow-lg: 0 25px 70px rgba(15, 39, 68, 0.18);
  --radius: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse at top left, #fff7e8 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, #eef2f9 0%, transparent 50%),
    linear-gradient(135deg, #faf7f2 0%, #ffffff 50%, #f5f0e8 100%);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[dir="rtl"] {
  font-family: 'Cairo', 'Inter', -apple-system, sans-serif;
}

body::before {
  content: '';
  position: fixed;
  inset: -50%;
  background:
    radial-gradient(circle at 20% 30%, rgba(201, 169, 97, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(15, 39, 68, 0.06) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============ LANGUAGE SWITCH ============ */
.lang-switch {
  display: inline-flex;
  gap: 4px;
  background: var(--white);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  letter-spacing: 0.3px;
}

.lang-btn:hover:not(.active) {
  color: var(--navy);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(15, 39, 68, 0.25);
}

/* ============ CARD ============ */
.card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold), var(--gold-light), var(--gold-dark));
}

/* ============ CARD HEADER ============ */
.card-header {
  background: linear-gradient(135deg, var(--navy-3) 0%, var(--navy) 50%, var(--navy-2) 100%);
  padding: 34px 30px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(201, 169, 97, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  position: relative;
}

.ornament span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.8;
}
.ornament span:nth-child(2) {
  width: 40px;
  height: 1px;
  border-radius: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.org {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
  line-height: 1.4;
}

.org-sub {
  color: rgba(229, 200, 143, 0.75);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 500;
  text-transform: uppercase;
  margin-top: 6px;
  position: relative;
}

body[dir="rtl"] .org {
  letter-spacing: 1px;
  font-size: 16px;
  font-weight: 700;
}
body[dir="rtl"] .org-sub {
  letter-spacing: 0;
  font-size: 12px;
}

/* ============ CARD BODY ============ */
.card-body {
  padding: 0 28px 28px;
  text-align: center;
  margin-top: -64px;
  position: relative;
}

.photo-wrap {
  width: 140px;
  height: 140px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--white);
  box-shadow: 0 12px 35px rgba(15, 39, 68, 0.22), 0 0 0 1px rgba(201, 169, 97, 0.3);
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 60%, var(--gold-dark));
  position: relative;
}

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 52px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

body[dir="rtl"] .name {
  font-family: 'Cairo', 'Amiri', serif;
  font-size: 30px;
}

.title {
  font-size: 12px;
  color: var(--gold-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 6px;
}
body[dir="rtl"] .title {
  letter-spacing: 1px;
  font-size: 14px;
}

.subtitle {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 400;
}

/* ============ DIVIDER ============ */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 20px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.divider span {
  color: var(--gold);
  font-size: 14px;
}

/* ============ CONTACT LIST ============ */
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: var(--cream);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: start;
  border: 1px solid transparent;
}

.contact-item:hover,
.contact-item:focus-visible {
  background: var(--white);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(15, 39, 68, 0.08);
  outline: none;
}

.contact-item:hover .icon-wrap {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}

.icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
  color: var(--white);
}

.icon-wrap svg {
  width: 18px;
  height: 18px;
}

.contact-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.contact-label {
  font-size: 10px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.contact-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ BUTTONS ============ */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

.btn {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

.btn svg { flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(15, 39, 68, 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 39, 68, 0.3);
  outline: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--border);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--gold);
  color: var(--gold-dark);
  transform: translateY(-2px);
  outline: none;
}

/* ============ SOCIALS ============ */
.socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  text-decoration: none;
  transition: all 0.3s;
  border: 1px solid var(--border);
}

.social-link:hover,
.social-link:focus-visible {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(15, 39, 68, 0.2);
  outline: none;
}

.social-link svg {
  width: 18px;
  height: 18px;
}

/* ============ FOOTER ============ */
.card-footer {
  background: var(--cream);
  padding: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-2);
  border-top: 1px solid var(--border);
  letter-spacing: 0.3px;
}

.tip {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  opacity: 0.75;
}

/* ============ RTL ============ */
body[dir="rtl"] .contact-item {
  text-align: right;
}

body[dir="rtl"] .contact-label {
  letter-spacing: 0.5px;
  font-size: 11px;
}

body[dir="rtl"] .lang-btn {
  font-family: 'Cairo', 'Inter', sans-serif;
}

body[dir="rtl"] .card-footer,
body[dir="rtl"] .tip {
  font-family: 'Cairo', 'Inter', sans-serif;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 480px) {
  body { padding: 16px 12px; }
  .card-body { padding: 0 22px 24px; }
  .card-header { padding: 30px 22px 86px; }
  .name { font-size: 26px; }
  .photo-wrap { width: 128px; height: 128px; }
  .photo-fallback { font-size: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body { background: white; }
  body::before, .lang-switch, .tip, .action-buttons, .socials { display: none; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}
