/* Mobile-only styles - loaded only on phone devices */
/* This file is conditionally loaded for screens < 768px */

/* Hide back button on article pages */
.back-button,
.nav-link.back-button,
.nav-links .back-button,
.nav-links a.back-button,
a[href="../index.html"].back-button {
  display: none !important;
}

/* Hide nav-links div if it only contains back button */
.nav-links:has(.back-button):not(:has(:not(.back-button))) {
  display: none !important;
}

/* Additional mobile optimizations when JS detects mobile device */
body.is-mobile-device {
  /* Optimize touch interactions */
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}

/* Hide all desktop-specific sections on mobile */
@media screen and (max-width: 767px) {
  /* Calendar mobile adjustments */
  .calendar-popup-overlay {
    padding: 2vw !important;
    box-sizing: border-box !important;
  }

  .calendar-popup {
    max-width: calc(100vw - 4vw) !important;
    margin: 0 auto !important;
    width: calc(100vw - 4vw) !important;
    box-sizing: border-box !important;
    border-radius: 3vw !important;
  }

  .calendar-popup .popup-content {
    flex-direction: column !important;
    padding: 2vw !important;
    padding-bottom: 4vw !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .calendar-popup .submit-btn {
    margin-bottom: 3vw !important;
  }

  .calendar-left,
  .calendar-right {
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-top: none !important;
  }

  .calendar-left h2,
  #calendarPopupTitle {
    padding-top: 12vw !important;
    margin-top: 0 !important;
  }

  .calendar-popup .popup-close {
    top: 3vw !important;
    right: 3vw !important;
    width: 10vw !important;
    height: 10vw !important;
    font-size: 6vw !important;
  }

  .calendar-container {
    padding: 1vw !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .calendar-weekdays,
  .calendar-days {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    gap: 0.5vw !important;
  }

  .calendar-weekdays div {
    font-size: 2.5vw !important;
    padding: 1vw 0 !important;
    text-align: center !important;
  }

  .calendar-day {
    font-size: 3vw !important;
    padding: 1vw !important;
    width: auto !important;
    min-width: auto !important;
    max-width: auto !important;
    text-align: center !important;
  }

  .calendar-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4vw !important;
  }

  .calendar-header h3 {
    font-size: 5vw !important;
    min-width: 50vw !important;
    text-align: center !important;
  }

  .calendar-nav {
    width: 10vw !important;
    height: 10vw !important;
    font-size: 5vw !important;
  }

  .calendar-view-container {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .calendar-view-container > * {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hide honeypot and hidden fields completely on mobile */
  input[name="website"],
  input[type="hidden"] {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
  }

  /* Remove any borders or lines from form elements */
  .calendar-right .contact-form,
  .calendar-popup .contact-form {
    border-top: none !important;
    padding-top: 2vw !important;
  }

  .calendar-right .form-row:first-of-type,
  .contact-form .form-row:first-of-type,
  .calendar-popup .form-row:first-of-type {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Ensure first visible input has no line above */
  input[name="name"] {
    border-top: 0.25vw solid #e0e0e0 !important;
    margin-top: 0 !important;
  }

  .form-row:first-of-type input:first-child {
    margin-top: 0 !important;
  }

  .calendar-right::before,
  .contact-form::before {
    display: none !important;
  }

  /* Fix reCAPTCHA alignment on mobile */
  .g-recaptcha {
    transform: scale(0.77) !important;
    transform-origin: 0 0 !important;
    margin: 0 !important;
    display: block !important;
    width: fit-content !important;
    max-width: 100% !important;
  }

  .form-row:has(.g-recaptcha),
  #contactRecaptcha,
  #calendarRecaptcha {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }

  /* Navbar mobile adjustments - full width flush to top, twice bigger */
  body .navbar,
  html body .navbar,
  nav.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    padding: 5vw 5vw !important; /* Responsive padding based on viewport width */
    padding-top: calc(
      5vw + env(safe-area-inset-top)
    ) !important; /* Account for notch/status bar */
    margin: 0 !important;
    margin-top: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(0.1875rem) !important;
    -webkit-backdrop-filter: blur(0.1875rem) !important;
    /* Ignore any safe area or viewport insets for positioning */
    transform: translateY(0) !important;
    /* Override any inherited top value */
    inset-block-start: 0 !important;
  }

  /* Override any body/html padding that might push content down */
  body {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  html {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* Hide contact button in navbar on mobile */
  .nav-actions {
    display: none !important;
  }

  .nav-logo a {
    display: flex !important;
    align-items: center !important;
    gap: 3vw !important; /* Responsive gap */
    font-size: 6vw !important; /* Responsive font size */
  }

  .nav-logo a span {
    display: inline !important;
    font-size: 6vw !important; /* Responsive font size */
    font-weight: 500 !important;
  }

  .nav-logo img {
    width: 8vw !important; /* Responsive logo width */
    height: 8vw !important; /* Responsive logo height */
  }
  /* Hide desktop carousel */
  .carousel-section {
    display: none !important;
  }

  /* Hide desktop mission statement */
  .mission-statement {
    display: none !important;
  }

  /* Hide desktop interactive features */
  .interactive-features {
    display: none !important;
  }

  /* Mobile Carousel Section */
  .carousel-section-mobile {
    display: block !important;
    min-height: 80vh;
    height: auto; /* Allow height to grow with content */
    padding: 1.5rem 0 6rem 0; /* Less top padding, more bottom padding */
    background: #f5f5f5; /* Light gray background */
    position: relative;
    width: 100vw;
    overflow: visible !important;
  }

  .carousel-mobile-container {
    position: relative;
    width: 100vw;
    height: 70vh; /* Fixed height for carousel itself */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    cursor: grab;
    user-select: none;
    overflow: visible !important;
  }

  .carousel-mobile-track {
    position: relative;
    display: flex;
    width: 100%;
    height: 75%;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    gap: 0.5rem;
    padding: 0;
    margin: 0 auto;
  }

  .carousel-mobile-slide {
    flex: 0 0 70vw;
    width: 70vw;
    height: 100%;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.6;
    transform: scale(0.92);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.3rem;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .carousel-mobile-slide:active {
    transform: scale(0.9);
  }

  .carousel-mobile-slide.active {
    opacity: 1;
    transform: scale(1);
  }

  .carousel-item {
    width: 100%;
    height: 55%; /* Fixed height for image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    order: 1; /* Image comes after title */
    flex-shrink: 0;
  }

  .carousel-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.3) 100%
    );
  }

  .carousel-mobile-text {
    padding: 0;
    text-align: center;
    display: contents; /* This allows children to participate in parent flex layout */
  }

  .carousel-mobile-text h3 {
    font-size: 5vw;
    font-weight: 500;
    color: #494949;
    margin: 0;
    padding: 0;
    letter-spacing: -0.02em;
    order: 0; /* Title at top */
  }

  .carousel-mobile-text p {
    font-size: 4vw;
    color: #555;
    line-height: 1.2;
    max-width: 85%;
    margin: 0 auto;
    padding: 0 4vw 1vw 4vw;
    font-weight: 500;
    order: 2; /* Subtitle at bottom */
  }

  .carousel-mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 248, 248, 0.8);
    backdrop-filter: blur(2.5vw);
    color: #666;
    padding: 2vw 5vw;
    border-radius: 6vw;
    border: 0.25vw solid #454545;
    text-decoration: none;
    font-weight: 400;
    font-size: 3.5vw;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    margin: 1vw auto 0 auto;
    width: fit-content;
    text-align: center;
    box-shadow: 0 0.5vw 2vw rgba(0, 0, 0, 0.04);
    order: 3; /* Button at very bottom */
  }

  .carousel-mobile-btn:hover {
    background: rgba(240, 240, 240, 0.9);
    border-color: #000;
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.08);
  }

  /* Pagination dots for carousel */
  .carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5vw;
    margin-bottom: 0;
    padding: 1vw 0 0 0;
    order: -1;
  }

  .carousel-dot {
    width: 1.5vw;
    height: 1.5vw;
    min-width: 0.375rem;
    min-height: 0.375rem;
    border-radius: 50%;
    background: #d0d0d0;
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0.6;
  }

  .carousel-dot.active {
    width: 5vw;
    height: 1.5vw;
    min-width: 1.25rem;
    min-height: 0.375rem;
    border-radius: 0.75vw;
    background: #999;
    opacity: 1;
  }

  .see-all-button-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 248, 248, 0.8);
    backdrop-filter: blur(2.5vw);
    color: #666;
    padding: 2vw 5vw;
    border-radius: 6vw;
    border: 0.25vw solid #454545;
    text-decoration: none;
    font-weight: 400;
    font-size: 3.5vw;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    position: relative;
    margin: 17vw auto 0 auto;
    display: block;
    width: fit-content;
    min-width: 40vw;
    text-align: center;
    box-shadow: 0 0.5vw 2vw rgba(0, 0, 0, 0.04);
  }

  .see-all-button-mobile:hover {
    background: rgba(240, 240, 240, 0.9);
    border-color: #000;
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.08);
  }

  /* Hide the arrow SVG in the button */
  .see-all-button-mobile svg {
    display: none;
  }

  /* Carousel navigation arrows */
  .carousel-arrow {
    position: absolute;
    top: calc(50% + 2vw); /* Moved down */
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2.5vw);
    border: 0.25vw solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 11vw;
    height: 11vw;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 0.5vw 2.5vw rgba(0, 0, 0, 0.1);
  }

  .carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 1vw 3.5vw rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.05);
  }

  .carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
  }

  .carousel-arrow svg {
    width: 6vw;
    height: 6vw;
    color: rgba(100, 100, 100, 0.8);
  }

  .carousel-arrow-left {
    left: 5vw;
  }

  .carousel-arrow-right {
    right: 5vw;
  }

  .carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }

  .carousel-arrow:disabled:hover {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-50%) scale(1);
  }

  /* Mobile Mission Statement */
  .mission-statement-mobile {
    display: block !important;
    padding: 17vw 4vw 10vw;
    background-color: #ffffff;
    max-width: 100vw;
    overflow: hidden;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mission-text-mobile {
    font-size: 6.5vw !important;
    font-weight: 300;
    line-height: 1.4;
    text-align: center;
    color: #666;
    max-width: 100%;
    margin: 0 auto;
    letter-spacing: -0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .mission-text-mobile br {
    display: block;
    content: "";
    margin-top: 2vw;
  }

  .mission-text-mobile .ai-driven {
    color: #999;
    font-weight: inherit;
    font-size: inherit;
    line-height: inherit;
    position: relative;
    display: inline;
  }

  .mission-text-mobile .ai-driven::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #ffffff;
    animation: none;
  }

  .mission-text-mobile .ai-driven.typing::after {
    animation: revealTextMobile 0.8s steps(17, end) forwards;
  }

  .mission-text-mobile .four-pillar {
    color: #999;
    font-weight: inherit;
    font-size: inherit;
    line-height: inherit;
    position: relative;
    display: inline;
  }

  .mission-text-mobile .four-pillar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #ffffff;
    animation: none;
  }

  .mission-text-mobile .four-pillar.typing::after {
    animation: revealTextMobile 1s steps(20, end) forwards;
  }

  @keyframes revealTextMobile {
    from {
      left: 0;
    }
    to {
      left: 100%;
    }
  }

  /* Mobile Interactive Features */
  .interactive-features-mobile {
    display: block !important;
    background-color: #ffffff;
    padding: 0 0 2rem 0;
  }

  .features-mobile-container {
    padding: 0 4vw;
  }

  .feature-mobile-item {
    display: block;
    padding: 6vw 6vw 6vw 0;
    border-bottom: 0.25vw solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: background 0.3s ease;
    position: relative;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
  }

  /* Visual hint for swipe */
  .feature-mobile-item::before {
    content: "";
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      90deg,
      transparent 0%,
      rgba(0, 0, 0, 0.02) 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .feature-mobile-item:active::before {
    opacity: 1;
  }

  .feature-mobile-item::after {
    content: "→";
    position: absolute;
    right: 0;
    bottom: 3vw;
    font-size: 6vw;
    color: #5e5e5e;
    font-weight: 200;
    transition: all 0.3s ease;
    font-family: system-ui, -apple-system, sans-serif;
    animation: arrowBounce 1.5s ease-in-out infinite;
  }

  @keyframes arrowBounce {
    0%,
    100% {
      transform: translateX(0);
    }
    50% {
      transform: translateX(8px);
    }
  }

  /* Randomized delays for each feature item */
  .feature-mobile-item:nth-child(1)::after {
    animation-delay: 0s;
  }

  .feature-mobile-item:nth-child(2)::after {
    animation-delay: 0.3s;
  }

  .feature-mobile-item:nth-child(3)::after {
    animation-delay: 0.7s;
  }

  .feature-mobile-item:nth-child(4)::after {
    animation-delay: 1.1s;
  }

  .feature-mobile-item:nth-child(5)::after {
    animation-delay: 0.5s;
  }

  .feature-mobile-item:nth-child(6)::after {
    animation-delay: 0.9s;
  }

  .feature-mobile-item:last-child {
    border-bottom: none;
  }

  .feature-mobile-item:hover {
    background: transparent;
  }

  .feature-mobile-item:hover::after {
    color: #5e5e5e;
    transform: none;
  }

  .feature-mobile-title {
    font-size: 15vw;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 3vw;
    letter-spacing: -0.02em;
  }

  .feature-mobile-description {
    font-size: 3.8vw;
    line-height: 1.5;
    color: #666;
    margin-bottom: 3vw;
  }

  .feature-mobile-number {
    font-size: 3.5vw;
    color: #999;
    font-weight: 500;
  }

  /* Adjust other mobile-specific elements */
  .hero {
    margin-top: 0 !important;
    height: 100vh !important;
    min-height: 100vh !important;
  }

  .hero-title {
    font-size: 14vw !important;
  }

  .hero-subtitle {
    font-size: 4vw !important;
  }

  .build-section {
    padding: 2vw 4vw !important;
    background-color: #ececec;
  }

  .build-section .container {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .build-content {
    flex-direction: column !important;
    gap: 13vw !important;
    align-items: stretch !important;
  }

  .build-image {
    width: 100% !important;
    height: 90vw !important;
    min-height: 60vw !important;
    max-height: 60vw !important;
    max-width: 100% !important;
    border-radius: 2vw !important;
    overflow: hidden !important;
  }

  .build-image img {
    width: 100% !important;
    height: 90vw !important;
    object-fit: cover !important;
  }

  .build-text {
    height: 72vw !important;
    min-height: 72vw !important;
    max-height: 72vw !important;
    padding: 10vw !important;
    text-align: center !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2vw !important;
    background-color: #f9f9f9;
    border-radius: 2vw !important;
  }

  .build-text h2 {
    font-size: 6vw !important;
    margin: 0 0 1vw 0 !important;
    line-height: 1.3 !important;
    font-weight: 450 !important;
  }

  .build-text p {
    font-size: 4.4vw !important;
    line-height: 1.5 !important;
    margin: 0 0 0.5vw 0 !important;
    color: #555 !important;
  }

  .build-section .build-text .learn-more-btn,
  .build-text a.learn-more-btn,
  a.learn-more-btn,
  .learn-more-btn {
    margin-top: 2vw !important;
    padding: 6px 10px !important;
    font-size: 3vw !important;
    border-radius: 1vw !important;
    display: inline-block !important;
    min-width: auto !important;
    width: auto !important;
    color: #3e3e3e !important;
    border-color: #787878 !important;
  }

  /* Hide desktop testimonials on mobile */
  .testimonials-section {
    display: none !important;
  }

  /* Mobile Testimonials Section - Complete Rework */
  .testimonials-section-mobile {
    display: block !important;
    padding: 6vw 0;
    background: #ffffff;
    overflow: hidden;
  }

  .testimonials-mobile-title {
    font-size: 7vw;
    font-weight: 400;
    text-align: left;
    color: #1a1a1a;
    margin: 0 0 6vw 0;
    padding: 0 4vw;
    line-height: 1.35;
    display: block;
  }

  .testimonials-mobile-title .line1,
  .testimonials-mobile-title .line2 {
    display: block;
    position: relative;
    overflow: hidden;
    width: fit-content;
  }

  .testimonials-mobile-title .line1 {
    margin-bottom: 1.2vw;
  }

  .testimonials-mobile-title .line1::after,
  .testimonials-mobile-title .line2::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #ffffff;
    transform: translateX(0);
    animation: none;
    will-change: transform;
  }

  .testimonials-mobile-title.typing .line1::after {
    animation: revealText1 0.5s linear forwards;
  }

  .testimonials-mobile-title.typing .line2::after {
    animation: revealText2 0.4s linear 0.5s forwards;
  }

  @keyframes revealText1 {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(100%);
    }
  }

  @keyframes revealText2 {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(100%);
    }
  }

  .testimonials-mobile-container {
    position: relative;
    width: 100%;
    padding: 0 3vw;
  }

  .testimonials-mobile-track {
    position: relative;
    width: 100%;
    overflow: visible;
  }

  .testimonial-mobile-slide {
    display: none;
    width: 100%;
    position: static;
    opacity: 1;
    padding: 0;
    margin: 0;
  }

  .testimonial-mobile-slide.active {
    display: block;
  }

  /* Reset any inherited styles */
  .testimonial-mobile-slide * {
    position: static;
    transform: none;
    opacity: 1;
    text-indent: 0;
  }

  .testimonial-mobile-card {
    background: #ffffff;
    border: 0.25vw solid #e0e0e0;
    border-radius: 3vw;
    padding: 5vw 4vw;
    width: 100%;
    box-shadow: 0 0.25vw 0.75vw rgba(0, 0, 0, 0.1);
    display: block;
    min-height: 75vw;
  }

  .testimonial-mobile-card .company-name {
    font-size: 3vw;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #666;
    text-transform: uppercase;
    margin: 0 0 4vw 0;
    padding: 0 0 0 2.5vw;
    display: block;
    clear: both;
    text-align: left;
  }

  .testimonial-mobile-card .testimonial-text {
    font-size: 4vw;
    line-height: 1.65;
    color: #1a1a1a;
    margin: 0 0 4vw 0;
    padding: 0 2.5vw 0 2.5vw;
    display: block;
    position: static;
    clear: both;
    text-align: left;
    text-indent: 0;
    left: auto;
    transform: none;
  }

  /* Remove any quote decoration */
  .testimonial-mobile-card .testimonial-text::before,
  .testimonial-mobile-card .testimonial-text::after {
    display: none !important;
    content: none !important;
  }

  .testimonial-mobile-card .testimonial-author {
    border-top: 0.25vw solid #f0f0f0;
    padding: 2.5vw 2.5vw 0 2.5vw;
    margin: 0 0 0 0;
    display: block;
    clear: both;
  }

  .testimonial-mobile-card .author-name {
    font-size: 3.6vw;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.75vw 0;
    padding: 0;
    display: block;
  }

  .testimonial-mobile-card .author-title {
    font-size: 3.2vw;
    color: #666;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    display: block;
  }

  /* Dots indicator */
  .testimonials-mobile-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1vw;
    margin-top: 4vw;
    padding: 1.25vw;
  }

  .testimonials-mobile-dots .dot {
    width: 1.5vw;
    height: 1.5vw;
    border-radius: 50%;
    background: #d0d0d0;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
  }

  .testimonials-mobile-dots .dot.active {
    background: #333;
    width: 5vw;
    height: 1.5vw;
    border-radius: 0.75vw;
  }

  .testimonials-title {
    font-size: 7vw !important;
    padding: 0 4vw !important;
  }

  .testimonial-card {
    min-width: 85vw !important;
  }

  /* CTA section mobile */
  .cta-section {
    padding: 8vw 0 !important;
  }

  .cta-buttons {
    flex-direction: column !important;
    gap: 2.5vw !important;
  }

  .cta-box {
    width: 100% !important;
    padding: 4vw 4vw 4vw 3vw !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative !important;
    border-radius: 1vw !important;
  }

  .cta-text {
    font-weight: 400 !important;
    font-size: 8vw !important;
    text-align: left !important;
    letter-spacing: -0.05em !important;
    line-height: 1.1 !important;
  }

  .cta-arrow {
    position: absolute !important;
    right: 3vw !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 8vw !important;
  }

  /* Footer mobile */
  .footer {
    padding: 6vw 4.5vw !important;
  }

  .footer-content {
    flex-direction: column !important;
    gap: 3vw !important;
    text-align: center !important;
  }

  /* Floating contact button at bottom right */
  .mobile-contact-button {
    position: fixed !important;
    bottom: 5vw !important;
    right: 5vw !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 3.5vw 5vw !important;
    border-radius: 0 !important;
    text-decoration: none !important;
    font-size: 4.2vw !important;
    font-weight: 500 !important;
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.25) !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    border: 0.25vw solid #000000 !important;
  }

  .mobile-contact-button:hover {
    background-color: #f5f5f5 !important;
    box-shadow: 0 1.5vw 4vw rgba(0, 0, 0, 0.35) !important;
    transform: translateY(-0.5vw) !important;
  }

  .mobile-contact-button:active {
    transform: translateY(0) !important;
  }
}

