/* assets/css/custom.css
   All custom CSS from the approved Earthwest Civil HTML design */

html { scroll-behavior: smooth; }
body { font-family: 'Manrope', sans-serif; }

/* Material Symbols icon style */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Glass morphism utility */
.bg-glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ── Mobile menu toggle (pure CSS checkbox hack) ─────────────────────── */
#mobile-menu-toggle:checked ~ #mobile-menu {
    display: flex;
}

/* ── Entrance Animations ─────────────────────────────────────────────── */
@keyframes fade-slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fade-slide-up 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── Scroll Reveal ───────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ── Stagger children inside reveal sections ─────────────────────────── */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active .stagger-item {
    opacity: 1;
    transform: translateY(0);
}

.reveal.active .stagger-item:nth-child(1) { transition-delay: 0.1s; }
.reveal.active .stagger-item:nth-child(2) { transition-delay: 0.2s; }
.reveal.active .stagger-item:nth-child(3) { transition-delay: 0.3s; }
.reveal.active .stagger-item:nth-child(4) { transition-delay: 0.4s; }
.reveal.active .stagger-item:nth-child(5) { transition-delay: 0.5s; }

/* ── Header scroll state ─────────────────────────────────────────────── */
header.scrolled {
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    padding-top: 2px;
    padding-bottom: 2px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ── Hero Carousel ───────────────────────────────────────────────────── */
.carousel-slide {
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    position: absolute;
    inset: 0;
}

.carousel-slide.active {
    opacity: 1;
}

/* ── WordPress menu reset (so wp_nav_menu matches your design) ───────── */
#main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2.5rem; /* space-x-10 */
}

#main-nav ul li a {
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: -0.025em;
    transition: color 0.3s;
    text-decoration: none;
}

#main-nav ul li a:hover,
#main-nav ul li.current-menu-item a {
    color: #60fe6c; /* primary-container */
}

#main-nav ul li.current-menu-item a {
    border-bottom: 2px solid #60fe6c;
    padding-bottom: 4px;
}

/* Mobile menu — WP nav items */
#mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#mobile-menu ul li a {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

#mobile-menu ul li.current-menu-item a {
    color: #60fe6c;
}
/*
 * Breadcrumb styling — added to assets/css/custom.css
 * Styles Rank Math, Yoast, and manual breadcrumbs to match site design
 */

/* ── Rank Math Breadcrumb Styling ─────────────────────────────────────────── */
.ew-breadcrumb .rank-math-breadcrumb p,
.ew-breadcrumb p,
.ew-breadcrumb ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
}

/* All breadcrumb links */
.ew-breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.ew-breadcrumb a:hover {
    color: var(--primary, #34cb39);
}

/* Separator between items */
.ew-breadcrumb .rank-math-breadcrumb .separator,
.ew-breadcrumb .separator {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    margin: 0 2px;
}

/* Current/last item (not a link) */
.ew-breadcrumb span:last-child:not(.separator),
.ew-breadcrumb .last {
    color: var(--primary, #34cb39);
    font-weight: 600;
}

/* Rank Math uses › as default separator — style it */
.rank-math-breadcrumb .separator::before {
    content: '';
}

/* ── Inner page hero breadcrumb override for Rank Math ───────────────────── */
.rank-math-breadcrumb p {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 0 !important;
}

/* ── Contact Form Message Styles ─────────────────────────────────────────── */
#ew-form-message {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 500;
}
#ew-form-message.ew-msg-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
#ew-form-message.ew-msg-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
/* ── Intro ───────────────────────────────────────────────────── */
.ew-service-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 1rem;
}

