:root {
  --azul-marino: #12265e;
  --vinotinto: #6b0e11;
  --white: #fff;
  --gris-claro: #f5f6fa;
  --black: #000;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "Arial", sans-serif;
  background: var(--gris-claro);
  color: var(--azul-marino);
  box-sizing: border-box;
}

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

body {
  padding-top: 15px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  color: var(--azul-marino);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0 1.5rem 0;
  box-shadow: 0 2px 8px rgba(26, 34, 56, 0.08);
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 1 !important;
  visibility: visible !important;
  height: auto !important;
  max-width: 100%;
}

header.scrolled {
  background: var(--azul-marino);
  color: var(--white);
  padding: 0.8rem 0 0.8rem 0;
}

.header-logo {
  margin-left: 2rem;
  display: flex;
  align-items: center;
  width: 220px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.header-logo.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.header-logo.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-20px);
}

.logo-small {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  margin-right: 0.8rem;
  background: var(--white);
}

.header-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: inherit;
  white-space: nowrap;
}

nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  justify-content: center;
  align-items: center;
}

nav a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--vinotinto);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav a:hover::after,
nav a:focus::after {
  width: 80%;
}

header:not(.scrolled) nav a:hover,
header:not(.scrolled) nav a:focus {
  color: var(--vinotinto);
  background-color: rgba(107, 14, 17, 0.1);
}

header.scrolled nav a:hover,
header.scrolled nav a:focus {
  color: var(--white);
  background-color: var(--vinotinto);
}

.search-container {
  margin-right: 2rem;
  width: 220px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(18, 38, 94, 0.2);
  transition: all 0.3s ease;
}

header.scrolled .search-form {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-input {
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-size: 0.9rem;
  color: var(--azul-marino);
  width: 180px;
  outline: none;
}

header.scrolled .search-input {
  color: var(--white);
}

header.scrolled .search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--azul-marino);
  transition: color 0.3s ease;
}

header.scrolled .search-button {
  color: var(--white);
}

.search-button:hover {
  color: var(--vinotinto);
}

.search-results-container {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  width: 100%;
  max-width: 400px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  margin-top: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(18, 38, 94, 0.1);
}

