/* ==========================================
   DAYTONA SITEWIDE RESPONSIVE FIXES
   Load after your main child theme CSS files.
========================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

/* Shared container safety */
.container {
  width: min(100% - 32px, 1180px);
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================
   GLOBAL MOBILE ALIGNMENT
========================================== */

@media (max-width: 900px) {
  .section-header,
  .internal-hero__inner,
  .internal-copy,
  .gallery-cta__inner,
  .internal-cta__inner {
    text-align: center;
  }

  .section-sub,
  .internal-hero p,
  .internal-copy p,
  .gallery-cta p,
  .internal-cta p {
    margin-left: auto;
    margin-right: auto;
  }

  .btn,
  .service-card__link,
  .blog-card__readmore {
    justify-content: center;
  }
}

/* ==========================================
   INTERNAL PAGES: ABOUT / SERVICES / CONTACT
========================================== */

@media (max-width: 1024px) {
  .internal-split,
  .internal-contact-layout,
  .internal-cta__inner,
  .gallery-cta__inner {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .internal-split,
  .internal-contact-layout {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
  }

  .internal-card-stack,
  .internal-contact-card,
  .internal-contact-form {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .internal-hero {
    padding-top: 96px;
    padding-bottom: 70px;
  }

  .internal-hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.9rem);
    line-height: 1;
  }

  .internal-section {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .internal-services-grid {
    grid-template-columns: 1fr;
  }

  .internal-service-card,
  .internal-feature-card,
  .internal-contact-card,
  .contact-card {
    text-align: center;
  }

  .internal-contact-list a,
  .internal-contact-list div {
    align-items: center;
    text-align: center;
  }

  .internal-cta__inner,
  .gallery-cta__inner {
    align-items: center;
    text-align: center;
  }

  .internal-cta__inner .btn,
  .gallery-cta__inner .btn {
    width: 100%;
    max-width: 340px;
  }
}

/* Contact forms */
@media (max-width: 640px) {
  .form-row,
  .the-form .form-row {
    grid-template-columns: 1fr !important;
  }

  .form-group label {
    text-align: left;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .btn--full {
    width: 100%;
  }
}

/* ==========================================
   SERVICES HUB + INDIVIDUAL SERVICE PAGES
========================================== */

@media (max-width: 1024px) {
  .service-detail-layout {
    grid-template-columns: 1fr;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
  }

  .service-sidebar-card {
    position: static;
  }

  .service-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-hub-group > h3 {
    text-align: center;
  }
}

@media (max-width: 700px) {
  .service-related-grid {
    grid-template-columns: 1fr;
  }

  .service-detail-card,
  .service-sidebar-card,
  .service-related-card {
    text-align: center;
  }

  .service-list li {
    text-align: left;
  }

  .service-sidebar-actions .btn {
    width: 100%;
  }
}

/* ==========================================
   GALLERY PAGE
========================================== */

@media (max-width: 1000px) {
  .gallery-grid-custom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-toolbar {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .gallery-section {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .gallery-grid-custom {
    grid-template-columns: 1fr;
  }

  .gallery-filter {
    width: 100%;
    max-width: 360px;
  }

  .gallery-card__body {
    text-align: center;
  }

  .gallery-lightbox {
    padding: 16px;
  }

  .gallery-lightbox__close {
    top: 12px;
    right: 12px;
  }
}

/* ==========================================
   HOMEPAGE
========================================== */

@media (max-width: 1024px) {
  .hero__inner,
  .quote-section__inner,
  .why-inner {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .hero__copy,
  .hero__panel,
  .quote-section__info,
  .quote-section__form,
  .why-image,
  .why-reasons {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__copy,
  .quote-section__info,
  .why-reasons {
    text-align: center;
  }

  .hero__ctas {
    justify-content: center;
  }

  .check-list {
    display: grid;
    justify-items: center;
  }

  .check-list li {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero {
    padding-top: 110px;
    padding-bottom: 70px;
  }

  .hero__heading {
    font-size: clamp(2.6rem, 13vw, 4.2rem);
    line-height: 0.98;
  }

  .hero__ctas {
    display: grid;
    width: 100%;
    gap: 12px;
  }

  .hero__ctas .btn {
    width: 100%;
  }

  .services-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .blog-card__body {
    text-align: center;
  }

  .service-card__icon {
    margin-left: auto;
    margin-right: auto;
  }

  .why-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 26px;
  }

  .stat-divider {
    width: 100%;
    height: 1px;
  }

  .areas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .area-chip {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .areas-grid {
    grid-template-columns: 1fr;
  }
}

/* Before / After */
.before-after-card {
  height: 100%;
}

.before-after-card__images {
  height: 280px;
}

.before-after-image {
  height: 280px;
}

.before-after-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.before-after-card__body {
  min-height: 116px;
}

@media (max-width: 900px) {
  .before-after-grid {
    grid-template-columns: 1fr;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
  }

  .before-after-card__body {
    text-align: center;
  }
}

@media (max-width: 560px) {
  .before-after-card__images {
    grid-template-columns: 1fr;
    height: auto;
  }

  .before-after-image {
    height: 220px;
  }

  .before-after-image + .before-after-image {
    border-left: 0;
    border-top: 1px solid #ffffff;
  }

  .before-after-card__body {
    min-height: auto;
    padding: 18px 18px 22px;
  }
}

/* ==========================================
   FOOTER
========================================== */

@media (max-width: 1100px) {
  .custom-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;
  }
}

@media (max-width: 700px) {
  .custom-site-footer {
    text-align: center;
  }

  .footer-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .custom-footer__inner {
    grid-template-columns: 1fr;
  }

  .custom-footer__col {
    align-items: center;
  }

  .custom-footer__col a,
  .custom-footer__col p {
    text-align: center;
  }

  .footer-contact-item {
    justify-content: center;
  }

  .custom-footer__bottom {
    flex-direction: column;
    gap: 18px;
    text-align: center;
  }

  .custom-footer__bottom nav {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 460px) {
  .footer-gallery {
    grid-template-columns: 1fr;
  }

  .footer-gallery img {
    max-height: 90px;
    object-fit: contain;
  }
}

/* ==========================================
   SERVICES HUB — FULL WIDTH LIKE BEFORE
========================================== */

.service-hub-section .container {
  max-width: 1180px;
}

.service-hub-group {
  margin-bottom: 72px;
}

/* Keep service titles left aligned */
.service-hub-group > h3 {
  margin-bottom: 26px;
  text-align: left;
}

/* Restore natural full-width layout */
.service-hub-group .internal-services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
}

/* Keep cards consistent height */
.service-hub-group .internal-service-card {
  text-align: left;
  height: 100%;
}

/* Mobile only */
@media (max-width: 768px) {
  .service-hub-group > h3 {
    text-align: center;
  }

  .service-hub-group .internal-services-grid {
    grid-template-columns: 1fr;
  }

  .service-hub-group .internal-service-card {
    text-align: center;
  }
}

/* ==========================================
   MOBILE MENU (KADENCE)
========================================== */

.mobile-navigation ul li a {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mobile-navigation ul li.menu-item-has-children > a {
  font-weight: 800;
}

.mobile-navigation ul li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Off-canvas background */
.drawer-content {
  background: #1f2426;
}

/* Links */
.drawer-content .mobile-navigation a {
  color: #ffffff;
}

/* Hover */
.drawer-content .mobile-navigation a:hover {
  color: var(--global-palette-highlight);
}

/* Hamburger icon */
.menu-toggle-open {
  color: #ffffff;
}

/* Bigger tap targets */
.mobile-navigation ul li a {
  padding: 16px 22px;
}

/* ==========================================
   KADENCE MOBILE HEADER FIX
========================================== */

@media (max-width: 768px) {
  .site-header,
  .site-main-header-wrap,
  .site-main-header-inner-wrap {
    min-height: 72px;
  }

  .site-header .site-branding,
  .site-header .site-branding a {
    max-width: 170px;
  }

  .site-header .custom-logo,
  .site-header .site-branding img {
    max-width: 150px;
    height: auto;
  }

  .mobile-toggle-open-container,
  .menu-toggle-open {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .menu-toggle-open {
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .menu-toggle-open .menu-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-header-row-container-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-header-section-left {
    min-width: 0;
  }

  .site-header-section-right {
    flex-shrink: 0;
  }
}

@media (max-width: 420px) {
  .site-header .site-branding,
  .site-header .site-branding a {
    max-width: 140px;
  }

  .site-header .custom-logo,
  .site-header .site-branding img {
    max-width: 125px;
  }

  .site-header-row-container-inner {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* ==========================================
   KADENCE MOBILE HEADER / LOGO FIX
========================================== */

@media (max-width: 768px) {
  .site-header {
    position: absolute;
    width: 100%;
    z-index: 9999;
  }

  .site-main-header-wrap,
  .site-main-header-inner-wrap,
  .site-header-row-container-inner {
    min-height: 78px;
  }

  .site-header-row-container-inner {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .site-header-section-left {
    min-width: 0;
    flex: 1;
  }

  .site-header-section-right {
    flex: 0 0 auto;
  }

  .site-branding,
  .site-branding a {
    max-width: 115px !important;
    width: 115px !important;
  }

  .site-branding img,
  .custom-logo {
    width: 115px !important;
    max-width: 115px !important;
    height: auto !important;
  }

  .mobile-toggle-open-container {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .menu-toggle-open {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
  }

  .menu-toggle-open .menu-toggle-icon,
  .menu-toggle-open svg {
    width: 28px !important;
    height: 28px !important;
  }

  .internal-hero {
    padding-top: 130px !important;
  }
}

@media (max-width: 420px) {
  .site-branding,
  .site-branding a {
    max-width: 96px !important;
    width: 96px !important;
  }

  .site-branding img,
  .custom-logo {
    width: 96px !important;
    max-width: 96px !important;
  }

  .site-header-row-container-inner {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .internal-hero {
    padding-top: 120px !important;
  }
}

/* ==========================================
   MOBILE HEADER CLEAN FIX
========================================== */

@media (max-width: 768px) {
  .site-header {
    position: absolute;
    width: 100%;
    z-index: 9999;
  }

  @media (max-width: 768px) {
    .site-branding {
      transform: translateY(26px);
    }

    .site-header-section-right {
      transform: translateY(10px);
    }
  }

  .site-header-row-container-inner {
    min-height: 74px;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .site-header-section-left {
    position: static !important;
    transform: none !important;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
  }

  .site-header-section-right {
    flex: 0 0 auto;
    margin-left: auto;
    justify-content: flex-end;
  }

  .site-branding,
  .site-branding a {
    width: 88px !important;
    max-width: 88px !important;
  }

  .site-branding img,
  .custom-logo {
    width: 88px !important;
    max-width: 88px !important;
    height: auto !important;
  }

  .menu-toggle-open {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
  }

  .menu-toggle-open svg,
  .menu-toggle-open .menu-toggle-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .hero,
  .internal-hero {
    padding-top: 118px !important;
  }

  .internal-hero::after,
  .gallery-page .internal-hero::after {
    display: none !important;
  }
}

@media (max-width: 420px) {
  .site-branding,
  .site-branding a,
  .site-branding img,
  .custom-logo {
    width: 76px !important;
    max-width: 76px !important;
  }

  .site-header-row-container-inner {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .hero,
  .internal-hero {
    padding-top: 108px !important;
  }
}

/* ==========================================
   MOBILE MENU ARROW FIX
========================================== */

.drawer-content .menu-item-has-children > .drawer-sub-toggle {
  color: #ffffff !important;
  opacity: 0.9;
}

.drawer-content .menu-item-has-children > .drawer-sub-toggle:hover {
  color: #ffffff !important;
  opacity: 1;
}

/* SVG chevrons */
.drawer-content .drawer-sub-toggle svg,
.drawer-content .drawer-sub-toggle path {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

/* Slightly larger tap target */
.drawer-content .drawer-sub-toggle {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================
   FOOTER COPYRIGHT MOBILE FIX
========================================== */

@media (max-width: 768px) {
  .custom-footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
  }

  .custom-footer__bottom p {
    margin: 0;
    max-width: 320px;
    line-height: 1.55;
    font-size: 0.95rem;
    text-align: center;
    word-break: normal;
  }

  .custom-footer__bottom nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 26px;
  }

  .custom-footer__bottom nav a {
    white-space: nowrap;
  }
}

/* ==========================================
   FOOTER BOTTOM MOBILE CLEANUP
========================================== */

@media (max-width: 768px) {
  .custom-footer__bottom {
    gap: 20px;
  }

  .custom-footer__bottom p {
    max-width: 100%;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
  }

  .custom-footer__bottom nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: center;
    margin: 0 auto;
  }

  .custom-footer__bottom nav a {
    font-size: 1rem;
    line-height: 1.35;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .footer-map-choice__options {
    justify-content: center;
    margin-left: 0;
  }
}

/* ==========================================
   REDUCED MOTION
   For visitors who turn on "reduce motion" in
   their device settings: no smooth scrolling,
   near-instant transitions/animations, and no
   hover lift or zoom effects.
========================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover,
  .service-card:hover,
  .service-area-card:hover,
  .service-related-card:hover,
  .area-service-links a:hover,
  .internal-contact-list a:hover,
  .contact-map-choice:hover,
  .internal-contact-list a.contact-map-choice__link:hover,
  .custom-footer__col a.footer-map-choice__link:hover,
  .footer-gallery img:hover,
  .gallery-filter:hover,
  .gallery-card:hover,
  .gallery-card:hover .gallery-card__image img,
  .gallery-item:hover img {
    transform: none !important;
  }
}

/* "Skip to content" moves focus to the page wrapper; no outline around the whole page. */
#main:focus {
  outline: none;
}

/* ==========================================
   PHONE CALL / QUOTE BAR
   Fixed to the bottom of the screen on phones;
   the page gets matching bottom space so the
   footer is never hidden behind it.
========================================== */

.mobile-action-bar {
  display: none;
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .mobile-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(31, 36, 38, 0.97);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
  }

  .mobile-action-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border: 2px solid #ffffff;
    border-radius: 14px;
    font-weight: 850;
    text-decoration: none;
  }

  .mobile-action-bar__call,
  .mobile-action-bar__call:visited,
  .mobile-action-bar__call:focus {
    background: transparent;
    color: #ffffff;
  }

  .mobile-action-bar__quote,
  .mobile-action-bar__quote:visited,
  .mobile-action-bar__quote:focus {
    background: #ffffff;
    color: #1f2426;
  }

  .mobile-action-bar a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  a.area-chip:hover,
  .why-actions__link:hover svg {
    transform: none !important;
  }
}

@media (max-width: 640px) {
  .hero .rating-badge {
    justify-content: center;
  }

  .why-actions {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tip-card:hover .blog-card__image-link img {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-map-choice__options a:hover {
    transform: none !important;
  }
}