/* ── Sub-service cards ──────────────────────────────────────── */
.ew-sub-service {
  border-radius: 1.5rem;
  overflow: hidden;
  margin: 2rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.ew-sub-header {
  padding: 1.75rem 2rem;
  color: #fff;
  position: relative;
}
.ew-sub-1 .ew-sub-header { background: #16a34a; }
.ew-sub-2 .ew-sub-header { background: #1d4ed8; }
.ew-sub-3 .ew-sub-header { background: #d97706; }

.ew-sub-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}
.ew-sub-header h2 {
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0.25rem 0 0.75rem !important;
  border: none !important;
  padding: 0 !important;
}
.ew-sub-header p {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}
.ew-sub-points {
  list-style: none !important;
  padding: 1.5rem 2rem !important;
  margin: 0 !important;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.ew-sub-points li {
  padding-left: 1.5rem !important;
  position: relative;
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.5;
}
.ew-sub-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: 700;
}

/* ── Why It Matters ─────────────────────────────────────────── */
.ew-why-matters {
  background: #0f172a;
  border-radius: 1.5rem;
  padding: 2.5rem;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}
.ew-why-matters::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(96,254,108,0.6) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.05;
}
.ew-why-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}
.ew-why-label {
  display: inline-block;
  color: #4ade80;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
}
.ew-why-left h2 {
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0.25rem 0 1rem !important;
  border: none !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}
.ew-why-left p {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  line-height: 1.7;
}
.ew-why-right {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  padding: 1.5rem;
}
.ew-why-right h4 {
  color: #4ade80;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 1rem !important;
  border: none !important;
  padding: 0 !important;
}
.ew-why-points {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.ew-why-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ew-why-points li:last-child { border-bottom: none; }
.ew-why-points li::before {
  content: "✕";
  color: #f87171;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Service Areas ──────────────────────────────────────────── */
.ew-service-areas {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  padding: 2rem;
  margin: 2rem 0;
}
.ew-service-areas h3 {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #16a34a !important;
  margin: 0 0 1rem !important;
  border: none !important;
  padding: 0 !important;
}
.ew-areas-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.ew-areas-tags span {
  background: rgba(22,163,74,0.1);
  color: #15803d;
  border: 1px solid rgba(22,163,74,0.25);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 20px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .ew-sub-points { grid-template-columns: 1fr; }
  .ew-why-inner { grid-template-columns: 1fr; }
  .ew-why-matters { padding: 1.5rem; }
}

/* ================================================================
   CONTACT FORM 7 — Earthwest Civil Styling
   Overrides CF7 default styles to match site design
================================================================ */

/* ── CF7 Wrapper ──────────────────────────────────────────────── */
.ew-cf7-wrapper .wpcf7 {
  width: 100%;
}
.ew-cf7-wrapper .wpcf7-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* ── Labels ───────────────────────────────────────────────────── */
.ew-cf7-wrapper .wpcf7-form label,
.ew-cf7-wrapper label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.375rem;
}

/* ── Input fields ─────────────────────────────────────────────── */
.ew-cf7-wrapper .wpcf7-form input[type="text"],
.ew-cf7-wrapper .wpcf7-form input[type="email"],
.ew-cf7-wrapper .wpcf7-form input[type="tel"],
.ew-cf7-wrapper .wpcf7-form input[type="url"],
.ew-cf7-wrapper .wpcf7-form input[type="number"],
.ew-cf7-wrapper .wpcf7-form select,
.ew-cf7-wrapper .wpcf7-form textarea {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.ew-cf7-wrapper .wpcf7-form input:focus,
.ew-cf7-wrapper .wpcf7-form select:focus,
.ew-cf7-wrapper .wpcf7-form textarea:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}
.ew-cf7-wrapper .wpcf7-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* ── CF7 form-control spans (wrap each field) ─────────────────── */
.ew-cf7-wrapper .wpcf7-form span.wpcf7-form-control-wrap {
  display: block;
}

/* ── Submit button ────────────────────────────────────────────── */
.ew-cf7-wrapper .wpcf7-form input[type="submit"],
.ew-cf7-wrapper .wpcf7-submit {
  width: 100%;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(22,163,74,0.25);
  grid-column: 1 / -1;
  font-family: inherit;
}
.ew-cf7-wrapper .wpcf7-form input[type="submit"]:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
  box-shadow: 0 6px 28px rgba(22,163,74,0.35);
}
.ew-cf7-wrapper .wpcf7-form input[type="submit"]:active {
  transform: scale(0.98);
}

/* ── Validation messages ──────────────────────────────────────── */
.ew-cf7-wrapper .wpcf7-not-valid-tip {
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: block;
}
.ew-cf7-wrapper .wpcf7-not-valid {
  border-color: #dc2626 !important;
}
.ew-cf7-wrapper .wpcf7-response-output {
  margin: 1rem 0 0;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  grid-column: 1 / -1;
}
.ew-cf7-wrapper .wpcf7-mail-sent-ok {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}
.ew-cf7-wrapper .wpcf7-mail-sent-ng,
.ew-cf7-wrapper .wpcf7-aborted {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}
.ew-cf7-wrapper .wpcf7-spam-blocked,
.ew-cf7-wrapper .wpcf7-validation-errors {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* ── Full-width fields ────────────────────────────────────────── */
.ew-cf7-wrapper .wpcf7-form .full-width,
.ew-cf7-wrapper .wpcf7-form p:has(textarea),
.ew-cf7-wrapper .wpcf7-form p:has(select) {
  grid-column: 1 / -1;
}

/* Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ew-cf7-wrapper .wpcf7-form {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   HERO CF7 FORM — Matches white card design on homepage
================================================================ */
.ew-hero-cf7 .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ew-hero-cf7 .wpcf7-form br {
    display: none;
}
.ew-hero-cf7 .wpcf7-form label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 1rem;
}
.ew-hero-cf7 .wpcf7-form input[type="text"],
.ew-hero-cf7 .wpcf7-form input[type="email"],
.ew-hero-cf7 .wpcf7-form input[type="tel"],
.ew-hero-cf7 .wpcf7-form select,
.ew-hero-cf7 .wpcf7-form textarea {
  width: 100%;
  background: #f1f5f9;
  border: none;
  border-radius: 0.75rem;
  padding: 1rem;
  font-size: 0.875rem;
  color: #1e293b;
  outline: none;
  transition: box-shadow 0.2s;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.ew-hero-cf7 .wpcf7-form input:focus,
.ew-hero-cf7 .wpcf7-form select:focus,
.ew-hero-cf7 .wpcf7-form textarea:focus {
  box-shadow: 0 0 0 3px rgba(22,163,74,0.2);
}
.ew-hero-cf7 .wpcf7-form-control {
    margin-top: 6px;
}
.ew-hero-cf7 .wpcf7-form textarea {
  min-height: 90px;
  resize: none;
}
.ew-hero-cf7 .wpcf7-form input[type="submit"] {
  width: 100%;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
  box-shadow: 0 4px 15px rgba(22,163,74,0.3);
  font-family: inherit;
}
.ew-hero-cf7 .wpcf7-form input[type="submit"]:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}
.ew-hero-cf7 .wpcf7-not-valid-tip {
  color: #dc2626;
  font-size: 0.72rem;
  margin-top: 0.2rem;
  display: block;
}
.ew-hero-cf7 .wpcf7-response-output {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.5rem;
}
.ew-hero-cf7 .wpcf7-mail-sent-ok {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}
.ew-hero-cf7 .wpcf7-mail-sent-ng,
.ew-hero-cf7 .wpcf7-aborted {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}


#mobile-menu-toggle:checked ~ #mobile-menu {
    display: flex;
    background-color: #000000eb;
    height: 100vh;
}
/* Parent should be relative */
#main-nav .menu-item-has-children {
    position: relative;
}

