/*
Theme Name:     Custom OMCLawyers Theme 
Description:    Child Theme of Divi
Author:         MTS
Template:       Divi

(optional values you can add: Theme URI, Author URI, Version, License, License URI, Tags, Text Domain)
*/
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');
.instrument-serif-regular {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-style: normal;
}
@media (max-width: 767px) {
  .frontrow .et_pb_column {
    min-height: 350px;
  }
}
/* 1) Mega Menu: stop submenus from exceeding the viewport on mobile */
@media (max-width: 767px){
  #mega-menu-wrap-primary-menu,
  #mega-menu-primary-menu{
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  #mega-menu-primary-menu .mega-sub-menu{
    max-width: 100vw !important;
    left: 0 !important;   /* avoid off-canvas positioning */
    right: auto !important;
    box-sizing: border-box;
  }
}

/* 2) Slick: ensure the viewport clips the overly-wide track */
.lawyer-slider .slick-list{
  overflow: hidden;   /* hard clip */
}

/* 3) Header rows: Divi rows can use widened calc() for gutters.
      Zero gutters on mobile in header to avoid tiny overflows. */
@media (max-width: 767px){
  .et-l--header .et_pb_row{
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }
}

/* Optional global safety while debugging (remove after you find the cause) */
@media (max-width: 767px){
  html, body { overflow-x: hidden; }
}

/* Hide raw slides until Slick finishes init */
.lawyer-slider { opacity: 0; }
.lawyer-slider.is-ready { opacity: 1; transition: opacity .2s ease; }

/* Style the arrow container */
.slider-nav-buttons {
  margin-top: 15px;
  text-align: center;
}
.baseline-button {
  display: inline-flex;
  align-items: baseline; /* Align with container's baseline */
  background-color: #d14f26; /* Adjust to match exact orange */
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}

.baseline-button::after {
  content: "→";
  margin-left: 8px;
  font-size: 18px;
  line-height: 1;
}

.cases .et_pb_blurb_container {padding-left: 60px!important;}

.baseline-button:hover {
  background-color: #b84321; /* Slightly darker on hover */
}

/* Common button styles */
.slider-nav-buttons .slick-prev,
.slider-nav-buttons .slick-next {
  position: static !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 6px;
  border: 2px solid #f26f21; /* orange border */
  border-radius: 50%;
  background: transparent; /* no fill */
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

/* Hide slick default pseudo arrows */
.slider-nav-buttons .slick-prev:before,
.slider-nav-buttons .slick-next:before {
  content: none !important;
}

/* White arrow icon (explicit size keeps buttons from causing overflow) */
.slider-nav-buttons .slick-prev svg,
.slider-nav-buttons .slick-next svg {
  width: 14px;
  height: 14px;
  stroke: #ffffff;
  stroke-width: 2;
  fill: none;
}

/* Extra safety: ensure any inline SVGs in the nav can’t grow unexpectedly */
.slider-nav-buttons svg{
  max-width: 100%;
  height: auto;
  display: block;
}

/* Hover effect */
.slider-nav-buttons .slick-prev:hover,
.slider-nav-buttons .slick-next:hover {
   background: transparent; /* no fill */
  border-color: #f26f21;
}

.instrument-serif-regular-italic {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-style: italic;
}
/* container under the slider */
.lawyer-slider-wrapper .slider-nav-buttons {
  margin-top: 14px;
  text-align: center;
}

/* make sure arrows are not absolutely positioned */
.lawyer-slider-wrapper .slick-prev,
.lawyer-slider-wrapper .slick-next {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  transform: none !important;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin: 0 6px;
  background: rgba(255,255,255,0.15);
  border: 0;
  cursor: pointer;
}

/* hide Slick’s default pseudo icons since we use a <span> */
.lawyer-slider-wrapper .slick-prev:before,
.lawyer-slider-wrapper .slick-next:before {
  content: none !important;
}

.lawyer-slider-wrapper .btn-arrow span {
  font-size: 20px;
  line-height: 1;
  color: #fff;
}

.lawyer-slider-wrapper .btn-arrow:hover {
  background: rgba(255,255,255,0.3);
}

/* Wrapper background and spacing to match the teal band */
.lawyer-slider-wrapper {
  position: relative;
  padding: 30px 10px 10px;
  background: transparent; /* no fill */
  /* Explicitly clip horizontal overflow to prevent sideways scroll on mobile */
  overflow-x: clip;   /* use overflow-x:hidden if you need older browser support */
  overflow-y: visible;
}

/* Let Slick own the layout. Remove your old flex rules. */
.lawyer-slider { opacity: 1; }
.lawyer-slider .slick-slide { padding: 0 10px; box-sizing: border-box; }
/* Enforce clipping on Slick’s viewport element */
.lawyer-slider .slick-list{ overflow: hidden; }

/* Card */
.lawyer-card {
  display: block;
  background: transparent; /* no fill */
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
  transition: transform .18s ease, box-shadow .18s ease;
}
.lawyer-card:hover { transform: translateY(-3px); box-shadow: 0 10px 18px rgba(0,0,0,0.35); }

/* Image area with consistent aspect */
.card-image {
  aspect-ratio: 3 / 4;
  background: #133a48;
  position: relative;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top; /* align image from the top down */
  display: block;
}

/* Orange corner triangle */
.card-image::after {
  content: "";
  position: absolute;
  top: 10px;              /* inset from top */
  right: 10px;            /* inset from right */
  width: 0;
  height: 0;
  border-top: 18px solid #f26f21;  /* orange color */
  border-left: 18px solid transparent;
  z-index: 2;
}

/* Shadow for the triangle */
.card-image::before {
  content: "";
  position: absolute;
  top: 11px;              /* 1px offset for shadow */
  right: 9px;
  width: 0;
  height: 0;
  border-top: 18px solid rgba(0, 0, 0, 0.2);
  border-left: 18px solid transparent;
  z-index: 1;
}

/* Name bar at bottom with small arrow */
.card-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.5); /* translucent overlay like reference */
  color: #fff;
  /* Prevent long names from pushing slide width */
  gap: 8px;
}

/* Constrain long names to avoid horizontal overflow on small screens */
.lawyer-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: #fff;
  margin: 0;
  min-width: 0;               /* allow flex item to shrink */
  overflow: hidden;           /* hide overflow */
  text-overflow: ellipsis;    /* show ellipsis if needed */
  white-space: nowrap;        /* keep on one line (use normal to allow wrapping) */
}

.card-arrow {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='5' y1='12' x2='19' y2='12'/><polyline points='12 5 19 12 12 19'/></svg>") no-repeat center;
  background-size: contain;
  opacity: 0.8;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.lawyer-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(2px);
}

.lawyer-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* Arrows in the top right like the reference */
.custom-arrow {
  position: absolute;
  top: 6px;
  right: 46px;                 /* prev */
  background: rgba(255,255,255,0.12);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
}
.custom-arrow.slick-next { right: 6px; } /* next on the far right */
.custom-arrow span {
  font-size: 22px;
  line-height: 1;
  color: #fff;
}
.custom-arrow:hover { background: rgba(255,255,255,0.22); }

/* Hide default theme arrows if any */
.slick-prev:before, .slick-next:before { display: none; }
