/* ============================================
   TMS Teknoloji - Custom Styles
   ============================================ */

/* --- Custom Properties --- */
:root {
  --primary: #991B1E;
  --primary-hover: #7F1618;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --text: #0F172A;
  --text-muted: #475569;
  --text-light: #64748B;
  --border: #E2E8F0;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --radius: 0.75rem;
}

html.dark {
  --primary: #EF4444;
  --primary-hover: #DC2626;
  --accent: #3B82F6;
  --accent-hover: #2563EB;
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-card-hover: #334155;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-light: #64748B;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
}

/* --- Logo Dark/Light Mode --- */
.logo-light { display: block; }
.logo-dark { display: none; }

html.dark .logo-light { display: none; }
html.dark .logo-dark { display: block; }

/* --- Reference Logo Dark/Light Fixes --- */
/* Dark text logos: invert in dark mode so they become visible */
html.dark .ref-logo-dark-text { filter: brightness(0) invert(1); }
/* Light text logos: darken in light mode so they become visible */
.ref-logo-light-text { filter: brightness(0); }
html.dark .ref-logo-light-text { filter: none; }
/* Logos with white bg: add rounded corners */
.ref-logo-white-bg { background: white; border-radius: 8px; padding: 4px 10px; }

/* --- Theme Toggle --- */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

html.dark .navbar {
  background: rgba(15, 23, 42, 0.8);
}

.navbar.scrolled {
  box-shadow: var(--shadow-lg);
}

.nav-link {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

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

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

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

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--bg-card);
  z-index: 1001;
  transition: right 0.3s ease;
  box-shadow: -5px 0 25px rgba(0,0,0,0.15);
  padding: 5rem 2rem 2rem;
  overflow-y: auto;
}

