/* ----------------------- Root Variables ----------------------- */
:root {
  --verde: #339966;
  --azul: #000033;
  --azul-dark: #000a23;
}

/* ----------------------- Global Styles ----------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Sora", sans-serif;
  border: none;
  scroll-behavior: smooth;
}

/* Keyboard focus: hide outline for mouse, show for keyboard nav */
:focus:not(:focus-visible) {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--verde);
  outline-offset: 3px;
  border-radius: 3px;
}

body {
  max-width: 100vw;
}

/* ----------------------- Header and Navigation ----------------------- */
.header-area {
  top: 30px;
  position: fixed;
  height: auto;
  max-width: 100vw;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
}

.main-nav {
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 40px;
  padding: 0 1rem;
  min-height: 60px;
  width: 90%;
  max-width: 1200px;
  white-space: nowrap;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
}

.logo-section {
  display: flex;
  align-items: center;
}
.icon-section {
  display: none;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  height: 100vh;
  width: 40%;
  padding: 2rem 1rem;
  z-index: 1000;
  background-color: var(--azul);
  right: -100%;
  transition: all 0.6s ease;
}
.mobile-menu.open {
  right: 0;
}
.mobile-menu .nav {
  display: flex;
  flex-direction: column;
  height: min-content;
  gap: 1rem;
}
.mobile-menu .nav li a {
  color: white;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.menu-section {
  display: flex;
  justify-content: flex-end;
  height: 100%;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--azul);
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logo:hover {
  color: var(--verde);
}

.logo:hover img {
  scale: 1.1;
}

.logo img {
  height: 40px;
  margin-right: 5px;
  transition: all 0.3s ease;
}
.nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 15px;
  height: 100%;
}

