/* =========================================================
   جمعية الإصلاح — باراكو، بنين
   Theme: Green + Blue | RTL | Responsive
   ========================================================= */

:root {
  --green-900: #064e2f;
  --green-700: #0b8a4a;
  --green-600: #0fa35a;
  --green-500: #18b96b;
  --blue-900: #0f2f5f;
  --blue-700: #16449c;
  --blue-600: #1e5fd8;
  --blue-500: #2f7ff0;
  --ink: #12203a;
  --muted: #5c6b82;
  --bg: #ffffff;
  --bg-soft: #f3f8f6;
  --line: #e2ece7;
  --gold: #ffd166;
  --shadow-sm: 0 6px 18px rgba(9, 44, 30, 0.08);
  --shadow-md: 0 14px 38px rgba(9, 44, 30, 0.14);
  --shadow-lg: 0 24px 60px rgba(9, 44, 30, 0.18);
  --gradient: linear-gradient(135deg, var(--green-700), var(--blue-700));
  --gradient-soft: linear-gradient(135deg, rgba(11,138,74,.12), rgba(30,95,216,.12));
  --radius: 18px;
  --container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

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

.section { padding: 96px 0; }

.section-tag {
  display: inline-block;
  background: var(--gradient-soft);
  color: var(--green-700);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 40px;
  margin-bottom: 14px;
  border: 1px solid rgba(11,138,74,.2);
}

.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 14px;
}

.section-head p { color: var(--muted); max-width: 640px; margin: 0 auto; }

.section-head { text-align: center; margin-bottom: 56px; }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 24px rgba(11,138,74,.32);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(11,138,74,.4); }
.btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.08);
}
.btn-ghost:hover { background: #fff; color: var(--green-700); }
.btn-light { background: #fff; color: var(--green-700); box-shadow: var(--shadow-sm); }
.btn-light:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-block { width: 100%; text-align: center; }

/* ============ Header ============ */
.header {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease;
}
.header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { display: inline-flex; filter: drop-shadow(0 4px 8px rgba(11,138,74,.3)); }
.brand-logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 3px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.15rem; font-weight: 900; color: var(--ink); }
.brand-text small { font-size: 0.75rem; color: var(--muted); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
  padding: 9px 15px;
  border-radius: 40px;
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--green-700); background: var(--gradient-soft); }
.nav-link.nav-cta {
  background: var(--gradient);
  color: #fff;
  padding: 10px 20px;
  box-shadow: 0 8px 18px rgba(11,138,74,.3);
}
.nav-link.nav-cta:hover { color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 3px;
  background: var(--ink);
  border-radius: 4px;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 170px 0 90px;
  background: var(--gradient);
  color: #fff;
  overflow: hidden;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.12) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 70%, rgba(255,255,255,.08) 0 2px, transparent 3px);
  background-size: 90px 90px;
  mask-image: linear-gradient(160deg, rgba(0,0,0,.8), transparent 85%);
}
.hero-pattern::after {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,209,102,.18), transparent 65%);
  top: -180px; left: -120px;
}
.hero-pattern::before {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  border: 42px solid rgba(255,255,255,.06);
  bottom: -160px; right: -80px;
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}

.badge {
  display: inline-block;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  padding: 7px 18px;
  border-radius: 40px;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.45;
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--gold); }

