@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

:root {
  --color-primary: #02426e;
  --color-secondary: #225a80;
  --color-tertiary: #417192;
  --color-quaternary: #6189a4;
  --color-quinary: #81a1b6;
  --color-senary: #a0b8c9;
  --color-septenary: #c0d0db;
  --color-octonary: #dfe7ed;

  --font-inter: "Inter", sans-serif;

  box-sizing: border-box;
}

html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  max-width: 1080px;
  font-family: var(--font-inter);
  background-color: var(--color-octonary);
  color: var(--color-primary);
  margin: 0 auto;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

.header {
  height: 90px;
  background-color: var(--color-senary);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  justify-content: space-between;
  padding: 0 2rem;
}

.logo-container {
  height: 100%;
  display: flex;
  align-items: center;
}

.logo {
  width: 120px;
}

.menu-toggle {
  height: 100%;
  width: 48px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--color-primary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.menu-toggle:hover {
  color: var(--color-secondary);
}

.menu-toggle svg {
  width: 100%;
  height: 100%;
}

.nav {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 999;
  position: absolute;
  top: 90px;
  left: 0;
  right: 0;
  background-color: var(--color-senary);
}

.nav.show {
  max-height: 300px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1.125rem;
  text-align: center; /* Centra los enlaces */
}

.nav-link {
  color: var(--color-secondary);
  font-weight: 300;
  padding: 0.75rem 1rem;
  display: block;
  letter-spacing: 0.06rem;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link:focus-within,
.nav-link:active {
  color: var(--color-primary);
  background-color: var(--color-octonary);
}

.nav-link.active {
  color: var(--color-primary);
  font-weight: 500;
  background-color: var(--color-septenary);
}

.main-content {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--color-septenary);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  position: relative;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  background-color: var(--color-septenary);
  margin: auto;
  margin-bottom: 1rem;
}

.carousel-slide {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  object-position: top;
}

.carousel-slide img:nth-of-type(1) {
  object-position: center;
}

.carousel-btns, .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(2, 66, 110, 0.7);
  color: var(--color-octonary);
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 50%;
  transition: background-color 0.3s ease, transform 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btns:hover, .carousel-btn:hover {
  background-color: var(--color-primary);
  transform: translateY(-50%) scale(1.05);
}

.carousel-btns.prev, .carousel-btn.prev {
  left: 10px;
}

.carousel-btns.next, .carousel-btn.next {
  right: 10px;
}

.hero-section {
  text-align: center;
  padding-top: 1rem;
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.25;
  margin: 0;
  text-align: center;
  padding: 0.5rem 1rem;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.25;
  margin: 0;
  text-align: center;
  padding: 0.5rem 0;
}

.hero-description {
  font-size: 1rem;
  color: var(--color-secondary);
  font-weight: 500;
  max-width: 48rem;
  margin: 0.5rem;
  text-align: center;
  text-wrap: balance;
}

.hero-description.contact-description {
  font-size: 1.2rem;
  text-wrap: balance;
  margin-bottom: 1.5rem;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.btn {
  width: 80%;
  margin: 0 auto;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease,
    border 0.3s ease;
  font-size: 1.125rem;
  display: inline-block;
  border: 2px solid var(--color-primary);
}

.btn:hover {
  transform: scale(1.05);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-octonary);
}

.btn-primary:hover {
  background-color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}

.btn-secondary {
  background-color: var(--color-octonary);
  color: var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-senary);
}

/* Features Grid Section */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.feature-item {
  height: 280px;
  flex: 1 1 280px;
  max-width: 90%;
}

.flip-card {
  position: relative;
}

.flip-card-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  position: relative;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner,
.flip-card:active .flip-card-inner,
.flip-card:focus .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: white;
  text-align: center;
}

.flip-card-front {
  z-index: 2;
  background-color: var(--color-octonary);
}

.flip-card-front img.feature-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}

.flip-card-back {
  background-color: var(--color-secondary);
  color: var(--color-octonary);
  transform: rotateY(180deg);
  justify-content: center;
  padding-bottom: 2rem;
}

.feature-title {
  height: 2.5rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  font-weight: 600;
  margin: 0;
  margin-top: 1rem;
  color: var(--color-primary);
}

.flip-back-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.flip-back-description {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.btn-small {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--color-octonary);
  color: var(--color-secondary);
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s;
}

.btn-small:hover {
  background-color: #f0f0f0;
  color: var(--color-primary);
}

.map-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
}
.map-iframe {
  width: 100%;
  max-width: 90%;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
}

