/*
Theme Name: Divi Child
Template: Divi
Version: 1.0.0
Text Domain: divi-child
*/

/* =============================================================
   1. MOBILE MENU (HEADER)
   ============================================================= */

@media screen and (max-width: 1003px) {

  /* Contain scroll inside overlay and enable inertial scroll on iOS */
  .mobile-menu-overlay {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  /* Extra top padding to clear the fixed admin toolbar and safe area */
  body.admin-bar .mobile-menu-topbar {
    padding-top: calc(38px + env(safe-area-inset-top)) !important;
  }

  /* Overlay layout: flex column filling the full viewport height */
  .mobile-menu-overlay {
    display: flex !important;
    flex-direction: column !important;
    height: 100dvh !important;
    overflow-y: auto !important;
    transition: transform 0.4s ease-in-out, display 0.4s allow-discrete;
    transform: translateY(-100%);
  }

  /* Open state: slides the panel into place once it becomes visible */
  .mobile-menu-overlay[style*="display: flex"] {
    transform: translateY(0);
  }

  /* Starting point for the slide-in animation */
  @starting-style {
    .mobile-menu-overlay[style*="display: flex"] {
      transform: translateY(-100%);
    }
  }

  /* Fixed topbar, always visible above the menu panel */
  .mobile-menu-topbar,
  .et-interaction-trigger-kefa0evsry {
    flex: 0 0 auto;
    position: relative;
    z-index: 9999;
  }

  /* Menu links row: vertically centered within the remaining space */
  .et_pb_row_3_tb_header {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    justify-content: center !important;
  }

}

/* Taller fixed admin toolbar on smaller mobile screens */
@media screen and (max-width: 782px) {
  body.admin-bar .mobile-menu-topbar {
    padding-top: calc(52px + env(safe-area-inset-top)) !important;
  }
}

/* =============================================================
   2. LOGO MARQUEE
   ============================================================= */

/* --background is reused in the side fade gradients below */
.logo-marquee {
  --logo-gap: 15px;
  --background: #ffffff;

  position: relative;
  width: 100%;
  max-width: none;
  overflow: hidden;
  padding: 18px 0;

}

/* Scrolling track; width: max-content lets it grow with the content */
.logo-marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: logo-marquee-scroll 32s linear infinite;
  will-change: transform;
}

/* Duplicate this group at least twice for a seamless infinite loop */
.logo-marquee__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: var(--logo-gap);
  padding-right: var(--logo-gap);
}

/* Fixed logo size, grayscale/dimmed by default */
.logo-marquee img {
  display: block !important;
  flex: 0 0 135px !important;
  width: 135px !important;
  height: 70px !important;
  min-width: 135px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  filter: grayscale(100%);
  opacity: 0.85;
  transition:
    filter 0.3s ease,
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* Full color + slight zoom on hover */
.logo-marquee img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.06);
}

/* Pause scroll while hovering the marquee */
.logo-marquee:hover .logo-marquee__track {
  animation-play-state: paused;
}

/* Fade edges to soften the logo cutoff at both sides */
.logo-marquee::before,
.logo-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 60px;
  pointer-events: none;
}

.logo-marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--background), transparent);
}

.logo-marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--background), transparent);
}

/* Moves only 50% since content is duplicated -> seamless loop */
@keyframes logo-marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* Tablet/mobile: smaller gap, faster loop, smaller logos */
@media screen and (max-width: 767px) {
  .logo-marquee {
    --logo-gap: 10px;

    padding: 14px 0;
  }

  .logo-marquee__track {
    animation-duration: 22s;
  }

  .logo-marquee img {
    flex: 0 0 100px !important;
    flex-basis: 100px !important;
    width: 100px !important;
    height: 55px !important;
    min-width: 100px !important;
  }

  .logo-marquee::before,
  .logo-marquee::after {
    width: 20px;
  }
}

/* Accessibility: stop animation if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .logo-marquee__track {
    animation-play-state: paused;
  }
}


/* =============================================================
   3. TESTIMONIAL SLIDER
   ============================================================= */

.testimonial-slider,
.testimonial-slider * {
  box-sizing: border-box;
}

