/* ============================================
   S & A Design — Custom Styles
   Colors based on about-us image:
   Steel blue #3A5568, Red accent #C0392B, Dark navy #1B2A38
   ============================================ */

:root {
  --primary: #C0392B;
  --secondary: #3A5568;
  --accent: #E74C3C;
  --dark: #1B2A38;
  --light: #F0F4F8;
  --text: #2C3E50;
  --text-light: #7F8C9B;
}

/* Smooth scroll via CSS (JS fallback in script.js) */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* Contain GSAP slide animations within section bounds */
#about_1,
#services_1,
#features_1,
#gallery_1,
#testimonials_1,
#contact_1,
#cta_1,
#faq_1 {
  overflow-x: hidden;
}

/* ============================================
   Navigation
   ============================================ */
.nav-transparent {
  background: transparent;
}
.nav-transparent .nav-logo-text,
.nav-transparent .nav-link,
.nav-transparent .nav-hamburger {
  color: white;
}
.nav-scrolled {
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}
.nav-scrolled .nav-logo-text,
.nav-scrolled .nav-link,
.nav-scrolled .nav-hamburger {
  color: var(--dark);
}
.nav-link {
  position: relative;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}
.nav-link:hover {
  color: var(--primary) !important;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-badge {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(192, 57, 43, 0.15);
}

/* ============================================
   Service Cards (Numbered list)
   ============================================ */
.service-card {
  background: white;
  border-radius: 16px;
  padding: 2rem 2.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  transition: all 0.4s ease;
  border: 1px solid transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}
.service-number {
  font-family: 'Sora', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--light);
  line-height: 1;
  transition: color 0.4s ease;
  min-width: 80px;
  text-align: center;
}
.service-card:hover .service-number {
  color: var(--primary);
}
.service-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  flex-shrink: 0;
}
.service-card:hover .service-icon-wrap {
  background: var(--primary);
  color: white;
}
.service-icon-wrap svg {
  width: 24px;
  height: 24px;
  color: var(--secondary);
  transition: color 0.4s ease;
}
.service-card:hover .service-icon-wrap svg {
  color: white;
}

@media (max-width: 768px) {
  .service-card {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem;
    text-align: center;
  }
  .service-number {
    font-size: 2.5rem;
  }
  .service-icon-wrap {
    margin: 0 auto;
  }
}

/* ============================================
   Feature Cards (Why Us)
   ============================================ */
.feature-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}
.feature-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}
.feature-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.feature-card:hover .feature-card-image img {
  transform: scale(1.08);
}
.feature-card-body {
  padding: 1.75rem;
  flex: 1;
}

/* ============================================
   Testimonials
   ============================================ */
.testimonial-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  transition: all 0.4s ease;
  position: relative;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}
.testimonial-quote-icon {
  width: 32px;
  height: 32px;
  color: var(--light);
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
.testimonial-card:hover .testimonial-quote-icon {
  color: rgba(192, 57, 43, 0.15);
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ============================================
   Gallery
   ============================================ */
.gallery-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/5;
}
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.gallery-card:hover img {
  transform: scale(1.08);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 42, 56, 0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery-card:hover .gallery-overlay {
  opacity: 1;
}
.gallery-overlay span {
  color: white;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}
.gallery-overlay small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}
.gallery-zoom-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s ease;
}
.gallery-card:hover .gallery-zoom-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   Contact Form
   ============================================ */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
  color: var(--text);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1);
}
.form-input::placeholder {
  color: #a0aec0;
}
.form-input.error {
  border-color: #e53e3e;
}
.form-label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.form-submit {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.form-submit:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(192, 57, 43, 0.3);
}
.form-submit:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.2);
}