.nav li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav li a {
  text-decoration: none;
  color: black;
  padding: 0 10px;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.nav li a:hover {
  color: var(--verde);
}

.nav li a.active {
  color: var(--verde);
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: none;
}

.overlay.open {
  display: block;
}

/* ----------------------- Welcome Area ----------------------- */
.welcome-area {
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("/assets/images/banner.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  height: 100vh;
}

.header-text {
  position: absolute;
  text-align: center;
  color: white;
  width: 80%;
  transform: translateY(-50%);
}

/* ----------------------- Features Section ----------------------- */
.features {
  width: 100%;
  margin-top: -15rem;
  z-index: 9;
  position: relative;
}

.card-container {
  max-width: 75vw;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
}

.card {
  background: white;
  box-shadow: 0 2px 48px 0 rgba(0, 0, 0, 0.3);
  max-width: 20vw;
  width: 100%;
  padding: 1rem;
  text-align: center;
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(100px);
  transition: all 0.6s ease-out;
}

.card.show {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  box-shadow: 0 2px 48px 0 rgba(0, 0, 0, 0.1);
  transform: translateY(-20px);
}

.icon {
  height: 6rem;
  width: 6rem;
  line-height: 6rem;
  background-color: var(--verde);
  border-radius: 50%;
  margin: 0 auto;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.icon img {
  max-height: 3.5rem;
  filter: brightness(0) invert(1);
  transition: all 0.3s ease;
}

.card h4,
.card p {
  margin: 0;
}

.card p {
  font-size: 0.9rem;
}

.card h4 {
  margin-bottom: 0.5rem;
  color: var(--azul-dark);
}

/* ----------------------- About Section ----------------------- */
.about {
  background: white;
  max-width: 100vw;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.about h2 {
  font-weight: 500;
}

.about-row {
  display: flex;
  justify-content: center;
}

.about-row > div:first-child {
  padding-left: 12.5%;
}

.about-row > div:last-child {
  padding-right: 12.5%;
}

.about-image {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image img {
  max-width: 100%;
  height: auto;
  display: block;
  transform: translateX(-100%);
  opacity: 0;
  transition: all 1s ease-in-out;
}

.about-image img.show {
  transform: translateX(0);
  opacity: 1;
}
.about-text {
  padding-left: 2rem;
}

.divider {
  height: 0.5rem;
  width: 5rem;
  background-color: var(--verde);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.about p {
  margin-bottom: 2rem;
}

.about ul {
  list-style: inside;
}
.about ul li {
  margin-bottom: 0.5rem;
}

.about li::marker {
  color: var(--verde);
}

/* ----------------------- Why Us Section ----------------------- */
.why-us {
  max-width: 100vw;
  width: 100%;
  height: 500px;
  background-image: url(/assets/images/why-us-bg.png);
  background-position: center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  color: white;
  padding: 1rem;
}

.why-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.why-row {
  width: 80%;
  display: flex;
  justify-content: space-evenly;
  margin-bottom: 2rem;
}
.why-item {
  width: 35%;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}
.why-item:hover {
  background-color: rgba(255, 255, 255, 0.3);
  scale: 1.05;
}
.why-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.why-item p {
  font-size: 0.9rem;
}

/* ----------------------- Industries Section ----------------------- */
.industries {
  display: flex;
  justify-content: center;
  max-width: 100vw;
  width: 100%;
  height: 40rem;
  overflow: hidden;
}
.sector {
  width: 100%;
  display: flex;
  transition: all 0.3s ease-in-out;
}
.sector.commercial {
  margin-left: -100%;
}
.sector.industrial {
  margin-right: 0;
}
.industry {
  width: 70%;
  display: flex;
  justify-content: space-between;
  padding-top: 3rem;
}
.industry > div {
  width: 50%;
}
.industry-text {
  display: flex;
  flex-direction: column;
  padding: 0px 3rem;
  justify-content: center;
}
.industry-text h2 {
  color: var(--azul);
  font-size: 2.5rem;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.industry-text p {
  font-size: 0.9rem;
  width: 70%;
}
#commercial-text {
  align-items: end;
  text-align: end;
}
.industry-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, auto);
}
.service-box {
  display: flex;
  flex-direction: column;
}
.sector.commercial .service-box {
  text-align: end;
}
.number {
  color: #999;
  margin-bottom: 1rem;
}
.service {
  cursor: pointer;
  margin-bottom: 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}
.service-box.active .service {
  color: #999;
}
.service-slider {
  width: 30%;
  background-color: var(--azul);
  display: flex;
  flex-direction: column;
  padding: 2rem;
  position: relative;
}
.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  max-height: 10rem;
}
.service-icon img {
  height: 9rem;
  filter: brightness(0) invert(1);
}
.sector.commercial .service-icon img {
  transform: translateX(50px);
  opacity: 0;
  transition: transform 1.5s ease, opacity 0.5s ease;
}
.sector.commercial .service-icon img.show {
  transform: translateX(0);
  opacity: 1;
}
.sector.industrial .service-icon img {
  transform: translateX(-50px);
  opacity: 0;
  transition: transform 1.5s ease, opacity 0.5s ease;
}
.sector.industrial .service-icon img.show {
  transform: translateX(0);
  opacity: 1;
}
.service-text {
  display: flex;
  flex-direction: column;
  color: white;
  height: 25rem;
}
.service-text h2 {
  margin-bottom: 1.5rem;
}
.service-text p {
  font-size: 0.9rem;
}
.slider-control {
  display: flex;
  color: white;
  justify-content: space-between;
}
.slider-control > div {
  display: flex;
  flex-direction: column;
}
.left img,
.right img {
  width: 2.5rem;
  filter: brightness(0) invert(1);
  cursor: pointer;
  margin-bottom: 1rem;
}
.left {
  align-items: flex-start;
}
.right {
  align-items: flex-end;
  text-align: end;
}
.slider-control span {
  font-size: 0.9rem;
}

/* ------------------- Switch Button Styles ------------------- */

.switch-button {
  width: 15rem;
  height: 1.5rem;
  text-align: center;
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  border: 1px solid var(--verde);
  border-radius: 1rem;
  background: none;
  overflow: hidden;
}

.switch-button-case {
  flex: 1;
  background: none;
  height: 100%;
  color: var(--azul);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  text-transform: uppercase;
  position: relative;
  cursor: pointer;
}

.switch-button-case:hover {
  color: #ccc;
}

.switch-button-case:focus {
  outline: none;
}

.toggle-active {
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background-color: var(--verde);
  transition: 0.3s ease-out all;
  z-index: 0;
}

.active-case {
  color: white;
  z-index: 1;
}
.mobile-industries {
  display: none;
}
/* ----------------------- Contact Section ----------------------- */
.contact {
  max-width: 100vw;
  background: #eeeeee;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}
.contact h2 {
  color: var(--azul);
  margin-bottom: 1rem;
}
.contact p {
  color: var(--azul-dark);
}
.form {
  width: 40%;
  border-radius: 1rem;
  box-shadow: 0 2rem 3rem rgba(0, 0, 0, 0.4);
  opacity: 0;
  margin-top: 2rem;
  margin-bottom: 3rem;
  transform: translateY(4rem);
  transition: opacity 0.6s ease, transform 0.6s ease,
    box-shadow 0.6s ease-in-out;
}

.form:hover {
  box-shadow: none;
}

.form.show {
  opacity: 1;
  transform: translateY(0);
}

.form-header {
  background: #4d4d4f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  padding: 0 1rem;
}

.form-header-btn {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.form-header-right {
  display: flex;
  overflow: hidden;
}

.form-ellipsis {
  width: 5px;
  height: 5px;
  background: #999;
  margin-left: 2px;
  border-radius: 50%;
}

.form-header-btn.close {
  background: #ff5f5c;
}

.form-header-btn.min {
  background: #ffbf47;
}

.form-header-btn.max {
  background: #00cc4e;
}

.form-body {
  background: #3e3e3e;
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  display: flex;
  justify-content: space-between;
  color: white;
  padding: 1rem;
}
.form-body p {
  color: white;
}

.form-body-left {
  width: 35%;
  padding-right: 0.5rem;
}

.form-body-right {
  width: 65%;
  padding-left: 0.5rem;
}

.form span {
  font-weight: 600;
}

.form p {
  font-weight: 300;
  font-size: 0.8rem;
}

.form-row {
  margin-bottom: 1rem;
  width: 100%;
}

.form-row:first-child {
  display: flex;
  justify-content: space-between;
}

.form-row:first-child input {
  width: 48%;
}

.form-row input,
.form-row textarea {
  border-radius: 1rem;
  border: 1px solid #999;
  padding: 0.8rem 0.5rem;
  background: transparent;
  color: white;
  transition: all 0.3s ease;
}

.form-row textarea {
  resize: none;
  width: 100%;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row input:valid,
.form-row textarea:valid {
  border-color: white;
}

.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin: 0;
}
.form-buttons span{
  font-size: .8rem;
  font-weight: 400;
  color: #999;
}

.form-buttons .btn {
  text-transform: uppercase;
  color: var(--verde);
  background: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.form-buttons .btn:hover {
  color: #297a52;
}

/* ----------------------- Footer Section ----------------------- */
footer {
  background-color: var(--azul-dark);
  color: #fff;
  width: 100%;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  padding-right: 2rem;
  padding-left: 2rem;
}
.footer-contact a{
  text-decoration: none;
  color: white;
  font-size: .8rem;
}
.footer-logo{
  display: flex;
  flex-direction: column;
}
#siteseal{
  margin-top: 2rem;
}
.footer-logo span {
  color: white;
}

.footer-logo p {
  font-size: 1rem;
  color: #999;
  margin-top: 1rem;
}

.footer-nav h4,
.footer-contact h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #fff;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
}

.footer-nav ul li {
  margin-bottom: 0.5rem;
}

.footer-nav ul li a {
  text-decoration: none;
  color: #999;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.footer-nav ul li a:hover {
  color: #fff;
}

/* Sub-navigation Styles */
.footer-nav .footer-subnav {
  margin-left: 1rem;
  list-style-type: none;
  padding: 0;
}

.footer-subnav li {
  margin-top: 0.5rem;
}

.footer-nav .footer-subnav li a {
  font-size: 0.8rem;
  color: #aaa;
  transition: color 0.3s ease;
}

.footer-subnav li a:hover {
  color: #fff;
}

.footer-contact p {
  font-size: 0.9rem;
  color: #999;
}
.footer-icons {
  display: none;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #444;
  font-size: 0.7rem;
  color: #999;
  padding: 1rem;
  margin-top: 1rem;
}

/* Tablet (992px y menor) */
@media (max-width: 992px) {
  .card-container {
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 90vw;
  }
  .card {
    max-width: 45%;
  }
  .form {
    width: 70%;
  }
  .why-row {
    width: 95%;
  }
  .industries {
    width: 95%;
  }
  .about-row {
    gap: 1.5rem;
  }
}

/* Tablet pequeño (768px y menor) */
@media (max-width: 768px) {
  .card {
    max-width: 80%;
    margin: 0 auto;
  }
  .form {
    width: 90%;
  }
  .about-row {
    flex-direction: column;
  }
  .about-row > div:last-child {
    padding-right: 1rem;
  }
  .about-text {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .about-row > div:first-child {
    padding-left: 1rem;
  }
}

/* Pantallas pequeñas (móviles) */
@media (max-width: 576px) {
  .nav {
    display: none;
  }
  .icon-section {
    display: block;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
  }
  .menu-section {
    display: none;
  }
  .mobile-menu {
    display: block;
  }
  .icon-section img {
    width: 30px;
    cursor: pointer;
  }
  .welcome-area {
    align-items: center;
    justify-content: center;
    padding-top: 10rem;
  }
  .header-text h1 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
  }
  .header-text p {
    font-size: 1rem;
  }
  .features {
    margin-top: -20rem;
  }
  .card-container {
    display: flex;
    flex-direction: column;
  }
  .card {
    max-width: 80vh;
    margin-bottom: 2rem;
  }
  .about {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }
  .about-text ul li {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  .about-row {
    flex-direction: column;
  }
  .about-row > div:first-child {
    padding-left: 0px;
  }
  .about-image {
    margin-bottom: 2rem;
  }
  .about-image img {
    max-width: 80%;
  }
  .industries {
    display: none;
  }
  .switch-button {
    margin-top: 0;
  }
  .switch-button-case:hover {
    color: white;
  }
  .mobile-industries {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding-top: 0.5rem;
    padding-bottom: 1rem;
  }
  .mobile-industrial-text {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding-top: 2.5rem;
  }
  .mobile-commercial-text {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding-top: 2.5rem;
  }
  .mobile-industries h2 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--azul);
  }
  .mobile-industries p {
    width: 80%;
    font-size: 0.8rem;
  }
  .mobile-industries .divider {
    margin-top: 2rem;
  }
  .mobile-industrial-services {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
  }
  .mobile-commercial-services {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
  }
  .mobile-service {
    display: flex;
    width: 100%;
    margin-bottom: 2rem;
    align-items: center;
  }
  .mobile-service.right {
    padding-left: 2rem;
  }
  .mobile-service.left {
    padding-right: 2rem;
  }
  .mobile-service-icon {
    width: 30%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .mobile-service-icon img {
    width: 70%;
    filter: none;
  }
  .mobile-service-text {
    width: 70%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
  }
  .mobile-service-text p {
    width: 100%;
    text-align: left;
    font-size: 0.8rem;
  }
  .mobile-industries.industrial .mobile-commercial-text,
  .mobile-industries.industrial .mobile-commercial-services {
    display: none;
  }
  .mobile-industries.commercial .mobile-industrial-text,
  .mobile-industries.commercial .mobile-industrial-services {
    display: none;
  }
  .mobile-service.left .mobile-service-icon img {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s ease-in-out;
  }
  .mobile-service.right .mobile-service-icon img {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.8s ease-in-out;
  }
  .mobile-industrial-services
    .mobile-service.left
    .mobile-service-icon
    img.show {
    opacity: 1;
    transform: translateX(0);
  }
  .mobile-industrial-services
    .mobile-service.right
    .mobile-service-icon
    img.show {
    opacity: 1;
    transform: translateX(0);
  }
  .mobile-commercial-services
    .mobile-service.left
    .mobile-service-icon
    img.show {
    opacity: 1;
    transform: translateX(0);
  }
  .mobile-commercial-services
    .mobile-service.right
    .mobile-service-icon
    img.show {
    opacity: 1;
    transform: translateX(0);
  }
  .why-container{
    justify-content: space-between;
  }
  .why-us h2 {
    margin-bottom: .5rem;
  }
  .why-row {
    width: 100%;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    justify-content: space-between;
  }
  .why-item {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: .8rem;
  }
  .why-item h3 {
    font-size: 0.8rem;
    margin-bottom: .2rem;
  }
  .why-item p {
    font-size: 0.7rem;
  }
  .contact {
    padding: 2rem 1rem;
  }
  .form {
    width: 100%;
  }
  .form-body-left p {
    font-size: 0.7rem;
  }
  .contact h2 {
    font-size: 1rem;
  }
  .contact p {
    font-size: 0.9rem;
  }
  .form-body p {
    font-size: 0.7rem;
  }
  .footer-logo {
    max-width: 33%;
    display: flex;
    flex-direction: column;
  }
  .footer-logo .logo img {
    scale: 0.9;
  }
  .footer-logo .logo span {
    font-size: 0.9rem;
  }
  .footer-logo p {
    font-size: 0.8rem;
  }
  .footer-content {
    padding: 1rem;
  }
  .footer-nav h4 {
    line-height: 40px;
    font-size: 0.9rem;
  }
  .footer-nav ul li a {
    font-size: 0.8rem;
  }
  .footer-nav .footer-subnav li a {
    font-size: 0.7rem;
  }
  .footer-contact h4 {
    line-height: 40px;
  }
  .footer-contact {
    max-width: 33%;
  }
  .footer-contact a{
    display: none;
  }
  .footer-contact p {
    display: none;
  }
  .footer-icons {
    display: block;
    display: flex;
    justify-content: space-around;
  }
  .footer-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.4rem;
    border: 2px solid var(--verde);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .footer-icon a {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .footer-icon img {
    height: 1rem;
  }
  .footer-bottom {
    margin-top: 0;
  }
}

/* Reduce motion for users with vestibular disorders */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
