/* ============================================
   OSAMA ALSADI — Premium Light Portfolio
   Static bilingual media portfolio UI
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-main: #fbf6ee;
  --bg-section: #fffaf3;
  --bg-soft: #f4eadc;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-solid: #ffffff;

  --text-main: #171717;
  --text-soft: #3f3f3f;
  --text-muted: #7a746d;

  --accent: #ef7f1a;
  --accent-dark: #c75f0c;
  --accent-soft: rgba(239, 127, 26, 0.12);
  --accent-lighter: #fff0df;

  --border-soft: rgba(45, 35, 25, 0.11);
  --border-subtle: rgba(45, 35, 25, 0.08);
  --border-accent: rgba(239, 127, 26, 0.32);

  --shadow-soft: 0 18px 45px rgba(48, 35, 20, 0.09);
  --shadow-card: 0 12px 32px rgba(48, 35, 20, 0.08);
  --shadow-accent: 0 14px 32px rgba(239, 127, 26, 0.22);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 30px;

  --container: 1180px;
  --header-height: 76px;
  --font-body: 'Inter', 'Cairo', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top right, rgba(239, 127, 26, 0.14), transparent 32rem),
    radial-gradient(circle at top left, rgba(255, 218, 178, 0.4), transparent 30rem),
    linear-gradient(180deg, #fff8ef 0%, #fbf6ee 45%, #fffaf3 100%);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(45, 35, 25, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 35, 25, 0.03) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 78%);
}

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

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

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

ul {
  list-style: none;
}

section {
  position: relative;
  padding: 86px 24px;
  border-bottom: 1px solid var(--border-soft);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}

.section-header {
  max-width: 720px;
  margin-bottom: 40px;
}

.portfolio .section-header,
.experience .section-header,
.training .section-header,
.contact .section-header,
.services .section-header {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-label {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  color: var(--text-main);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
}

[dir='rtl'] .section-title {
  line-height: 1.28;
}

.section-title span:last-child {
  color: var(--accent);
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 620px;
  margin: 14px auto 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: 0 20px 44px rgba(48, 35, 20, 0.13);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 250, 243, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: rgba(255, 250, 243, 0.94);
  box-shadow: 0 12px 30px rgba(48, 35, 20, 0.08);
}

.navbar {
  max-width: var(--container);
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  font-weight: 900;
  font-size: 1.2rem;
  white-space: nowrap;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand small {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 4px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-lighter);
  border: 1px solid var(--border-accent);
  box-shadow: 0 10px 25px rgba(239, 127, 26, 0.13);
  flex: 0 0 auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 800;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

.nav-cta {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-accent);
  background: var(--accent-lighter);
  color: var(--accent-dark) !important;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-toggle {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 0.85rem;
}

.language-toggle .active {
  color: var(--accent);
}

.lang-toggle-label {
  display: none;
}

.hamburger {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.82);
  display: none;
  place-items: center;
  position: relative;
}

.hamburger span {
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-main);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger span:nth-child(1) {
  transform: translateY(-6px);
}

.hamburger span:nth-child(3) {
  transform: translateY(6px);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - var(--header-height));
  position: relative;
  overflow: hidden;
  padding: 78px 24px 56px;
  border-bottom: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 250, 243, 0.97) 0%, rgba(255, 250, 243, 0.82) 44%, rgba(255, 250, 243, 0.28) 100%),
    radial-gradient(circle at 88% 20%, rgba(239, 127, 26, 0.15), transparent 26%);
}

[dir='rtl'] .hero::before {
  background:
    linear-gradient(270deg, rgba(255, 250, 243, 0.97) 0%, rgba(255, 250, 243, 0.82) 44%, rgba(255, 250, 243, 0.28) 100%),
    radial-gradient(circle at 12% 20%, rgba(239, 127, 26, 0.15), transparent 26%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-grid > *,
.hero-copy {
  min-width: 0;
}

.hero-grid > *,
.about-grid > *,
.contact-grid > *,
.services-grid > *,
.portfolio-grid > *,
.training-grid > * {
  min-width: 0;
}

.hero-name {
  color: var(--text-soft);
  font-weight: 900;
  font-size: 1rem;
  margin-bottom: 10px;
}

.hero-name .highlight {
  color: var(--text-main);
}

.hero-title {
  max-width: 690px;
  color: var(--text-main);
  font-size: 5.1rem;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
  margin-bottom: 24px;
  overflow-wrap: anywhere;
}

.hero-title span {
  color: var(--accent);
  display: block;
  max-width: 100%;
}

.hero-title .hero-title-tail {
  color: var(--text-main);
}

[dir='rtl'] .hero-title {
  line-height: 1.18;
}

[dir='rtl'] .hero-title span {
  margin-top: 0.16em;
}

.hero-text {
  max-width: 540px;
  color: var(--text-soft);
  font-size: 1.08rem;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #f6a347);
  color: #ffffff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(239, 127, 26, 0.3);
}

.btn-outline,
.btn-secondary {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--border-accent);
}

.btn-outline:hover,
.btn-outline:focus-visible,
.btn-secondary:hover,
.btn-secondary:focus-visible {
  color: var(--accent-dark);
  background: var(--accent-lighter);
}

.trusted-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.trusted-row span {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.58);
}

.hero-visual {
  min-height: 620px;
  width: min(100%, 460px);
  justify-self: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 0 var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 240, 223, 0.9), rgba(244, 234, 220, 0.76)),
    var(--bg-card-solid);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.74);
}

[dir='rtl'] .hero-visual {
  border-radius: 0 0 var(--radius-lg) 0;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 16%, rgba(239, 127, 26, 0.14), transparent 18rem),
    linear-gradient(180deg, rgba(255, 250, 243, 0.36), rgba(244, 234, 220, 0.62));
}

.hero-bg-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 25%;
  transform: translateY(-76px);
  border-radius: calc(var(--radius-lg) - 10px);
  filter: drop-shadow(0 18px 28px rgba(48, 35, 20, 0.14));
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(255, 250, 243, 0), rgba(255, 250, 243, 0.52)),
    radial-gradient(circle at 78% 24%, rgba(239, 127, 26, 0.2), transparent 28%);
}

.visual-eq {
  position: absolute;
  z-index: 2;
  left: 28px;
  bottom: 120px;
  height: 90px;
  display: flex;
  align-items: end;
  gap: 8px;
}

[dir='rtl'] .visual-eq {
  right: 28px;
  left: auto;
}

.visual-eq span {
  width: 9px;
  min-height: 18px;
  border-radius: 999px;
  background: linear-gradient(to top, var(--accent), #f6b869);
  animation: equalize 1.3s ease-in-out infinite alternate;
}

.visual-eq span:nth-child(2) {
  height: 58px;
  animation-delay: 0.14s;
}

.visual-eq span:nth-child(3) {
  height: 36px;
  animation-delay: 0.28s;
}

.visual-eq span:nth-child(4) {
  height: 78px;
  animation-delay: 0.42s;
}

.visual-eq span:nth-child(5) {
  height: 42px;
  animation-delay: 0.56s;
}

.visual-eq span:nth-child(6) {
  height: 70px;
  animation-delay: 0.7s;
}

.visual-eq span:nth-child(7) {
  height: 28px;
  animation-delay: 0.84s;
}

.visual-caption {
  position: absolute;
  z-index: 3;
  left: 28px;
  right: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.visual-caption i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-lighter);
  flex: 0 0 auto;
}

.visual-caption div {
  min-width: 0;
}

.visual-caption strong,
.visual-caption span {
  display: block;
}

.visual-caption strong {
  color: var(--text-main);
}

.visual-caption span {
  color: var(--text-muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.hero-waves {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 130px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  opacity: 0.18;
  pointer-events: none;
}

.sound-wave-bar {
  width: 3px;
  height: 10px;
  border-radius: 999px 999px 0 0;
  background: var(--accent);
  animation: waveAnim 1.2s ease-in-out infinite alternate;
}

/* ---------- Stats ---------- */
.stats-strip {
  padding-top: 0;
  padding-bottom: 52px;
  border-bottom: 0;
}

