/**
 * ClickBiz Location Landing Framework v2.0
 * Responsive Media Queries, Stacking Rules and Sticky Mobile Actions
 */

/* Laptop Viewports */
@media (max-width: 1199px) {
  .hero-section {
    min-height: 760px;
  }
}

/* Tablet Viewports */
@media (max-width: 991px) {
  .landing-section {
    padding: 100px 0;
  }

  .hero-section {
    min-height: 720px;
    text-align: center !important;
  }

  .hero-text-col {
    text-align: center !important;
    padding-right: 15px !important;
    margin-bottom: 40px !important;
  }

  .hero-text-col span.text-uppercase {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  .hero-title {
    font-size: 42px;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero-description {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero-benefits-wrapper {
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .benefit-pill {
    justify-content: center !important;
  }

  .hero-actions {
    justify-content: center !important;
  }

  /* Appointment form card centering on mobile */
  .appointment-card {
    text-align: center !important;
  }

  .appointment-card label {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
  }

  .appointment-card input, 
  .appointment-card select, 
  .appointment-card textarea {
    text-align: center !important;
    text-align-last: center !important;
  }

  .appointment-card form .d-flex,
  .appointment-card .wpcf7-form .d-flex,
  .appointment-card .wizard-step-panel .d-flex {
    justify-content: center !important;
  }

  .appointment-card form button,
  .appointment-card form input[type="submit"],
  .appointment-card .wpcf7-form button,
  .appointment-card .wpcf7-form input[type="submit"],
  .appointment-card .btn-next,
  .appointment-card .btn-submit {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .section-title {
    font-size: 32px;
  }

  /* Grid card margins for tablet view */
  .service-card, .dentist-card, .tech-card, .review-card {
    margin-bottom: 20px;
  }

  /* 100% width treatment finder pills on mobile */
  .finder-options {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
  }
  .finder-pill {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    text-align: center !important;
  }

  /* Global mobile centering for all landing page content */
  /* Center only specific text elements in Hero on mobile */
  .hero-section h1,
  .hero-section p,
  .hero-text-col span.text-uppercase {
    text-align: center !important;
  }

  /* Align specific layout columns and cards to center */
  .transit-card, 
  .local-grid-card, 
  .local-serving-card,
  .service-card,
  .dentist-card,
  .review-card,
  .tech-card,
  .tech-benefit-card,
  .benefit-card,
  .why-us-card {
    align-items: center !important;
    text-align: center !important;
  }

  .why-us-card .d-flex {
    justify-content: center !important;
    text-align: center !important;
  }

  .service-card .service-body {
    align-items: center !important;
    text-align: center !important;
  }

  /* Override text-left columns in dynamic sections on mobile viewports */
  .dentists-section .text-left,
  .reviews-section .text-left,
  .gallery-section .text-left,
  .tech-section .text-left {
    text-align: center !important;
  }

  /* Center align badges (like Featured Case and Featured Story) */
  .landing-section .badge {
    display: inline-block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  /* Center why-us subtitle eyebrow on mobile/tablet */
  .why-us-section .col-lg-7 span.text-uppercase {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
  }

  /* Center why-us main title, description, and bottom reassurance block on mobile/tablet */
  .why-us-section .col-lg-7,
  .why-us-section .col-lg-7 h2,
  .why-us-section .col-lg-7 .why-us-content,
  .why-us-section .col-lg-7 .mt-5,
  .why-us-section .col-lg-7 .mt-5 h5,
  .why-us-section .col-lg-7 .mt-5 p {
    text-align: center !important;
  }
  .why-us-section .col-lg-7 .mt-5 .d-flex {
    justify-content: center !important;
    align-items: center !important;
  }

  /* Spacing for services section CTA buttons when stacked on mobile/tablet */
  .services-section .btn-landing-secondary {
    margin-bottom: 12px !important;
    margin-right: 0 !important;
  }

  /* Spacing for why-us section CTA buttons when stacked on mobile/tablet */
  .why-us-section .btn-landing-cta,
  .why-us-section .btn-landing-secondary {
    margin-bottom: 12px !important;
    margin-right: 0 !important;
  }

  /* Center the author bio block in featured reviews */
  .featured-testimonial-card .col-lg-4 {
    border-left: none !important;
    border-top: 1px solid rgba(0,0,0,0.06) !important;
    padding-top: 20px !important;
    justify-content: center !important;
  }

  /* Center emergency section content on mobile/tablet */
  .emergency-section .col-lg-7,
  .emergency-section .col-lg-7 span,
  .emergency-section .col-lg-7 h2,
  .emergency-section .col-lg-7 .emergency-content,
  .emergency-section .col-lg-7 .row,
  .emergency-section .col-lg-7 .row .col-sm-6 > div,
  .emergency-section .col-lg-7 .d-flex {
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* Spacing for emergency section CTA buttons when stacked on mobile/tablet */
  .emergency-section .col-lg-7 .d-flex .btn:first-child {
    margin-right: 0 !important;
    margin-bottom: 12px !important;
  }

  /* Center opening hours content and list items on mobile */
  .opening-hours-content {
    text-align: center !important;
  }
  .opening-hours-list li {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    border-bottom: none !important;
    padding-bottom: 8px !important;
  }

  /* Center clinic information and map section CTA buttons on mobile/tablet */
  .location-section .col-lg-5,
  .location-section .col-lg-5 h3,
  .location-section .col-lg-5 p,
  .location-section .col-lg-5 .p-3,
  .location-section .col-lg-5 h4,
  .location-section .col-lg-5 .d-flex {
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* Spacing for map section CTA buttons when stacked on mobile/tablet */
  .location-section .col-lg-5 .d-flex .btn:first-child {
    margin-right: 0 !important;
    margin-bottom: 12px !important;
  }

  .card-icon-tag,
  .transit-icon,
  .service-icon,
  .tech-icon,
  .benefit-icon {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Mobile Viewports */
@media (max-width: 575px) {
  .landing-section {
    padding: 80px 0;
  }

  .hero-section {
    min-height: auto;
    padding: 80px 0 40px;
  }

  .hero-title {
    font-size: 32px;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-description {
    font-size: 16px;
  }

  .appointment-card {
    padding: 24px;
    margin-top: 30px;
  }

  .section-title {
    font-size: 28px;
  }

  /* Padding at bottom of page to prevent sticky action bar overlapping footer content */
  body.landing-v2-active {
    padding-bottom: 75px;
  }

  /* Sticky Bottom Call-to-Action Bar */
  .mobile-sticky-actions-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px 15px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateY(100%);
  }

  .mobile-sticky-actions-bar.is-visible {
    transform: translateY(0);
  }

  .mobile-sticky-action-btn-cta {
    flex: 1;
    background-color: var(--Prim);
    color: #FFFFFF;
    font-weight: 700;
    text-align: center;
    border-radius: 50px;
    padding: 12px;
    font-size: 14px;
    text-decoration: none;
    margin-left: 10px;
  }

  .mobile-sticky-action-btn-cta:hover {
    color: #FFFFFF;
    text-decoration: none;
  }

  .mobile-sticky-action-btn-call {
    flex: 1;
    background-color: transparent;
    color: #222222;
    border: 2px solid #222222;
    font-weight: 700;
    text-align: center;
    border-radius: 50px;
    padding: 10px;
    font-size: 14px;
    text-decoration: none;
  }

  .mobile-sticky-action-btn-call:hover {
    color: #222222;
    text-decoration: none;
  }
}