/* ============================================
   Contact Info Cards
   ============================================ */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.contact-info-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(192, 57, 43, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-info-icon svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

/* ============================================
   About features checkmarks
   ============================================ */
.about-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  background: var(--light);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.about-feature-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.about-feature-icon svg {
  width: 14px;
  height: 14px;
  color: white;
}

/* ============================================
   About Info Cards (moved from hero)
   ============================================ */
.about-info-card {
  background: var(--light);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}
.about-info-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.about-info-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

/* ============================================
   FAQ Section
   ============================================ */
.faq-item {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: all 0.3s ease;
}
.faq-item:hover {
  border-color: var(--primary);
}
.faq-item.open {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(192, 57, 43, 0.1);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.faq-question:hover {
  background: var(--light);
}
.faq-chevron {
  transition: transform 0.3s ease;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
}

/* ============================================
   Footer links
   ============================================ */
.footer-link {
  color: #9ca3af;
  font-size: 0.875rem;
  transition: color 0.3s ease;
  display: block;
  padding: 0.15rem 0;
}
.footer-link:hover {
  color: var(--primary);
}

/* ============================================
   Scroll to top
   ============================================ */
#scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   Prefers reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   Mobile adjustments
   ============================================ */

/* Small phones ≤ 480px */
@media (max-width: 480px) {
  .hero-badge {
    font-size: 0.7rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #hero-stats > div {
    padding: 0.25rem;
  }
  #hero-stats .text-2xl,
  #hero-stats .md\:text-3xl {
    font-size: 1.25rem !important;
  }
  #hero-stats .text-xs,
  #hero-stats .md\:text-sm {
    font-size: 0.65rem !important;
  }

  .service-card {
    padding: 1.25rem 1rem;
  }

  .testimonial-card {
    padding: 1.25rem;
  }

  .feature-card-image {
    height: 180px;
  }
}

/* Info cards stack on small screens */
@media (max-width: 640px) {
  #about-info-cards {
    grid-template-columns: 1fr !important;
  }
}

/* Very small screens < 350px */
@media (max-width: 350px) {
  /* Reduce container padding */
  .max-w-7xl,
  .max-w-4xl {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Nav */
  #nav_1 > div {
    height: 3.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .nav-logo-text {
    font-size: 1rem !important;
  }
  #nav_1 img {
    height: 2rem;
  }

  /* Hero */
  #hero_1 h1 {
    font-size: 1.75rem !important;
    line-height: 1.2;
  }
  #hero_1 p {
    font-size: 0.875rem !important;
  }
  #hero_1 .flex.flex-col,
  #hero_1 .flex.sm\:flex-row {
    flex-direction: column !important;
  }
  #hero_1 .flex.flex-col a,
  #hero_1 .flex.sm\:flex-row a {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  /* Hero stats — stack vertically */
  #hero-stats {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
    max-width: 100% !important;
  }
  #hero-stats > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 0.5rem;
  }
  #hero-stats > div:first-child {
    border-top: none;
    padding-top: 0;
  }

  /* About features */
  #about-features {
    grid-template-columns: 1fr !important;
  }

  /* About image */
  .about-image img {
    max-height: 240px;
    object-fit: cover;
  }

  /* Features / Why Us cards */
  .feature-card-image {
    height: 150px;
  }

  /* Service cards */
  .service-card {
    padding: 1rem 0.75rem;
  }
  .service-card h3 {
    font-size: 1rem !important;
  }
  .service-number {
    font-size: 2rem;
    min-width: auto;
  }

  /* Contact */
  #contact_1 .bg-dark {
    padding: 1.25rem !important;
  }
  .contact-info-item span,
  .contact-info-item a {
    word-break: break-all;
    font-size: 0.85rem;
  }

  /* CTA banner */
  #cta_1 h2 {
    font-size: 1.5rem !important;
  }
  #cta_1 p {
    font-size: 0.875rem !important;
  }

  /* Floating buttons closer to edge */
  #scroll-top {
    left: 0.75rem;
    bottom: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
  }
  #whatsapp-btn {
    right: 0.75rem;
    bottom: 0.75rem;
    width: 3rem;
    height: 3rem;
  }

  /* Gallery cards */
  .gallery-card {
    aspect-ratio: 3/4;
  }

  /* Section padding */
  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
}

/* Form success message */
.form-success {
  text-align: center;
  padding: 2rem;
}
.form-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #d4edda;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.form-success-icon svg {
  width: 32px;
  height: 32px;
  color: #28a745;
}