/* Custom Styles - Professional UI/UX Design */
* {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

body {
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.75;
    color: #1f2937;
    font-size: 17px;
}

@media (min-width: 768px) {
    body {
        font-size: 18px;
    }
}

@media (min-width: 1024px) {
    body {
        font-size: 19px;
    }
}

/* Typography Enhancement */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    line-height: 1.85;
    font-size: 1.05rem;
}

/* Readable content text */
.text-gray-600 {
    font-size: 1.05rem;
    line-height: 1.85;
}

/* Leading relaxed paragraphs */
.leading-relaxed {
    line-height: 1.85 !important;
    font-size: 1.05rem;
}

/* List items in content */
section li span,
section li {
    font-size: 1.02rem;
    line-height: 1.75;
}

/* Bump up small card descriptions for readability */
.card-hover p.text-sm,
.card-hover .text-sm,
section .rounded-xl p.text-sm,
section .rounded-lg p.text-sm,
section .rounded-xl .text-sm:not(nav .text-sm),
section .rounded-lg .text-sm:not(nav .text-sm) {
    font-size: 0.975rem !important;
    line-height: 1.75;
}

/* Service area lists readable */
section ul.space-y-2 li {
    font-size: 1rem;
    line-height: 1.75;
}

/* Stats text readable */
.stat-card .text-sm,
section .bg-emerald-50 .text-sm {
    font-size: 0.975rem !important;
}

/* Content section text-gray-700 */
section .text-gray-700 {
    font-size: 1.02rem;
    line-height: 1.8;
}

/* Shared responsive content width for every template and screen size. */
.container {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.btn-primary {
}

.btn-secondary {
}

.btn-outline {
}

.form-input {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-input:hover {
    border-color: #d1d5db;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: #d1d5db;
}

.form-input:valid:not(:placeholder-shown) {
    border-color: #d1d5db;
}

/* Compact Form Input for Hero Section */
.form-input-compact {
    width: 100% !important;
    max-width: 100%;
    padding: 0.625rem 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #ffffff;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-height: 42px;
    cursor: text;
    display: block;
    box-sizing: border-box;
    margin: 0;
}

.form-input-compact:hover {
    border-color: #d1d5db;
}

.form-input-compact::placeholder {
    color: #9ca3af;
    font-size: 0.875rem;
}

.form-input-compact:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
    outline: none;
}

.form-input-compact:invalid:not(:placeholder-shown) {
    border-color: #d1d5db;
}

.form-input-compact:valid:not(:placeholder-shown) {
    border-color: #d1d5db;
}

/* Ensure form inputs take full width */
.form-input-compact,
input[type="text"].form-input-compact,
input[type="number"].form-input-compact,
input[type="tel"].form-input-compact,
input.form-input-compact {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Grid columns full width */
.grid.grid-cols-2 > div {
    width: 100%;
}

.grid.grid-cols-2 > div input {
    width: 100% !important;
}

.stat-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.stat-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.stat-card:nth-child(1) {
    transition-delay: 0.1s;
}

.stat-card:nth-child(2) {
    transition-delay: 0.2s;
}

.stat-card:nth-child(3) {
    transition-delay: 0.3s;
}

.stat-card:nth-child(4) {
    transition-delay: 0.4s;
}

.stat-number {
    transition: all 0.3s ease;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Details/Summary styling */
details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: '+';
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s;
}

details[open] summary::after {
    transform: rotate(45deg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Hero Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-animate-1 {
    animation: fadeInLeft 1s ease-out;
}

.hero-animate-2 {
    animation: fadeInRight 1s ease-out 0.2s;
    animation-fill-mode: both;
}

.hero-animate-3 {
    animation: scaleIn 0.8s ease-out 0.4s;
    animation-fill-mode: both;
}

/* Improved Spacing with Balanced Layout */
.section-padding {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 5rem 0;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding: 6rem 0;
    }
}

/* Content Max Width for Better Readability */
.content-wrapper {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (min-width: 768px) {
    .content-wrapper {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

@media (min-width: 1024px) {
    .content-wrapper {
        padding-left: 5rem;
        padding-right: 5rem;
    }
}

/* Enhanced Cards */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Back to Top Button Enhancement */
#scrollToTop {
    transition: all 0.3s ease;
}

#scrollToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4);
}

/* Blob Animation for Hero */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Gradient Animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
}

/* Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Smooth Transitions */
a, button, input, textarea {
    transition: all 0.2s ease;
}

/* Loading Skeleton */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Stats Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-animate {
    animation: countUp 0.6s ease-out;
}

/* Trust Badge Glow */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    }
}

.trust-badge {
    animation: glow 2s ease-in-out infinite;
}

/* CTA Button Enhancement */
.cta-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.cta-primary:hover::before {
    left: 100%;
}

/* Testimonial Card */
.testimonial-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.02);
}

/* Mobile Optimization */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.35rem;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
}

/* Logo Scrolling Animation */
.logo-scroll-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1.5rem 0;
    background: transparent;
}

/* Force animation to start */
.logo-scroll-track {
    animation: scroll-left 150s linear infinite !important;
}

/* Ensure smooth continuous animation */
.logo-scroll-container::before,
.logo-scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.logo-scroll-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(249, 250, 251, 1), transparent);
}

.logo-scroll-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(249, 250, 251, 1), transparent);
}

.logo-scroll-track {
    display: flex;
    gap: 1.5rem;
    animation: scroll-left 150s linear infinite;
    width: fit-content;
    will-change: transform;
    animation-fill-mode: both;
}

.logo-scroll-track:hover {
    animation-play-state: paused;
}