/* Ensure desktop sections are visible on larger screens */
@media screen and (min-width: 768px) {
  .carousel-section-mobile,
  .mission-statement-mobile,
  .interactive-features-mobile,
  .testimonials-section-mobile,
  .mobile-contact-button {
    display: none !important;
  }

  .carousel-section,
  .mission-statement,
  .interactive-features {
    display: block !important;
  }
}

/* Adjustments for larger phones (iPhone Pro Max, etc.) */
@media screen and (min-width: 414px) and (max-width: 767px) {
  .carousel-mobile-slide {
    flex: 0 0 75vw;
    width: 75vw;
  }
}

/* Extra small screens (below 375px) - ensure proper calendar padding */
@media screen and (max-width: 374px) {
  .calendar-popup-overlay {
    padding: 1vw !important;
  }

  .calendar-popup {
    max-width: calc(100vw - 2vw) !important;
    width: calc(100vw - 2vw) !important;
  }

  .calendar-popup .popup-content {
    padding: 1vw !important;
  }

  .calendar-container {
    padding: 0.5vw !important;
  }

  .calendar-weekdays div {
    font-size: 2.2vw !important;
    padding: 0.5vw 0 !important;
  }

  .calendar-day {
    font-size: 2.8vw !important;
    padding: 0.8vw !important;
  }
}

