/* ========================================
   Forta s.r.o. — Custom Styles
   Dark & Premium / Industrial Steel
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  --primary: #D97706;
  --primary-light: #F59E0B;
  --secondary: #1C1917;
  --accent: #F59E0B;
  --dark: #0C0A09;
  --light: #FAFAF9;
  --surface: #1A1714;
  --surface-light: #292420;
  --text: #E7E5E4;
  --text-light: #A8A29E;
  --text-dark: #292524;
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* Contain GSAP slide animations within sections */
section {
  overflow-x: hidden;
}

::selection {
  background: var(--primary);
  color: white;
}

/* --- Navbar --- */
nav.scrolled {
  background: rgba(12, 10, 9, 0.95);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

nav.scrolled .nav-logo {
  color: white;
}

.nav-link {
  position: relative;
  color: rgba(255,255,255,0.7);
  transition: color 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-link:hover,
.nav-link.active {
  color: white;
}

.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,
.nav-link.active::after {
  width: 100%;
}

/* --- Hero --- */
.hero-gradient {
  background: linear-gradient(to bottom, transparent 0%, rgba(12, 10, 9, 0.4) 100%);
}

.hero-accent-line {
  opacity: 0;
  transform: scaleX(0);
}

/* --- Stats --- */
.stat-item {
  text-align: center;
  position: relative;
}

.stat-item::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 50%;
  background: rgba(255,255,255,0.08);
}

.stat-item:last-child::after {
  display: none;
}

@media (max-width: 1023px) {
  .stat-item:nth-child(2)::after {
    display: none;
  }
}

.stat-value {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-light);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- About --- */
.about-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.about-feature-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(217, 119, 6, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-feature-icon svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* --- Services Zigzag --- */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.service-row:nth-child(even) .service-content {
  order: 2;
}

.service-row:nth-child(even) .service-image-wrap {
  order: 1;
}

@media (max-width: 1023px) {
  .service-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .service-row:nth-child(even) .service-content,
  .service-row:nth-child(even) .service-image-wrap {
    order: unset;
  }
}

.service-number {
  font-size: 5rem;
  font-weight: 900;
  color: rgba(217, 119, 6, 0.12);
  line-height: 1;
  font-family: 'Archivo', sans-serif;
}

.service-image-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.service-image-wrap img {
  transition: transform 0.7s ease;
}

.service-image-wrap:hover img {
  transform: scale(1.05);
}

.service-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12,10,9,0.5) 0%, transparent 50%);
}

/* --- Features Grid --- */
.feature-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s ease;
}

.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.feature-icon-wrap {
  width: 56px;
  height: 56px;
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-wrap {
  background: var(--primary);
  border-color: var(--primary);
}

.feature-icon-wrap svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
  transition: color 0.3s ease;
}

.feature-card:hover .feature-icon-wrap svg {
  color: white;
}

/* --- Gallery --- */
.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12,10,9,0.8) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.gallery-caption {
  color: white;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

/* --- CTA Banner --- */
.cta-bg {
  -webkit-filter: grayscale(40%);
  filter: grayscale(40%);
}

/* --- Contact Cards --- */
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  transition: all 0.3s ease;
}

.contact-card:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.contact-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(217, 119, 6, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card-icon svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

/* --- Scroll to Top --- */
#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#scroll-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.3);
}

/* --- Footer --- */
.footer-link {
  color: var(--text-light);
  transition: color 0.3s ease;
  display: block;
}

.footer-link:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-light);
}

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

/* --- Mobile Menu --- */
.mobile-link {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.3s ease;
}

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

/* --- Decorative: dot pattern background --- */
.dot-pattern {
  background-image: radial-gradient(rgba(217, 119, 6, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* --- Section Heading Accent --- */
.heading-accent {
  position: relative;
  display: inline-block;
}

.heading-accent::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

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

  .service-image-wrap:hover img,
  .gallery-item:hover img {
    transform: none !important;
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

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

/* --- Tablets & small laptops (≤ 768px) --- */
@media (max-width: 768px) {
  .service-number {
    font-size: 3.5rem;
  }

  .about-image-border {
    display: none;
  }

  .about-image-wrap .absolute {
    display: none;
  }

  .gallery-overlay {
    opacity: 1;
  }
}

/* --- Small phones (≤ 480px) --- */
@media (max-width: 480px) {
  .stat-value {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
  }

  #stats_1 .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .service-row {
    gap: 1.25rem;
  }

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

  .service-image-wrap img {
    height: 240px !important;
  }

  .feature-card {
    padding: 1.25rem;
  }

  .feature-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .feature-icon-wrap svg {
    width: 20px;
    height: 20px;
  }

  .contact-card {
    padding: 1rem;
  }

  .contact-card-icon {
    width: 40px;
    height: 40px;
  }

  .gallery-item {
    border-radius: 10px;
  }

  .gallery-overlay {
    opacity: 1;
    padding: 1rem;
  }

  .gallery-caption {
    font-size: 0.9rem;
  }

  #scroll-top {
    right: 0.75rem;
    bottom: 0.75rem;
    width: 40px;
    height: 40px;
  }
}

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

  /* Nav */
  nav .h-20 {
    height: 3.5rem;
  }

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

  /* Hero */
  #hero_1 h1 {
    font-size: 1.75rem !important;
    line-height: 1.15;
  }

  #hero_1 p {
    font-size: 0.9rem !important;
  }

  #hero_1 .flex.flex-col.sm\\:flex-row {
    flex-direction: column !important;
  }

  #hero_1 .flex a {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    justify-content: center;
  }

  /* Stats */
  .stat-value {
    font-size: 1.5rem;
  }

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

  #stats_1 .grid {
    gap: 0.75rem;
  }

  .stat-item::after {
    display: none;
  }

  /* About image */
  .about-image-wrap img {
    height: 240px !important;
  }

  /* Services */
  .service-number {
    font-size: 2.5rem;
  }

  .service-image-wrap img {
    height: 200px !important;
  }

  /* Features grid — single column */
  #features-grid {
    grid-template-columns: 1fr !important;
  }

  /* Gallery — 1 column */
  #gallery-grid {
    grid-template-columns: 1fr !important;
  }

  /* Contact form padding */
  #contact_1 .bg-surface {
    padding: 1.25rem !important;
  }

  /* Contact card long values */
  .contact-card {
    word-break: break-all;
  }

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

  /* Floating buttons closer to edge */
  #scroll-top {
    right: 0.5rem;
    bottom: 0.5rem;
  }

  /* WhatsApp button */
  .fixed.bottom-20 {
    right: 0.5rem;
    bottom: 3.5rem;
    width: 48px;
    height: 48px;
  }

  /* Footer columns stack */
  #footer_1 .grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  /* Section headings smaller */
  h2 {
    font-size: 1.5rem !important;
  }

  /* Section vertical padding reduced */
  .py-24 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
}
