/* ========================================
   Medi servis - Custom Styles
   Design: Bold & Editorial + Construction
   ======================================== */

/* === CSS Custom Properties === */
:root {
  --primary: #C17817;
  --primary-dark: #A06510;
  --secondary: #1E293B;
  --accent: #D4870E;
  --dark: #0F172A;
  --light: #F8F6F1;
  --text: #334155;
  --text-light: #94A3B8;
}

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

body {
  overflow-x: hidden;
}

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

/* === Navbar === */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.25rem 0;
}

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

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

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

.mobile-nav-link {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.3s ease, padding-left 0.3s ease;
  display: block;
}

.mobile-nav-link:hover {
  color: var(--primary);
  padding-left: 0.5rem;
}

/* === Hero === */
#hero_1 {
  background-color: var(--dark);
}

.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

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

/* === Service Cards === */
.service-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--primary);
  transition: height 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: transparent;
}

.service-card:hover::before {
  height: 100%;
}

.service-card .service-number {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 3rem;
  color: rgba(193, 120, 23, 0.08);
  line-height: 1;
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

.service-card .service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(193, 120, 23, 0.1);
  color: var(--primary);
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: white;
}

/* === Transport Cards === */
.transport-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.transport-card:hover {
  background: rgba(193, 120, 23, 0.15);
  border-color: rgba(193, 120, 23, 0.3);
  transform: translateX(4px);
}

.transport-card .transport-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(193, 120, 23, 0.2);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* === Gallery === */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  break-inside: avoid;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

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

/* === Contact Form === */
.form-group label {
  display: block;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: white;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(193, 120, 23, 0.12);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ef4444;
}

.form-group .error-msg {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: none;
}

.form-group input.error + .error-msg,
.form-group textarea.error + .error-msg {
  display: block;
}

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

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(193, 120, 23, 0.25);
}

.submit-btn:active {
  transform: translateY(0);
}

/* === Contact Info Items === */
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item .contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(193, 120, 23, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item .contact-label {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.15rem;
}

.contact-item .contact-value {
  color: white;
  font-size: 1rem;
}

.contact-item .contact-value a {
  color: white;
  transition: color 0.3s ease;
}

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

/* === Feature Check Items === */
.feature-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.feature-check .check-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(193, 120, 23, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-check span {
  font-size: 0.95rem;
  color: var(--text);
}

/* === About Stats === */
.stat-item {
  text-align: center;
}

.stat-item .stat-value {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: white;
  line-height: 1.1;
}

.stat-item .stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
}

/* === Footer === */
.footer-link {
  color: var(--text-light);
  font-size: 0.9rem;
  transition: color 0.3s ease, padding-left 0.3s ease;
  display: block;
  padding: 0.2rem 0;
}

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

/* === Scroll to Top === */
#scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

/* === Bento Grid Featured === */
.service-card.featured {
  background: var(--secondary);
  border-color: transparent;
}

.service-card.featured .service-number {
  color: rgba(193, 120, 23, 0.15);
}

.service-card.featured h3 {
  color: white;
}

.service-card.featured p {
  color: var(--text-light);
}

.service-card.featured .service-icon {
  background: rgba(193, 120, 23, 0.2);
}

.service-card.featured:hover .service-icon {
  background: var(--primary);
}

.service-card.featured::before {
  background: var(--primary);
}

/* === Decorative accent line for section headings === */
.section-accent {
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

/* === 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-card:hover,
  .transport-card:hover,
  .gallery-item:hover img {
    transform: none !important;
  }

  .scroll-line {
    animation: none !important;
  }
}

/* === Section overflow containment (prevents GSAP x-slides from causing horizontal scroll) === */
#about_1,
#services_1,
#transport_1,
#gallery_1,
#contact_1,
#cta_1 {
  overflow-x: hidden;
}

/* === Responsive — Tablets & small laptops (≤ 768px) === */
@media (max-width: 768px) {
  #hero_1 h1 {
    font-size: 2.5rem;
  }

  .about-image .absolute {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 1.5rem;
    border-radius: 12px;
  }

  #about-stats {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .service-card {
    padding: 1.5rem;
  }

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

  /* Contact section padding */
  #contact_1 .bg-dark,
  #contact_1 .bg-light {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* === Small phones (≤ 480px) === */