.stats-panel {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.stat-item {
  min-height: 112px;
  display: grid;
  place-items: center;
  text-align: center;
  border-right: 1px solid var(--border-soft);
}

[dir='rtl'] .stat-item {
  border-right: 0;
  border-left: 1px solid var(--border-soft);
}

.stat-item:last-child {
  border-right: none;
}

[dir='rtl'] .stat-item:last-child {
  border-left: none;
}

.stat-item i {
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: 8px;
}

.stat-number {
  color: var(--accent);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
}

.stat-label {
  color: var(--text-main);
  font-weight: 800;
  margin-top: 6px;
}

/* ---------- About ---------- */
.about {
  background: rgba(255, 250, 243, 0.54);
}

.about-grid {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  color: var(--text-soft);
  font-size: 1.04rem;
  margin-top: 18px;
  max-width: 100%;
}

/* ---------- Services ---------- */
.services {
  background: var(--bg-section);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 40px;
}

.service-card {
  min-height: 270px;
  padding: 34px 28px;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), rgba(239, 127, 26, 0));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

[dir='rtl'] .service-card::before {
  transform-origin: right;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon,
.training-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-lighter);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  font-size: 1.45rem;
  margin-bottom: 24px;
}

.service-card h3 {
  color: var(--text-main);
  font-size: 1.35rem;
  line-height: 1.15;
  margin-bottom: 16px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-arrow {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 900;
  transition: transform 0.25s ease;
}

[dir='rtl'] .card-arrow {
  transform: rotate(180deg);
}

.service-card:hover .card-arrow {
  transform: translateX(4px);
}

[dir='rtl'] .service-card:hover .card-arrow {
  transform: translateX(-4px) rotate(180deg);
}

/* ---------- Portfolio ---------- */
.portfolio {
  background:
    linear-gradient(180deg, rgba(244, 234, 220, 0.48), rgba(255, 250, 243, 0.82));
}

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  margin-bottom: 34px;
}

