/* =============================
   Modern Hero Section Styling (Improved & Complete)
============================= */

/* use theme tokens from global.css (fallbacks added) */
.service-hero {
  background: var(--bg, #98cb32);
  position: relative;
  overflow: hidden; /* changed from visible to prevent overflow */
  padding: clamp(28px, 6vw, 56px) 1rem;
  color: var(--ink, #181917);
}

.service-grid {
  display: grid;
  grid-template-columns: 56% 45%;
  gap: clamp(15px, 3vw, 40px);
  align-items: center;
}

/* ---------- Optimized Service Images ---------- */
.service-images {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    /* square image for SEO-friendly display */
    display: block;
    min-width: 280px;
    max-width: 500px;
    /* optional max width for hero/images */
    margin: 0 auto;
}

/* shared image card base */
.service-images .img {
    position: absolute;
    border-radius: 16px;
    /* equal rounded corners */
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.149);
    /* subtle catch eye */
    border: 1px solid #bcb8b84b;
    background: #7ecc3a;
    /* milky white background */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect for catchiness */
.service-images .img:hover {
    transform: scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

/* Back (main) image */
.service-images .img-back {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Image inside card */
.service-images .img-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* covers the square frame nicely */
    display: block;
    border-radius: 16px;
    /* equal corners for perfect square */
    transition: transform 0.4s ease;
}

/* Optional hover zoom effect */
.service-images .img-back img:hover {
    transform: scale(1.03);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-images {
        aspect-ratio: 1 / 1;
        max-width: 100%;
    }
}

/* front (smaller) image overlapping to the right and down */
.service-images .img-front {
  width: 55%;
  height: 68%;
  right: -5%;
  bottom: -5%;
  z-index: 3;
  display: block;
}

.service-images .img-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center;
  will-change: transform;
  animation: floatY 5.4s cubic-bezier(.25,.85,.25,1) infinite;
}

/* subtle shadow edge for front image */
.service-images .img-front::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius, 16px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.22);
  pointer-events: none;
}

/* ---------- Text content ---------- */
.service-content {
  padding: 0 0.5rem;
}