@media (max-width: 480px) {
  /* Reduce container padding globally */
  .max-w-7xl,
  .max-w-4xl,
  .max-w-3xl,
  .max-w-lg {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Nav */
  #navbar .h-20 {
    height: 4rem;
  }

  #nav-logo {
    font-size: 1.25rem;
  }

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

  #hero_1 p[data-field="subheadline"] {
    font-size: 1rem;
  }

  #hero_1 .flex.flex-wrap {
    flex-direction: column;
  }

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

  /* About */
  .about-image img {
    height: 280px;
  }

  #about-stats {
    gap: 1rem;
  }

  .stat-item .stat-value {
    font-size: 1.5rem;
  }

  .stat-item .stat-label {
    font-size: 0.65rem;
  }

  /* About stats box */
  .about-image .absolute,
  .about-image > .bg-primary {
    padding: 1rem 1.25rem;
  }

  /* Section headings */
  #about_1 h2,
  #services_1 h2,
  #transport_1 h2,
  #gallery_1 h2,
  #contact_1 h2 {
    font-size: 1.75rem;
  }

  /* Service cards */
  .service-card {
    padding: 1.25rem;
  }

  .service-card h3 {
    font-size: 1rem;
  }

  .service-card p {
    font-size: 0.8rem;
  }

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

  /* Transport images */
  #transport-images img {
    height: 140px;
  }

  /* CTA Banner */
  #cta_1 h2 {
    font-size: 1.5rem;
  }

  #cta-btn {
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
  }

  /* Contact */
  #contact_1 .bg-dark,
  #contact_1 .bg-light {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .contact-item .contact-value {
    font-size: 0.9rem;
    word-break: break-all;
  }

  /* Map */
  #contact_1 .rounded-xl {
    height: 180px;
  }

  /* Floating buttons — nudge closer to edge */
  #scroll-top {
    right: 0.75rem;
    bottom: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
  }

  .fixed.bottom-20.right-6 {
    right: 0.75rem;
    bottom: 3.75rem;
    width: 3rem;
    height: 3rem;
  }

  .fixed.bottom-20.right-6 svg {
    width: 22px;
    height: 22px;
  }

  /* Footer */
  #footer_1 .grid {
    gap: 2rem;
  }
}

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

  #navbar .max-w-7xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #navbar .h-20 {
    height: 3.5rem;
  }

  #nav-logo {
    font-size: 1.1rem;
  }

  /* Hero */
  #hero_1 {
    min-height: 90vh;
  }

  #hero_1 h1 {
    font-size: 1.65rem;
  }

  #hero_1 p[data-field="subheadline"] {
    font-size: 0.875rem;
  }

  #hero_1 .inline-flex {
    padding: 0.35rem 0.75rem;
  }

  #hero_1 .inline-flex span {
    font-size: 0.7rem;
  }

  /* About image */
  .about-image img {
    height: 220px;
  }

  /* Stats — single column on very small */
  #about-stats {
    flex-direction: column;
    gap: 0.5rem;
  }

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

  .stat-item:first-child {
    border-top: none;
    padding-top: 0;
  }

  .stat-item .stat-value {
    font-size: 1.25rem;
  }

  .stat-item .stat-label {
    font-size: 0.65rem;
    margin-top: 0;
  }

  /* Section headings even smaller */
  #about_1 h2,
  #services_1 h2,
  #transport_1 h2,
  #gallery_1 h2,
  #contact_1 h2 {
    font-size: 1.5rem;
  }

  /* Service cards */
  .service-card {
    padding: 1rem;
  }

  /* CTA */
  #cta_1 h2 {
    font-size: 1.35rem;
  }

  /* Transport images */
  #transport-images img {
    height: 110px;
  }

  /* Contact email break */
  .contact-item .contact-value {
    word-break: break-all;
  }
}
