/* ========================================
   AMSM Servis - Custom Styles
   Design: Sharp & Corporate
   Colors: Earth Tones (Slate, Charcoal, Amber)
   Animation: Fade & Rise + Stagger Cascade
   ======================================== */

/* CSS Custom Properties */
:root {
  --primary: #C4742E;
  --secondary: #1C2331;
  --accent: #D4943A;
  --dark: #0F1419;
  --light: #F7F5F2;
  --text: #2D2D2D;
  --text-light: #7A7A7A;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-y: scroll;
}

body {
  overflow: visible;
}

main {
  overflow: visible;
}

/* Hide inner scrollbars (not the main browser scrollbar) */
main,
main *:not(html):not(body),
section,
video,
nav,
footer {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

main::-webkit-scrollbar,
main *:not(html):not(body)::-webkit-scrollbar,
section::-webkit-scrollbar,
video::-webkit-scrollbar,
nav::-webkit-scrollbar,
footer::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ========================================
   NAVIGATION
   ======================================== */
#nav_1 {
  background: transparent;
}

#nav_1.scrolled {
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-logo {
  color: #fff;
  transition: color 0.4s ease;
}

#nav_1.scrolled .nav-logo {
  color: var(--secondary);
}

#nav_1 .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

#nav_1 .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

#nav_1 .nav-link:hover::after {
  width: 100%;
}

#nav_1.scrolled .nav-link {
  color: var(--text);
}

#nav_1.scrolled .nav-link:hover {
  color: var(--primary);
}

/* Hamburger */
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.35s ease;
  border-radius: 2px;
}

.hamburger-line.top { top: 12px; }
.hamburger-line.mid { top: 19px; }
.hamburger-line.bot { top: 26px; }

#nav_1.scrolled .hamburger-line {
  background: var(--secondary);
}

.menu-open .hamburger-line.top {
  top: 19px;
  transform: translateX(-50%) rotate(45deg);
}

.menu-open .hamburger-line.mid {
  opacity: 0;
}

.menu-open .hamburger-line.bot {
  top: 19px;
  transform: translateX(-50%) rotate(-45deg);
}

.menu-open .hamburger-line {
  background: #fff !important;
}

#mobile-menu .nav-link-mobile {
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

#mobile-menu .nav-link-mobile:hover {
  color: var(--primary);
}

/* ========================================
   HERO
   ======================================== */
.hero-video {
  z-index: 0;
  pointer-events: none;
}

/* Hide any scrollbars inside the site */
#hero_1 {
  overflow: hidden;
}

video::-webkit-media-controls {
  display: none !important;
}

video::-webkit-scrollbar {
  display: none;
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(15, 20, 25, 0.8) 0%,
    rgba(28, 35, 49, 0.65) 40%,
    rgba(196, 116, 46, 0.25) 100%
  );
  z-index: 1;
}

/* Featured Image */
.hero-featured-wrap {
  position: relative;
  z-index: 2;
}

.hero-featured-image {
  position: relative;
}

.hero-img-frame {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-img-frame img {
  transition: transform 0.7s ease;
}

.hero-img-frame:hover img {
  transform: scale(1.04);
}

.hero-deco-border {
  z-index: 1;
  animation: decoFloat 4s ease-in-out infinite alternate;
}

.hero-deco-accent {
  z-index: 1;
  animation: decoFloat 5s ease-in-out infinite alternate-reverse;
}

.hero-deco-dots {
  z-index: 3;
}

@keyframes decoFloat {
  0% { transform: translate(0, 0); }
  100% { transform: translate(6px, -6px); }
}



/* ========================================
   ABOUT (Diagonal Split)
   ======================================== */
.about-diagonal {
  background: #fff;
}

.about-diagonal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--secondary);
  -webkit-clip-path: polygon(0 40%, 100% 0%, 100% 100%, 0 100%);
  clip-path: polygon(0 40%, 100% 0%, 100% 100%, 0 100%);
  z-index: 0;
}

.about-diagonal > .max-w-7xl {
  position: relative;
  z-index: 1;
}

/* About text colors adapt to the diagonal dark bg */
.about-diagonal .about-text span[data-field="label"] {
  color: var(--primary);
}

.about-diagonal .about-text p[data-field="text"] {
  color: rgba(255, 255, 255, 0.7);
}

.about-diagonal .about-text h2 {
  color: #fff;
}

.about-diagonal .about-text .w-16 {
  background: var(--primary);
}