.mobile-menu.open {
  right: 0;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu .nav-link {
  display: block;
  font-size: 1.1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.mobile-menu .nav-link::after {
  display: none;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1002;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Dropdown Navigation --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.nav-dropdown-trigger .dropdown-arrow {
  transition: transform 0.25s ease;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 700px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 100;
  pointer-events: none;
}

/* Invisible bridge to prevent hover gap */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

/* Compact dropdown variant for Hizmetler & Odoo */
.nav-dropdown-menu.compact {
  min-width: 420px;
  grid-template-columns: repeat(2, 1fr);
}

/* ENCY products dropdown - 4 columns */
.nav-dropdown-menu.ency-menu {
  min-width: 820px;
  padding: 1.75rem 2rem;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

/* Odoo dropdown - logo header + 3 columns */
.nav-dropdown-menu.odoo-menu {
  min-width: 720px;
  padding: 1.75rem 2rem;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

/* Hizmetler compact wider */
.nav-dropdown-menu.compact {
  min-width: 480px;
  padding: 1.75rem 2rem;
}

.odoo-menu-header {
  grid-column: 1 / -1;
  text-align: center;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.odoo-menu-header img {
  height: 22px;
  width: auto;
}

html.dark .nav-dropdown-menu {
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Mega-header: logo/icon + product name */
.mega-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.mega-header a {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  padding: 0;
}

.mega-header a:hover {
  color: var(--primary);
  padding-left: 0;
}

.mega-header img {
  height: 20px;
  width: auto;
  flex-shrink: 0;
}

.mega-header svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Column dividers for mega menus */
.ency-menu .nav-dropdown-section,
.odoo-menu .nav-dropdown-section {
  padding: 0 1.5rem;
}

.ency-menu .nav-dropdown-section:first-child,
.odoo-menu .odoo-menu-header + .nav-dropdown-section {
  padding-left: 0;
}

.ency-menu .nav-dropdown-section:last-child,
.odoo-menu .nav-dropdown-section:last-child {
  padding-right: 0;
}

.ency-menu .nav-dropdown-section + .nav-dropdown-section,
.odoo-menu .nav-dropdown-section + .nav-dropdown-section {
  border-left: 1px solid rgba(128,128,128,0.3);
}

.nav-dropdown-section h4 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
}

.nav-dropdown-section h4 a {
  color: inherit;
  text-decoration: none;
}

.nav-dropdown-section h4 a:hover {
  text-decoration: underline;
}

.nav-dropdown-section a {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
  white-space: nowrap;
}

.odoo-menu .nav-dropdown-section a {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown-section a .odoo-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0.7;
  filter: saturate(0.6);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.nav-dropdown-section a:hover .odoo-icon {
  opacity: 1;
  filter: saturate(1);
}

.nav-dropdown-section a:hover {
  color: var(--primary);
  padding-left: 4px;
}

/* Mobile accordion dropdown */
.mobile-dropdown {
  border-bottom: 1px solid var(--border);
}

.mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

.mobile-dropdown-toggle .dropdown-arrow {
  transition: transform 0.25s ease;
}

.mobile-dropdown-toggle.open .dropdown-arrow {
  transform: rotate(180deg);
}

.mobile-dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-dropdown-content.open {
  max-height: 600px;
}

.mobile-dropdown-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.mobile-dropdown-content a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0 0.4rem 0.75rem;
  transition: color 0.2s ease;
}

.mobile-dropdown-content a:hover {
  color: var(--primary);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, #1E293B 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Page Hero (inner pages) */
.page-hero {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 4rem;
  background: linear-gradient(135deg, var(--primary) 0%, #1E293B 100%);
  color: #fff;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb .separator {
  color: rgba(255,255,255,0.4);
}

/* --- Partner Marquee --- */
.marquee-wrapper {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
  display: flex;
  gap: 3rem;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track-reverse {
  display: flex;
  gap: 3rem;
  animation: marquee-reverse 35s linear infinite;
  width: max-content;
}

.marquee-track-reverse:hover {
  animation-play-state: paused;
}

@keyframes marquee-reverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Partner Band Dots */
.marquee-track > div,
.marquee-track-reverse > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.marquee-track > div::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.marquee-track-reverse > div::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.partner-logo {
  flex-shrink: 0;
  height: 3rem;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

.partner-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
}

html.dark .partner-logo {
  filter: grayscale(100%) brightness(2);
}
html.dark .partner-logo:hover {
  filter: grayscale(0%) brightness(1.2);
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

/* SVG icon theming: black in light mode, white in dark mode */
.card-icon img[src*="icons/"] {
  filter: brightness(0);
  transition: filter 0.3s ease;
}

html.dark .card-icon img[src*="icons/"] {
  filter: none;
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(153, 27, 30, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* --- Scroll Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.4s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Statistics Counter --- */
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

@media (min-width: 768px) {
  .stat-number {
    font-size: 3rem;
  }
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #7F1618 50%, var(--accent) 100%);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.55rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border: 3px solid var(--bg);
  border-radius: 50%;
  z-index: 1;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

@media (min-width: 768px) {
  .timeline {
    padding-left: 0;
    max-width: 800px;
    margin: 0 auto;
  }

  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline-item {
    width: 50%;
    padding-left: 0;
  }

  .timeline-item:nth-child(odd) {
    padding-right: 3rem;
    text-align: right;
    margin-left: 0;
  }

  .timeline-item:nth-child(even) {
    padding-left: 3rem;
    margin-left: 50%;
  }

  .timeline-item:nth-child(odd)::before {
    left: auto;
    right: -0.5rem;
  }

  .timeline-item:nth-child(even)::before {
    left: -0.5rem;
  }
}


/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* --- Blog Cards --- */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

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

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.blog-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Blog filter pills */
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* --- Form Styles --- */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(153, 27, 30, 0.1);
}

html.dark .form-input:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-input.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
  color: #EF4444;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}

.form-input.error + .form-error {
  display: block;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* --- Footer --- */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

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

/* --- Blog Post Content --- */
.prose {
  max-width: 800px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.prose p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

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

.prose blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-muted);
}

/* --- Gradient Text --- */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Section Divider --- */
.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 2px;
}

/* --- Icon bg helpers --- */
.icon-bg-red {
  background: rgba(153, 27, 30, 0.1);
  color: var(--primary);
}

.icon-bg-blue {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
}

.icon-bg-green {
  background: rgba(22, 163, 74, 0.1);
  color: #16A34A;
}

.icon-bg-purple {
  background: rgba(147, 51, 234, 0.1);
  color: #9333EA;
}

.icon-bg-orange {
  background: rgba(234, 88, 12, 0.1);
  color: #EA580C;
}

.icon-bg-teal {
  background: rgba(20, 184, 166, 0.1);
  color: #14B8A6;
}

html.dark .icon-bg-red { background: rgba(239, 68, 68, 0.15); }
html.dark .icon-bg-blue { background: rgba(59, 130, 246, 0.15); }
html.dark .icon-bg-green { background: rgba(22, 163, 74, 0.15); }
html.dark .icon-bg-purple { background: rgba(147, 51, 234, 0.15); }
html.dark .icon-bg-orange { background: rgba(234, 88, 12, 0.15); }
html.dark .icon-bg-teal { background: rgba(20, 184, 166, 0.15); }

/* --- Product Feature List --- */
.feature-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.feature-check svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: #16A34A;
  margin-top: 0.15rem;
}

/* --- Misc --- */
.text-primary { color: var(--primary); }
.bg-primary { background-color: var(--primary); }
.border-primary { border-color: var(--primary); }

/* Gradient overlay for blog card images */
.blog-image-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* 404 page */
.error-404 {
  font-size: 8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

@media (min-width: 768px) {
  .error-404 {
    font-size: 12rem;
  }
}

/* --- Image Containers --- */
.hero-bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(153,27,30,0.82) 0%, rgba(30,41,59,0.92) 100%);
}

html.dark .hero-bg-img::after {
  background: linear-gradient(135deg, rgba(15,23,42,0.85) 0%, rgba(30,41,59,0.95) 100%);
}

/* Hero Video Background */
.hero-bg-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.hero-bg-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120vw;
  height: 120vh;
  min-width: 120%;
  min-height: 120%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: 0;
}
.hero-bg-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(153,27,30,0.75) 0%, rgba(30,41,59,0.85) 100%);
  z-index: 1;
}
html.dark .hero-bg-video::after {
  background: linear-gradient(135deg, rgba(15,23,42,0.8) 0%, rgba(30,41,59,0.9) 100%);
}
@media (max-width: 768px) {
  .hero-bg-video iframe { display: none; }
}

/* Homepage Product Cards */
.product-card-home {
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  border-color: var(--border);
}
.product-card-home:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.product-card-home.hover-primary:hover { border-color: var(--primary); }
.product-card-home.hover-accent:hover { border-color: var(--accent); }
.product-card-home.hover-odoo:hover { border-color: #714b67; }
.product-card-home.hover-teal:hover { border-color: #14B8A6; }
.product-card-home.hover-purple:hover { border-color: #A855F7; }

.card-img-top {
  width: calc(100% + 4rem);
  height: 200px;
  margin: -2rem -2rem 1.5rem -2rem;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.product-screenshot {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  background: transparent;
  border: none;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.product-screenshot:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.14);
}

html.dark .product-screenshot {
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
html.dark .product-screenshot:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.product-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero image column: flex chain to propagate grid-stretch height */
.hero-img-col {
  display: flex;
  flex-direction: column;
}
.hero-img-col .product-screenshot {
  flex: 1;
  min-height: 0;
  display: flex;
}
.hero-img-col .product-screenshot img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
}

/* Smooth image load */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img.loaded, img[loading="eager"] {
  opacity: 1;
}

/* --- Section Transition Wave --- */
.section-wave {
  position: relative;
}

.section-wave::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 1;
}

.section-wave.wave-to-card::after {
  background: var(--bg-card);
}

/* --- Video Embed --- */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

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

/* --- Gradient Divider Between Sections --- */
.gradient-divider {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
  border: none;
  margin: 0;
}

/* --- Cookie Consent Banner --- */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

#cookie-consent-banner.visible {
  transform: translateY(0);
}

html.dark #cookie-consent-banner {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-consent-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-consent-inner p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.cookie-consent-inner a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 500;
}

.cookie-consent-inner a:hover {
  color: var(--primary-hover);
}

.cookie-consent-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-consent-buttons button {
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

#cookie-accept {
  background: var(--primary);
  color: #fff;
}

#cookie-accept:hover {
  background: var(--primary-hover);
}

#cookie-reject {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

#cookie-reject:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* --- Print --- */
@media print {
  .navbar, .back-to-top, .mobile-menu, .mobile-overlay, #cookie-consent-banner {
    display: none !important;
  }
}