.filter-pill,
.filter-btn {
  min-height: 42px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text-soft);
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 900;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.filter-pill.active,
.filter-pill:hover,
.filter-btn.active,
.filter-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(239, 127, 26, 0.22);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.portfolio-card,
.portfolio-item {
  position: relative;
  overflow: hidden;
  min-height: 292px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.portfolio-card:hover,
.portfolio-item:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: 0 20px 44px rgba(48, 35, 20, 0.13);
}

.portfolio-item.hidden {
  display: none;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #171717;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #171717;
}

.video-wrapper video {
  object-fit: cover;
}

.custom-thumbnail {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  cursor: pointer;
  background-color: #171717;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform 0.35s ease;
}

.custom-thumbnail.video-thumbnail-overlay {
  background-color: transparent;
}

.custom-thumbnail::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20, 20, 20, 0.06), rgba(20, 20, 20, 0.38));
}

.portfolio-card:hover .custom-thumbnail {
  transform: scale(1.06);
}

.play-button {
  position: relative;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(20, 20, 20, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.play-button i {
  margin-left: 3px;
}

[dir='rtl'] .play-button i {
  margin-right: 3px;
  margin-left: 0;
}

.portfolio-info {
  min-height: 96px;
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), #ffffff);
}

.portfolio-info h3,
.portfolio-info h4 {
  color: var(--text-main);
  font-size: 0.98rem;
  line-height: 1.25;
  margin-bottom: 6px;
}

.portfolio-info p,
.portfolio-info .category-tag {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* ---------- Experience ---------- */
.experience {
  background: var(--bg-section);
}

.timeline {
  display: grid;
  gap: 30px;
  margin-top: 44px;
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 220px 1fr;
  gap: 28px;
  align-items: center;
  min-height: 176px;
  padding: 24px;
}

.timeline-number {
  color: var(--text-main);
  font-weight: 900;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.timeline-number::after {
  content: '';
  width: 2px;
  min-height: 120px;
  background: linear-gradient(to bottom, var(--accent), rgba(239, 127, 26, 0.12));
}

.timeline-number::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px var(--accent-soft);
}

.timeline-thumb {
  height: 128px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  background: #ffffff;
}

.timeline-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-content h3 {
  color: var(--text-main);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.timeline-content p {
  color: var(--text-muted);
  max-width: 620px;
}

.timeline-year {
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 6px;
}

.timeline-dot {
  display: none;
}

/* ---------- Training ---------- */
.training {
  background: rgba(251, 246, 238, 0.72);
}

.training-grid,
.training-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 42px;
}

.academic-certification-grid {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  grid-template-columns: minmax(0, 1fr);
}

.academic-certification-grid .training-card {
  min-height: 0;
}

.training-subheader {
  max-width: 720px;
  margin: 54px auto 0;
  text-align: center;
}

.training-group-title {
  color: var(--text-main);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
}

.training-card {
  min-height: 310px;
  padding: 30px;
}

.training-card h3 {
  color: var(--text-main);
  font-size: 1.18rem;
  line-height: 1.25;
  margin-bottom: 10px;
}

.training-issuer,
.training-card .issuer {
  color: var(--accent);
  font-weight: 900;
  font-size: 0.9rem;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.training-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(circle at 8% 12%, rgba(239, 127, 26, 0.08), transparent 24rem),
    var(--bg-section);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
  margin-top: 42px;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-card {
  min-height: 146px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  display: grid;
  align-content: start;
  gap: 10px;
}

.contact-item-icon {
  color: var(--accent);
  font-size: 1.45rem;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-lighter);
  border: 1px solid var(--border-accent);
}

.contact-item-text h4 {
  color: var(--text-main);
  margin-bottom: 6px;
}

.contact-item-text p,
.contact-item-text a {
  color: var(--text-muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.contact-item-text a:hover,
.contact-socials a:hover {
  color: var(--accent);
}

.contact-socials {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.contact-socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.72);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.contact-socials a:hover {
  border-color: var(--border-accent);
  background: var(--accent-lighter);
}

.contact-form {
  padding: 32px;
  background: rgba(255, 255, 255, 0.88);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  min-width: 0;
}

label,
.form-group label {
  display: block;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 7px;
}

input,
textarea {
  width: 100%;
  padding: 15px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

input::placeholder,
textarea::placeholder {
  color: #aaa19a;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: #ffffff;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.btn-submit {
  width: 100%;
}

/* ---------- Footer ---------- */
.footer {
  background: rgba(255, 250, 243, 0.92);
  border-top: 1px solid var(--border-soft);
  padding: 48px 24px 24px;
}

.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  align-items: start;
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 14px;
  max-width: 280px;
}

.footer h4 {
  color: var(--text-main);
  margin-bottom: 14px;
}

.footer a {
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.footer-links a {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: var(--container);
  margin: 32px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-text {
  color: var(--text-muted);
}

.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-accent);
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--accent);
  box-shadow: var(--shadow-accent);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  z-index: 900;
}

[dir='rtl'] .scroll-top {
  right: auto;
  left: 22px;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 127, 26, 0.32);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(239, 127, 26, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 127, 26, 0);
  }
}

@keyframes equalize {
  from {
    transform: scaleY(0.58);
  }

  to {
    transform: scaleY(1);
  }
}

@keyframes waveAnim {
  from {
    height: 10px;
  }

  to {
    height: var(--wave-height, 60px);
  }
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .hero-title {
    font-size: 4.25rem;
  }

  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .training-grid,
  .training-cards {
    grid-template-columns: 1fr;
  }

  .training-card {
    min-height: 0;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-visual {
    min-height: 560px;
  }

}

@media (max-width: 860px) {
  :root {
    --header-height: 70px;
  }

  section {
    padding: 68px 18px;
  }

  .navbar {
    padding: 0 18px;
    gap: 14px;
  }

  .brand {
    font-size: 1rem;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .brand small {
    display: none;
  }

  .hamburger {
    display: grid;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    right: 18px;
    left: 18px;
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: rgba(255, 250, 243, 0.98);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a {
    display: block;
    padding: 12px;
    border-radius: var(--radius-sm);
  }

  .nav-links a:hover {
    background: var(--accent-lighter);
  }

  .nav-cta {
    justify-content: center;
  }

  .language-toggle {
    min-width: 74px;
    padding: 0 10px;
  }

  .hero {
    min-height: auto;
    padding: 62px 18px 44px;
  }

  .hero::before,
  [dir='rtl'] .hero::before {
    background:
      linear-gradient(180deg, rgba(255, 250, 243, 0.98), rgba(255, 250, 243, 0.84)),
      radial-gradient(circle at 85% 8%, rgba(239, 127, 26, 0.14), transparent 18rem);
  }

  .hero-grid {
    gap: 38px;
  }

  .hero-title {
    font-size: 3rem;
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  [dir='rtl'] .hero-title {
    font-size: 2.8rem;
    line-height: 1.2;
  }

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

  .stats-panel,
  .services-grid,
  .portfolio-grid,
  .contact-cards,
  .form-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .stat-item,
  [dir='rtl'] .stat-item {
    border-right: none;
    border-left: none;
    border-bottom: 1px solid var(--border-soft);
    padding: 20px 0;
  }

  .stat-item:last-child,
  [dir='rtl'] .stat-item:last-child {
    border-bottom: none;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .timeline-number {
    justify-items: start;
  }

  [dir='rtl'] .timeline-number {
    justify-items: end;
  }

  .timeline-number::after,
  .timeline-number::before {
    display: none;
  }

  .timeline-thumb {
    height: 180px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .navbar {
    padding: 0 12px;
    gap: 10px;
  }

  .brand {
    gap: 8px;
    font-size: 0.94rem;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .nav-actions {
    gap: 8px;
  }

  .language-toggle {
    min-width: 66px;
    min-height: 36px;
    padding: 0 8px;
    gap: 6px;
    font-size: 0.8rem;
  }

  .hamburger {
    width: 36px;
    height: 36px;
  }

  .hero-title {
    max-width: 100%;
    font-size: 2.06rem;
  }

  .hero-title .hero-title-tail {
    max-width: 10.2em;
  }

  [dir='rtl'] .hero-title {
    font-size: 1.96rem;
    line-height: 1.22;
  }

  .hero-text {
    font-size: 1rem;
  }

  .btn,
  .hero-actions a {
    width: 100%;
  }

  .hero-visual {
    min-height: 520px;
    max-width: 360px;
    border-radius: var(--radius-lg);
  }

  [dir='rtl'] .hero-visual {
    border-radius: var(--radius-lg);
  }

  .visual-caption {
    right: 16px;
    bottom: 16px;
    left: 16px;
    padding: 14px;
  }

  .visual-eq {
    left: 18px;
    bottom: 106px;
  }

  [dir='rtl'] .visual-eq {
    right: 18px;
    left: auto;
  }

  .portfolio-info {
    min-height: auto;
  }

  .contact-form {
    padding: 22px;
  }
}
