/* Selecta Strategy - Premium Branding Design */
/* Universal flag display (CSS/SVG/Emoji) */
.flag,
.flag-img {
  width: 20px;
  height: 15px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
  object-fit: cover;
  background-size: cover;
  background-position: center;
}

/* CSS Flag fallbacks when images aren't available */
.flag-css {
  width: 20px;
  height: 15px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

/* Spain Flag */
.flag-css.es {
  background: linear-gradient(to bottom, #AA151B 0%, #AA151B 25%, #F1BF00 25%, #F1BF00 75%, #AA151B 75%);
}

/* USA Flag */
.flag-css.us {
  background: linear-gradient(to right, #002868 0%, #002868 40%, #BF0A30 40%);
}

/* Portugal Flag */
.flag-css.pt {
  background: linear-gradient(to right, #046A38 0%, #046A38 40%, #DA020E 40%);
}

/* France Flag */
.flag-css.fr {
  background: linear-gradient(to right, #002654 0%, #002654 33%, #FFFFFF 33%, #FFFFFF 66%, #ED2939 66%);
}

/* Russia Flag */
.flag-css.ru {
  background: linear-gradient(to bottom, #FFFFFF 0%, #FFFFFF 33%, #0039A6 33%, #0039A6 66%, #D52B1E 66%);
}

/* Additional country flags */
.flag-css.mx {
  background: linear-gradient(to right, #006847 0%, #006847 33%, #FFFFFF 33%, #FFFFFF 66%, #CE1126 66%);
}

.flag-css.co {
  background: linear-gradient(to bottom, #FDE047 0%, #FDE047 50%, #0EA5E9 50%, #0EA5E9 75%, #DC2626 75%);
}

.flag-css.ar {
  background: linear-gradient(to bottom, #74C0FC 0%, #74C0FC 33%, #FFFFFF 33%, #FFFFFF 66%, #74C0FC 66%);
}

.flag-css.cl {
  background: linear-gradient(to bottom, #FFFFFF 0%, #FFFFFF 50%, #DC2626 50%);
}

.flag-css.pe {
  background: linear-gradient(to right, #DC2626 0%, #DC2626 33%, #FFFFFF 33%, #FFFFFF 66%, #DC2626 66%);
}

.flag-css.gb {
  background: linear-gradient(45deg, #012169 25%, #FFFFFF 25%, #FFFFFF 50%, #C8102E 50%, #C8102E 75%, #FFFFFF 75%);
}

.flag-css.de {
  background: linear-gradient(to bottom, #000000 0%, #000000 33%, #DD0000 33%, #DD0000 66%, #FFCE00 66%);
}

.flag-css.br {
  background: linear-gradient(to bottom, #009739 0%, #009739 25%, #FEDD00 25%, #FEDD00 75%, #009739 75%);
}

/* Generic flag for others */
.flag-css.default {
  background: linear-gradient(45deg, #4A90A4 25%, transparent 25%), 
              linear-gradient(-45deg, #4A90A4 25%, transparent 25%), 
              linear-gradient(45deg, transparent 75%, #4A90A4 75%), 
              linear-gradient(-45deg, transparent 75%, #4A90A4 75%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0px;
  background-color: #f0f0f0;
}

/* Custom Select with Flags */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select__trigger {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--gray-300);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.custom-select__trigger:hover {
  border-color: var(--gray-400);
  box-shadow: var(--shadow);
}

.custom-select__trigger:after {
  content: '▼';
  font-size: 0.8em;
  color: var(--text-secondary);
}

.custom-select__options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 2px solid var(--gray-300);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  z-index: 20000;
  display: none;
}

.custom-select.open .custom-select__options {
  display: block;
}

.custom-select.open .custom-select__trigger:after {
  content: '▲';
}

.custom-select__option {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s ease;
  border-bottom: 1px solid var(--gray-200);
}

.custom-select__option:last-child {
  border-bottom: none;
}

.custom-select__option:hover {
  background: var(--gray-100);
}

.custom-select__option.selected {
  background: var(--accent-light);
  color: var(--accent);
}

/* Brand scrollbars for custom country dropdown */
.custom-select__options{ scrollbar-width: thin; scrollbar-color: var(--primary-600) rgba(255,255,255,.06); }
.custom-select__options::-webkit-scrollbar{ width: 10px; height: 10px; }
.custom-select__options::-webkit-scrollbar-track{ background: rgba(255,255,255,.06); border-radius: 10px; }
.custom-select__options::-webkit-scrollbar-thumb{
  background: linear-gradient(135deg, var(--accent-hover), var(--primary-600));
  border-radius: 10px;
  border: 2px solid rgba(10,31,68,.35);
}
.custom-select__options::-webkit-scrollbar-thumb:hover{ background: linear-gradient(135deg, var(--primary-hover), var(--primary-600)); }
.custom-select__options::-webkit-scrollbar-thumb:active{
  background: linear-gradient(135deg, #0E2A55, #061A33);
  box-shadow: inset 0 0 0 2px rgba(13,36,73,.35), 0 0 10px rgba(13,36,73,.3);
}

/* Emoji Support - Cross-platform compatibility (fallback) */
.flag-emoji {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Emoji One', 'Android Emoji', 'Twemoji Mozilla', 'Symbola', emoji, sans-serif;
  font-size: 1.2em;
  display: inline-block;
  text-rendering: optimizeQuality;
  -webkit-font-feature-settings: "liga" on, "calt" on;
  font-feature-settings: "liga" on, "calt" on;
  text-decoration: none;
  line-height: 1;
  vertical-align: middle;
  margin-right: 4px;
}

:root{
  /* Professional palette with brand identity colors */
  --header-h: 70px;
  --topbar-h: 0px;
  
  /* Light theme with brand accent */
  --bg: #ffffff;
  --bg-secondary: #f8f9fa;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #8e8e93;
  
  /* Brand colors - Selecta Strategy Identity */
  --primary: #0A1F44;  /* Deep blue from new logo */
  --primary-hover: #083366;
  --primary-light: #e6edf7;
  --primary-600: #0A1F44;
  --accent: #0A1F44;   /* Using brand blue as main accent */
  --accent-hover: #083366;
  --accent-light: #e6edf7;
  --metallic: #A3A3A3;  /* Metallic gray from logo */
  
  /* Legacy variables for compatibility */
  --gold-2: var(--metallic);
  --aqua: #4A90A4;
  --aqua-2: #5BA0B4;
  
  /* Neutral grays */
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  
  /* Spacing and layout */
  --container-max: 1200px;
  --section-padding: 120px;
  --card-radius: 16px;
  --button-radius: 8px;
  
  /* Typography */
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}
/* Base styles */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-h);
}
/* Basic element styles */
img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}
/* Layout */
.container {
  width: min(var(--container-max), 90%);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--section-padding) 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
}

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

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  transition: all 0.3s ease;
}

.header__wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0;
}

.brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--primary);
}

.brand img {
  height: 110px;
  width: auto;
  max-width: none;
  margin: -20px 0;
}

.nav__menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav__menu a {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

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

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

.nav__menu a:hover::after {
  width: 100%;
}

.header__cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--button-radius);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  position: relative;
  overflow: hidden;
}

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

.btn--accent:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(10, 31, 68, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--metallic);
}

.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn--pill {
  border-radius: 50px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--bg) 100%);
  padding: 2rem 0;
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: 80vh;
}

.hero__text {
  max-width: 100%;
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 90%;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__image {
  width: 100%;
  max-width: 500px;
  height: auto;
  object-fit: contain;
}


/* Language selector */
.lang {
  position: relative;
}

.lang__btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--button-radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang__btn:hover {
  border-color: var(--accent);
}

.lang__list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--button-radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  list-style: none;
  margin: 0;
  display: none;
  min-width: 180px;
  z-index: 100;
  /* Limit height to 7 rows and enable scroll */
  max-height: calc(var(--lang-row-h, 44px) * 7 + 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.lang__list a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  padding: 8px 12px;
  min-height: var(--lang-row-h, 44px);
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.lang__list a:hover {
  background: var(--gray-100);
}

.lang--open .lang__list {
  display: block;
}

/* Themed scrollbar for language list (Firefox + WebKit) */
.lang__list{ scrollbar-width: thin; scrollbar-color: var(--primary-600) rgba(255,255,255,.06); }
.lang__list::-webkit-scrollbar{ width: 10px; height: 10px; }
.lang__list::-webkit-scrollbar-track{ background: rgba(255,255,255,.06); border-radius: 10px; }
.lang__list::-webkit-scrollbar-thumb{ background: linear-gradient(135deg, var(--primary-600), var(--primary-500)); border-radius: 10px; border: 2px solid rgba(255,255,255,.15); }
.lang__list::-webkit-scrollbar-thumb:hover{ background: linear-gradient(135deg, var(--primary-hover), var(--primary-600)); }

/* Cards */
.cards {
  display: grid;
  gap: 2rem;
}

.cards--4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.cards--3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

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

.card h3 {
  color: var(--text);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Services - Apple/Samsung Style */
.services-grid {
  display: grid;
  gap: 2rem;
}

/* Hero Service Card (Large like Apple) */
.service-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--bg) 100%);
  border-radius: 24px;
  padding: 4rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

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

.service-hero__content h3 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text);
  line-height: 1.2;
}

.service-hero__content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.service-hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.service-hero__media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-hero__media img {
  width: 100%;
  max-width: 400px;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
}

/* Service Cards Grid */
.services-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 3rem;
}

.service-card-large {
  background: var(--surface);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(10, 31, 68, 0.12);
  transition: all 0.4s ease;
  border: 2px solid rgba(163, 163, 163, 0.2);
  min-height: 500px;
}

.service-card-large:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 60px rgba(10, 31, 68, 0.2);
  border-color: var(--primary);
}

.service-card-large__media {
  position: relative;
  overflow: hidden;
  height: 320px;
}

.service-card-large__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transition: transform 0.3s ease;
}

.service-card-large:hover .service-card-large__media img {
  transform: scale(1.05);
}

.service-card-large__content {
  padding: 2.5rem;
}

.service-card-large__content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary);
  line-height: 1.3;
}

