/* ================================================
   MANARE RESIDENCE — Responsive & Mobile Styles
   ================================================
   Breakpoints:
   - ≤ 480px  : Small phones
   - ≤ 768px  : Mobile / small tablets
   - ≤ 1024px : Tablets / iPad
   - ≤ 1440px : Small laptops (13" MacBook, etc.)
   - > 1440px : Desktop / large screens
   ================================================ */

/* ================================================
   GLOBAL TITLE SCALING — 13" MacBook (≤ 1440px)
   Reduce all titles to prevent overflow/collision
   ================================================ */
@media (max-width: 1440px) {
  /* Vision Section */
  .vision__title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
  }

  .vision__panel-info {
    padding: 2.5rem 3.5rem;
  }

  .vision__desc {
    font-size: 0.85rem;
    max-width: 360px;
  }

  /* Overview / Soluções */
  .overview__headline {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
  }

  .overview-section {
    padding: 5rem 80px;
  }

  .overview__text-col {
    width: 480px;
    min-width: 280px;
  }

  /* Location */
  .location__title {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
  }

  .location__card-title {
    font-size: 1.5rem;
  }

  /* Contact */
  .contact__title {
    font-size: clamp(2rem, 3.5vw, 3rem);
  }

  /* Text Section Quote */
  .text-section__quote {
    font-size: clamp(1.3rem, 2.8vw, 2.4rem);
  }

  .text-section {
    padding: 140px 0;
  }
}

/* ================================================
   TABLET (≤ 1024px)
   ================================================ */
@media (max-width: 1024px) {
  /* --- Sticky Header: Hide desktop nav, show hamburger --- */
  .sticky-header__nav {
    display: none;
  }

  .sticky-header__container {
    padding: 0.6rem 4%;
  }

  .sticky-header__cta.btn-primary {
    font-size: 0.8rem;
    padding: 0.6rem 1.2rem;
  }

  /* Hero */
  .hero {
    height: 100vh;
  }

  .hero__bg,
  .hero__fg {
    top: -200px;
    height: calc(100% + 300px);
  }

  .hero__text {
    top: -120px;
  }

  .hero__logo {
    width: 40%;
    max-width: min(35vw, 380px);
  }

  /* Vision Section */
  .vision-section {
    height: auto;
    min-height: auto;
  }

  .vision__panel-image {
    height: 45vh;
  }

  .vision__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
  }

  /* Showcase */
  .showcase__title {
    font-size: clamp(1.2rem, 3vw, 2rem);
  }

  /* Overview / Soluções */
  .overview-section {
    padding: 4rem 30px;
  }

  .overview__headline {
    font-size: clamp(2rem, 4vw, 2.8rem);
  }

  .overview__text-col {
    width: 100%;
    min-width: auto;
  }

  /* Location */
  .location__title {
    font-size: clamp(2rem, 4vw, 2.8rem);
  }

  .location__header {
    margin-bottom: 3rem;
  }

  .location__card-title {
    font-size: 1.3rem;
  }

  /* Contact */
  .contact__title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }

  /* Text Section */
  .text-section {
    padding: 100px 0;
  }

  .text-section__quote {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
  }

  /* Video Section */
  .video-section {
    height: 60vh;
  }
}

/* ================================================
   MOBILE (≤ 768px)
   ================================================ */