.about-diagonal .stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-diagonal .stat-value {
  color: var(--primary);
}

.about-diagonal .stat-label {
  color: rgba(255, 255, 255, 0.6);
}

.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 12px;
  background: var(--light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.stat-value {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--primary);
  line-height: 1.1;
}

.stat-label {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ========================================
   SERVICES (Horizontal Showcase Slider)
   ======================================== */
.services-showcase {
  position: relative;
}

#service-image-display {
  background: var(--secondary);
}

#service-active-img {
  opacity: 1;
}

#service-active-img.fade-out {
  opacity: 0;
}

.service-slide-number {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 5rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--primary);
  opacity: 0.35;
  margin-bottom: 0.5rem;
  transition: opacity 0.4s ease;
}

.service-thumb {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  opacity: 0.5;
  transition: all 0.3s ease;
  position: relative;
}

.service-thumb:hover {
  opacity: 0.8;
}

.service-thumb.active {
  border-color: var(--primary);
  opacity: 1;
}

.service-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-thumb .thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 20, 25, 0.7);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Swipe hint animation */
#svc-swipe-hint {
  animation: swipeHint 2.5s ease-in-out infinite;
}

@keyframes swipeHint {
  0%, 100% { opacity: 0.5; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(-6px); }
}

.svc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  opacity: 0.2;
  transition: all 0.3s ease;
}

.svc-dot.active {
  opacity: 1;
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

@media (max-width: 1023px) {
  .service-slide-number {
    font-size: 3.5rem;
  }

  .service-thumb {
    width: 100px;
    height: 65px;
  }
}

/* ========================================
   FEATURES (Numbered List)
   ======================================== */
.feature-row {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease;
}

.feature-row:last-child {
  border-bottom: none;
}

.feature-row:hover {
  transform: translateX(8px);
}

.feature-step-number {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--primary);
  opacity: 0.3;
  min-width: 80px;
  text-align: center;
  transition: opacity 0.3s ease;
}

.feature-row:hover .feature-step-number {
  opacity: 0.6;
}

.feature-row-content {
  flex: 1;
  padding-top: 0.5rem;
}

.feature-row-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.feature-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-row-icon svg,
.feature-row-icon i {
  color: #fff;
  width: 20px;
  height: 20px;
}

.feature-title {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}

.feature-desc {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .feature-step-number {
    font-size: 3rem;
    min-width: 50px;
  }

  .feature-row {
    gap: 1.25rem;
    padding: 2rem 0;
  }
}

/* ========================================
   GALLERY (Lightbox with Thumbnails)
   ======================================== */
.gallery-featured-wrap {
  position: relative;
}

.gallery-featured-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 25, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-featured-wrap:hover .gallery-featured-overlay {
  opacity: 1;
}

.gallery-thumb {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 3px solid transparent;
  transition: all 0.3s ease;
}

.gallery-thumb.active {
  border-color: var(--primary);
}

.gallery-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 25, 0.3);
  transition: opacity 0.3s ease;
  opacity: 1;
}

.gallery-thumb.active::after,
.gallery-thumb:hover::after {
  opacity: 0;
}

.gallery-thumb img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

@media (min-width: 768px) {
  .gallery-thumb img {
    height: 110px;
  }
}

@media (min-width: 1024px) {
  .gallery-thumb img {
    height: 130px;
  }
}

.gallery-thumb:hover img {
  transform: scale(1.05);
}

/* ========================================
   TESTIMONIALS (Minimal)
   ======================================== */
.testimonial-minimal-quote {
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.7;
  color: var(--secondary);
  font-style: italic;
  position: relative;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

@media (min-width: 768px) {
  .testimonial-minimal-quote {
    font-size: 1.75rem;
  }
}

.testimonial-minimal-quote::before {
  content: '\201C';
  position: absolute;
  top: -0.6em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 6rem;
  font-style: normal;
  color: var(--primary);
  opacity: 0.15;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.testimonial-minimal-attr {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-light);
  transition: opacity 0.4s ease;
}

.testimonial-minimal-attr .attr-name {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

.testimonial-minimal-attr .attr-divider {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--text-light);
  vertical-align: middle;
  margin: 0 0.75rem;
  opacity: 0.4;
}

.test-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary);
  opacity: 0.2;
  cursor: pointer;
  transition: all 0.3s ease;
}

.test-dot:hover {
  opacity: 0.5;
}