/* Phone-specific optimizations for very small screens */
@media screen and (max-width: 375px) {
  .hero-title {
    font-size: 3rem !important;
  }

  .mission-text-mobile {
    font-size: 1.5rem !important;
  }

  .feature-mobile-title {
    font-size: 2rem !important;
  }

  .carousel-mobile-text h3 {
    font-size: 1.25rem;
  }

  .carousel-mobile-text p {
    font-size: 0.875rem;
  }
}

/* Landscape phone orientation adjustments */
@media screen and (max-width: 767px) and (orientation: landscape) {
  .carousel-section-mobile {
    height: auto;
    min-height: 100vh;
  }

  .carousel-mobile-track {
    height: 50vh;
  }

  .hero {
    min-height: 100vh !important;
    height: 100vh !important;
  }
}

/* ===== BUILD SECTION SPACING OVERRIDE - MUST BE LAST ===== */
/* Override all previous build-text spacing rules */
@media screen and (max-width: 767px) {
  .build-section .build-text,
  section.build-section .build-text {
    gap: 0 !important;
    padding: 11vw 6vw !important;
  }

  .build-section .build-text h2,
  section.build-section .build-text h2 {
    margin: 0 !important;
    margin-bottom: 0.5vw !important;
    padding: 0 !important;
    line-height: 1.05 !important;
  }

  .build-section .build-text p,
  section.build-section .build-text p {
    margin: 0 !important;
    margin-bottom: 0.5vw !important;
    padding: 0 !important;
    line-height: 1.15 !important;
  }

  .build-section .build-text .learn-more-btn,
  .build-section .build-text a.learn-more-btn,
  .build-section .build-text a {
    margin: 0 !important;
    margin-top: 0.5vw !important;
  }
}