@media (max-width: 768px) {
  /* --- Sticky Header: Mobile layout --- */
  .sticky-header__nav {
    display: none;
  }

  .hero__overlay-link {
    font-size: 1rem;
  }

  .sticky-header__container {
    padding: 0.6rem 5%;
  }

  .sticky-header__left {
    gap: 0;
  }

  .sticky-header__right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }

  .sticky-header__cta.btn-primary {
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
  }

  /* Add a hamburger toggle button for sticky header on mobile */
  .sticky-header__hamburger {
    display: flex;
  }

  /* --- Hero Section Mobile --- */
  .hero {
    height: 100vh;
  }

  .hero__bg,
  .hero__fg {
    top: -100px;
    height: calc(100% + 150px);
  }

  .hero__text {
    top: -200px;
  }

  .hero__logo {
    width: 55%;
    max-width: 280px;
  }

  .hero__overlay {
    padding: 1rem 1.2rem;
  }

  .hero__nav-cta {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
  }

  /* --- Vision Section Mobile --- */
  .vision-section {
    height: auto;
    margin-top: 60px !important;
  }

  .vision__panel-image {
    height: 40vh;
    min-height: 250px;
  }

  .vision__mobile-info {
    height: auto;
    min-height: auto;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }

  .vision__mobile-info .vision__title {
    font-size: 1.6rem !important;
    line-height: 1.2;
  }

  .vision__mobile-info .vision__desc {
    font-size: 0.8rem !important;
    line-height: 1.7;
  }

  .vision__mobile-info .vision__content-box {
    gap: 1.2rem;
  }

  /* --- Showcase Section Mobile --- */
  .showcase {
    height: 80vh;
    min-height: 500px;
  }

  .showcase__header {
    padding: 1.2rem 5%;
  }

  .showcase__header-title {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .showcase__header-nav {
    gap: 0.8rem;
    font-size: 0.7rem;
  }

  .showcase__images-layer {
    height: 50vh;
  }

  .showcase__item {
    width: 220px;
  }

  .showcase__title {
    font-size: clamp(1rem, 5vw, 1.6rem);
    line-height: 1;
  }

  .showcase__name-layer {
    padding-top: 4.5rem;
    padding-bottom: 0.5rem;
  }

  .showcase__arrow {
    width: 36px;
    height: 36px;
  }

  .showcase__arrow svg {
    width: 18px;
    height: 18px;
  }

  /* Card is 220px on mobile => half = 110px. Arrow 36px + 10px gap */
  .showcase__arrow--prev {
    left: calc(50% - 110px - 46px);
  }

  .showcase__arrow--next {
    right: calc(50% - 110px - 46px);
  }

  .showcase__card-btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.65rem;
    bottom: 1rem;
  }

  /* --- Text Section Mobile --- */
  .text-section {
    padding: 80px 0;
  }

  .text-section__quote {
    font-size: clamp(1rem, 5vw, 1.5rem);
    padding: 0 1.5rem;
    max-width: 100%;
  }

  .text-section__line--top {
    margin-bottom: 2rem;
  }

  .text-section__line--bottom {
    margin-top: 2rem;
  }

  /* --- Overview / Soluções Section Mobile --- */
  .overview-section {
    padding: 3rem 1.5rem;
    min-height: auto;
  }

  .overview__container {
    flex-direction: column;
    gap: 2.5rem;
  }

  .overview__text-col {
    width: 100%;
    min-width: auto;
  }

  .overview__headline {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    margin-bottom: 1.5rem;
  }

  .overview__description p {
    font-size: 0.85rem;
  }

  /* Cards become a horizontal slideshow on mobile */
  .overview__cards-col {
    width: 100%;
    overflow: hidden;
  }

  .overview__cards-container {
    width: 100%;
    height: auto;
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 1rem 0;
  }

  .overview__cards-container::-webkit-scrollbar {
    display: none;
  }

  .overview__card {
    position: relative;
    top: auto;
    left: auto;
    width: 280px;
    height: auto;
    flex-shrink: 0;
    opacity: 1;
    transform: none !important;
    scroll-snap-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  }

  .overview__card.is-visible {
    transform: none !important;
  }

  .overview__card-img-wrapper {
    height: 200px;
  }

  .overview__card-content {
    height: auto;
    padding: 1rem;
  }

  /* Disable hover fan animation on mobile */
  .overview__cards-container:hover .overview__card {
    transform: none !important;
  }

  /* --- Location Section Mobile --- */
  .location-section {
    padding: 4rem 1.5rem 5rem 1.5rem;
    min-height: auto;
  }

  .location__header {
    margin-bottom: 2.5rem;
  }

  .location__title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .location__grid {
    gap: 3rem;
  }

  .location__card-img-wrapper {
    height: 40vh;
    min-height: 250px;
    max-height: 400px;
    margin-bottom: 0;
  }

  .location__card-text {
    padding: 1.5rem 0;
  }

  .location__card-text--overlap {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    width: 100% !important;
    padding: 1.5rem 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .location__card-title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }

  .location__card-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 0;
  }

  .location__card--offset {
    margin-top: 0 !important;
  }

  /* --- Video Section Mobile --- */
  .video-section {
    height: 45vh;
    min-height: 250px;
  }

  /* --- Contact Section Mobile --- */
  .contact-section {
    padding: 4rem 1.5rem;
  }

  .contact__container {
    gap: 2.5rem;
  }

  .contact__title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .contact__label {
    margin-bottom: 1rem;
  }

  .contact__desc {
    font-size: 0.85rem;
    margin-bottom: 2rem;
  }

  .contact-form .btn-sharp {
    width: 100%;
    text-align: center;
  }

  /* --- Footer Mobile --- */
  .site-footer {
    padding: 4rem 5% 1.5rem 5%;
  }

  .footer__container {
    gap: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .footer__socials {
    flex-direction: column;
    gap: 0.6rem;
  }

  .footer__bottom {
    text-align: center;
  }

  .footer__brands {
    margin-bottom: 2rem;
  }

  /* --- WhatsApp FAB Mobile --- */
  .whatsapp-fab {
    width: 48px;
    height: 48px;
    bottom: 1.2rem;
    right: 1.2rem;
  }

  .whatsapp-fab svg {
    width: 24px;
    height: 24px;
  }
}

