/* ═══════════════════════════════════════════════════════════════════════════
   ALGORITMO.CH - Modern Landing Page v2
   A clean, minimal dark theme with violet/indigo accents
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;

  /* Primary palette - Violet/Indigo */
  --color-primary: #8b5cf6;
  --color-primary-light: #a78bfa;
  --color-primary-dark: #7c3aed;
  --color-accent: #c4b5fd;

  /* Secondary accents */
  --color-secondary: #06b6d4;
  --color-tertiary: #f472b6;

  /* Backgrounds */
  --bg-base: #0a0a0f;
  --bg-surface: rgba(15, 15, 25, 0.8);
  --bg-elevated: rgba(25, 25, 40, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.03);

  /* Text */
  --text-primary: #f4f4f5;
  --text-secondary: rgba(244, 244, 245, 0.7);
  --text-muted: rgba(244, 244, 245, 0.5);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(139, 92, 246, 0.4);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --gradient-glow: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  --gradient-mesh:
    radial-gradient(at 20% 20%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 80% 80%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 40% 60%, rgba(244, 114, 182, 0.06) 0px, transparent 50%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.15);

  /* Spacing */
  --section-padding: clamp(4rem, 10vw, 8rem);
  --container-max: 1200px;
  --container-padding: clamp(1.5rem, 5vw, 3rem);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-mesh);
  background-attachment: fixed;
  pointer-events: none;
  z-index: -1;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER / NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.header-v2 {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 var(--container-padding);
  transition: background var(--transition-base), backdrop-filter var(--transition-base);
}

.header-v2.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

#header-logo-v2 {
  width: 220px;
  max-width: 45vw;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

/* Language Selector - Modern Dropdown */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.lang-btn .ti {
  font-size: 16px;
  transition: transform var(--transition-fast);
}

.lang-selector.open .lang-btn .ti-chevron-down {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  padding: 6px;
  background: rgba(20, 20, 30, 0.98);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: all var(--transition-fast);
}

.lang-selector.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.lang-option:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.lang-option.active {
  color: var(--color-primary-light);
  background: rgba(139, 92, 246, 0.1);
}

/* Flag icons */
.flag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.flag-icon svg {
  display: block;
}

/* Button with icon (uses CSS pseudo-element) */
.btn-with-icon::before {
  content: "\eb73"; /* ti-send icon */
  font-family: "tabler-icons";
  font-size: 18px;
  margin-right: 8px;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.hero-v2 {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Animated gradient orbs */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 20s ease-in-out infinite;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: rgba(139, 92, 246, 0.15);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 500px;
  height: 500px;
  background: rgba(6, 182, 212, 0.12);
  bottom: -150px;
  right: -100px;
  animation-delay: -7s;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(244, 114, 182, 0.08);
  top: 40%;
  left: 60%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(10px, -10px) scale(1.02);
  }
}

/* Grid pattern */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 120px var(--container-padding) 80px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 100px;
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  max-width: 800px;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-title .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: fadeIn 1s ease-out 1s both;
}

.scroll-indicator .mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--border-default);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator .wheel {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 2px;
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(8px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Floating Particles Background Canvas */
.hero-canvas-v2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  color: white;
  background: var(--gradient-primary);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 8px 24px -8px rgba(139, 92, 246, 0.5);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 16px 32px -8px rgba(139, 92, 246, 0.6);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  color: var(--text-primary);
  background: var(--bg-glass);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn .ti {
  font-size: 18px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

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

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

.section-header {
  margin-bottom: 48px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary-light);
  margin-bottom: 12px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
}

/* Section divider */
.section-divider {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.divider-line {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--border-default) 20%,
    var(--color-primary) 50%,
    var(--border-default) 80%,
    transparent 100%
  );
  position: relative;
}

.divider-line::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--color-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PORTFOLIO / PROJECTS
   ═══════════════════════════════════════════════════════════════════════════ */

.portfolio-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.portfolio-filters {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-select {
  padding: 10px 36px 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all var(--transition-fast);
}

.sort-select:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.sort-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr));
  gap: 24px;
}

/* Project Card */
.project-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  transition: all var(--transition-base);
}

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

.project-image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--gradient-glow);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.project-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--color-primary);
  opacity: 0.5;
  font-size: 48px;
  transition: all var(--transition-base);
}

.project-card:hover .project-placeholder {
  opacity: 0.8;
  transform: scale(1.1);
}

.project-gallery-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: rgba(139, 92, 246, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  transition: all var(--transition-fast);
  z-index: 5;
}

.project-gallery-btn:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(139, 92, 246, 0.4);
}

.project-body {
  padding: 24px;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.project-title-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.project-title-link:hover {
  color: var(--color-primary-light);
}

.project-card:hover .project-title-link {
  color: var(--color-primary-light);
}

.project-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.project-date i {
  color: var(--color-primary-light);
}

.project-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.tech-tag:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}

