/* index.css */

/* HERO SECTION (Background and Positioning) */
.hero {
    background: url('/static/image-main2.png') no-repeat center center/cover;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero nav {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}

.hero nav ul {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hero nav ul li a {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero nav ul li a:hover {
    color: #e67300;
    text-decoration: underline;
}

.hero h1 {
    font-size: 3rem;
    margin-top: -10rem;
}

.hero p {
    font-size: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* ABOUT IMAGE */
.about-image {
    background: url('/static/image-aboutus.jpg') no-repeat center center/cover;
    min-height: 400px;
}

/* ABOUT PAGE LINK */
#about a {
  color: #007BFF;
  text-decoration: none;
  font-weight: bold;
}

#about a:hover {
  color: #0056b3;
}

/* GET HELP BANNER */
.get-help-banner {
    background: url('/static/image-banner.png') no-repeat center center/cover;
    color: white;
    text-align: center;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.get-help-banner p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* TESTIMONIAL CAROUSEL STYLES */
.reviews-section {
    background: #f7f7f7;
    padding: 3rem 0;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0 50px; /* creates space for arrows inside */
}

.review-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
}

.review-carousel::-webkit-scrollbar {
    display: none;
}

.client-say-box {
    background: #fff;
    border-radius: 8px;
    /* box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); */
    min-width: 300px;
    max-width: 320px;
    margin: 0 10px;
    flex-shrink: 0;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease-in-out;
}

.client-say-box:hover {
    transform: translateY(-10px);
}

.star-rating {
    color: gold;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.client-say-box p {
    margin-top: 10px;
    font-size: 1rem;
    line-height: 1.5;
    color: #444;
}

/* === Reviews clamp (only when needed) === */
/* Default: normal text, no fade, no button */
.client-say-box.review-card .review-text { line-height: 1.55; }
.client-say-box.review-card .review-more { display: none; }

/* JS adds .is-clamped only if the text overflows */
.client-say-box.review-card.is-clamped .review-text{
  --lines: 8;                         /* desktop lines */
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: var(--lines);
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.client-say-box.review-card.is-clamped .review-text::after{
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 3rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff); /* match card bg */
  pointer-events: none;
}
.client-say-box.review-card.is-clamped .review-more{
  display: inline-block;
  margin-top: .75rem;
  background: none; border: 0; cursor: pointer;
  font-weight: 600; text-decoration: underline;
}

/* Expanded state */
.client-say-box.review-card.is-clamped.expanded .review-text{
  display: block; -webkit-line-clamp: unset;
}
.client-say-box.review-card.is-clamped.expanded .review-text::after{ display: none; }
.client-say-box.review-card.is-clamped .review-more::after{ content: "Read more"; }
.client-say-box.review-card.is-clamped.expanded .review-more::after{ content: "Show less"; }

@media (max-width:768px){
  .client-say-box.review-card.is-clamped .review-text{ --lines: 6; }
}

/* ARROW BUTTONS */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: #333;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    z-index: 10;
}

.carousel-arrow:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    background: #f3f3f3;
}

.carousel-arrow.left {
    left: 10px;
}

.carousel-arrow.right {
    right: 10px;
}

/* SERVICES */
.service-box {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease-in-out;
}

/* RESPONSIVE TWEAKS */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.15rem;
    }
}


/* ===== Mobile hero menu toggle ===== */

/* Hamburger button (hidden by default; shown via media query) */
.menu-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 28px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: none;                /* desktop: hidden */
  z-index: 20;
}
.menu-toggle span {
  display: block;
  height: 3px;
  margin: 6px 0;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ======= MOBILE (<= 768px) – final, right-anchored dropdown ======= */
@media (max-width: 768px) {

  /* Position the nav container at the top of the hero */
  .hero nav {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    padding: 0 8px;

    /* reset desktop centering */
    transform: none !important;
    width: auto !important;
  }

  /* Show the hamburger, keep it top-right */
  .menu-toggle {
    display: block;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 28px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    z-index: 30;
  }
  .menu-toggle span {
    display: block;
    height: 3px;
    margin: 6px 0;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }

  /* Turn the UL into a right-anchored dropdown panel.
     Target the actual element by id to beat the desktop `nav ul` rule. */
  #heroMenu {
    /* reset desktop styles */
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    display: none !important;            /* hidden by default */
    justify-content: initial !important; /* no center flex row */
    gap: 0 !important;

    /* dropdown panel */
    position: absolute !important;
    top: 56px;
    right: 16px;                         /* anchor to the RIGHT */
    left: auto !important;
    width: min(80vw, 200px);             /* narrower panel */
    background: rgba(0,0,0,0.88);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    padding: 12px 14px !important;
    z-index: 25;

    /* animation */
    transform-origin: top right;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity .18s ease, transform .18s ease;
    flex-direction: column;              /* vertical list */
    align-items: stretch;
  }

  /* When toggled open */
  #heroMenu.open {
    display: flex !important;
    opacity: 1;
    transform: scale(1);
  }

  #heroMenu li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }
  #heroMenu li:last-child { border-bottom: none; }

  #heroMenu a {
    display: block;
    text-align: left;
    padding: 10px 12px;
    font-size: 1.05rem;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
  }
  #heroMenu a:active { background: rgba(255,255,255,0.08); }

  /* Optional: prevent background scroll when menu open */
  body.nav-open { overflow: hidden; }
}

@media (max-width: 768px) {
  /* Dimmed click-catcher behind the dropdown */
  .menu-backdrop {
    position: fixed;
    inset: 0;                      /* top:0; right:0; bottom:0; left:0 */
    background: rgba(0,0,0,0.35);
    z-index: 22;                   /* below menu (25), above hero */
    opacity: 0;
    transition: opacity .18s ease;
  }
  .menu-backdrop.show { opacity: 1; }
}

/* ===== Force mobile menu when the viewport is short (landscape phones) ===== */
@media (max-height: 500px) and (orientation: landscape) {
  /* reset the desktop centering */
  .hero nav { transform: none !important; left: 0 !important; right: 0 !important; width: auto !important; }

  /* show burger; hide inline menu by default */
  .menu-toggle { display: block !important; top: 12px; right: 16px; z-index: 30; }
  /* turn the UL into the same right-anchored dropdown */
  #heroMenu {
    display: none !important;
    position: absolute !important;
    top: 48px;
    right: 16px;
    left: auto !important;
    width: min(70vw, 260px);
    flex-direction: column;
    gap: 0;
    background: rgba(0,0,0,0.88);
    padding: 10px 12px !important;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    transform-origin: top right;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity .18s ease, transform .18s ease;
    z-index: 25;
  }
  #heroMenu.open { display: flex !important; opacity: 1; transform: scale(1); }
  #heroMenu li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.15); }
  #heroMenu li:last-child { border-bottom: none; }
  #heroMenu a { display: block; text-align: left; padding: 10px 12px; color: #fff !important; }

  /* hero typography tighter for short height */
  .hero h1 { font-size: 2rem; margin-top: 0 !important; line-height: 1.2; }
  .hero p  { font-size: 1rem; margin-top: .5rem; margin-bottom: 1rem; }
}

/* Also, as a general safety: don't use a big negative margin on small screens */
@media (max-width: 1024px) {
  .hero h1 { margin-top: 0 !important; }
}