/* ================================================
   SMALL PHONES (≤ 480px)
   ================================================ */
@media (max-width: 480px) {
  .hero__logo {
    width: 60%;
    max-width: 240px;
  }

  .hero__text {
    top: -160px;
  }

  .vision__mobile-info .vision__title {
    font-size: 1.3rem !important;
  }

  .showcase {
    height: 70vh;
    min-height: 420px;
  }

  .showcase__item {
    width: 180px;
  }

  .showcase__images-layer {
    height: 45vh;
  }

  .showcase__title {
    font-size: clamp(0.9rem, 5vw, 1.3rem);
  }

  .showcase__name-layer {
    padding-top: 4rem;
    padding-bottom: 0.3rem;
  }

  .showcase__arrow {
    width: 30px;
    height: 30px;
  }

  .showcase__arrow svg {
    width: 16px;
    height: 16px;
  }

  /* Card is 180px on small phones => half = 90px. Arrow 30px + 8px gap */
  .showcase__arrow--prev {
    left: calc(50% - 90px - 38px);
  }

  .showcase__arrow--next {
    right: calc(50% - 90px - 38px);
  }

  .showcase__card-btn {
    padding: 0.4rem 1rem;
    font-size: 0.6rem;
    bottom: 0.8rem;
  }

  .overview__card {
    width: 250px;
  }

  .overview__headline {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .location__title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .contact__title {
    font-size: clamp(1.4rem, 6vw, 1.8rem);
  }

  .text-section__quote {
    font-size: clamp(0.95rem, 5vw, 1.3rem);
  }

  .text-section {
    padding: 60px 0;
  }

  .footer__col h4 {
    font-size: 0.95rem;
  }
}

/* ================================================
   STICKY HEADER — Mobile Hamburger Button
   ================================================ */
.sticky-header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.sticky-header__hamburger .bar {
  width: 100%;
  height: 2px;
  background-color: var(--color-white);
  transition: all var(--transition-fast);
  margin: -3px;
}

@media (max-width: 1024px) {
  .sticky-header__hamburger {
    display: flex;
  }
}

/* ================================================
   MOBILE MENU OVERLAY (for sticky header)
   ================================================ */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-blue-dark);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.mobile-menu-overlay__close {
  position: absolute;
  top: 1.5rem;
  right: 5%;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-overlay__close .bar {
  position: absolute;
  width: 100%;
  height: 1px;
  background-color: var(--color-white);
}

.mobile-menu-overlay__close .bar:first-child {
  transform: rotate(45deg);
}

.mobile-menu-overlay__close .bar:last-child {
  transform: rotate(-45deg);
}

.mobile-menu-overlay__nav {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: center;
}

.mobile-menu-overlay__link {
  font-family: var(--font-secondary);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.mobile-menu-overlay.is-open .mobile-menu-overlay__link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-overlay.is-open .mobile-menu-overlay__link:nth-child(1) {
  transition-delay: 0.15s;
}
.mobile-menu-overlay.is-open .mobile-menu-overlay__link:nth-child(2) {
  transition-delay: 0.25s;
}
.mobile-menu-overlay.is-open .mobile-menu-overlay__link:nth-child(3) {
  transition-delay: 0.35s;
}
.mobile-menu-overlay.is-open .mobile-menu-overlay__link:nth-child(4) {
  transition-delay: 0.45s;
}

.mobile-menu-overlay__link:hover {
  color: var(--color-grey-light);
  letter-spacing: 0.15em;
}

.mobile-menu-overlay__cta {
  margin-top: 2rem;
  padding: 0.8rem 2.5rem;
  border: 1px solid var(--color-white);
  background: transparent;
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition-fast);
  opacity: 0;
  transform: translateY(20px);
}

.mobile-menu-overlay.is-open .mobile-menu-overlay__cta {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.55s;
}

.mobile-menu-overlay__cta:hover {
  background: var(--color-white);
  color: var(--color-blue-dark);
}

/* ================================================
   SOLUCOES MODAL — Mobile Adjustments
   ================================================ */
@media (max-width: 768px) {
  .mobile-menu-overlay__link {
    font-size: 1rem;
  }

  .solucoes-modal__content {
    width: 95%;
  }

  .solucoes-modal__info {
    padding: 1.5rem 1.2rem;
  }

  .solucoes-modal__title {
    font-size: 1.3rem;
  }

  .solucoes-modal__desc {
    font-size: 0.8rem;
  }

  .solucoes-modal__nav {
    width: 36px;
    height: 36px;
  }

  .solucoes-modal__nav--prev {
    left: 0.5rem;
  }

  .solucoes-modal__nav--next {
    right: 0.5rem;
  }

  .solucoes-modal__image-wrapper {
    min-height: 200px;
  }
}