.hero-desc {
  color: rgba(255,255,255,.88);
  font-size: 1.06rem;
  max-width: 560px;
  margin-bottom: 30px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  padding: 16px 10px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.stat strong { display: block; font-size: 1.7rem; font-weight: 900; color: var(--gold); }
.stat span { font-size: .82rem; color: rgba(255,255,255,.85); font-weight: 600; }

/* Hero art */
.hero-art { position: relative; height: 420px; }
.art-card {
  position: absolute;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(8px);
  border-radius: 22px;
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.art-card svg { width: 74px; height: 74px; margin: 0 auto 8px; }
.art-card p { font-weight: 800; }
.card-main {
  top: 60px; left: 12%;
  width: 210px;
  transform: rotate(-4deg);
  animation: float 6s ease-in-out infinite;
}
.card-sub { width: 150px; }
.card-a { top: 20px; right: 2%; transform: rotate(5deg); animation: float 7s ease-in-out infinite 1s; }
.card-b { bottom: 30px; right: 20%; transform: rotate(-3deg); animation: float 8s ease-in-out infinite .5s; }

@keyframes float {
  0%,100% { transform: translateY(0) rotate(var(--r,0deg)); }
  50% { transform: translateY(-14px) rotate(var(--r,0deg)); }
}
.card-main { --r: -4deg; }
.card-a { --r: 5deg; }
.card-b { --r: -3deg; }

/* ============ Values ============ */
.values { padding: 34px 0; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value-item { display: flex; align-items: flex-start; gap: 14px; }
.v-icon {
  flex: 0 0 46px;
  width: 46px; height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
}
.v-green { background: linear-gradient(135deg, var(--green-600), var(--green-700)); }
.v-blue { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); }
.value-item strong { font-size: 1.05rem; font-weight: 800; }
.value-item p { color: var(--muted); font-size: .92rem; }

/* ============ About ============ */
.about { background: var(--bg); }
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }

.about-visual { position: relative; }
.about-frame {
  background: var(--gradient-soft);
  border: 1px dashed rgba(11,138,74,.4);
  border-radius: 26px;
  padding: 60px 30px;
  text-align: center;
  position: relative;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.frame-top {
  width: 150px; height: 150px;
  border-radius: 50%;
  background: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  position: relative;
  box-shadow: var(--shadow-md);
}
.frame-top img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.frame-top::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px dashed var(--green-600);
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.about-frame h3 { font-size: 1.6rem; font-weight: 900; margin-top: 8px; }
.about-frame p { color: var(--muted); font-weight: 700; }

.about-chip {
  position: absolute;
  bottom: -22px; left: 20px;
  background: var(--gradient);
  color: #fff;
  padding: 16px 24px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
}
.about-chip strong { font-size: 1.6rem; font-weight: 900; color: var(--gold); }
.about-chip span { font-size: .85rem; font-weight: 700; max-width: 120px; line-height: 1.4; }

.about-text > p { color: var(--muted); margin-bottom: 16px; }
.about-list { margin: 22px 0 30px; display: grid; gap: 12px; }
.about-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.about-list li span {
  flex: 0 0 26px; width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: .8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============ Projects ============ */
.projects { background: var(--bg-soft); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.project-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s ease;
}
.project-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.project-card:hover::before { transform: scaleX(1); }

.p-icon {
  width: 68px; height: 68px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.p-icon svg { width: 42px; height: 42px; }
.pi-green { background: linear-gradient(135deg, var(--green-500), var(--green-700)); }
.pi-blue { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); }

.project-card h3 { font-size: 1.2rem; font-weight: 900; margin-bottom: 10px; }
.project-card p { color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.p-foot {
  display: inline-block;
  font-size: .85rem;
  font-weight: 800;
  color: var(--blue-700);
  background: var(--gradient-soft);
  padding: 5px 14px;
  border-radius: 30px;
}

/* ============ Page hero ============ */
.page-hero {
  position: relative;
  padding: 150px 0 70px;
  background: var(--gradient);
  color: #fff;
  overflow: hidden;
}
.page-hero-content { position: relative; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .9rem; font-weight: 700; color: rgba(255,255,255,.8); margin-bottom: 18px; }
.breadcrumb a { color: var(--gold); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; margin-bottom: 14px; }
.page-hero p { color: rgba(255,255,255,.88); font-size: 1.08rem; max-width: 640px; }

/* ============ Categories (clickable cards) ============ */
.categories { background: var(--bg-soft); }
.cat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.cat-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.cat-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }

.cat-card-top {
  padding: 34px 24px 28px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.cat-construction .cat-card-top { background: linear-gradient(135deg, var(--green-600), var(--green-900)); }
.cat-development .cat-card-top { background: linear-gradient(135deg, var(--blue-500), var(--blue-900)); }
.cat-marketing .cat-card-top { background: linear-gradient(135deg, #e8a20c, #b37905); }

.cat-icon {
  width: 80px; height: 80px;
  border-radius: 22px;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-icon svg { width: 46px; height: 46px; }
.cat-card-top h3 { font-size: 1.4rem; font-weight: 900; }

.cat-card-body { padding: 22px 24px; flex: 1; }
.cat-card-body p { color: var(--muted); font-size: .95rem; }
.cat-count { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.cat-count span {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 4px 12px;
  border-radius: 30px;
  font-size: .78rem;
  font-weight: 700;
}

.cat-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  font-weight: 800;
}
.cat-construction .cat-more { color: var(--green-700); }
.cat-development .cat-more { color: var(--blue-700); }
.cat-marketing .cat-more { color: #b37905; }
.cat-more .arrow { transition: transform .3s ease; }
.cat-card:hover .cat-more .arrow { transform: translateX(-6px); }

/* ============ Sub projects pages ============ */
.sub-projects { background: var(--bg-soft); }
.sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 26px;
}
.sub-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.sub-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.sub-photo {
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 170px;
  overflow: hidden;
  background: #dce7e1;
}
.sub-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.sub-card:hover .sub-photo img { transform: scale(1.07); }

.sub-body { padding: 22px 24px 0; flex: 1; }
.sub-body h3 { font-size: 1.22rem; font-weight: 900; margin-bottom: 8px; }
.sub-body p { color: var(--muted); font-size: .93rem; }

.sub-actions { padding: 16px 24px 24px; margin-top: auto; }
.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  padding: 10px 22px;
  border-radius: 40px;
  font-family: inherit;
  font-weight: 800;
  font-size: .92rem;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.page-development .btn-more { background: rgba(30,95,216,.12); color: var(--blue-700); }
.page-marketing .btn-more { background: rgba(232,162,12,.14); color: #b37905; }
body:not(.page-development):not(.page-marketing) .btn-more { background: rgba(11,138,74,.12); color: var(--green-700); }
.btn-more:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ============ Modal ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility .3s ease;
}
.modal.open { visibility: visible; opacity: 1; }
.modal-overlay { position: absolute; inset: 0; background: rgba(8,20,38,.62); backdrop-filter: blur(4px); }
.modal-box {
  position: relative;
  background: #fff;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px);
  transition: transform .3s ease;
}
.modal.open .modal-box { transform: translateY(0); }
.modal-img { width: 100%; height: 230px; object-fit: cover; display: block; }
.modal-close {
  position: absolute;
  top: 12px; left: 12px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s ease;
}
.modal-close:hover { transform: rotate(90deg); }
.modal-content { padding: 26px; }
.modal-content h3 { font-size: 1.45rem; font-weight: 900; margin-bottom: 10px; }
.modal-content p { color: var(--muted); }
body.modal-open { overflow: hidden; }

@media (max-width: 900px) {
  .cat-cards { grid-template-columns: 1fr; }
}

/* ============ Carousel ============ */
.carousel-section { background: var(--bg); }
.carousel { position: relative; }
.carousel-track {
  display: flex;
  gap: 24px;
  overflow: hidden;
  padding: 4px 0;
  transform: translateX(0);
  transition: transform .55s cubic-bezier(.22,.61,.36,1);
  touch-action: pan-y;
}
.carousel-card {
  flex: 0 0 calc((100% - 48px) / 3);
  scroll-snap-align: center;
}
.carousel-card a {
  display: block;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform .3s ease, box-shadow .3s ease;
}
.carousel-card a:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.carousel-card .sub-body h3 { font-size: 1.15rem; }

.carousel-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 6;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.carousel-btn:hover { transform: translateY(-50%) scale(1.08); box-shadow: var(--shadow-lg); }
.carousel-btn.prev { right: -14px; }
.carousel-btn.next { left: -14px; }

.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: none;
  background: #c8d6cf;
  cursor: pointer;
  padding: 0;
  transition: width .3s ease, background .3s ease, border-radius .3s ease;
}
.dot.active { width: 28px; border-radius: 8px; background: var(--green-600); }

@media (min-width: 901px) {
  .carousel-section .carousel-btn,
  .carousel-section .carousel-dots { display: none; }
}

@media (max-width: 900px) {
  .carousel-card { flex: 0 0 calc((100% - 24px) / 2); }
}
@media (max-width: 600px) {
  .carousel-track {
    flex-direction: column;
    gap: 20px;
    overflow: visible;
    transition: none;
  }
  .carousel-card { flex: 0 0 auto; width: 100%; }
  .carousel-section .carousel-btn,
  .carousel-section .carousel-dots { display: none; }
}

/* ============ CTA ============ */
.cta {
  background: var(--gradient);
  color: #fff;
  text-align: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "\2713";
  position: absolute;
  font-size: 320px;
  color: rgba(255,255,255,.06);
  top: -60px; right: -40px;
  line-height: 1;
}
.cta h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 900; margin-bottom: 12px; }
.cta p { max-width: 640px; margin: 0 auto 30px; color: rgba(255,255,255,.9); font-size: 1.05rem; }

/* ============ Contact ============ */
.contact { background: var(--bg); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }

.contact-info > p { color: var(--muted); margin-bottom: 30px; max-width: 440px; }
.info-row { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.info-icon {
  flex: 0 0 48px; width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--gradient-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.info-row strong { display: block; font-weight: 800; }
.info-row p { color: var(--muted); font-size: .95rem; }

.contact-form {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 34px;
  box-shadow: var(--shadow-sm);
}
.form-row { margin-bottom: 16px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  transition: border-color .25s ease, box-shadow .25s ease;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 4px rgba(11,138,74,.12);
}
.form-note { margin-top: 14px; font-weight: 800; color: var(--green-700); text-align: center; }

/* ============ Footer ============ */
.footer { background: #0b1c30; color: rgba(255,255,255,.82); padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer .brand-logo img { width: 40px; height: 40px; }
.footer .brand-text strong { color: #fff; }
.footer-brand p { font-size: .92rem; color: rgba(255,255,255,.65); margin-top: 14px; }
.footer-col h4 { color: #fff; font-size: 1.05rem; font-weight: 900; margin-bottom: 18px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ""; position: absolute; bottom: 0; right: 0; width: 34px; height: 3px; border-radius: 4px; background: var(--gradient); }
.footer-col a { display: block; color: rgba(255,255,255,.7); margin-bottom: 10px; font-size: .95rem; transition: color .2s ease, padding .2s ease; }
.footer-col a:hover { color: var(--gold); padding-right: 6px; }
.footer-col p { font-size: .95rem; margin-bottom: 10px; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; text-align: center; }
.footer-bottom p { font-size: .88rem; color: rgba(255,255,255,.55); }

/* ============ Social icons ============ */
.social-icons { display: flex; gap: 10px; margin-top: 4px; }
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.social-icon svg { display: block; }
.social-icon:hover { transform: translateY(-3px); }
.social-icon.tg:hover { background: #229ED9; border-color: #229ED9; }
.social-icon.yt:hover { background: #ff0000; border-color: #ff0000; }

.footer-col .social-icon,
.footer .social-icon {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.25);
}
.footer-col .social-icon svg,
.footer .social-icon svg { width: 20px; height: 20px; }

.social-title { margin-top: 26px; }

.header-social { gap: 6px; margin-inline-end: 8px; margin-top: 0; }
.header-social .social-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gradient-soft);
  color: var(--green-700);
  border: none;
}
.header-social .social-icon:hover { color: #fff; transform: translateY(-2px); }
.header-social .social-icon.tg:hover { background: #229ED9; }
.header-social .social-icon.yt:hover { background: #ff0000; }

@media (max-width: 900px) {
  .header-social { display: none; }
}

/* ============ Back to top ============ */
.back-top {
  position: fixed;
  bottom: 24px; left: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-3px); }

/* ============ Reveal animations ============ */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 20px; }
  .hero-art { height: 340px; }
  .card-main { left: 30%; top: 40px; }
  .card-a { right: 4%; }
  .card-b { right: 32%; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    top: 76px; right: 0;
    width: min(320px, 82vw);
    height: calc(100vh - 76px);
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 22px;
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateX(110%);
    transition: transform .35s ease;
    z-index: 99;
  }
  .nav.open { transform: translateX(0); }
  .nav-link { padding: 14px 16px; font-size: 1.05rem; }
  .nav-link.nav-cta { text-align: center; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .values-grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 640px) {
  .hero { padding: 140px 0 70px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-art { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .section { padding: 68px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-frame { min-height: 280px; }
  .about-chip { position: static; margin-top: 18px; justify-content: center; }
}

@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; text-align: center; }
}
