/* ===================================
   ARBOR TREE EXPERTS - CUSTOM STYLES
   Fresh & Airy | Midnight Blue + Mint
   =================================== */

:root {
  --midnight: #0f2b4c;
  --midnight-light: #1a3a5c;
  --midnight-dark: #091a2e;
  --mint: #7ecba1;
  --mint-light: #a8d8ba;
  --mint-lighter: #d4f0e2;
  --mint-pale: #f0faf4;
  --cream: #faf9f6;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --shadow-sm: 0 1px 3px rgba(15, 43, 76, 0.08);
  --shadow-md: 0 4px 20px rgba(15, 43, 76, 0.1);
  --shadow-lg: 0 10px 40px rgba(15, 43, 76, 0.12);
  --shadow-xl: 0 20px 60px rgba(15, 43, 76, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--midnight);
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

.text-mint { color: var(--mint); }

.lead {
  font-size: 1.15rem;
  color: var(--gray-600);
  line-height: 1.8;
}

/* Section Labels */
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 12px;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--mint);
  color: var(--midnight-dark);
}

.btn-primary:hover {
  background: var(--mint-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--midnight);
  border-color: var(--white);
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Loader */
.loader-container {
  position: fixed;
  inset: 0;
  background: var(--midnight);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-container.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-circle {
  width: 48px;
  height: 48px;
  border: 3px solid var(--mint-lighter);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  font-family: 'Outfit', sans-serif;
}

.navbar.scrolled .logo {
  color: var(--midnight);
}

.logo-icon {
  color: var(--mint);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--mint);
}

.navbar.scrolled .nav-links a {
  color: var(--gray-600);
}

.navbar.scrolled .nav-links a:hover {
  color: var(--midnight);
}

.nav-links .btn-primary {
  color: var(--midnight-dark);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar.scrolled .mobile-toggle span {
  background: var(--midnight);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(9, 26, 46, 0.85) 0%,
    rgba(15, 43, 76, 0.7) 50%,
    rgba(26, 58, 92, 0.6) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 80px;
}

.hero-text {
  max-width: 700px;
}

.badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.badge-mint {
  background: rgba(126, 203, 161, 0.2);
  color: var(--mint-light);
  border: 1px solid rgba(126, 203, 161, 0.3);
}

.hero h1 {
  color: var(--white);
  margin-bottom: 24px;
  font-weight: 600;
}

.hero h1 .text-mint {
  color: var(--mint);
}

.hero > .container > .hero-text > p {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-stats {
  display: flex;
  gap: 48px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--mint);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.5; transform: scaleY(0.7); }
}

/* Services Section */
.services {
  padding: 120px 0;
  background: var(--cream);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--mint-lighter);
}

.service-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--mint-pale);
  color: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--mint);
  color: var(--midnight-dark);
}

.service-card h3 {
  margin-bottom: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.service-card p {
  color: var(--gray-500);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* About Section */
.about {
  padding: 120px 0;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  position: relative;
}

.image-main {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.image-main img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.image-accent {
  position: absolute;
  bottom: -40px;
  right: -40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--white);
}

.image-accent img {
  width: 280px;
  height: 200px;
  object-fit: cover;
}

.experience-badge {
  position: absolute;
  top: -20px;
  left: -20px;
  background: var(--midnight);
  color: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.exp-number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--mint);
  line-height: 1;
}

.exp-text {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
}

.about-content .section-label {
  text-align: left;
}

.about-content h2 {
  margin-bottom: 24px;
}

.about-content > p {
  color: var(--gray-500);
  margin-bottom: 16px;
}

.about-content > p.lead {
  color: var(--gray-600);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 40px 0;
}

.feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--mint-pale);
  color: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.feature h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--midnight);
  margin-bottom: 4px;
}

.feature p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.about-content .btn {
  margin-top: 8px;
}

/* Gallery Section */
.gallery {
  padding: 120px 0;
  background: var(--cream);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(2, 280px);
  gap: 20px;
}

.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 43, 76, 0.8), transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: var(--white);
  font-weight: 500;
  font-size: 1rem;
}

.gallery-item:nth-child(1) { grid-column: span 7; }
.gallery-item:nth-child(2) { grid-column: span 5; }
.gallery-item:nth-child(3) { grid-column: span 5; }
.gallery-item:nth-child(4) { grid-column: span 4; }
.gallery-item:nth-child(5) { grid-column: span 8; }

/* CTA Section */
.cta {
  position: relative;
  padding: 120px 0;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
}

.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(9, 26, 46, 0.9), rgba(15, 43, 76, 0.85));
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  color: var(--white);
  margin-bottom: 20px;
}

.cta-content > p {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Contact Section */
.contact {
  padding: 120px 0;
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info .section-label {
  text-align: left;
}

.contact-info h2 {
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--gray-500);
  margin-bottom: 40px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.contact-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: var(--radius-md);
  background: var(--mint-pale);
  color: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--midnight);
  margin-bottom: 4px;
}

.contact-item p {
  color: var(--gray-500);
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-item a {
  color: var(--midnight);
}

.contact-item a:hover {
  color: var(--mint);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--cream);
  border-radius: var(--radius-xl);
  padding: 48px;
}

.contact-form h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--midnight);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  color: var(--gray-800);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(126, 203, 161, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.form-success svg {
  color: var(--mint);
  margin-bottom: 16px;
}

.form-success h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--midnight);
  margin-bottom: 8px;
}

.form-success p {
  color: var(--gray-500);
}

/* Map Section */
.map-section {
  height: 400px;
  filter: grayscale(20%);
}

.map-section iframe {
  width: 100%;
  height: 100%;
}

/* Footer */
.footer {
  background: var(--midnight-dark);
  padding: 80px 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
}

.footer-links h4,
.footer-contact h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
  font-size: 1rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--mint);
}

.footer-contact p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-contact a {
  color: rgba(255,255,255,0.5);
}

.footer-contact a:hover {
  color: var(--mint);
}

.footer-bottom {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
}

/* Animations */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="slide-left"] {
  transform: translateX(-40px);
}

[data-animate="slide-right"] {
  transform: translateX(40px);
}

[data-animate].animated {
  opacity: 1;
  transform: translate(0, 0);
}

[data-animate][data-delay="100"] { transition-delay: 0.1s; }
[data-animate][data-delay="200"] { transition-delay: 0.2s; }
[data-animate][data-delay="300"] { transition-delay: 0.3s; }
[data-animate][data-delay="400"] { transition-delay: 0.4s; }
[data-animate][data-delay="500"] { transition-delay: 0.5s; }
[data-animate][data-delay="600"] { transition-delay: 0.6s; }

/* Responsive */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-grid {
    gap: 48px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--midnight);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a {
    color: rgba(255,255,255,0.85) !important;
    font-size: 1.1rem;
  }
  
  .nav-links a:hover {
    color: var(--mint) !important;
  }
  
  .hero-stats {
    gap: 32px;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .about-image {
    max-width: 500px;
  }
  
  .image-accent {
    right: -20px;
    bottom: -20px;
  }
  
  .image-accent img {
    width: 200px;
    height: 150px;
  }
  
  .about-features {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  
  .gallery-item:nth-child(n) {
    grid-column: span 1;
  }
  
  .gallery-item img {
    height: 250px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .contact-form-wrapper {
    padding: 32px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero-stats {
    flex-wrap: wrap;
    gap: 24px;
  }
  
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .contact-form-wrapper {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .service-card:hover {
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  
  [data-animate] {
    opacity: 1;
    transform: none;
  }
  
  html {
    scroll-behavior: auto;
  }
}