.map-iframe:hover,
.map-iframe:active,
.map-iframe:focus-within {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.footer {
  background-color: var(--color-primary);
  color: var(--color-octonary);
  padding: 1rem;
  font-family: var(--font-inter);
  font-size: 0.9rem;
}

.footer svg {
  width: 20px;
  height: 20px;
  color: var(--color-octonary);
}

.footer a {
  color: var(--color-octonary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--color-quinary);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 0.5rem;
}

.footer-columns {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  margin-bottom: 1rem;
}

.footer-column {
  min-width: 180px;
}

.footer-column h4 {
  font-size: 1rem;
  margin: 0.2rem 0;
  color: var(--color-senary);
}

.footer-column p {
  display: flex;
  margin: 0.5rem 0;
  align-items: center;
  height: 24px;
}

.footer-column span {
  display: flex;
  color: var(--color-septenary);
  width: 20px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin: 0.5rem 0;
  color: var(--color-septenary);
}

.contact-icon {
  margin-right: 0.5rem;
}

.contact-icon.last {
  visibility: hidden;
}

.footer-bottom {
  border-top: 1px solid var(--color-quaternary);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-septenary);
}

.footer-bottom a {
  color: var(--color-septenary);
  margin: 0 0.5rem;
}

.footer-bottom a:hover {
  color: var(--color-quinary);
}

form {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background-color: var(--color-octonary);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--color-primary);
}

form input,
form textarea {
  border: 1px solid var(--color-senary);
  border-radius: 4px;
  font-family: var(--font-inter);
  font-size: 1rem;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 2px var(--color-senary);
}

.contact-form {
  max-width: 90%;
  margin: 0 auto;
  background-color: var(--color-octonary);
  position: relative;
}

.form-group {
  margin-bottom: 0.5rem;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}

textarea {
  width: 150px;
  min-height: 150px;
  max-height: 400px;
  min-width: 100%;
  max-width: 100%;
}

.btn-primary.contacto {
  width: 60%;
  background-color: var(--color-primary);
  color: var(--color-octonary);
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  margin: 0;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  align-self: center;
}

.form-message {
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;

  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 90%;
  z-index: 10;
}

.form-message.success {
  background-color: #d4edda; 
  color: #157c2d; 
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background-color: #f8d7da; 
  color: #721c24; 
  border: 1px solid #f5c6cb;
}

.form-message.show {
  opacity: 1;
  visibility: visible;
}

.form-message.hide {
  opacity: 0;
  visibility: hidden;
}

.whatsapp-float-container {
  height: 100px; 
  position: fixed;
  padding: 2rem;
  max-width: 1080px; 
  bottom: 30px;
  right: 50%; 
  transform: translateX(50%); 
  z-index: 1000;
  width: 100%;
  pointer-events: none; 
}

.whatsapp-float {
  position: absolute; 
  bottom: 0;
  right: 30px;
  background-color: #25d366; 
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
  pointer-events: auto; 
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #1db956; 
}

.whatsapp-float img {
  width: 48px;
  height: 48px;
}

.info-container {
  max-width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  margin-top: 2rem;
  padding: 2rem;
  background-color: var(--color-octonary);
  text-align: center; 
  border-radius: 12px;
  transition: all 0.3s ease;
}

.info-container:hover,
.info-container:active,
.info-container:focus-within {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.info-item {
  margin: 1rem;
}

.info-icon {
  color: var(--color-tertiary);
}

.info-icon svg {
  width: 32px;
  height: 32px;
}

.info-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-secondary);
}

.info-item p {
  font-size: 1rem;
  color: var(--color-primary);
  line-height: 1.4;
}

.info-container.nosotros {
  margin-bottom: 2rem;
}

.section-with-image {
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column; 
  align-items: center;
  text-align: center;
  padding: 1rem 0;
  gap: 1rem;
}

.content-text {
  flex: 1;
  min-width: 100%;
}

.image-container {
  flex: 1;
  min-width: 100%;
  max-height: 200px;
}