.no-projects {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.no-projects i {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTACT SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.contact-section {
  position: relative;
}

.contact-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 16px;
}

.contact-title .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

/* Contact Form */
.contact-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 32px;
  text-align: left;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Override Tailwind forms plugin and browser defaults */
.contact-form .form-input,
.contact-form .form-textarea,
.contact-form input,
.contact-form textarea,
input.form-input,
textarea.form-textarea,
[type='text'].form-input,
[type='email'].form-input {
  padding: 14px 18px !important;
  font-size: 15px !important;
  color: #f4f4f5 !important;
  background: #14141f !important;
  background-color: #14141f !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-appearance: none !important;
  appearance: none !important;
  color-scheme: dark;
  box-shadow: none !important;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

/* Autofill styling for webkit browsers */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-textarea:-webkit-autofill,
.form-textarea:-webkit-autofill:hover,
.form-textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0px 1000px rgba(20, 20, 35, 0.95) inset;
  transition: background-color 5000s ease-in-out 0s;
}

.form-input:hover,
.form-textarea:hover {
  border-color: var(--border-hover);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

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

.form-submit {
  width: 100%;
  margin-top: 8px;
}

.form-note {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 24px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.footer-v2 {
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 10, 15, 0.5);
  padding: 40px var(--container-padding);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  height: 24px;
  width: auto;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

.footer-sep {
  color: var(--border-default);
}

/* ═══════════════════════════════════════════════════════════════════════════
   COOKIE BANNER
   ═══════════════════════════════════════════════════════════════════════════ */

.cookie-banner-v2 {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: 400px;
  z-index: 1000;
  background: rgba(15, 15, 25, 0.98);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookie-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.cookie-icon {
  font-size: 32px;
  line-height: 1;
}

.cookie-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cookie-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-actions .btn {
  flex: 1;
  min-width: 100px;
  padding: 10px 16px;
  font-size: 14px;
}

.cookie-info-btn {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  transition: all var(--transition-fast);
}

.cookie-info-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

@media (max-width: 640px) {
  .cookie-banner-v2 {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */

.modal-overlay-v2 {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease-out;
}

.modal-v2 {
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  background: rgba(15, 15, 25, 0.98);
  border: 1px solid var(--border-default);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(139, 92, 246, 0.1);
  animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-close-v2 {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: all var(--transition-fast);
}

.modal-close-v2:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--border-hover);
}

.modal-body-v2 {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-body-v2 h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 24px 0 12px;
}

.modal-body-v2 h3:first-child {
  margin-top: 0;
}

.modal-body-v2 p {
  margin-bottom: 16px;
}

.modal-body-v2 ul {
  margin: 0 0 16px 24px;
}

.modal-body-v2 li {
  margin-bottom: 8px;
}

.modal-footer-v2 {
  padding: 20px 28px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

/* Company Info Card */
.info-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.info-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.info-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.info-card a {
  color: var(--color-primary-light);
  transition: color var(--transition-fast);
}

.info-card a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Cookie Status */
.cookie-status {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.cookie-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.cookie-status h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.status-badge {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 100px;
}

.status-badge.not-set {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-badge.accepted {
  color: #86efac;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.declined {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.cookie-status p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Scrollbar */
.modal-body-v2::-webkit-scrollbar {
  width: 6px;
}

.modal-body-v2::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body-v2::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}

.modal-body-v2::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.4);
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════════════════════ */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.95);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.lightbox-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.9);
  transform: scale(1.05);
}

.lightbox-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-height: 100%;
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(90vh - 120px);
  object-fit: contain;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.lightbox-description {
  text-align: center;
  padding: 16px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  max-width: 600px;
}

.lightbox-description p {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.lightbox-counter {
  font-size: 14px;
  color: var(--text-muted);
}

.lightbox-nav {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 28px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.lightbox-nav:hover:not(:disabled) {
  background: var(--color-primary);
  transform: scale(1.1);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .lightbox-container {
    flex-direction: column;
    gap: 10px;
  }

  .lightbox-nav {
    position: absolute;
    bottom: 20px;
    width: 48px;
    height: 48px;
  }

  .lightbox-nav:first-of-type {
    left: 20px;
  }

  .lightbox-nav:last-of-type {
    right: 20px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }

  .lightbox-image {
    max-height: calc(90vh - 200px);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.hiding {
  opacity: 0;
  transform: translateX(100%);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.toast-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.toast-message {
  font-size: 14px;
  color: var(--text-primary);
  flex: 1;
}

.toast-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toast-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.toast-success { border-color: rgba(34, 197, 94, 0.3); }
.toast-success .toast-icon { color: #22c55e; }

.toast-error { border-color: rgba(239, 68, 68, 0.3); }
.toast-error .toast-icon { color: #ef4444; }

.toast-warning { border-color: rgba(245, 158, 11, 0.3); }
.toast-warning .toast-icon { color: #f59e0b; }

.toast-info { border-color: rgba(139, 92, 246, 0.3); }
.toast-info .toast-icon { color: var(--color-primary); }

.toast-loading { border-color: rgba(6, 182, 212, 0.3); }
.toast-loading .toast-icon {
  color: var(--color-secondary);
  animation: spin 1s linear infinite;
}

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

@media (max-width: 640px) {
  .toast-container {
    top: auto;
    bottom: 20px;
    left: 16px;
    right: 16px;
    max-width: none;
  }

  .toast {
    transform: translateY(100%);
  }

  .toast.show {
    transform: translateY(0);
  }

  .toast.hiding {
    transform: translateY(100%);
  }
}
