/* ===== Sabric Logistics Ltd — общие стили ===== */
/* Вынесены из index.html, oklch заменён на hex (совместимость). */

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: #f7f9fb;
  background-color: #161a24;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 { font-family: 'Space Grotesk', sans-serif; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ===== COLOR TOKENS ===== */
:root {
  --bg-dark: #161a24;
  --bg-card: #222838;
  --bg-section: #1d2330;
  --bg-footer: #10141c;
  --accent: #3fc6bb;
  --accent-hover: #35b0a6;
  --text-light: #f7f9fb;
  --text-muted: #a3aebd;
  --border: #3a425a;
}

/* ===== UTILITY ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .container { padding: 0 1.5rem; } }

.btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background-color: var(--accent); color: var(--bg-dark);
  border-radius: 10px; padding: 8px 16px; font-weight: 600;
  font-size: 0.875rem; line-height: 1.25rem; transition: all 0.2s; border: none; cursor: pointer;
}
.btn-accent:hover { background-color: var(--accent-hover); }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
  border-radius: 10px; padding: 8px 16px; font-weight: 600;
  font-size: 0.875rem; line-height: 1.25rem; transition: all 0.2s; cursor: pointer;
}
.btn-outline:hover { background-color: rgba(63, 198, 187, 0.1); }

.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }

/* ===== ANIMATIONS ===== */
.animate-section {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-section.visible {
  opacity: 1; transform: translateY(0);
}

/* ===== HEADER ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background-color: rgba(22, 26, 36, 0.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0; max-width: 1200px; margin: 0 auto; padding-left: 1rem; padding-right: 1rem;
}
@media (min-width: 768px) { .header-inner { padding-left: 1.5rem; padding-right: 1.5rem; } }

.logo { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: 0.25rem; }
.logo-white { color: var(--text-light); }
.logo-accent { color: var(--accent); }
.logo-img { max-height: 32px; width: auto; display: block; }
@media (max-width: 767px) { .logo-img { max-height: 32px; } }

.nav-desktop { display: none; align-items: center; gap: 1.5rem; }
@media (min-width: 768px) { .nav-desktop { display: flex; } }

.nav-link {
  font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
  transition: color 0.2s; cursor: pointer; background: none; border: none; padding: 0;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }

.hamburger {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  color: var(--text-muted); transition: color 0.2s; background: none;
}
.hamburger:hover { color: var(--accent); }
@media (min-width: 768px) { .hamburger { display: none; } }

.mobile-nav {
  display: none; background-color: var(--bg-dark);
  border-top: 1px solid var(--border); padding: 1rem;
}
.mobile-nav.open { display: block; }
.mobile-nav .nav-link {
  display: block; padding: 0.5rem 0.75rem; border-radius: 8px; font-size: 0.875rem; font-weight: 500;
}
.mobile-nav .nav-link:hover, .mobile-nav .nav-link.active { background-color: var(--bg-card); color: var(--accent); }
.mobile-nav .btn-accent { width: 100%; text-align: center; margin-top: 0.5rem; padding: 10px 16px; }

/* ===== PAGE SECTIONS ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding-top: 4rem; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(22, 26, 36, 0.95) 0%, rgba(22, 26, 36, 0.7) 50%, rgba(22, 26, 36, 0.98) 100%);
}
.hero-content { position: relative; z-index: 10; max-width: 600px; padding: 4rem 0; }

.badge {
  display: inline-block; padding: 6px 16px; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 500; margin-bottom: 1.5rem;
  background-color: rgba(63, 198, 187, 0.15);
  color: var(--accent); border: 1px solid rgba(63, 198, 187, 0.3);
}

.hero h1 {
  font-size: 40px; font-weight: 700; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.02em;
}
@media (min-width: 640px) { .hero h1 { font-size: 56px; } }
@media (min-width: 1024px) { .hero h1 { font-size: 72px; } }

.hero-subtitle {
  font-size: 16px; line-height: 1.7; color: var(--text-muted); margin-bottom: 2rem; max-width: 480px;
}
@media (min-width: 640px) { .hero-subtitle { font-size: 18px; } }

.hero-buttons { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) { .hero-buttons { flex-direction: row; } }
.hero-buttons .btn-accent, .hero-buttons .btn-outline { padding: 12px 24px; font-size: 1rem; }

/* ===== STATS ===== */
.stats-section { padding: 4rem 0; }
@media (min-width: 768px) { .stats-section { padding: 5rem 0; } }

.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }

.stat-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 1.5rem; border-radius: 12px;
  background-color: var(--bg-card); border: 1px solid var(--border);
  transition: transform 0.3s;
}
.stat-card:hover { transform: translateY(-4px); }
.stat-value { font-family: 'Space Grotesk', sans-serif; font-size: 1.875rem; font-weight: 700; color: var(--accent); }
@media (min-width: 640px) { .stat-value { font-size: 2.25rem; } }
.stat-label { margin-top: 0.5rem; font-size: 0.875rem; color: var(--text-muted); }

/* ===== SERVICES OVERVIEW ===== */
.services-overview { padding: 4rem 0; background-color: var(--bg-section); }
@media (min-width: 768px) { .services-overview { padding: 6rem 0; } }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 1rem; }
@media (min-width: 640px) { .section-header h2 { font-size: 32px; } }
.section-header p { max-width: 600px; margin: 0 auto; color: var(--text-muted); }

.services-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 12px; background-color: var(--bg-card);
  border: 1px solid var(--border); transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); }

.service-card-img { position: relative; height: 192px; overflow: hidden; flex-shrink: 0; }
.service-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.service-card:hover .service-card-img img { transform: scale(1.05); }
.service-card-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg-card) 0%, transparent 60%);
}

.service-card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.service-card-body h3 { font-size: 1.125rem; font-weight: 600; color: var(--text-light); margin-bottom: 0.75rem; }
.service-card-body p { font-size: 0.875rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 1rem; flex: 1; }

.learn-more {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.875rem; font-weight: 500; color: var(--accent);
  transition: color 0.2s; cursor: pointer; background: none; border: none; padding: 0;
}
.learn-more:hover { text-decoration: underline; }
.learn-more svg { width: 14px; height: 14px; }

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 4rem 0; text-align: center;
  background: linear-gradient(135deg, rgba(63, 198, 187, 0.1) 0%, var(--bg-dark) 50%, rgba(63, 198, 187, 0.05) 100%);
}
@media (min-width: 768px) { .cta-section { padding: 6rem 0; } }
.cta-section h2 { font-size: 24px; font-weight: 700; margin-bottom: 1rem; }
@media (min-width: 640px) { .cta-section h2 { font-size: 32px; } }
.cta-section p { max-width: 500px; margin: 0 auto 2rem; color: var(--text-muted); }

/* ===== PAGE HEADER (sub-pages) ===== */
.page-header {
  display: flex; align-items: center; padding-top: 6rem; padding-bottom: 4rem;
  background: linear-gradient(180deg, rgba(22, 26, 36, 0.98) 0%, var(--bg-section) 100%);
  text-align: center;
}
@media (min-width: 768px) { .page-header { padding-top: 8rem; padding-bottom: 5rem; } }
.page-header h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 1rem; }
@media (min-width: 640px) { .page-header h1 { font-size: 3.5rem; } }
@media (min-width: 1024px) { .page-header h1 { font-size: 3.5rem; } }
.page-header p { max-width: 600px; margin: 0 auto; color: var(--text-muted); }

/* ===== SERVICES PAGE ===== */
.service-block { padding: 4rem 0; }
@media (min-width: 768px) { .service-block { padding: 6rem 0; } }
.service-block.alt { background-color: var(--bg-section); }

.service-block-inner {
  display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center;
}
@media (min-width: 768px) { .service-block-inner { grid-template-columns: 1fr 1fr; gap: 3rem; } }

.service-block-img { position: relative; height: 256px; border-radius: 12px; overflow: hidden; }
@media (min-width: 640px) { .service-block-img { height: 320px; } }
@media (min-width: 768px) { .service-block-img { height: 384px; } }
.service-block-img img { width: 100%; height: 100%; object-fit: cover; }

.service-block-content h2 { font-size: 24px; font-weight: 700; margin-bottom: 1rem; }
@media (min-width: 640px) { .service-block-content h2 { font-size: 30px; } }
.service-block-content > p { color: var(--text-muted); line-height: 1.7; margin-bottom: 1.5rem; }

.feature-list { display: flex; flex-direction: column; gap: 0.75rem; }
.feature-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.feature-icon {
  flex-shrink: 0; width: 32px; height: 32px; display: flex;
  align-items: center; justify-content: center; border-radius: 8px;
  background-color: rgba(63, 198, 187, 0.15);
}
.feature-icon svg { width: 16px; height: 16px; color: var(--accent); }
.feature-item span { font-size: 0.875rem; line-height: 1.6; color: var(--text-muted); }

/* ===== ABOUT PAGE ===== */
.about-section { padding: 4rem 0; }
@media (min-width: 768px) { .about-section { padding: 6rem 0; } }
.about-section.alt { background-color: var(--bg-section); }
.about-section .content-narrow { max-width: 700px; margin: 0 auto; }
.about-section h2 { font-size: 24px; font-weight: 700; margin-bottom: 1.5rem; }
@media (min-width: 640px) { .about-section h2 { font-size: 30px; } }
.about-section p { color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }

.info-table {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  background-color: var(--bg-card);
}
.info-table table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 1rem 1.5rem; font-size: 0.875rem; }
.info-table tr + tr { border-top: 1px solid var(--border); }
.info-table td:first-child { font-weight: 500; color: var(--text-light); background-color: rgba(34, 40, 56, 0.5); white-space: nowrap; }
.info-table td:last-child { color: var(--text-muted); }

.sic-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 800px; margin: 0 auto; }
@media (min-width: 768px) { .sic-grid { grid-template-columns: 1fr 1fr; } }

.sic-card {
  padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border);
  background-color: var(--bg-card); transition: transform 0.3s;
}
.sic-card:hover { transform: translateY(-4px); }
.sic-code { font-family: 'Space Grotesk', sans-serif; font-size: 2.25rem; font-weight: 700; color: var(--accent); margin-bottom: 0.75rem; display: block; }
.sic-card h3 { font-size: 1.125rem; font-weight: 600; color: var(--text-light); margin-bottom: 0.5rem; }
.sic-card p { font-size: 0.875rem; line-height: 1.7; color: var(--text-muted); }

/* ===== CONTACT PAGE ===== */
.contact-cards-section { padding: 4rem 0; background-color: var(--bg-section); }
@media (min-width: 768px) { .contact-cards-section { padding: 5rem 0; } }

.contact-cards-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .contact-cards-grid { grid-template-columns: repeat(3, 1fr); } }

.contact-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 1.5rem; border-radius: 12px;
  border: 1px solid var(--border); background-color: var(--bg-card);
  transition: transform 0.3s;
}
.contact-card:hover { transform: translateY(-4px); }
.contact-card-icon {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background-color: rgba(63, 198, 187, 0.15); margin-bottom: 1rem;
}
.contact-card-icon svg { width: 20px; height: 20px; color: var(--accent); }
.contact-card h3 { font-size: 1.125rem; font-weight: 600; color: var(--text-light); margin-bottom: 0.5rem; }
.contact-card p { font-size: 0.875rem; color: var(--text-muted); }

.map-section { padding: 4rem 0; }
.map-section iframe {
  width: 100%; height: 400px; border: 0; border-radius: 12px;
  border: 1px solid var(--border);
}

.form-section { padding: 4rem 0; background-color: var(--bg-section); }
@media (min-width: 768px) { .form-section { padding: 6rem 0; } }

.form-wrapper { max-width: 600px; margin: 0 auto; }
.form-wrapper h2 { font-size: 24px; font-weight: 700; margin-bottom: 2rem; text-align: center; }
@media (min-width: 640px) { .form-wrapper h2 { font-size: 30px; } }

.form-row { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text-light); margin-bottom: 0.5rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 0.625rem 0.875rem; border-radius: 8px;
  background-color: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-light); font-size: 0.875rem; transition: border-color 0.2s;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; }

.btn-submit {
  width: 100%; padding: 0.75rem; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Toast notification */
.toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 200;
  padding: 1rem 1.5rem; border-radius: 10px;
  font-size: 0.875rem; font-weight: 500;
  transform: translateY(120%); opacity: 0;
  transition: all 0.3s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background-color: #3fae6a; color: #0f2a1b; }
.toast.error { background-color: #c0564e; color: #fff; }

/* ===== FOOTER ===== */
.footer { background-color: var(--bg-footer); border-top: 1px solid var(--border); }
.footer-inner { padding: 3rem 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

.footer-col h3 {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-light); margin-bottom: 1rem;
}
.footer-col p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; }
.footer-col .logo { margin-bottom: 1rem; }
.footer-col a {
  display: block; font-size: 0.875rem; color: var(--text-muted);
  padding: 0.25rem 0; transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border); padding: 1rem 0;
  text-align: center; font-size: 0.75rem; color: var(--text-muted);
}

/* ===== SVG ICONS (inline) ===== */
.icon { display: inline-block; vertical-align: middle; }

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

/* Desktop service block image order fix */
@media (min-width: 768px) {
  #page-services .service-block:nth-child(3) .service-block-inner {
    direction: ltr;
  }
  #page-services .service-block:nth-child(3) .service-block-content {
    order: 2;
  }
  #page-services .service-block:nth-child(3) .service-block-img {
    order: 1;
  }
  #page-services .service-block:nth-child(5) .service-block-content {
    order: 1;
  }
  #page-services .service-block:nth-child(5) .service-block-img {
    order: 2;
  }
}