/* Hide submenu by default */
#main-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #0f172a; /* slate-900 */
    min-width: 260px;
    padding: 12px 0;
    border-radius: 10px;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Show on hover */
#main-nav .menu-item-has-children:hover > .sub-menu {
    display: block;
}

/* Submenu links */
#main-nav .sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: #fff;
    font-size: 13px;
    transition: 0.3s;
}

/* Hover effect */
#main-nav .sub-menu li a:hover {
    background: rgba(255,255,255,0.08);
}
#main-nav .sub-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

#main-nav .menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#main-nav ul li.current-menu-item .sub-menu a{
	color:#fff;
    border-bottom: 2px solid transparent;
}
.other-services a {
    text-transform: uppercase;
}
@media (max-width: 767px) {

    /* Hide submenu by default */
	#mobile-menu .menu-item{
		text-align:center;
	}
    #mobile-menu .sub-menu {
        display: none;
        padding-left: 15px;
        margin-top: 5px;
    }

    /* Show when active */
    #mobile-menu .menu-item-has-children.active .sub-menu {
        display: block;
    }

    /* Submenu links styling */
    #mobile-menu .sub-menu li a {
        display: block;
        font-size: 14px;
        padding: 8px 0;
        color: #cbd5f5;
    }

    /* Arrow */
    #mobile-menu .menu-item-has-children > a::after {
        content: "▾";
        float: right;
        transition: 0.3s;
    }

    #mobile-menu .menu-item-has-children.active > a::after {
        transform: rotate(180deg);
    }

    .submenu-arrow {
        font-size: 22px;
        margin-left: 8px;
        cursor: pointer;
        transition: 0.3s;
    }

    .menu-item-has-children.active a .submenu-arrow {
        transform: rotate(180deg);
    }

    .menu-item-has-children .sub-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .menu-item-has-children.active .sub-menu {
        max-height: 500px;
    }
	#mobile-menu .menu-item a::after {
    display: none !important;
    content: none !important;
}
	#mobile-menu .current-menu-item .sub-menu li a{
		color:#fff;
	}
}