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

:root {
  --white: #ffffff;
  --black: #050505;
  --muted: #5f6368;
  --line: #e8e8e8;
  --soft: #f6f6f6;
  --whatsapp: #25d366;
  --whatsapp-dark: #168d45;
  --radius: 8px;
  --container: 1180px;
  --shadow: 0 18px 55px rgba(0, 0, 0, .08);
  --shadow-strong: 0 26px 80px rgba(0, 0, 0, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Cairo', Arial, sans-serif;
  background: var(--white);
  color: var(--black);
  direction: rtl;
  line-height: 1.8;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }

::selection { background: var(--black); color: var(--white); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  transition: box-shadow .25s ease, background .25s ease;
}
.nav-wrap { min-height: 74px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 18px; }
.brand-text small { font-size: 12px; color: var(--muted); font-weight: 700; }
.brand img { height: 46px; width: auto; transition: transform .25s ease; }
.brand:hover img { transform: translateY(-2px) scale(1.03); }
.main-nav { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.main-nav a {
  padding: 9px 13px;
  border-radius: var(--radius);
  color: #1d1d1f;
  font-weight: 700;
  font-size: 15px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.main-nav a.active, .main-nav a:hover { background: var(--black); color: var(--white); transform: translateY(-1px); }
.nav-whatsapp, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--black);
  border-radius: var(--radius);
  font-weight: 800;
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn.whatsapp, .nav-whatsapp { background: var(--whatsapp); border-color: var(--whatsapp); color: var(--black); }
.btn.secondary { background: var(--white); color: var(--black); }
.btn.full { width: 100%; }
.btn:hover, .nav-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .12); }
.btn.whatsapp:hover, .nav-whatsapp:hover { background: #2ee574; border-color: #2ee574; }
.menu-toggle { display: none; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 9px 12px; font-size: 20px; }

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  align-items: center;
  padding: 42px 0 30px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 15%, rgba(37, 211, 102, .16), transparent 28%),
    radial-gradient(circle at 85% 25%, rgba(0, 0, 0, .08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7f9f8 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 100%;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0,0,0,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 75%);
}
.hero-shell { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: 30px; align-items: center; }
.eyebrow { display: inline-flex; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 800; color: var(--muted); margin-bottom: 18px; }
h1, h2, h3, p { margin-top: 0; }
.hero-copy { max-width: 690px; }
.hero h1 { font-size: clamp(35px, 6vw, 72px); line-height: 1.08; margin-bottom: 14px; font-weight: 900; letter-spacing: -.5px; animation: riseIn .7s ease both; }
.hero p { color: var(--muted); font-size: 19px; max-width: 680px; margin-bottom: 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-points {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f2937;
  font-weight: 700;
}
.hero-points li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--whatsapp);
  flex: 0 0 10px;
  box-shadow: 0 0 0 4px rgba(37, 211, 102, .2);
}

.hero-media-stack {
  display: grid;
  grid-template-columns: 1fr 190px;
  grid-template-rows: minmax(220px, auto) minmax(180px, auto);
  gap: 14px;
  align-items: stretch;
  animation: mediaIn .8s ease .1s both;
}
.hero-media {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  border: 1px solid #e7ece8;
  background: #f2f4f3;
}
.hero-media.main {
  grid-row: 1 / 3;
  min-height: 470px;
}
.hero-media.mini {
  min-height: 200px;
}
.hero-media.mini span {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255, 255, 255, .9);
  color: #1f2937;
  border: 1px solid #dfe5e1;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}
.hero-media img, .service-photo img, .article-card img, .article-hero img { width: 100%; height: 100%; object-fit: cover; }

.hero-kpis {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.hero-kpis article {
  border: 1px solid #dfe6e2;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(6px);
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .05);
}
.hero-kpis strong {
  display: block;
  font-size: 18px;
  margin-bottom: 3px;
}
.hero-kpis span { color: var(--muted); font-size: 14px; }