.service-card-large__content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
  font-size: 1.1rem;
}

.btn--link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.btn--link:hover {
  color: var(--primary-hover);
  transform: translateX(4px);
}

/* Tech Section */
.tech__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: start;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-300);
}

.timeline li {
  margin: 0 0 2rem;
  position: relative;
  padding-left: 3rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.integrations {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.integrations h3 {
  margin-bottom: 1rem;
}

.integrations ul {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

/* Cases/Carousel */
.carousel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.carousel__track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 1rem;
}

.carousel__track::-webkit-scrollbar {
  height: 6px;
}

.carousel__track::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 3px;
}

.carousel__track::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 3px;
}

.case {
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

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

.case h3 {
  color: var(--text);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.case p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--gray-300);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.carousel__btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.carousel__btn.prev {
  left: 10px;
}

.carousel__btn.next {
  right: 10px;
}

/* Blog - Tesla Style */
.blog-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

/* Hero Blog Article (Tesla Style) */
.blog-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.blog-hero:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.blog-hero__media {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.blog-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-hero:hover .blog-hero__media img {
  transform: scale(1.02);
}

.blog-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
}

.blog-hero__content {
  padding: 3rem;
  color: white;
}

.blog-hero__content h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
  line-height: 1.2;
}

.blog-hero__meta {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

.blog-hero .btn {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.blog-hero .btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Secondary Blog Articles */
.blog-secondary {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

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

.blog-card__media {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.blog-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.3) 60%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
}

.blog-card__content {
  padding: 1.5rem;
  color: white;
}

.blog-card__content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: white;
  line-height: 1.3;
}

.blog-card__meta {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.btn--small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.blog-card .btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.blog-card .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Back to top button */
.to-top{
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary);
  border: 1px solid var(--gray-300);
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  opacity: 0; visibility: hidden;
  z-index: 900;
}
.to-top.show{ opacity: 1; visibility: visible; }
.to-top:hover{ transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.25); }

