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

:root {
  --navy-900: #0f1d33;
  --navy-800: #162742;
  --navy-600: #233b63;
  --gold-600: #a37c46;
  --gold-500: #b8945e;
  --gold-400: #cbb085;
  --gold-300: #dcc6a2;
  --white: #ffffff;
  --gray-50: #f8fafe;
  --gray-100: #eef2f8;
  --gray-300: #d8e0ec;
  --gray-500: #8c9bae;
  --gray-600: #5d6980;
  --text: #1f2d43;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 6px -1px rgba(15, 29, 51, 0.05), 0 2px 4px -1px rgba(15, 29, 51, 0.03);
  --shadow: 0 10px 24px rgba(15, 29, 51, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(15, 29, 51, 0.1), 0 10px 10px -5px rgba(15, 29, 51, 0.04);
  --container: min(1120px, 92%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fafcff 0%, #ffffff 40%, #f4f8fd 100%);
  line-height: 1.8;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: all 0.3s ease; }
.container { width: var(--container); margin-inline: auto; }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: 
    linear-gradient(rgba(15, 29, 51, 0.85), rgba(15, 29, 51, 0.95)),
    url('./Premium%20Law%20Firm%20Website%20Hero%20Background.png') top center / cover no-repeat;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(220, 198, 162, 0.15);
  transition: all 0.3s ease;
}
.header-inner {
  min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 700;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  letter-spacing: -0.5px;
}
.brand-logo {
  width: 52px;
  height: 64px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.25;
  text-align: start;
  min-width: 0;
  padding-inline-end: 6px;
}
.brand-name { line-height: 1.25; }
.brand-subtitle {
  font-size: 0.92em;
  font-weight: 600;
  color: rgba(220, 198, 162, 0.96);
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.toggle { display: none; width: 44px; height: 44px; border: 1px solid rgba(220, 198, 162, 0.3); background: rgba(220, 198, 162, 0.1); color: #f4ead8; border-radius: 12px; transition: all 0.3s ease; }
.toggle:active { transform: scale(0.95); }
.nav-wrap { display: flex; align-items: center; gap: 20px; margin-inline-start: auto; }
.nav { display: flex; gap: 8px; }
.nav a { color: #dbe4f2; font-size: 0.9rem; font-weight: 600; padding: 8px 14px; border-radius: 10px; position: relative; overflow: hidden; }
.nav a::before { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background: var(--gold-400); transition: width 0.3s ease; border-radius: 2px; }
.nav a:hover, .nav a.active { color: #ffffff; background: rgba(255,255,255,0.05); }
.nav a:hover::before, .nav a.active::before { width: 60%; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: 999px; font-size: 0.9rem; font-weight: 700; border: 0; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 0.85rem; }
.btn-primary { background: linear-gradient(135deg, var(--gold-400), var(--gold-600)); color: var(--navy-900); box-shadow: 0 8px 20px -6px rgba(184, 148, 94, 0.5); }
.btn-primary:hover { box-shadow: 0 12px 24px -6px rgba(184, 148, 94, 0.7); }
.btn-outline { border: 1px solid rgba(220, 198, 162, 0.4); background: rgba(220, 198, 162, 0.05); color: #f4ead8; }
.btn-outline:hover { background: rgba(220, 198, 162, 0.15); border-color: var(--gold-400); }
.btn-light { border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.1); color: #ffffff; backdrop-filter: blur(4px); }
.btn-light:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.5); }

/* Typography & Sections */
.section { padding: 90px 0; }
.section-title { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 700; color: var(--navy-900); margin-bottom: 12px; line-height: 1.4; letter-spacing: -0.5px; }
.section-subtitle { color: var(--gray-600); max-width: 760px; margin-bottom: 40px; font-size: 0.95rem; }

/* Hero */
.hero {
  position: relative;
  min-height: clamp(520px, 64vh, 680px);
  display: flex;
  align-items: center;
  background-color: var(--navy-900);
  background-image: linear-gradient(135deg, rgba(15, 29, 51, 0.38) 0%, rgba(22, 39, 66, 0.42) 100%), url('./background.jpeg');
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  overflow: hidden;
}
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>'); opacity: 0.03; pointer-events: none; }
.hero-content { color: #fff; max-width: 650px; padding: clamp(48px, 6vh, 72px) 0; position: relative; z-index: 10; animation: fadeInUp 0.8s ease-out; }
.eyebrow { display: inline-flex; border: 1px solid rgba(220, 198, 162, 0.3); background: linear-gradient(90deg, rgba(220, 198, 162, 0.15), rgba(220, 198, 162, 0.05)); color: var(--gold-300); border-radius: 999px; font-size: 0.85rem; font-weight: 600; padding: 8px 18px; margin-bottom: 20px; backdrop-filter: blur(4px); }
.hero h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.3; margin-bottom: 20px; letter-spacing: -1px; }
.hero p { color: #dbe4f2; font-size: 0.95rem; margin-bottom: 32px; max-width: 680px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* Cards Grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { border: 1px solid rgba(230, 237, 247, 0.8); background: rgba(255, 255, 255, 0.8); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); backdrop-filter: blur(8px); position: relative; overflow: hidden; animation: fadeInUp 0.6s ease-out backwards; }
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }
.card::before { content: ''; position: absolute; top: 0; right: 0; width: 4px; height: 100%; background: linear-gradient(to bottom, var(--gold-400), var(--gold-600)); opacity: 0; transition: opacity 0.3s ease; }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: rgba(220, 198, 162, 0.3); }
.card:hover::before { opacity: 1; }
.card h3 { color: var(--navy-900); font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--gray-600); font-size: 0.9rem; line-height: 1.7; }

/* Legal articles */
.article-meta { display: block; font-size: 0.8rem; font-weight: 600; color: var(--gold-600); margin-bottom: 8px; }
.article-meta-date { color: var(--gray-500); font-weight: 600; margin-top: 4px; margin-bottom: 12px; }
.card-link { display: inline-flex; align-items: center; margin-top: 16px; font-size: 0.9rem; font-weight: 700; color: var(--navy-600); }
.card-link:hover { color: var(--gold-600); }
.article-back { display: inline-flex; align-items: center; margin-bottom: 24px; font-size: 0.9rem; font-weight: 700; color: var(--navy-600); }
.article-back:hover { color: var(--gold-600); }
.article-detail-title { font-size: clamp(1.3rem, 2.5vw, 1.8rem); margin-bottom: 12px; }
.article-body { color: var(--gray-600); font-size: 0.95rem; line-height: 1.9; max-width: 760px; }
.article-body p { margin: 0; }
.article-disclaimer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--gray-100); color: var(--gray-500); font-size: 0.85rem; font-weight: 600; }
.articles-message { color: var(--gray-600); font-size: 0.95rem; text-align: center; grid-column: 1 / -1; padding: 24px; }
.articles-error { color: #9b3b3b; }

/* Why Us Section */
.why { background: linear-gradient(180deg, var(--gray-50), #ffffff); border-top: 1px solid #eef2f8; border-bottom: 1px solid #eef2f8; position: relative; }
.why-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
.why-list { list-style: none; display: grid; gap: 16px; animation: fadeInUp 0.8s ease-out backwards; animation-delay: 0.3s; }
.why-list li { position: relative; padding-right: 32px; color: #4f5c73; font-size: 0.95rem; font-weight: 600; padding-bottom: 16px; border-bottom: 1px solid var(--gray-100); transition: color 0.3s ease; }
.why-list li:hover { color: var(--navy-900); }
.why-list li::before { content: '✓'; position: absolute; right: 0; top: 0; color: var(--gold-500); font-weight: bold; font-size: 1.1rem; }
.why-list li:last-child { border-bottom: none; }

/* CTA Box */
.cta-box { border-radius: var(--radius-lg); border: 1px solid rgba(220, 198, 162, 0.2); background: linear-gradient(135deg, var(--navy-900), var(--navy-800) 50%, var(--navy-600)); color: #edf3fc; box-shadow: var(--shadow-lg); padding: 50px; text-align: center; position: relative; overflow: hidden; animation: fadeInUp 0.8s ease-out backwards; }
.cta-box::after { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(220, 198, 162, 0.1) 0%, transparent 60%); pointer-events: none; }
.cta-box h2 { color: var(--white); margin-bottom: 12px; font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 700; }
.cta-box p { color: #d7e1ef; margin-bottom: 30px; font-size: 0.95rem; max-width: 600px; margin-inline: auto; }
.cta-box .hero-actions,
.cta-box-actions { justify-content: center; position: relative; z-index: 2; }

/* Contact page — single column */
.contact-section {
  padding: 44px 0 64px;
}
.contact-container {
  max-width: 680px;
  margin-inline: auto;
}
.contact-section .section-title {
  margin-bottom: 10px;
  text-align: center;
}
.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.contact-intro {
  margin: 0 0 4px;
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: center;
}
.contact-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}
.contact-main {
  padding: 26px 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(220, 198, 162, 0.28);
  background: #fff;
}
.contact-form-title {
  color: var(--navy-900);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.contact-form {
  padding: 0;
  box-shadow: none;
  border: 0;
  background: transparent;
  animation: none;
  gap: 14px;
}
.contact-form textarea {
  min-height: 110px;
}
.contact-side-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  animation: none;
}
.contact-side-card::before { display: none; }
.contact-side-card:hover { transform: none; box-shadow: var(--shadow-sm); }
.contact-side-card h3 {
  color: var(--navy-900);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.contact-side-card p {
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0;
  color: var(--gray-600);
  flex: 1;
}
.contact-wa-btn {
  margin-top: 12px;
  width: 100%;
  color: var(--navy-900);
  font-weight: 700;
}
.contact-wa-btn:hover {
  color: var(--navy-900);
}

/* Footer */
.footer { background: var(--navy-900); color: var(--gray-300); border-top: 1px solid rgba(220, 198, 162, 0.15); }
.footer-inner { min-height: 80px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 0.9rem; font-weight: 600; padding: 20px 0; }

/* WhatsApp Float */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 18px rgba(18, 140, 126, 0.28);
  z-index: 40;
  animation: pulseGlow 2s infinite;
  transition: opacity 0.2s ease, transform 0.3s ease, visibility 0.2s ease;
}
.wa-float:hover { transform: scale(1.06); animation: none; box-shadow: 0 12px 22px rgba(18, 140, 126, 0.35); }
.wa-float svg { width: 30px; height: 30px; fill: currentColor; }
body.nav-open .wa-float {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.9);
}

/* Forms */
.form { display: grid; gap: 20px; background: #fff; padding: 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); animation: fadeInUp 0.6s ease-out backwards; }
.form label { color: var(--navy-900); font-size: 0.9rem; font-weight: 600; margin-bottom: -10px; display: block; }
.form input, .form select, .form textarea { width: 100%; border: 2px solid var(--gray-100); border-radius: 12px; padding: 14px 16px; font: inherit; background: var(--gray-50); transition: all 0.3s ease; color: var(--text); font-size: 0.9rem; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--gold-400); background: #fff; box-shadow: 0 0 0 4px rgba(220, 198, 162, 0.15); }
.form textarea { min-height: 140px; resize: vertical; }

/* Responsive */
@media (max-width: 1024px) {
  .hero-content { max-width: 100%; text-align: center; }
  .hero-actions { justify-content: center; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .why-layout { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 860px) {
  .toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-wrap {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: rgba(15,29,51,0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(220,198,162,0.2);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow-lg);
    max-height: min(70vh, 360px);
    overflow-y: auto;
  }
  .nav-wrap.open { display: flex; animation: fadeInUp 0.3s ease; }
  .nav { flex-direction: column; align-items: stretch; gap: 4px; width: 100%; }
  .nav a {
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    font-size: 0.95rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 680px) {
  body { padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
  body.nav-open { overflow: hidden; }
  .brand { font-size: 0.92rem; gap: 10px; max-width: calc(100% - 56px); }
  .brand-logo { width: 46px; height: 58px; }
  .brand-text { gap: 3px; padding-inline-end: 4px; }
  .brand-subtitle { font-size: 0.86em; line-height: 1.38; }
  .section { padding: 50px 0; }
  .section-title { font-size: 1.5rem; }
  .section-subtitle { font-size: 0.9rem; margin-bottom: 30px; }
  .hero-content { padding: 40px 0; text-align: center; }
  .hero h1 { font-size: 1.8rem; line-height: 1.35; margin-bottom: 16px; }
  .hero p { font-size: 0.9rem; line-height: 1.8; margin-bottom: 24px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .hero-actions .btn { width: 100%; justify-content: center; min-height: 54px; }
  .grid-3 { grid-template-columns: 1fr; gap: 20px; }
  .card { padding: 24px 20px; }
  .contact-section { padding: 32px 0 48px; }
  .contact-main { padding: 20px 18px; }
  .contact-side { grid-template-columns: 1fr; gap: 10px; }
  .contact-side-card { padding: 16px 18px; }
  .cta-box { padding: 30px 20px; border-radius: var(--radius); }
  .cta-box h2 { font-size: 1.3rem; }
  .cta-box p { font-size: 0.9rem; }
  .cta-box-actions .btn { width: auto; min-width: 180px; }
  .wa-float {
    width: 44px;
    height: 44px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    animation: none;
    box-shadow: 0 6px 14px rgba(18, 140, 126, 0.25);
  }
  .wa-float svg { width: 24px; height: 24px; }
  .form { padding: 24px; }
  .contact-form { padding: 0; }
}