.service-content h2 {
  font-size: clamp(28px, 3.8vw, 46px);
  margin-bottom: 0.6rem;
  color: var(--ink-strong, #101010);
}

.service-content p.small {
  margin-bottom: 1rem;
  color: var(--ink-muted, #666);
  max-width: 48ch;
}

/* two-column bullet list */
.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 0.65rem 2rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.25rem;
}

.service-list li {
  position: relative;
  padding-left: 1.25rem;
  font-weight: 600;
  color: var(--ink, #191917);
}

/* bullet */
.service-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #98cb32);
  position: absolute;
  left: 0.1rem;
  top: 0.6rem;
}

/* buttons row */
.service-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn.outline {
  border: 1px solid var(--accent2, #3b4b1b);
  color: var(--accent2, #3b4b1b);
  background: transparent;
  font-weight: 700;
  padding: .85rem 1.1rem;
  border-radius: 12px;
}
.btn.outline:hover {
  background: var(--accent2, #3b4b1b);
  color: #bdbcbc;
  transform: translateY(-2px);
}

/* ===== Animation ===== */
@keyframes floatY {
  0% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-8px) scale(1.002); }
  50% { transform: translateY(-14px) scale(1.006); }
  75% { transform: translateY(-8px) scale(1.002); }
  100% { transform: translateY(0) scale(1); }
}

/* reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  .service-images .img-front img { animation: none; }
}

/* ===== Responsive adjustments ===== */
@media (max-width: 1100px) {
  .service-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .service-images .img-back { width: 77%; }
  .service-images .img-front { width: 66%; right: -5%; bottom: -5%; }
}

@media (max-width: 880px) {
  .service-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-images {
    aspect-ratio: 3 / 2;
    margin-bottom: 1rem;
  }

  /* hide back image on small screens */
  .service-images .img-back {
    display: none;
  }

  /* make front image take full space */
  .service-images .img-front {
    position: relative;
    width: 100%;
    height: 100%;
    right: 0;
    bottom: 0;
  }

  .service-content {
    text-align: center;
  }

  .service-list {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .service-buttons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .service-images {
    aspect-ratio: 1 / 1;
  }

  .service-images .img-back {
    display: none;
  }

  .service-images .img-front {
    width: 100%;
    height: 100%;
    right: 0;
    bottom: 0;
  }

  .service-content h2 {
    font-size: clamp(22px, 6vw, 28px);
  }

  .service-list li {
    font-size: 0.95rem;
  }
}

/* ===============================
   Service 2nd Section
   ============================== */

/* Container & heading */
.services-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start;
  margin-block-end: clamp(1.25rem, 4vw, 2.5rem);
}

.services-head h2 {
  font-family: 'Noto Serif Ethiopic', serif;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin: 0 0 0.5rem;
  color: var(--ink-strong, #101010);
}

.services-lead {
  margin: 0;
  color: var(--ink, #191917);
  line-height: 1.6;
}

/* Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

/* Base card */
.service-card {
  position: relative;
  background: var(--card, #eef0ec);
  border-radius: var(--radius, 12px);
  padding: clamp(1.75rem, 4vw, 3rem);
  text-align: center;
  border: 1px dotted var(--accent, #98cb3262);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow, 0 12px 30px rgba(0,0,0,0.08));
  overflow: hidden;
  transition: transform var(--transition, 0.3s ease), box-shadow var(--transition, 0.3s ease);
  will-change: transform, box-shadow;
}

/* Decorative borders */
.service-card::before,
.service-card::after,
.service-card .border-left,
.service-card .border-right {
  content: "";
  position: absolute;
  background: var(--accent, #8ebb36);
  opacity: 0;
  transition: all 0.4s ease;
}

.service-card::before,
.service-card::after {
  block-size: 2px;
  inline-size: 0;
}

.service-card::before { inset-block-start: 0; inset-inline-start: 0; }
.service-card::after { inset-block-end: 0; inset-inline-end: 0; }

.service-card .border-left,
.service-card .border-right {
  inline-size: 2px;
  block-size: 0;
  inset-block-start: 0;
}

.service-card .border-left { inset-inline-start: 0; }
.service-card .border-right { inset-inline-end: 0; }

/* Hover border animation */
.service-card:hover::before,
.service-card:hover::after {
  inline-size: 100%;
  opacity: 1;
}
.service-card:hover .border-left,
.service-card:hover .border-right {
  block-size: 100%;
  opacity: 1;
}

/* Icon */
.svc-icon {
  inline-size: 64px;
  block-size: 64px;
  border-radius: var(--radius, 12px);
  display: grid;
  place-items: center;
  margin-inline: auto;
  background: var(--bg-alt, #f8f8f6);
  border: 1px solid rgba(255,255,255,0.0);
  color: var(--accent, #98cb32);
  transition: transform var(--transition, 0.3s ease), border-color var(--transition, 0.3s ease), color var(--transition, 0.3s ease);
}

/* Title */
.svc-title {
  font-family: 'Noto Serif Ethiopic', serif;
  font-size: 1.15rem;
  margin: 0;
  color: var(--ink-strong, #101010);
}

/* Description */
.svc-desc {
  margin: 0 auto 0.5rem;
  max-inline-size: 320px;
  color: var(--ink, #191917);
  line-height: 1.6;
}

/* Read more button */
.svc-more {
  margin-block-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 24px;
  background: var(--bg-alt, #f8f8f6);
  text-decoration: none;
  color: var(--ink, #191917);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background var(--transition, 0.3s ease), color var(--transition, 0.3s ease), transform 0.2s ease;
}

.svc-more .arrow {
  opacity: 0.6;
  transition: transform 0.3s ease;
}

.svc-more:hover {
  background: var(--accent, #98cb32);
  color: var(--card, #fff);
  transform: translateY(-2px);
}

.svc-more:hover .arrow {
  transform: translateX(4px);
  opacity: 1;
}

/* Hover card animation */
.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

/* on dark theme prefer stronger shadow */
html[data-theme="dark"] .service-card:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.service-card:hover .svc-icon {
  transform: translateY(-4px) scale(1.05);
  border-color: var(--accent, #98cb32);
  color: var(--accent-strong, #3b4b1b);
}

/* Highlighted card */
.service-card.highlighted {
  transform: translateY(-4px);
  background: var(--bg-alt, #f8f8f6);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card.highlighted .svc-icon {
  background: var(--bg-alt, #fafaf6);
  color: var(--accent, #98cb32);
  border-color: var(--accent, #98cb32);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Responsive */
@media (max-width: 980px) {
  .services-head { text-align: center; }
}


/* =========================
   REUSABLE SERVICE HERO SECTION (ENHANCED)
   ========================= */

.service-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    to right,
    var(--surface, var(--card, #dff6ca)),
    color-mix(in oklab, var(--bg-alt, #f8f8f6) 60%, transparent)
  );
}

/* Layout */
.service-hero__wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  position: relative;
  z-index: 2;
}

/* Content */
.service-hero__content {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.3s;  
}


.service-hero__tag {
  display:inline-block;padding:.45rem .9rem;border-radius:999px;background:rgba(152,203,50,.12);color:var(--accent);font-weight:700;border:1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  position: relative; bottom: 20px;
}


.service-hero__title {
  font-size: clamp(30px, 3.5vw, 48px);
  color: var(--ink-strong, #101010);
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.service-hero__text {
  font-size: 1.1rem;
  color: var(--ink-muted, #666);
  margin-bottom: 2rem;
  max-width: 560px;
}

/* Button */
.service-hero__btn {
  display: inline-block;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: btnPulse 2.5s infinite ease-in-out;
}
.service-hero__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Button (appearance) */
.service-hero__btn {
  position: relative;
  display: inline-block;
  padding: 0.9rem 1.8rem;
  background: var(--accent, #98cb32);
  color: var(--card, #fff);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: btnPulse 2.5s infinite ease-in-out;
}

.service-hero__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* ================================
   Service Hero – Image Section
   ================================ */

/* Hero Image Container */
.service-hero__image {
    flex: 1 1 440px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

/* Square Image Frame */
.service-hero__image-frame {
    position: relative;
    width: 440px;
    aspect-ratio: 1 / 1;
    /* Perfect square */
    background-color: #b9b9b974;
    /* light gray frame */
    border-radius: 18px;
    /* Equal corners */
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 40px rgba(182, 211, 154, 0.772);
    transition: transform 0.45s ease, box-shadow 0.45s ease;
}

/* Hover 3D & Scale Effect */
.service-hero__image-frame:hover {
    transform: rotateY(5deg) rotateX(3deg) scale(1.03);
    box-shadow: 0 32px 60px rgba(0, 0, 0, 0.242);
}

/* Image Styling */
.service-hero__image-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Perfect fit inside square */
    border-radius: 12px;
    animation: serviceFloatY 4s ease-in-out infinite;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.149);
}

/* Glow Accent Behind Image */
.service-hero__glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(141, 184, 54, 0.27) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Dark Mode Compatibility */
html[data-theme="dark"] .service-hero__image-frame {
    background-color: #21371f;
}

html[data-theme="dark"] .service-hero__image-frame img {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.195);
}

/* Floating Animation */
@keyframes serviceFloatY {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Responsive: Mobile / Tablet */
@media (max-width: 768px) {
    .service-hero__wrap {
        flex-direction: column-reverse;
        text-align: center;
    }

    .service-hero__content {
        max-width: 100%;
    }

    .service-hero__image-frame {
        width: 100%;
        max-width: 320px;
    }

    .service-hero__image-frame:hover {
        transform: none;
        /* Disable hover on mobile */
    }
}

/* Variant: Reverse Layout */
.service-hero[data-variant="reverse"] .service-hero__wrap {
    flex-direction: row-reverse;
}

.service-hero[data-variant="reverse"] .service-hero__content {
    text-align: left;
}
.service-hero[data-variant="reverse"] .service-hero__content { direction: ltr; }

/* Animations */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes serviceFloatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes btnPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Responsive */
@media (max-width: 900px) {
  .service-hero__wrap { grid-template-columns: 1fr; text-align: center; }
  .service-hero__content { order: 1; animation-delay: 0s; }
  .service-hero__image { order: 1; }
  .service-hero__text { margin-inline: auto; }
  .service-hero__image-frame:hover { transform: none; }
}


/* =================================================
   Text Section Code
   ================================================ */

html { scroll-behavior: smooth; }

/* Family law / longform section - theme-aware */
.family-law-section {
  background-color: var(--bg, #e7e3e3);
  padding: 80px 40px;
  font-family: "Noto Sans", sans-serif;
  color: var(--ink, #191917);
}

/* --- Layout --- */
.family-law-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
}

.family-law-content p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--ink-muted, #333);
}

.family-law-content section { margin-bottom: 3rem; }

/* --- Headings --- */
.family-heading {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink, #191917);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.family-heading:hover { color: var(--accent, #98cb32); }

/* --- Lists --- */
.family-list, .family-list-disc, .family-laws, .family-checks {
  margin-left: 1.2rem;
  line-height: 1.8;
}

.family-list li,
.family-list-disc li,
.family-laws li,
.family-checks li {
  margin-bottom: 0.6rem;
}

/* --- Sidebar --- */
.family-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #eee);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.118);
}
html[data-theme="dark"] .family-sidebar {
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.family-sidebar {
  padding: 20px 24px;
  height: fit-content;
}

.family-sidebar h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--accent2, #3b4b1b);
}

.family-sidebar__nav a {
  display: block;
  color: var(--ink, #191917);
  text-decoration: none;
  padding: 8px 0;
  border-left: 3px solid transparent;
  padding-left: 10px;
  transition: all 0.3s ease;
  font-weight: 600;
}

.family-sidebar__nav a:hover {
  color: var(--accent, #98cb32);
  border-left-color: var(--accent, #98cb32);
  transform: translateX(4px);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  
  .family-law-container { grid-template-columns: 1fr; }
  .family-sidebar { position: relative; top: 0; margin-top: 40px; display: none}
}

/* ===================== */
/* Table styling  */
/* ======================= */

.family-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.family-table th,
.family-table td {
  border: 1px solid var(--line, #e5e5e5);
  padding: 12px 16px;
  text-align: left;
}

.family-table th {
  background-color: var(--accent-bg, #f4f9ed);
  color: var(--accent2, #3b4b1b);
  font-weight: 700;
}

.family-table tr:nth-child(even) {
  background-color: var(--bg-alt, #fafafa);
}

.family-table tr:hover {
  background-color: var(--hover-bg, #f0f6e9);
  transition: background-color 0.3s ease;
}


/* =========================
   YOUTUBE VIDEO SECTION
   ========================= */

.video-section {
  padding: 50px 40px;
  background-color: var(--bg, #f3eded);
  text-align: center;
}

.video-container { max-width: 100%; margin: 0 auto; }

.video-title {
  font-size: clamp(28px, 4vw, 42px);
  color: var(--ink-strong, #191919);
  margin-bottom: 2rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
html[data-theme="dark"] .video-frame {
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.video-frame:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.video-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
}

/* Responsive */
@media (max-width: 600px) {
  .video-section { padding: 50px 20px; }
  .video-title { font-size: 26px; }
  .video-frame { border-radius: 12px; }
}


/* =============================================== */
/* INTELLECTUAL PROPERTY EXPERTISE SECTION  */
/* =============================================== */

.expertise__item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.8rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
  overflow: hidden;
}

/* gradient accent border on the left */
.expertise__item::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--accent), color-mix(in oklab, var(--accent) 70%, var(--accent2)));
  border-radius: var(--radius) 0 0 var(--radius);
}

/* hover animation */
.expertise__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* inner content styling */
.expertise__icon {
  font-size: 2rem;
  flex-shrink: 0;
  color: var(--accent2);
  z-index: 1;
}

.expertise__item h3 {
  margin: 0 0 .3rem;
  font-weight: 700;
  color: var(--ink-strong);
}

.expertise__item p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Dark mode adjustments */
html[data-theme="dark"] .expertise__item {
  background: var(--card);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .expertise__item::before {
  background: linear-gradient(180deg, var(--accent2), var(--accent));
}



/* RESPONSIVE */
@media (max-width:860px){
  .expertise__wrap{
    grid-template-columns:1fr;
    text-align:center;
  }
  .expertise__grid{
    align-items:center;
  }
  .expertise__item{
    flex-direction:column;
    text-align:center;
  }
  .expertise__icon{margin-bottom:.5rem}
}