/* --accent colors the arrows and the active dot */
.testimonial-slider {
  --accent: #218894;

  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

/* Clips slides outside the visible area */
.testimonial-slider__viewport {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

/* Slides row; translateX offset is applied via JS */
.testimonial-slider__track {
  display: flex;
  width: 100%;
  min-width: 0;
  transition: transform 0.65s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

/* Each slide takes the full width of the viewport */
.testimonial-slider__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  padding-inline: clamp(40px, 7vw, 75px);
  text-align: center;
}

/* Testimonial quote text styling */
.testimonial-slider blockquote {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  color: #505050;
  font-family: "Raleway", sans-serif;
  font-size: clamp(14px, 1.3vw, 16px);
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Author/attribution line below the quote */
.testimonial-slider__author {
  width: 100%;
  margin: clamp(26px, 4vw, 46px) 0 0;
  padding: 0;
  color: #6b6b6b;
  font-family: "Raleway", sans-serif;
  font-size: clamp(14px, 1.3vw, 16px);
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
}

/* Prev/next circular nav buttons */
.testimonial-slider__arrow {
  position: absolute;
  top: 5px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.testimonial-slider__arrow--previous {
  left: 8px;
}

.testimonial-slider__arrow--next {
  right: 8px;
}

/* Dot pagination row */
.testimonial-slider__dots {
  display: flex;
  justify-content: center;
  gap: 11px;
  margin-top: clamp(12px, 4vw, 47px);
}

.testimonial-slider__dot {
  width: 8px;
  height: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: #a7c4c7;
  cursor: pointer;
}

/* Highlights the dot for the current slide */
.testimonial-slider__dot.is-active {
  background: var(--accent);
}

/* Tablet/mobile: less side padding, arrows centered vertically */
@media (max-width: 767px) {
  .testimonial-slider__slide {
    padding-inline: 42px;
  }

  .testimonial-slider__arrow {
    top: 50%;
    transform: translateY(-50%);
  }
}

/* Small phones: smaller text and tighter spacing */
@media (max-width: 400px) {
  .testimonial-slider__slide {
    padding-inline: 35px;
  }

  .testimonial-slider blockquote,
  .testimonial-slider__author {
    font-size: 13px;
    line-height: 20px;
  }

  .testimonial-slider__arrow--previous {
    left: 5px;
  }

  .testimonial-slider__arrow--next {
    right: 5px;
  }
}


/* =============================================================
   4. NEWSLETTER FORM
   ============================================================= */

/* Fixed-width submit button, overriding the default button size */
.newsletter-form .et_pb_contact_submit {
  width: 115px !important;
  min-width: 115px !important;
  max-width: 115px !important;
  padding: 0 !important;
}

/* Fixed-width wrapper matching the submit button */
.newsletter-form .et_pb_button_wrapper {
  width: 115px !important;
}

/* Fixed-width container matching the submit button */
.newsletter-form .et_contact_bottom_container {
  width: 115px !important;
  flex: 0 0 115px !important;
}

/* =====================================================
   CARD SPACING & HEIGHT FIXES (all screen sizes)
   ===================================================== */
.signs-grid {
  gap: 15px !important;
}

.signs-grid .card-1,
.signs-grid .card-2,
.signs-grid .card-3,
.signs-grid .card-4,
.signs-grid .card-5 {
  min-height: 100%;
  height: auto;
  overflow: visible;
  box-sizing: border-box;
}


/* DESKTOP LAYOUT (1101px+) — Row 1: 3 cards | Row 2: 2 cards, centered */
@media only screen and (min-width: 1101px) {
  .signs-grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }
  .signs-grid .card-1 { grid-column: 1 / 3 !important; }
  .signs-grid .card-2 { grid-column: 3 / 5 !important; }
  .signs-grid .card-3 { grid-column: 5 / 7 !important; }
  .signs-grid .card-4 { grid-column: 2 / 4 !important; }
  .signs-grid .card-5 { grid-column: 4 / 6 !important; }
}


/* TABLET LAYOUT (768px–1100px) — Row 1: 2 cards | Row 2: 2 cards | Row 3: 1 card, centered */
@media only screen and (max-width: 1100px) and (min-width: 768px) {
  .signs-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .signs-grid .card-1 { grid-column: 1 / 3 !important; }
  .signs-grid .card-2 { grid-column: 3 / 5 !important; }
  .signs-grid .card-3 { grid-column: 1 / 3 !important; }
  .signs-grid .card-4 { grid-column: 3 / 5 !important; }
  .signs-grid .card-5 { grid-column: 2 / 4 !important; }
}


/* MOBILE LAYOUT (767px and narrower) — all cards stacked, one per row */
@media only screen and (max-width: 767px) {
  .signs-grid {
    grid-template-columns: 1fr !important;
  }
  .signs-grid .card-1,
  .signs-grid .card-2,
  .signs-grid .card-3,
  .signs-grid .card-4,
  .signs-grid .card-5 {
    grid-column: 1 / 2 !important;
  }
}

/* =====================================================
   BLOG CARDS — TEAL STYLE (namespaced to .blog-cards-teal)
   ===================================================== */

/* Grid container */
.blog-cards-teal.et_pb_blog_posts.et_grid_module {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* Card wrapper — full padding on all sides, teal border, rounded corners */
.blog-cards-teal .et_pb_post {
  background: #ffffff;
  border: 4px solid #1a7a7a;
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.blog-cards-teal .et_pb_post:hover {
  transform: translateY(-4px);
}

/* Featured image — spaced away from card edges, rounded on all corners */
.blog-cards-teal .et_pb_image_container {
  margin: 0 0 20px 0;
  border-radius: 14px;
  overflow: hidden;
}

.blog-cards-teal .et_pb_image_container img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

/* Post title with underline accent */
.blog-cards-teal .entry-title {
  font-size: 20px;
  font-weight: 700;
  color: #2b2b2b;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.blog-cards-teal .entry-title a {
  color: inherit;
  text-decoration: none;
}

.blog-cards-teal .entry-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: #1a7a7a;
  margin-top: 8px;
}

/* Meta row — date / comments */
.blog-cards-teal .post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #6b6b6b;
  margin: 10px 0 15px 0;
}

/* Content wrapper — override Divi's forced min-height on no-thumb posts */
.blog-cards-teal .post-content {
  display: block;
  min-height: 0 !important;
}

/* "Read more" button — fixed size, pill style with defined dimensions */
.blog-cards-teal .more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 53px;
  gap: 10px;
  background: #1f818e;
  color: #ffffff !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px;
  border: 1px solid #1f818e;
  border-radius: 6px;
  box-sizing: border-box;
  opacity: 1;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.blog-cards-teal .et_pb_post .post-content .more-link:visited {
  color: #ffffff !important;
}

.blog-cards-teal .et_pb_post .post-content .more-link:hover,
.blog-cards-teal .et_pb_post .post-content .more-link:hover:visited,
.blog-cards-teal .et_pb_post .post-content a.more-link:hover {
  background-color: transparent !important;
  color: #1f818e !important;
  border: 1px solid #1f818e !important;
  opacity: 1 !important;
}