.search-suggestions {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.search-suggestions li {
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.search-suggestions li:last-child {
  border-bottom: none;
}

.search-suggestions li:hover {
  background-color: #f8f9fa;
}

.suggestion-content {
  display: flex;
  flex-direction: column;
}

.suggestion-content strong {
  margin-bottom: 4px;
  color: #333;
  font-size: 0.95em;
}

.suggestion-location {
  font-size: 0.8em;
  color: #666;
  display: flex;
  align-items: center;
}

.page-label {
  font-weight: 600;
  margin-right: 5px;
  color: var(--vinotinto);
}

.section-label {
  color: #888;
}

.main-footer {
  background: var(--azul-marino);
  color: #f5f6fa;
  padding: 2.5rem 0 1.5rem 0;
  text-align: center;
  font-family: "Segoe UI", Arial, sans-serif;
  margin-top: 3rem;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
}

.footer-hours {
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.footer-social {
  margin-bottom: 1.2rem;
}

.footer-social a {
  display: inline-block;
  margin: 0 0.5rem;
  transition: transform 0.2s;
}

.footer-social a:hover {
  transform: translateY(-4px) scale(1.12);
}

.footer-social img {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1) grayscale(0.2);
  transition: filter 0.3s;
}

.footer-social a[aria-label="WhatsApp"]:hover img {
  filter: brightness(1) saturate(2) drop-shadow(0 0 4px #25d366);
}
.footer-social a[aria-label="Instagram"]:hover img {
  filter: brightness(1) saturate(2) drop-shadow(0 0 4px #e1306c);
}
.footer-social a[aria-label="Facebook"]:hover img {
  filter: brightness(1) saturate(2) drop-shadow(0 0 4px #1877f3);
}
.footer-social a[aria-label="LinkedIn"]:hover img {
  filter: brightness(1) saturate(2) drop-shadow(0 0 4px #0077b5);
}

.footer-copy {
  font-size: 1rem;
  color: #bfc9d1;
  margin-top: 1.5rem;
  letter-spacing: 0.5px;
}

.page-content {
  padding: 120px 0 50px 0;
  background-color: var(--white);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
}

.page-title {
  color: var(--azul-marino);
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: 800;
  position: relative;
  padding-bottom: 15px;
}

.page-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background-color: var(--vinotinto);
}

.page-description {
  text-align: center;
  font-size: 1.2rem;
  color: var(--black);
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--azul-marino);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background-color: var(--vinotinto);
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.arrow-up {
  font-size: 24px;
  font-weight: bold;
}

.clients-slider-wrapper {
  width: 96%;
  margin: 50px auto;
  overflow: hidden;
  position: relative;
  padding: 45px 30px;
  background-color: var(--gris-claro);
  border-radius: 12px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.clients-slider {
  display: flex;
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 20px 0;
  gap: 0;
}

.clients-slide {
  display: flex;
  min-width: 100%;
  animation: slideMarquee 60s linear infinite;
  align-items: center;
  justify-content: space-evenly;
  gap: 30px;
  flex-wrap: nowrap;
  padding: 0 20px;
  flex-shrink: 0;
}

.clients-slide-spaced {
  padding: 0 30px;
}

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

.client-logo {
  display: block;
  width: 120px;
  height: 80px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.5s ease;
  padding: 12px;
  margin: 0 20px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  flex-shrink: 0;
}

.client-logo:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

@media (max-width: 992px) {
  .search-container {
    width: 180px;
  }

  .header-logo {
    width: 180px;
  }

  nav ul {
    gap: 1rem;
  }

  nav a {
    font-size: 1rem;
    padding: 0.5rem 0.8rem;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 55px;
  }

  header {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    height: auto;
    min-height: 45px;
    box-sizing: border-box;
  }

  header.scrolled {
    flex-direction: row;
    padding: 0.3rem;
  }

  header.scrolled .header-logo.visible {
    margin: 0;
    flex: 0 0 auto;
    width: auto;
    display: flex;
    align-items: center;
  }

  .header-logo {
    order: 0;
    width: 0;
    margin: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    position: absolute;
    pointer-events: none;
  }

  .header-logo.visible {
    opacity: 1;
    transform: translateX(0);
    width: auto;
    position: relative;
    pointer-events: auto;
  }

  .header-title {
    font-size: 0.9rem;
  }

  .logo-small {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
  }

  header nav {
    order: 1;
    margin-right: auto;
    justify-content: flex-start;
    flex: 1;
    overflow-x: hidden;
    margin: 0;
    padding: 0.3rem 0;
  }

  nav ul {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.3rem;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-left: 0.5rem;
    max-width: 100%;
  }

  nav ul::-webkit-scrollbar {
    display: none;
  }

  nav a {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
  }

  .search-container {
    order: 2;
    width: auto;
    margin: 0 0.5rem;
    flex: 0 0 auto;
  }

  .search-form {
    width: auto;
  }

  .search-input {
    width: 110px;
    padding: 5px 8px;
    font-size: 0.8rem;
  }

  header.scrolled .search-input {
    width: 110px;
  }

  .search-button {
    padding: 5px 8px;
  }

  .search-button svg {
    width: 14px;
    height: 14px;
  }

  .search-results-container {
    max-width: 280px;
    right: 0;
    left: auto;
  }

  .suggestion-content {
    font-size: 0.85em;
  }

  .search-suggestions li {
    padding: 10px 12px;
  }

  .suggestion-content strong {
    font-size: 0.9em;
    margin-bottom: 2px;
  }

  .suggestion-location {
    font-size: 0.75em;
  }

  .hero-container,
  .testimonial-section,
  .main-footer,
  .page-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding-left: 10px;
    padding-right: 10px;
  }

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

  .page-description {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 45px;
  }

  header {
    padding: 0.3rem !important;
    min-height: 40px;
  }

  header.scrolled {
    padding: 0.25rem !important;
  }

  nav a {
    font-size: 0.7rem;
    padding: 0.2rem 0.3rem;
  }

  .search-input {
    width: 70px;
    font-size: 0.75rem;
  }

  header.scrolled .search-input {
    width: 70px;
  }

  .search-button {
    padding: 4px 6px;
  }

  .search-button svg {
    width: 12px;
    height: 12px;
  }

  .header-logo.visible .logo-small {
    width: 24px;
    height: 24px;
    margin-right: 0.2rem;
  }

  .header-logo.visible .header-title {
    display: none;
  }

  .search-results-container {
    width: 95%;
    max-width: 280px;
    right: 5px;
    left: auto;
    position: fixed;
    top: 50px;
    z-index: 9999;
  }

  .search-suggestions {
    max-height: 250px;
  }

  .search-suggestions li {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
  }

  .suggestion-content {
    font-size: 0.85em;
  }

  .suggestion-content strong {
    font-size: 0.9em;
    display: block;
    margin-bottom: 3px;
    color: #333;
  }

  .suggestion-location {
    font-size: 0.75em;
    color: #666;
  }

  .page-label {
    font-weight: 600;
    margin-right: 5px;
    color: var(--vinotinto);
  }

  .section-label {
    color: #888;
  }

  .scroll-top-btn {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }

  .arrow-up {
    font-size: 18px;
  }

  .client-logo {
    width: 90px;
    height: 60px;
    margin: 0 12px;
    padding: 8px;
  }

  .clients-slide {
    gap: 20px;
    padding: 0 15px;
  }
}