/* Contact & Forms */
.contact__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
}

.form {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.field {
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--gray-300);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

/* Enhanced emoji rendering for select elements */
.field select {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI', var(--font-body), system-ui, -apple-system, sans-serif;
}

/* Ensure emoji flags are visible in select options */
.field select option {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI', var(--font-body), system-ui, -apple-system, sans-serif;
  padding: 8px 12px;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--gray-400);
  box-shadow: var(--shadow);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light), var(--shadow);
  background: var(--bg);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--font-body);
}

.field--row {
  display: flex;
  gap: 1rem;
}

.contact__info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact__info li {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.contact__info a {
  color: var(--accent);
  text-decoration: none;
}

.contact__info a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2rem;
  align-items: center;
}

.footer__brand img {
  height: 32px;
  width: auto;
  margin-bottom: 0.5rem;
}

.footer__brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.footer nav {
  display: flex;
  gap: 2rem;
}

.footer nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer nav a:hover {
  color: var(--accent);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer__contact {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer__contact a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer__contact a:hover {
  color: var(--accent);
}

/* Plans */
.plans .price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.price-card {
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: var(--card-radius);
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(10, 31, 68, 0.25);
  border-color: var(--primary-hover);
}

.price-card--premium {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-light);
}

.price-card header h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.price-card .features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.price-card .features li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.5rem;
}