.image-container img {
  max-width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.nos-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.fade-in-section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.brands-section {
  height: 100%;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding-top: 1rem;
}

.brand-logo {
  text-align: center;
  width: 100%;
  border-radius: 12px;
  transition: transform 0.3s ease-in-out;
}

.brand-logo img {
  max-width: 90%;
  height: 200px;
  transition: filter 0.3s ease-in-out, opacity 0.3s ease-in-out;
  object-fit: contain;
}

.brand-logo:nth-child(2) img,
.brand-logo:nth-child(3) img,
.brand-logo:nth-child(6) img,
.brand-logo:nth-child(7) img,
.brand-logo:nth-child(11) img,
.brand-logo:nth-child(14) img,
.brand-logo:nth-child(16) img,
.brand-logo:nth-child(18) img {
  transform: scale(0.8);
}

.brand-logo.fade-in-logo {
  opacity: 0.5;
  filter: grayscale(70%); 

  transition: opacity 1s ease-in-out;
}

.brand-logo.fade-in-logo.is-visible {
  opacity: 1;
  filter: grayscale(0%); 
}

.brands-carousel-wrapper {
  position: relative;
  overflow: hidden;
  max-width: 400px;
}

.brands-carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.brands-carousel-slide {
  flex-shrink: 0;
  width: calc(100% / 4);
  text-align: center;
  padding: 1rem;
  box-sizing: border-box;
}
.brands-carousel-slide {
  width: 50%;
}

.brands-carousel-slide .brand-logo img {
  width: 100%;
  max-width: 150px;
  height: auto;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: filter 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.brands-carousel-slide .brand-logo img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.brands-carousel-pagination {
  display: none;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.brands-pagination-dot {
  width: 10px;
  height: 10px;
  background-color: var(--color-octonary);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.brands-pagination-dot.active {
  background-color: var(--color-primary);
}

.legal-section {
  background-color: var(--color-septenary);
  max-width: 1200px;
  margin: auto;
  padding: 20px;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .header {
    flex-direction: row;
    justify-content: space-between;
    padding-left: 3rem;
  }

  .logo-container {
    width: auto;
  }

  .menu-toggle {
    display: none;
  }

  .nav {
    max-height: none;
    overflow: visible;
    width: auto;
    position: static;
    background-color: transparent;
    box-shadow: none;
  }

  .nav-list {
    flex-direction: row;
    padding: 0;
    gap: 0.5rem;
  }
  .nav-link {
    font-weight: 500;
    border-radius: 8px;
  }

  .carousel-container {
    height: 250px;
    max-width: 1200px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
  }

  .hero-section {
    padding-top: 0;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-description {
    font-size: 1.3rem;
    max-width: 100%;
  }

  .hero-description.nos {
    max-width: 800px;
    font-size: 1.2rem;
    padding: 0.5rem 0;
    margin: 0 auto;
    text-wrap: balance;
  }

  .cta-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
  }

  .main-content {
    padding: 2rem;
  }

  .content-nos {
    background-color: var(--color-octonary);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .features-grid {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1rem;
  }

  .feature-item {
    max-width: 90%;
    height: 300px;
  }

  .map-iframe {
    width: 100%;
    max-width: 1200px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
  }

  .map-container {
    margin: 0;
    margin-top: 2rem;
  }

  .btn-small:focus,
  .btn-small:active,
  .btn-small:focus-within {
    background-color: #f0f0f0;
    color: #1a3f5e;
  }

  .footer-columns {
    justify-content: space-around;
    flex-direction: row;
  }

  .contact-form {
    max-width: 1200px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "name inquiry"
      "company textarea"
      "phone textarea"
      "email textarea"
      "button button";
    column-gap: 2rem;
    transition: all 0.3s ease;
  }

  .contact-form:hover {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  }

  .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
  }

  .contact-form textarea {
    resize: none;
    width: 100%; 
    height: 100%; 
  }

  .form-group:nth-of-type(1) {
    grid-area: name;
  }
  .form-group:nth-of-type(2) {
    grid-area: company;
  }
  .form-group:nth-of-type(3) {
    grid-area: phone;
  }
  .form-group:nth-of-type(4) {
    grid-area: email;
  }
  .form-group:nth-of-type(5) {
    grid-area: inquiry;
  }
  .form-group:nth-of-type(6) {
    grid-area: textarea;
  }

  .btn-primary.contacto {
    grid-area: button;
    margin: 0 auto;
    margin-top: 1rem;
    width: 60%;
  }

  .info-container {
    max-width: 1200px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
  }

  .info-container.nosotros {
    margin-bottom: 0;
  }

  .info-item {
    min-width: 250px;
    text-align: center;
    margin: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .info-item * {
    margin: 0.5rem 0;
    height: auto;
  }

  .section-with-image {
    flex-direction: row; 
    text-align: left;
    padding: 1.5rem;
    transition: all 0.3s ease;
  }

  .section-with-image img {
    max-height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
  }

  .image-container {
    max-height: 250px;
    position: relative;
    overflow: hidden; 
  }

  .content-text,
  .image-container {
    min-width: auto;
  }

  .nos-image {
    display: block;
    transition: filter 0.3s ease-in-out;
  }

  .image-container::after {
    content: "";
    position: absolute;
    border-radius: 12px;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary, #007bff);
    opacity: 0; 
    transition: opacity 0.3s ease-in-out;
    pointer-events: none; 
  }

  .section-with-image:hover .image-container::after {
    opacity: 0.2; 
    border-radius: 12px;
  }

  .hero-title.nos {
    display: inline-block; 
    position: relative;
    transition: color 0.3s ease;
  }

  .hero-title.nos::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary, #007bff);
    transition: width 0.3s ease-out;
  }

  .section-with-image:hover .hero-title.nos::after {
    width: 100%;
  }

  .hero-description.nos {
    color: var(--color-quaternary);
    transition: color 0.3s ease;
  }

  .section-with-image:hover .hero-description.nos {
    color: var(--color-primary);
  }

  .section-with-image:hover {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  }

  .section-with-image.image-left {
    flex-direction: row-reverse; 
  }

  .brands-section {
    max-width: 1200px;
  }

  .brands-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .brand-logo:hover img,
  .brand-logo:focus img,
  .brand-logo:active img,
  .brand-logo:focus-within img {
    filter: grayscale(0%); 
    opacity: 1;
  }
  .brands-carousel-wrapper {
    max-width: 1200px;
    overflow: hidden;
    position: relative;
  }

  .brands-carousel-slide {
    width: calc(100% / 3);
  }
  
}

@media (min-width: 490px) {
  .brands-carousel-pagination {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .brands-carousel-slide {
    width: calc(100% / 4);
  }
}