/* Smooth continuous scroll - seamless loop */
@keyframes scroll-left {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% - 0.75rem));
    }
}

.logo-item {
    flex-shrink: 0;
    width: 280px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: none;
    opacity: 1;
    transition: all 0.3s ease;
    padding: 1.5rem;
}

.logo-item:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    filter: none;
}


/* Mobile responsive for logo scroll */
@media (max-width: 768px) {
    .logo-scroll-track {
        gap: 1.25rem;
        animation: scroll-left 120s linear infinite;
    }
    
    .logo-item {
        width: 180px;
        height: 110px;
        padding: 1rem;
    }
}

/* Grid Pattern Background */
.bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Gradient Text Animation */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% auto;
    animation: gradient-shift 3s ease infinite;
}

/* Ping Animation Enhancement */
@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Hero Section Background */
.hero-section {
    position: relative;
    padding-top: 1rem;
}

@media (min-width: 768px) {
    .hero-section {
        padding-top: 1.5rem;
    }
}

/* Hero Background Image Positioning - Right Side Focus */
.hero-section img {
    object-position: right center;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-section .object-right-center {
    object-position: right center !important;
}

@media (max-width: 768px) {
    .hero-section img {
        object-position: right center;
    }
}

@media (max-width: 640px) {
    .hero-section img {
        object-position: right center;
    }
}

/* Dropdown Menu Smooth Animation */
.group {
    position: relative;
}

.group > a + div,
.group > span + div {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.group:hover > a + div,
.group:focus-within > a + div,
.group:hover > span + div,
.group:focus-within > span + div {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Keep dropdown visible when hovering dropdown itself */
.group > a + div:hover,
.group > span + div:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Dropdown Menu Styling */
.group > a + div a,
.group > span + div a {
    position: relative;
    overflow: hidden;
}

.group > a + div a::before,
.group > span + div a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #14b8a6);
    transition: width 0.3s ease;
}

.group > a + div a:hover::before,
.group > span + div a:hover::before {
    width: 100%;
}

/* Bridge gap between parent and dropdown */
.group > a + div::before,
.group > span + div::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

/* Ensure dropdown stays visible */
.group:hover > a + div,
.group > a + div:hover,
.group:hover > span + div,
.group > span + div:hover {
    display: block !important;
}

/* Mobile Menu Smooth Slide */
#mobileMenu {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenuOverlay {
    transition: opacity 0.3s ease;
}

/* Page Content Structure */
.page-content {
    min-height: 60vh;
}

/* Section Headers */
.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-header h2 {
        font-size: 2.5rem;
    }
}

.section-header p {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.8;
}

/* Card Grid Consistency */
.service-card-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .service-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .service-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Content Spacing */
.content-section {
    padding: 4rem 0;
}

@media (min-width: 768px) {
    .content-section {
        padding: 5rem 0;
    }
}

@media (min-width: 1024px) {
    .content-section {
        padding: 6rem 0;
    }
}

/* FAQ Styling */
.faq-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.faq-item p,
.faq-toggle + div p {
    font-size: 1.05rem;
    line-height: 1.85;
}

/* FAQ question headings */
.faq-item summary,
.faq-item h3 {
    font-size: 1.1rem;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Process Steps */
.process-step {
    position: relative;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Hero CTA Buttons */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}



/* Astro accessibility and integration safeguards. */
[hidden] { display: none !important; }
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: 0.5rem;
  background: #111827;
  color: #fff;
  padding: 0.75rem 1rem;
}
.skip-link:focus { transform: translateY(0); }
.honeypot-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.form-status {
  margin-bottom: 1rem;
  border-left: 4px solid #dc2626;
  border-radius: 0.5rem;
  background: #fee2e2;
  color: #7f1d1d;
  padding: 0.875rem 1rem;
  font-weight: 600;
}
.stat-card:not(.stat-item) {
  opacity: 1;
  transform: none;
}
#locations-menu,
.header-location-grid { gap: 1rem !important; }
.mobile-contact-grid { gap: 0.5rem !important; }
.footer-primary-grid { column-gap: 2rem !important; row-gap: 2.5rem !important; }
.footer-location-grid { column-gap: 1.5rem !important; row-gap: 2rem !important; }
.mobile-action-bar {
  gap: 0 !important;
  padding-bottom: env(safe-area-inset-bottom, 0);
  transform: translateY(0);
  opacity: 1;
  transition: transform 220ms ease, opacity 180ms ease;
}
.mobile-action-bar.mobile-action-bar--hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}
[data-accordion-trigger][aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
[data-desktop-dropdown] [data-dropdown-trigger][aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
[data-site-header] [aria-current="page"]:not([data-cta-id]) {
  background: #ecfdf5;
  color: #047857;
}
[data-site-header] section li,
[data-site-footer] section li {
  font-size: inherit;
  line-height: inherit;
}
body.mobile-menu-open { overflow: hidden; }
@media (max-width: 767px) {
  .hero-section {
    min-height: 0 !important;
    padding-top: 0 !important;
    align-items: flex-start !important;
  }
  .hero-section > .container {
    max-width: none !important;
    padding: 1rem 1rem 2rem !important;
  }
  .hero-section > .container > .grid {
    gap: 1.5rem !important;
  }
  .hero-section .hero-animate-1 {
    padding-top: 1.5rem !important;
  }
}
@media (min-width: 768px) {
  .hero-section > .container {
    max-width: 1440px !important;
    padding-left: clamp(2rem, 4vw, 3.5rem) !important;
    padding-right: clamp(2rem, 4vw, 3.5rem) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
}