.price-card .features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.price-card .price {
  margin: 1.5rem 0;
}

.price-card .amount {
  font-size: 3rem;
  font-weight: bold;
  color: var(--text);
  line-height: 1;
}

/* Capabilities */
.capabilities .cap-grid {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.capabilities .cap-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  border-bottom: 1px solid var(--gray-200);
}

.capabilities .cap-row:last-child {
  border-bottom: none;
}

.capabilities .cap-col {
  padding: 1.5rem;
  border-right: 1px solid var(--gray-200);
}

.capabilities .cap-col:last-child {
  border-right: none;
}

.capabilities .cap-title {
  font-weight: 600;
  color: var(--text);
}

/* Modals */
.lang-modal,
.svc-modal,
.rmodal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.lang-modal[hidden],
.svc-modal[hidden],
.rmodal[hidden] {
  display: none;
}

.lang-modal__dialog,
.svc-modal__dialog,
.rmodal__dialog {
  background: var(--surface);
  border-radius: var(--card-radius);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.lang-modal__close,
.svc-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.lang-modal__actions,
.svc-modal__actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.rmodal__dialog {
  text-align: center;
}

.rmodal__img {
  width: 120px;
  height: auto;
  margin: -3rem auto 1rem;
}

.rmodal__text {
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero__content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .tech__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }
  
  .cards--4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  /* Service Hero Responsive */
  .service-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 2rem;
    text-align: center;
  }
  
  /* Blog Grid Responsive */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .blog-hero__media {
    height: 400px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
    --section-padding: 80px;
  }
  
  .nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 0 0 var(--card-radius) var(--card-radius);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
  }
  
  .nav__menu.show {
    display: flex;
  }
  
  .nav__toggle {
    display: block;
  }
  
  .header__cta {
    gap: 0.5rem;
  }
  
  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero__actions .btn {
    width: 100%;
  }
  
  .cards--3,
  .cards--4 {
    grid-template-columns: 1fr;
  }
  
  .services-cards {
    grid-template-columns: 1fr;
  }
  
  .service-hero {
    padding: 2rem 1.5rem;
  }
  
  .service-hero__content h3 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  
  .service-hero__actions {
    flex-direction: column;
    width: 100%;
  }
  
  .service-hero__actions .btn {
    width: 100%;
  }
  
  .blog-hero__media {
    height: 300px;
  }
  
  .blog-hero__content {
    padding: 2rem;
  }
  
  .blog-secondary {
    gap: 1rem;
  }
  
  .blog-card__media {
    height: 200px;
  }
  
  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }
  
  .footer nav {
    justify-content: center;
  }
}

