:root {
  --primary: #0d6efd;
  --primary-dark: #0b5ed7;
  --primary-light: #3d8bfd;
  --secondary: #6c757d;
  --accent: #fd7e14;
  --accent-dark: #e96d0a;
  --success: #198754;
  --warning: #ffc107;
  --danger: #dc3545;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-dark: #121212;
  --bg-dark-alt: #1e1e1e;
  --text: #212529;
  --text-muted: #6c757d;
  --text-dark: #f8f9fa;
  --text-muted-dark: #adb5bd;
  --border: #dee2e6;
  --border-dark: #343a40;
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.1);
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --transition: 0.2s ease;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --header-height: 70px;
}

[data-theme="dark"] {
  --bg: #121212;
  --bg-alt: #1e1e1e;
  --text: #f8f9fa;
  --text-muted: #adb5bd;
  --border: #343a40;
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

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

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.transparent {
  background-color: transparent;
}

.header.solid {
  background-color: var(--bg);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .header.solid {
  background-color: var(--bg-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  /* gap: 0.5rem; */
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.logo-img {
  height: 72px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .logo-img {
    height: 36px;
  }
}

/* .logo svg {
  width: 36px;
  height: 36px;
  color: var(--primary);
}
*/

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

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

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

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

.btn-secondary {
  background-color: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--border);
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 0.5rem;
}

.btn-ghost:hover {
  background-color: var(--bg-alt);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

.lang-btn {
  font-weight: 600;
  min-width: 40px;
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
}

.lang-current:hover {
  background-color: var(--bg-alt);
}

.lang-current img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

.lang-current svg {
  width: 12px;
  height: 12px;
  transition: transform var(--transition);
}

.lang-dropdown.open .lang-current svg {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 100;
}

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

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  text-align: left;
  transition: background-color var(--transition);
}

.lang-option:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.lang-option:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

.lang-option:hover {
  background-color: var(--bg-alt);
}

.lang-option img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

.lang-option.active {
  background-color: var(--primary);
  color: white;
}

.lang-option.active:hover {
  background-color: var(--primary-dark);
}

.theme-btn {
  font-size: 1.25rem;
}

.bocata {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.bocata span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  transition: all 0.3s ease;
}

/* Hero */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  background-color: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  display: none;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 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='%230d6efd' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-title {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero-title span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-ctas .btn {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

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

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

.hero-ctas .btn-secondary {
  background-color: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.hero-ctas .btn-secondary:hover {
  background-color: var(--bg-alt);
  border-color: var(--text);
}

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

.trust-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.trust-chip svg {
  width: 18px;
  height: 18px;
  color: #ffd700;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

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

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

.service-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.service-content {
  padding: 1.5rem;
}

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

.service-content {
  padding: 1.5rem;
}

.service-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.service-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.service-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.service-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.service-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.service-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.service-card .btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}

.project-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.5s ease;
}

.project-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.project-item:hover .project-bg {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.project-label {
  color: white;
  font-weight: 600;
  font-size: 1.125rem;
}

.projects-cta {
  text-align: center;
  margin-top: 3rem;
}

/* About */
.about-image-full {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
}

.about-image-full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.about-text-col p {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.8;
}

.about-values-col h3 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.about-values-col ul {
  list-style: none;
}

.about-values-col li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-size: 1rem;
}

.about-values-col li svg {
  width: 20px;
  height: 20px;
  color: var(--success);
  flex-shrink: 0;
}

.about-metrics-full {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.metric-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background-color: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

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

.metric-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
}

.metric-icon svg {
  width: 26px;
  height: 26px;
  color: white;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.metric-label {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form {
  background-color: var(--bg-alt);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
}

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

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--bg);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.form-control.error {
  border-color: var(--danger);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

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

.form-helper {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-error {
  color: var(--danger);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  display: none;
}

.form-error.visible {
  display: block;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.form-message {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  display: none;
}

.form-message.success {
  display: block;
  background-color: rgba(25, 135, 84, 0.1);
  color: var(--success);
  border: 1px solid var(--success);
}

.form-message.error {
  display: block;
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.contact-info {
  padding: 2rem 0;
}

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

.info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-alt);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.info-icon svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.info-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.info-value {
  color: var(--text-muted);
}

.contact-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

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

.footer-full-width {
  width: 100%;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Full Width Map */
.map-section {
  width: 100%;
  height: 35vh;
  min-height: 300px;
  position: relative;
}

.map-section .leaflet-container {
  width: 100%;
  height: 100%;
}

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

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }
.fade-in-delay-6 { transition-delay: 0.6s; }

/* Responsive */
@media (max-width: 992px) {
  .hero-title {
    font-size: 4rem;
  }

  .services-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-image-full {
    height: 300px;
  }

  .about-metrics-full {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }

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

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--bg);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow);
  }

  .nav-menu.active {
    display: flex;
  }

  [data-theme="dark"] .nav-menu.active {
    background-color: var(--bg-dark);
  }

  .bocata {
    display: flex;
  }

  .bocata.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

  .bocata.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

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

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

  .hero-ctas {
    flex-direction: column;
  }

  .trust-chips {
    flex-direction: column;
  }

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

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

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .map-section {
    height: 35vh;
    min-height: 250px;
  }
}

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

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

  .about-image-full {
    height: 200px;
  }

  .about-metrics-full {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .metric-card {
    padding: 1.5rem;
  }

  .map-section {
    height: 35vh;
    min-height: 250px;
  }
}

/* Leaflet dark mode */
[data-theme="dark"] .leaflet-container {
  background: #1a1a1a;
}

[data-theme="dark"] .leaflet-tile-pane {
  filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3);
}

[data-theme="dark"] .leaflet-control-zoom a {
  background-color: var(--bg-dark);
  color: var(--text-dark);
  border-color: var(--border-dark);
}

[data-theme="dark"] .leaflet-control-zoom a:hover {
  background-color: var(--bg-alt);
}

[data-theme="dark"] .leaflet-control-attribution {
  background-color: rgba(30, 30, 30, 0.8);
  color: var(--text-muted-dark);
}

[data-theme="dark"] .leaflet-control-attribution a {
  color: var(--primary-light);
}

.leaflet-control-attribution {
  display: none !important;
}