.test-dot.active {
  opacity: 1;
  background: var(--primary);
  transform: scale(1.2);
}

/* ========================================
   CTA BANNER
   ======================================== */
#cta_1 {
  background: var(--dark);
}

/* ========================================
   CONTACT
   ======================================== */
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon svg,
.contact-icon i {
  color: #fff;
  width: 20px;
  height: 20px;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-value {
  color: var(--secondary);
  font-weight: 600;
  font-size: 1rem;
}

.contact-value a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-value a:hover {
  color: var(--primary);
}

/* ========================================
   FOOTER
   ======================================== */
.footer-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  display: block;
}

.footer-link:hover {
  color: var(--primary);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
}

.footer-contact-item svg,
.footer-contact-item i {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

.footer-contact-item a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-contact-item a:hover {
  color: #fff;
}

/* ========================================
   SCROLL TO TOP
   ======================================== */
#scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ========================================
   FORM STATES
   ======================================== */
.form-success {
  background: #ecfdf5;
  color: #065f46;
}

.form-error {
  background: #fef2f2;
  color: #991b1b;
}

/* ========================================
   SECTION ACCENT LINE
   ======================================== */
.accent-line {
  width: 4rem;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* ========================================
   OVERFLOW CONTAINMENT (prevents horizontal scroll from GSAP slides)
   ======================================== */
#hero_1,
#about_1,
#services_1,
#features_1,
#gallery_1,
#testimonials_1,
#cta_1,
#contact_1,
#footer_1 {
  overflow-x: hidden;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablets and below */
@media (max-width: 768px) {
  .stat-value {
    font-size: 2rem;
  }

  #about-stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
  }

  .stat-card {
    padding: 1rem 0.5rem;
  }

  .gallery-thumb img {
    height: 80px;
  }

  .footer-link {
    font-size: 0.85rem;
  }
}

/* Small phones ≤ 480px */
@media (max-width: 480px) {
  .stat-card {
    padding: 0.75rem 0.4rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  #service-info-display {
    padding: 0 0.25rem;
  }

  .service-slide-number {
    font-size: 3rem;
  }

  .hero-btns {
    gap: 0.5rem !important;
  }
}

/* Small phones ≤ 640px */
@media (max-width: 640px) {
  #about-stats {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .service-slide-number {
    font-size: 2.5rem;
  }

  .testimonial-minimal-quote {
    font-size: 1.2rem;
  }

  .testimonial-minimal-quote::before {
    font-size: 4rem;
  }

  .gallery-thumb img {
    height: 65px;
  }

  .feature-row {
    gap: 1rem;
    padding: 1.5rem 0;
  }

  .feature-step-number {
    font-size: 2.5rem;
    min-width: 40px;
  }

  .feature-title {
    font-size: 1.1rem;
  }

  .contact-value {
    word-break: break-all;
  }

  #contact-form-wrap {
    padding: 1.5rem !important;
  }

  #cta_1 h2 {
    font-size: 1.5rem !important;
  }
}

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

  #nav_1 .max-w-7xl {
    height: 3.5rem;
  }

  .nav-logo {
    font-size: 1.25rem !important;
  }

  .hero-headline {
    font-size: 1.75rem !important;
  }

  .hero-sub {
    font-size: 0.95rem !important;
  }

  .about-diagonal .about-image img {
    height: 240px !important;
  }

  #about-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .stat-value {
    font-size: 1.5rem;
    margin-bottom: 0;
  }

  .stat-label {
    margin-top: 0;
  }

  .service-slide-number {
    font-size: 2rem;
  }

  .gallery-thumb img {
    height: 55px;
  }

  #gallery-featured-img {
    height: 220px !important;
  }

  .feature-step-number {
    font-size: 2rem;
    min-width: 32px;
  }

  .feature-row {
    gap: 0.75rem;
  }

  .feature-title {
    font-size: 1rem;
  }

  .feature-desc {
    font-size: 0.85rem;
  }

  .testimonial-minimal-quote {
    font-size: 1rem;
    min-height: 80px;
  }

  #contact-form-wrap {
    padding: 1rem !important;
  }

  #cta_1 h2 {
    font-size: 1.25rem !important;
  }

  #scroll-top {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  #phone-float {
    left: 0.75rem;
    bottom: 0.75rem;
  }
}

/* ========================================
   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;
  }

  .hero-video {
    display: none;
  }

  .hero-deco-border,
  .hero-deco-accent {
    animation: none !important;
  }
}