/* ========================================
   B-Motics — Custom CSS
   Pure modern CSS (no frameworks)
   ======================================== */

/* --- Custom Properties --- */
:root {
  --color-primary: #0891b2;
  --color-primary-dark: #0e7490;
  --color-primary-light: #e0f7fa;
  --color-secondary: #1a1a1a;
  --color-accent: #06b6d4;
  --color-text: #334155;
  --color-text-light: #64748b;
  --color-heading: #0f172a;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-border: #e2e8f0;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --color-white: #ffffff;

  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', monospace;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --container-max: 1140px;
  --header-height: 72px;

  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

ul { list-style: none; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
  font-family: inherit;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  padding: 0.625rem 0.75rem;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
}

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

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1.0625rem;
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 2rem;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.lang-switcher {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-link {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-light);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.lang-link:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-heading);
  position: relative;
  transition: background var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-heading);
  transition: transform var(--transition);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   HERO
   ======================================== */
.hero {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #2d2d2d 100%);
  color: var(--color-white);
  padding: 5rem 0;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
}

.hero-title {
  font-size: 2.75rem;
  color: var(--color-white);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.hero .btn-primary:hover {
  background: #0e7490;
  border-color: #0e7490;
}

.hero .btn-outline {
  color: var(--color-white);
  border-color: rgba(255,255,255,0.4);
}

.hero .btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--color-white);
  color: var(--color-white);
}

/* ========================================
   SERVICES PREVIEW
   ======================================== */
.services-preview {
  padding: 5rem 0;
  background: var(--color-bg-alt);
}

.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 3rem;
  font-size: 1.125rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.service-icon {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-text-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.service-link {
  font-weight: 600;
  font-size: 0.9375rem;
}

.services-cta {
  text-align: center;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
  padding: 4rem 0;
  text-align: center;
  background: var(--color-bg);
}

.cta-section h2 {
  margin-bottom: 1.5rem;
}

.cta-actions {
  display: flex;
  justify-content: center;
}

/* ========================================
   PAGE SINGLE & LIST
   ======================================== */
.page-single,
.page-list,
.page-contact {
  padding: 3rem 0 5rem;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-description {
  font-size: 1.125rem;
  color: var(--color-text-light);
}

/* Prose content */
.prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose p {
  margin-bottom: 1rem;
}

.prose ul,
.prose ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 0.25rem;
}

.prose a {
  text-decoration: underline;
}

.prose strong {
  font-weight: 600;
  color: var(--color-heading);
}

.prose blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Tables (product pages) */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.prose thead th {
  text-align: left;
  font-weight: 600;
  color: var(--color-heading);
  padding: 0.625rem 0.875rem;
  border-bottom: 2px solid var(--color-heading);
}

.prose tbody td {
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.prose tbody tr:last-child td {
  border-bottom: 1px solid var(--color-heading);
}

.prose tbody tr:hover {
  background: var(--color-bg-alt);
}

@media (max-width: 768px) {
  .prose table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Card Grid (blog, services list) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card-title a {
  color: var(--color-heading);
}

.card-title a:hover {
  color: var(--color-primary);
}

.card-description {
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.card-date {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.card-link {
  font-weight: 600;
  font-size: 0.9375rem;
}

.empty-message {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.125rem;
  padding: 3rem 0;
}

/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
  color: var(--color-heading);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-check label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* Form feedback */
.form-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
}

.form-feedback-success {
  background: #f0fdf4;
  color: var(--color-success);
  border: 1px solid #bbf7d0;
}

.form-feedback-error {
  background: #fef2f2;
  color: var(--color-error);
  border: 1px solid #fecaca;
}

/* Contact Info sidebar */
.contact-info {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-info h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.info-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.info-item .icon {
  flex-shrink: 0;
  color: var(--color-primary);
  margin-top: 0.2rem;
}

.info-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-heading);
  font-size: 0.9375rem;
}

.info-item p {
  font-size: 0.9375rem;
  color: var(--color-text-light);
}

.info-item a {
  color: var(--color-text-light);
}

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

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--color-secondary);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-title {
  color: var(--color-white);
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-about p {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.footer-company {
  font-size: 0.8125rem !important;
  color: rgba(255,255,255,0.5);
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9375rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-contact .footer-links li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.footer-contact .icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: rgba(255,255,255,0.5);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}

/* ========================================
   COOKIE BANNER
   ======================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  padding: 1.5rem;
}

.cookie-banner-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.cookie-text h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.cookie-text p {
  font-size: 0.9375rem;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}

.cookie-more-info {
  font-size: 0.8125rem !important;
}

.cookie-settings {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
}

.cookie-option {
  margin-bottom: 0.75rem;
}

.cookie-option:last-child {
  margin-bottom: 0;
}

.cookie-option label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.cookie-option p {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-left: 1.5rem;
  margin-top: 0.25rem;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1.0625rem;
  }

  .lang-switcher {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--color-border);
  }

  .hero {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.0625rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }

  .services-preview {
    padding: 3rem 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    flex-direction: column;
  }

  .cookie-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.625rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
  }
}