.section { padding: 78px 0; }
.section.soft { background: var(--soft); }
.section-head { max-width: 720px; margin-bottom: 34px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 48px); line-height: 1.25; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card, .article-card, .request-panel, .admin-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .04);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-card { display: flex; flex-direction: column; }
.service-card:hover, .article-card:hover, .request-panel:hover { transform: translateY(-7px); box-shadow: var(--shadow-strong); border-color: #cfcfcf; }
.service-photo { height: 240px; background: var(--soft); }
.service-photo img, .article-card img { transition: transform .5s ease, filter .5s ease; }
.service-card:hover .service-photo img, .article-card:hover img { transform: scale(1.045); filter: contrast(1.03); }
.service-body, .article-body { padding: 22px; }
.service-icon { font-size: 28px; margin-bottom: 8px; }
.service-body h3, .article-body h3 { font-size: 23px; margin-bottom: 8px; }
.service-body p, .article-body p { color: var(--muted); }
.service-actions { display: flex; gap: 10px; margin-top: auto; padding: 0 22px 22px; }
.request-band { background: var(--white); color: var(--black); padding: 54px 0; border-block: 1px solid var(--line); }
.request-band p { color: var(--muted); }
.request-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  font: inherit;
  background: var(--white);
  color: var(--black);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--black); outline-offset: 2px; }
.article-card img { height: 210px; }
.article-meta { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.article-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0 24px;
  color: var(--muted);
}
.article-tools strong { color: var(--black); }
.page-hero { padding: 70px 0 42px; border-bottom: 1px solid var(--line); background: var(--soft); }
.page-hero h1 { font-size: clamp(34px, 5vw, 58px); margin-bottom: 8px; }
.page-hero p { color: var(--muted); max-width: 760px; }
.article-page { max-width: 860px; margin: 0 auto; }
.article-hero { height: 420px; overflow: hidden; border-radius: var(--radius); margin-bottom: 28px; }
.article-content { font-size: 19px; color: #202124; }
.article-content p, .article-content br { margin-bottom: 12px; }
.article-cta {
  margin-top: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--soft);
}

.site-footer {
  background:
    radial-gradient(circle at 80% 0%, rgba(0, 0, 0, .05), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  color: var(--black);
  padding-top: 52px;
  border-top: 1px solid var(--line);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.site-footer p { color: var(--muted); }
.site-footer a { display: block; color: var(--black); margin: 8px 0; }
.footer-about h3 { margin-bottom: 8px; }
.footer-about .footer-wa {
  display: inline-flex;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid #b8eecf;
  background: #e8f9ef;
  color: #0f7a3d;
  font-weight: 800;
}
.footer-links h4, .footer-contact h4 { margin-bottom: 10px; }
.footer-contact .footer-address { font-size: 14px; margin-top: 10px; }
.footer-bottom { text-align: center; color: var(--muted); border-top: 1px solid var(--line); margin-top: 34px; padding: 18px; }
.float-wa { position: fixed; left: 18px; bottom: 18px; z-index: 40; background: var(--whatsapp); color: var(--black); border-radius: 999px; padding: 12px 18px; font-weight: 900; box-shadow: var(--shadow); }
.float-wa::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 1px solid rgba(37, 211, 102, .5);
  animation: pulse 1.9s ease-out infinite;
}

.reveal-card { animation: riseIn .55s ease both; }
.stagger-list > *:nth-child(2) { animation-delay: .06s; }
.stagger-list > *:nth-child(3) { animation-delay: .12s; }
.stagger-list > *:nth-child(4) { animation-delay: .18s; }
.stagger-list > *:nth-child(5) { animation-delay: .24s; }
.stagger-list > *:nth-child(6) { animation-delay: .30s; }

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

@keyframes mediaIn {
  from { opacity: 0; transform: translateX(-18px) scale(.985); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes pulse {
  from { opacity: .8; transform: scale(.96); }
  to { opacity: 0; transform: scale(1.18); }
}

.admin-layout { min-height: 100vh; background: var(--soft); }
.admin-top { background: var(--black); color: var(--white); padding: 18px 0; }
.admin-top .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0; }
.admin-nav a { border: 1px solid var(--line); background: var(--white); padding: 8px 13px; border-radius: var(--radius); font-weight: 800; }
.admin-card { padding: 22px; margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--line); padding: 12px; text-align: right; vertical-align: top; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.alert { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; background: #eef8ef; border: 1px solid #cfead3; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; margin-inline-start: auto; }
  .main-nav { display: none; position: absolute; top: 74px; right: 16px; left: 16px; flex-direction: column; align-items: stretch; background: var(--white); border: 1px solid var(--line); padding: 12px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .nav-whatsapp { display: none; }
  .brand-text small { display: none; }
  .hero-grid, .grid-3, .footer-grid, .request-form, .form-grid { grid-template-columns: 1fr; }
  .hero-media-stack { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .hero-media.main { grid-row: auto; min-height: 300px; }
  .hero-media.mini { min-height: 190px; }
  .hero-kpis { grid-template-columns: 1fr; }
  .section { padding: 54px 0; }
  .service-actions { flex-direction: column; }
  .article-tools { align-items: flex-start; flex-direction: column; }
}

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