/* Cases */
.cases .carousel{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:var(--shadow);overflow:hidden}
.carousel__track{display:flex;gap:16px;scroll-behavior:smooth;overflow:auto;padding-bottom:6px;scrollbar-width:none}
.carousel__track::-webkit-scrollbar{display:none}
.cases .carousel::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,var(--bg) 0%,rgba(255,255,255,0) 6%,rgba(255,255,255,0) 94%,var(--bg) 100%);z-index:1}
.case{position:relative;min-width:280px;flex:0 0 33%;background:#ffffff;color:#333333;border:1px solid #e1e5e9;border-radius:12px;padding:18px;overflow:hidden;box-shadow:0 2px 16px rgba(0,0,0,0.08)}
.case::before{content:"";position:absolute;inset:0;padding:1px;border-radius:12px;background:linear-gradient(140deg,var(--gold-2),rgba(221,170,88,.22));-webkit-mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0) border-box;mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0) border-box;-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}
.case::after{content:"";position:absolute;inset:0;border-radius:12px;padding:1px;pointer-events:none;background:conic-gradient(from 0deg,transparent 0 342deg,rgba(221,170,88,.35) 342deg 350deg,rgba(221,170,88,.9) 350deg 356deg,rgba(221,170,88,.35) 356deg 360deg);-webkit-mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0) border-box;mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0) border-box;-webkit-mask-composite:xor;mask-composite:exclude;animation:border-sweep 26s linear infinite}
.carousel__btn{position:absolute;top:50%;transform:translateY(-50%);background:#ffffff;border:1px solid #e1e5e9;color:#333333;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;transition:transform .2s ease, box-shadow .2s ease;z-index:2;box-shadow:0 2px 8px rgba(0,0,0,0.1)}
.carousel__btn:hover{background:#f8f9fa;box-shadow:0 4px 16px rgba(0,0,0,0.15);transform:translateY(-50%) scale(1.06)}
.carousel__btn.prev{left:8px}
.carousel__btn.next{right:8px}

/* Blog */
.post{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:12px;box-shadow:var(--shadow)}
.post .meta{color:var(--metal);font-size:.9rem}
.post img{border-radius:12px;margin-bottom:10px;transition:transform .5s ease}
.post:hover{transform:translateY(-3px);transition:transform .2s ease, box-shadow .2s ease;box-shadow:0 16px 40px rgba(0,0,0,.45)}
.post:hover img{transform:scale(1.02)}

/* Contact */
.contact__grid{display:grid;grid-template-columns:1.1fr .9fr;gap:28px}
.form{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:var(--shadow)}
.field{display:grid;gap:6px;margin-bottom:12px}

/* Force cursors on suggestion popups (best-effort; overlay is UA-controlled) */
input::-webkit-calendar-picker-indicator,
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button{
  cursor: var(--cur-pointer), var(--cur-pointer-sm), pointer !important;
}
/* Select: custom arrow and appearance */
.form select{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23007aff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 16px;
  padding-right: 48px;
}
.form select:disabled{
  opacity:.6;
}
.form__msg{margin-top:8px;font-weight:700}

/* Form label cursor & custom select styles */
.form label{ cursor: var(--cur-pointer), var(--cur-pointer-sm), pointer !important; }

/* Custom Select (replaces native select to style open menu and cursor) */
.cselect{ position: relative; }
.cselect__btn{
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--gray-300);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}
.cselect__btn::after{
  content: '';
  position: absolute;
  right: 16px; 
  top: 50%; 
  transform: translateY(-50%);
  width: 16px; 
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23007aff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 16px 16px;
  background-repeat: no-repeat;
}
.cselect__btn:hover{ 
  border-color: var(--gray-400); 
  box-shadow: var(--shadow);
}
.cselect__btn:focus{ 
  outline: 0; 
  border-color: var(--accent); 
  box-shadow: 0 0 0 4px var(--accent-light), var(--shadow); 
  background: var(--bg);
}

.cselect__menu{
  position: absolute; 
  left: 0; 
  right: 0; 
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-height: 260px; 
  overflow: auto;
  list-style: none; 
  margin: 0; 
  padding: 8px;
  display: none; 
  z-index: 20000;
  /* Subtle fade/slide animation */
  opacity: 0; 
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cselect__menu.is-above{ transform: translateY(-6px); }
.cselect__menu.is-open{ opacity: 1; transform: translateY(0); }
.cselect--open .cselect__menu{ display: block; }
.cselect__option{
  padding: 12px 16px; 
  border-radius: 8px; 
  color: var(--text);
  cursor: pointer;
  border: 2px solid transparent;
  background: transparent;
  transition: all 0.2s ease;
}
.cselect__option:hover,
.cselect__option[aria-selected="true"]{
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* Native select hidden when enhanced */
.cselect > select[aria-hidden],
.cselect > select[hidden]{ display:none !important; }
/* Contact info links: white with animated underline */
.contact__info a,
.contact__info a:visited{color:#e5e7eb;text-decoration:none;position:relative;background-image:linear-gradient(currentColor,currentColor);background-size:0 2px;background-repeat:no-repeat;background-position:left 95%;transition:color .2s ease,background-size .25s ease}
.contact__info a:hover{color:#fff;background-size:100% 2px}



/* Utilities and responsive */
.header--scrolled{box-shadow:0 2px 8px rgba(0,0,0,0.1);background:#ffffff;border-bottom-color:var(--gray-200)}

/* Capabilities table-like grid */
.capabilities .cap-grid{display:flex;flex-direction:column;gap:0;border:1px solid var(--line);border-radius:18px;overflow:hidden;background:var(--surface)}
.capabilities .cap-row{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid rgba(255,255,255,.06)}
.capabilities .cap-row:first-child{border-top:none}
.capabilities .cap-col{padding:18px 16px;border-right:1px solid rgba(255,255,255,.06)}
.capabilities .cap-col:last-child{border-right:none}
.capabilities .cap-title{font-weight:800}



.plans .price-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}
/* Clean plan cards: dark interior + simple colored border (no effects) */
.price-card{
  position:relative;
  --accent: var(--primary);
  border-radius:20px;
  padding:22px;
  display:flex;flex-direction:column;gap:14px;
  transition:transform .25s ease, box-shadow .25s ease, filter .25s ease;
  overflow:hidden;
  background: var(--surface);
  border: 2px solid var(--primary);
  border:2px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
}
.price-card::before,.price-card::after{content:none}
.price-card:hover::after{content:"";position:absolute;inset:0;border-radius:20px;padding:1px;background:conic-gradient(from 0deg,transparent 0 340deg,rgba(221,170,88,.25) 340deg 350deg,rgba(221,170,88,.6) 350deg 356deg,rgba(221,170,88,.25) 356deg 360deg);-webkit-mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0) border-box;mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0) border-box;-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;animation:border-sweep 26s linear infinite}
.price-card:hover{transform:translateY(-4px);box-shadow:0 24px 70px rgba(0,0,0,.55);filter:saturate(1.02)}
.price-card header h3{margin:0;font-size:1.25rem;text-transform:uppercase;letter-spacing:.5px;color:var(--accent)}
.price-card .badge{position:absolute;top:12px;right:12px;background:linear-gradient(135deg,var(--gold-2),#ffe1a6);color:#1a1207;border-radius:999px;padding:6px 10px;font-weight:900;font-size:.8rem;box-shadow:0 8px 24px rgba(221,170,88,.35)}
.price-card--basic .badge{background:linear-gradient(135deg,var(--aqua),var(--aqua-2));color:#041016;box-shadow:0 8px 24px rgba(22,183,214,.35)}
.price-card .muted{color:var(--muted);font-weight:700;font-size:.95rem}
.price-card .features{margin:6px 0 0;padding-left:18px;color:#666666;display:grid;gap:8px;list-style:disc;list-style-position:outside}
.price-card .features li{position:relative}
.price-card .price{display:flex;flex-direction:column;gap:4px;margin-top:auto}
.price-card .amount{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:2.6rem;font-weight:900;color:#333333}
.price-card .note{color:#666666;font-size:.95rem}
.price-card--premium{ --accent: var(--primary); border-color: var(--primary); }
.price-card--basic  { --accent: var(--primary); border-color: var(--primary); }

/* Accent styling to match reference visuals */
/* Accent usage */
.price-card .features li::marker{ color: var(--accent); }
.price-card .features strong{ color: var(--accent); }
.price-card .amount{ color: var(--accent); }
.price-card .note{ color: var(--accent); }

/* Outline CTA in aqua for Basic, matching reference */
.price-card--basic .btn--ghost{
  border-color: rgba(91,227,255,.45);
  color: var(--aqua-2);
  background: rgba(10,17,19,.2);
}
.price-card--basic .btn--ghost:hover{
  background: rgba(10,17,19,.35);
  border-color: rgba(91,227,255,.65);
  color:#333333;
}

@media (prefers-reduced-motion: reduce){
  /* No animation to respect user preference; ring remains static */
  .btn,.btn:hover,.btn:active{transform:none !important}
  .btn--accent::after{transition:none}
  .service-card__img,.post img{transition:none !important;transform:none !important}
  .preloader__ring::after{animation:none !important}
}

@media (max-width: 820px){
  .plans .price-grid{grid-template-columns:1fr}
}

@media (max-width: 980px){
  .hero__grid{grid-template-columns:1fr}
  .panel{padding:18px}
  .display{font-size:clamp(1.9rem,6vw,2.6rem)}
  .cards--4{grid-template-columns:repeat(2,1fr)}
  .services .service-list{grid-template-columns:1fr}
  .tech__grid{grid-template-columns:1fr}
  .contact__grid{grid-template-columns:1fr}
  .hero .btn{min-width:unset;flex:1}
}
@media (max-width: 820px){
  :root{ --header-h: 56px; }
  .header__wrap{height:56px}
  .brand img{height:95px;width:auto;margin:-15px 0}
  .nav__toggle{display:block}
  .nav__menu{position:absolute;right:16px;top:62px;background:#ffffff;border:1px solid #e1e5e9;border-radius:12px;padding:12px;flex-direction:column;display:none;box-shadow:0 4px 16px rgba(0,0,0,0.1)}
  .nav__menu.show{display:flex}
  .header__cta .btn{padding:8px 12px;font-size:.9rem;white-space:nowrap;max-width:180px}
}
@media (max-width: 560px){
  :root{ --topbar-h: 52px; } /* accommodate possible wrap in topbar */
  .cards--4{grid-template-columns:1fr}
  .cards--3{grid-template-columns:1fr}
  .service-card{grid-template-columns:1fr}
  .service-card__img{height:240px}
  .capabilities .cap-row{grid-template-columns:1fr}
  .header__cta .btn{padding:6px 10px;font-size:.85rem;max-width:150px}
  .hero .actions{flex-direction:column}
  .hero .btn{width:100%;min-width:unset}
}

/* Extra small screens: tighten topbar spacing and scale text/icons a bit more */
@media (max-width: 420px){
  .topbar__wrap{gap:10px}
  .topbar__link .ico{width:14px;height:14px}
  .topbar .txt{max-width:32vw;font-size:clamp(10px,3.4vw,13px)}
}

/* Footer responsiveness: stack columns and allow contact to wrap nicely */
@media (max-width: 860px){
  .footer__grid{grid-template-columns:1fr;gap:12px}
  .footer__social{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
}
@media (max-width: 520px){
  .footer__contact a{white-space:nowrap;font-size:clamp(11px,3.6vw,14px)}
}

/* Beautiful themed scrollbars (Firefox + WebKit) */
/* Firefox */
html{ scrollbar-width: thin; scrollbar-color: var(--primary-600) rgba(255,255,255,.06); }
/* Make specific scroll areas inherit the theme too */
.cselect__menu{ scrollbar-width: thin; scrollbar-color: var(--primary-600) rgba(255,255,255,.06); }

/* WebKit-based (Chrome, Edge, Safari) */
*::-webkit-scrollbar{ width: 12px; height: 12px; }
*::-webkit-scrollbar-track{ background: rgba(255,255,255,.06); border-radius: 12px; }
*::-webkit-scrollbar-thumb{
  background: linear-gradient(135deg, var(--accent-hover), var(--primary-600));
  border-radius: 12px;
  border: 2px solid rgba(10,31,68,.35);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
*::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-600));
}
*::-webkit-scrollbar-thumb:active{
  background: linear-gradient(135deg, #0E2A55, #061A33);
  box-shadow: inset 0 0 0 2px rgba(13,36,73,.35), 0 0 12px rgba(13,36,73,.35);
}
*::-webkit-scrollbar-corner{ background: transparent; }

/* Tighter scrollbar inside custom select menu */
.cselect__menu::-webkit-scrollbar{ width: 10px; height: 10px; }
.cselect__menu::-webkit-scrollbar-track{ background: rgba(255,255,255,.06); border-radius: 10px; }
.cselect__menu::-webkit-scrollbar-thumb{
  background: linear-gradient(135deg, var(--accent-hover), var(--primary-600));
  border-radius: 10px;
  border: 2px solid rgba(10,31,68,.35);
}
.cselect__menu::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-600));
}
.cselect__menu::-webkit-scrollbar-thumb:active{
  background: linear-gradient(135deg, #0E2A55, #061A33);
  box-shadow: inset 0 0 0 2px rgba(13,36,73,.35), 0 0 10px rgba(13,36,73,.3);
}

/* Brighter thumb color in Firefox while menu abierto */
.cselect--open .cselect__menu{ scrollbar-color: var(--primary-600) rgba(255,255,255,.08); }

/* Language modal */
.lang-modal[hidden] { display: none !important; }
.lang-modal { position: fixed; inset: 0; z-index: 1000; }
.lang-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); }
.lang-modal__dialog { position: relative; margin: 10vh auto 0; max-width: 520px; background: #ffffff; color: #333333; border: 1px solid #e1e5e9; border-radius: 12px; padding: 20px 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
.lang-modal__close { position: absolute; top: 8px; right: 10px; background: transparent; border: 0; color: #666666; font-size: 22px; cursor: pointer; }
.lang-modal__actions { display: flex; gap: 12px; margin-top: 14px; }
body.no-scroll { overflow: hidden; }

/* Service modal */
.svc-modal[hidden] { display: none !important; }
.svc-modal { position: fixed; inset: 0; z-index: 1000; }
.svc-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); }
.svc-modal__dialog { position: relative; margin: 10vh auto 0; max-width: 680px; background: #0b0c10; color: #e5e7eb; border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 22px 26px; box-shadow: 0 10px 40px rgba(0,0,0,0.45); }
.svc-modal__close { position: absolute; top: 8px; right: 10px; background: transparent; border: 0; color: #e5e7eb; font-size: 22px; cursor: pointer; }
.svc-modal__actions { display: flex; gap: 12px; margin-top: 16px; }

/* Result modal (success/error feedback) */
.rmodal[hidden] { display: none !important; }
.rmodal { position: fixed; inset: 0; z-index: 1100; }
.rmodal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); }
.rmodal__dialog {
  position: relative;
  margin: 12vh auto 0;
  width: min(520px, 92%);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)), #0b0c10;
  color: #e5e7eb;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 22px 24px 20px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  text-align: center;
}
.rmodal__img {
  width: 120px; height: auto; margin: -64px auto 10px; display: block;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.45)) drop-shadow(0 3px 8px rgba(221,170,88,.22));
}
.rmodal__text { font-weight: 800; margin: 10px 0 14px; }
.rmodal__btn { margin-top: 6px; }
/* State colors */
.rmodal.rmodal--ok .rmodal__text { color: var(--gold-2); }
.rmodal.rmodal--err .rmodal__text { color: #ff6b6b; }

@media (max-width: 560px){
  .rmodal__img { width: 92px; margin-top: -52px; }
}

/* Neural Network Background Animation */
.neural-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.neural-network {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.08;
}

.neuron {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(10, 31, 68, 0.6);
  border-radius: 50%;
  animation: neuron-pulse 3s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(10, 31, 68, 0.3);
}

.neuron.active {
  background: rgba(10, 31, 68, 0.9);
  box-shadow: 0 0 12px rgba(10, 31, 68, 0.5);
}

.connection {
  position: absolute;
  height: 1px;
  background: rgba(10, 31, 68, 0.3);
  transform-origin: left center;
  opacity: 0;
  animation: connection-flow 4s ease-in-out infinite;
}

.connection.horizontal {
  background: linear-gradient(to right, transparent, rgba(10, 31, 68, 0.4), rgba(10, 31, 68, 0.6), rgba(10, 31, 68, 0.4), transparent);
}

.connection.vertical {
  background: linear-gradient(to bottom, transparent, rgba(10, 31, 68, 0.3), rgba(10, 31, 68, 0.5), rgba(10, 31, 68, 0.3), transparent);
  width: 1px;
  height: auto;
}

.connection.diagonal {
  background: linear-gradient(45deg, transparent, rgba(10, 31, 68, 0.25), rgba(10, 31, 68, 0.4), rgba(10, 31, 68, 0.25), transparent);
}

@keyframes neuron-pulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 0.4;
  }
  50% { 
    transform: scale(1.5);
    opacity: 0.8;
  }
}

@keyframes connection-flow {
  0% { 
    opacity: 0;
    transform: scaleX(0);
  }
  20% { 
    opacity: 0.6;
    transform: scaleX(0.3);
  }
  50% { 
    opacity: 0.8;
    transform: scaleX(1);
  }
  80% { 
    opacity: 0.4;
    transform: scaleX(1);
  }
  100% { 
    opacity: 0;
    transform: scaleX(1);
  }
}

@keyframes data-flow {
  0% { 
    left: 0%;
    opacity: 0;
  }
  10% { 
    opacity: 1;
  }
  90% { 
    opacity: 1;
  }
  100% { 
    left: 100%;
    opacity: 0;
  }
}
