/* ============================================
   VARIABLES CSS Y ESTILOS BASE
   ============================================ */
:root {
  --primary-color: #ec681c;
  --primary-dark: #ec681c;
  --background: #fff;
  --text-color: #333;
  --white: #fff;
  --dark-bg: #333;
  --shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--background);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  padding: 1rem;
  flex: 1;
  margin-bottom: 1px;
}

.section {
  margin-bottom: 2rem;
  padding: 1rem 2rem;
  background-color: var(--white);
  min-height: 100vh;
  box-sizing: border-box;
}

button, .btn {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  display: inline-block;
  text-align: center;
}

button:hover, .btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background-color: var(--primary-color);
}

.logo {
  max-width: 10rem;
}

.nav-list {
  list-style-type: none;
  display: flex;
  gap: 1.5rem;
}

.nav-list li a {
  font-size: 700;
  text-decoration: none;
  color: #FFF;
  transform: scale(1.1);
}

.nav-list li a:hover {
  color: #e08617;
}

.abrir-menu,
.cerrar-menu {
  display: none;
}

@media screen and (max-width: 800px) {
  .abrir-menu,
  .cerrar-menu {
    display: block;
    border: 0;
    background-color: transparent;
    cursor: pointer;
    font-size: 1.5rem;
  }

  .abrir-menu {
    color: white;
  }

  .cerrar-menu {
    color: white;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
  }

  .nav {
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background-color: rgba(236, 104, 28, 0.98);
    padding-top: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(-100%);
  }

  .nav.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding-top: 1rem;
  }

  .nav-list li {
    width: 100%;
    text-align: center;
  }

  .nav-list li a {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: 0.7rem 1rem;
    transition: all 0.2s ease;
  }

  .nav-list li a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
  }

  header {
    background-color: #ec681c;
    backdrop-filter: none;
  }
}

.btn {
  font-weight: 700;
  padding: 2px 22px;
  background: #ec681c;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  color: #000;
}

/* ============================================
   SECCIÓN VIDEO / GIF
   ============================================ */
.sectionvid {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 80vh;
  position: relative;
  overflow: hidden;
}

.containergif {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.containergif img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .sectionvid {
    min-height: auto;
    height: auto;
    padding-bottom: 56.25%;
    position: relative;
  }
  
  .containergif {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  .containergif img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .sectionvid {
    min-height: 100vh;
  }
}

/* ============================================
   SECCIÓN INICIO (QUIÉNES SOMOS)
   ============================================ */
.why_section {
  color: rgb(0, 0, 0);
  text-align: center;
  width: 100%;
  height: 40vh;
  background-color: #ffffff;
  align-items: center;
  justify-content: center;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.contenedor02 {
  width: 100%;
  height: 35vh;
  background-image: url(../img/celular.gif);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.contenedor01 {
  padding: 20px;
  margin: 0 2rem;
}

.somos2, .somos3 {
  text-align: justify;
}

@media only screen and (max-width: 900px) {
  .why_section {
    width: 100%;
    height: auto;
    grid-template-columns: repeat(1, 1fr);
    padding: 20px;
  }

  .contenedor02 {
    width: 100%;
    height: auto;
    height: 350px;
  }
}

/* ============================================
   SECCIÓN INICIO (POR QUÉ ELEGIRNOS)
   ============================================ */
.sectioninicio {
  width: 100%;
  min-height: auto;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.why-choose-us {
  padding: 60px 0;
  background-color: #ffffff;
}

.section-header {
  text-align: center;
  margin-bottom: 30px;
}

.section-title {
  font-size: 2.5rem;
  color: #333;
  font-weight: 700;
}

.highlight-text {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.2rem;
}

.highlight-text span {
  color: #0066cc;
  font-weight: 600;
}

.benefits-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.benefit-card {
  flex: 1 1 200px;
  text-align: center;
  padding: 20px;
  transition: transform 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-5px);
}

.benefit-image-container {
  margin-bottom: 15px;
}

.benefit-image {
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.benefit-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.benefit-details h3 {
  font-size: 1.8rem;
  color: #0066cc;
  margin-bottom: 5px;
}

.benefit-details h6 {
  font-size: 1rem;
  color: #666;
}

@media (max-width: 768px) {
  .benefits-grid {
    flex-direction: column;
    align-items: center;
  }
  
  .benefit-card {
    flex: 1 1 100%;
    max-width: 300px;
  }
}

/* ============================================
   SECCIÓN NOSOTROS
   ============================================ */
.sectionnosotros {
  width: 100%;
  min-height: auto;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.descripcion {
  width: 90vw;
  height: auto;
  margin: auto;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.des-track {
  padding: 1rem;
  width: 100%;
  height: auto;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.descri {
  background-color: white;
  padding: 20px;
  border-radius: 2rem;
  border: 2px solid #ec681c;
  flex: 1 1 300px;
  margin: 1rem;
  box-sizing: border-box;
}

.descri .p {
  text-align: justify;
  font-size: 110%;
}

.descri .t {
  font-size: xx-large;
  color: #ec681c;
}

.descripcion .descri {
  width: 100%;
  max-width: 500px;
  height: auto;
}

.descripcion .descri img {
  width: 50%;
  height: auto;
}

@media (max-width: 600px) {
  .descri {
    flex: 1 1 100%;
    margin: 0.5rem;
  }

  .descri .p {
    font-size: 80%;
  }

  .descri .t {
    font-size: x-large;
  }

  .descripcion .descri img {
    width: 50%;
  }
}

/* ============================================
   SECCIÓN SERVICIOS
   ============================================ */
.sectionservicio {
  width: 100%;
  background-color: #fff;
  position: relative;
  overflow: hidden;
}

.service_section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px 60px;
  text-align: center;
}

.custom_heading-container {
  margin-bottom: 50px;
}

.custom_heading-container h2.nser {
  font-size: 2.5rem;
  font-weight: 700;
  color: #000;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.custom_heading-container h2.nser::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #ec681c;
}

.service_container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  justify-content: center;
  padding: 20px 0;
  margin: 0 auto;
}

.card {
  width: 100%;
  height: 280px;
  perspective: 1000px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.front {
  background-color: #fff;
  z-index: 2;
}

.back {
  background-color: #fff;
  transform: rotateY(180deg);
}

.card:hover .front {
  transform: rotateY(180deg);
}

.card:hover .back {
  transform: rotateY(0deg);
}

.face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service_cta {
  margin-top: 50px;
  text-align: center;
}

.service_cta a {
  display: inline-block;
  padding: 14px 45px;
  background-color: #ec681c;
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(32, 50, 117, 0.2);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.service_cta a:hover {
  transform: translateY(-5px);
  background-color: #d45e19;
  box-shadow: 0 8px 20px rgba(32, 50, 117, 0.3);
}

@media screen and (max-width: 1024px) {
  .service_section {
    padding: 70px 20px 50px;
  }
  
  .card {
    height: 250px;
  }
}

@media screen and (max-width: 768px) {
  .service_section {
    padding: 60px 15px 40px;
  }
  
  .custom_heading-container h2.nser {
    font-size: 2.2rem;
  }
  
  .service_container {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
  
  .card {
    height: 220px;
  }
  
  .service_cta a {
    padding: 12px 40px;
    font-size: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .service_section {
    padding: 50px 10px 30px;
  }
  
  .custom_heading-container h2.nser {
    font-size: 1.8rem;
  }
  
  .card {
    height: 200px;
  }
  
  .service_cta a {
    padding: 10px 35px;
    font-size: 0.95rem;
  }
}

/* ============================================
   SECCIÓN PORTAFOLIO
   ============================================ */
.sectionporta {
  width: 100%;
  min-height: auto;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 40vh;
  min-height: 500px;
  overflow: hidden;
  background-color: #f5f5f5;
}

.portfolio-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  padding: 15px 40px;
  background-color: rgba(236, 104, 28, 0.9);
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid white;
}

.portfolio-button:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: #ec681c;
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.infinite-carousel {
  display: flex;
  width: 300%;
  height: 100%;
  animation: slide 30s linear infinite;
}

.carousel-slide {
  width: 11.111%;
  height: 100%;
  flex-shrink: 0;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}

@keyframes slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-66.666%);
  }
}

@media (max-width: 768px) {
  .carousel-container {
    height: 20vh;
    min-height: 200px;
  }
  
  .portfolio-button {
    padding: 12px 30px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .carousel-container {
    height: 10vh;
    min-height: 200px;
  }
  
  .portfolio-button {
    padding: 10px 25px;
    font-size: 0.9rem;
  }
}

/* ============================================
   SECCIÓN CONTACTO
   ============================================ */
.sectioncontac {
  width: 100%;
  min-height: auto;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.contact-section {
  max-width: 100%;
  height: auto;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
}

.contact-heading {
  margin-bottom: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container-contact {
  max-width: 100%;
  height: auto;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container-contact img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

@media screen and (max-width: 800px) {
  .container-contact img {
    width: 100%;
    position: static;
    transform: none;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  width: 90%;
  margin-top: 2rem;
}

.form-group textarea {
  height: 150px;
  padding: 1.5rem;
  background: none;
  border: 1px solid #d3d3d3;
  color: #000000;
}

.form-group .input {
  padding: 10px 20px;
  margin-bottom: 1rem;
  background: none;
  border: none;
  border-bottom: 1px solid #d3d3d3;
  color: #000000;
}

.form-group .btn-submit {
  padding: 10px 20px;
  margin: 1rem;
  border-radius: 20px;
  border: none;
  text-transform: uppercase;
  background-color: #ec681c;
}

#contenedor-div-1 {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  background-color: #ffffff;
}

.contact-section {
  width: 50%;
}

.container-contact {
  width: 50%;
}

@media only screen and (max-width: 800px) {
  .contact-section {
    width: 100%;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
  }
  
  .contact-heading {
    margin-bottom: 20px;
  }

  .contact-form {
    margin-bottom: 20px;
  }

  .form-group {
    display: flex;
    flex-direction: column;
  }

  .input,
  textarea {
    padding: 8px;
    font-size: 14px;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.pie-pagina {
  width: 100%;
  height: auto;
  background-color: #ffffff;
}

.pie-pagina .grupo-1 {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-gap: 50px;
  justify-content: center;
}

.pie-pagina .grupo-1 .box figure {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pie-pagina .grupo-1 .box figure img {
  width: 250px;
}

.pie-pagina .grupo-1 .box h2 {
  color: #ffffff;
  margin-bottom: 25px;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pie-pagina .grupo-1 .box p {
  color: #000000;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.pie-pagina .grupo-1 .red-social a {
  display: inline-block;
  text-decoration: none;
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 50%;
  color: white;
  margin-right: 10px;
  background-color: #ec681c;
  text-align: center;
  transition: all 300ms ease;
  transition: transform 1s ease;
}

.pie-pagina .grupo-1 .box .red-social {
  display: flex;
  justify-content: center;
  align-items: center;
}

.pie-pagina .grupo-1 .red-social a:hover {
  transform: rotate(360deg);
}

.pie-pagina2 {
  width: 100%;
  height: auto;
  background-color: #ec681c;
}

.pie-pagina2 .grupo-2 {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
  padding: 10px 0px;
}

.pie-pagina2 .grupo-2 small {
  color: white;
  font-size: 15px;
  text-align: center;
}

.mapa {
  width: 300px;
  height: 300px;
  overflow: hidden;
  border: 5px solid #ec681c;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}

.pie-pagina {
  display: flex;
}

.grupo-1 {
  flex: 1;
  padding: 10px;
}

@media screen and (max-width: 800px) {
  .pie-pagina .grupo-1 {
    width: 100%;
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 30px;
    padding: 35px 0px;
  }
  
  .pie-pagina2 .grupo-2 {
    width: 100%;
    grid-template-columns: 1fr;
    grid-gap: 20px;
    padding: 10px 0px;
  }
  
  .pie-pagina .grupo-1 .mapa {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
    overflow: hidden;
    border: 5px solid #ec681c;
    border-radius: 10px;
  }
  
  .pie-pagina .grupo-1 .mapa iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }
}

/* ============================================
   ELEMENTOS FLOTANTES (WhatsApp, Chatbot)
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 15%;
  right: 20px;
  z-index: 999;
  background-color: #25d366;
  border-radius: 50%;
  padding: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float img {
  width: 40px;
  height: 40px;
}

.chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  z-index: 1001;
}

.floating-message {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 14px 18px;
  border-radius: 18px;
  border-bottom-left-radius: 5px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  max-width: 220px;
  opacity: 1;
  backdrop-filter: blur(10px);
  position: relative;
  transform: translateY(0);
  transition: all 0.3s ease;
  margin-bottom: 8px;
}

.floating-message::before {
  content: '';
  position: absolute;
  bottom: 12px;
  right: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid #ffffff;
  border-right: 8px solid transparent;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.floating-message::after {
  content: '';
  position: absolute;
  bottom: 11px;
  right: -10px;
  width: 0;
  height: 0;
  border-left: 9px solid rgba(255, 255, 255, 0.3);
  border-right: 9px solid transparent;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.message-text {
  font-size: 13px;
  color: #2d3748;
  font-weight: 500;
  line-height: 1.4;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

#chatbot-toggle {
  background: linear-gradient(135deg, #ec681c 0%, #ff8c42 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  box-shadow: 
    0 6px 20px rgba(236, 104, 28, 0.4),
    0 0 0 3px rgba(255, 255, 255, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: visible;
  position: relative;
  flex-shrink: 0;
  opacity: 1;
  transform: scale(1);
  z-index: 1002;
}

#chatbot-toggle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 10px 25px rgba(236, 104, 28, 0.5),
    0 0 0 3px rgba(255, 255, 255, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, #e55a10 0%, #ff7a2e 100%);
}

.image-container {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
  z-index: 1003;
}

@keyframes float {
  0%, 100% { 
    transform: translateX(-50%) translateY(0px); 
  }
  50% { 
    transform: translateX(-50%) translateY(-8px); 
  }
}

.image-container {
  animation: float 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 
      0 6px 20px rgba(236, 104, 28, 0.4),
      0 0 0 3px rgba(255, 255, 255, 0.1);
  }
  50% { 
    box-shadow: 
      0 6px 20px rgba(236, 104, 28, 0.6),
      0 0 0 3px rgba(255, 255, 255, 0.15);
  }
}

#chatbot-toggle {
  animation: pulse-glow 3s ease-in-out infinite;
}

#chatbot {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 90vw;
  max-width: 400px;
  height: 90vh; /* Altura fija estándar */
  max-height: 700px; /* Límite máximo relativo al viewport */
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
}

#chatbot.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  bottom: 20px;
}

#chatbot.visible ~ .chatbot-widget #chatbot-toggle {
  transform: scale(0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

#chatbot.visible ~ .chatbot-widget .floating-message {
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
}

#chatbot.visible ~ .chatbot-widget .image-container {
  opacity: 0;
  transform: translateX(-50%) scale(0.8);
}

.close-btn {
  align-self: flex-end;
  background: linear-gradient(135deg, #ec681c 0%, #ff8c42 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 10px;
  z-index: 1001;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.close-btn:hover {
  transform: scale(1.1) rotate(90deg);
  background: linear-gradient(135deg, #e55a10 0%, #ff7a2e 100%);
}

.frame {
  width: 100%;
  height: 90vh;
  max-height: 800px;
  border: none;
  border-radius: 16px;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  background: white;
}

.chatbot-widget:hover .floating-message {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 13%;
    right: 18px;
    }

    .chatbot-widget {
    bottom: 15px;
    right: 15px;
    gap: 10px;
  }
  
  #chatbot-toggle {
    width: 65px;
    height: 65px;
  }
  
  .image-container {
    width: 70px;
    height: 70px;
    top: -20px;
  }
  
  .floating-message {
    max-width: 180px;
    padding: 12px 15px;
  }
  
  .message-text {
    font-size: 12px;
  }
  
  #chatbot {
    width: 95vw;
    right: 2.5vw;
    bottom: 80px;
  }

  #chatbot.visible {
    bottom: 15px;
  }
  
  .frame {
    height: 60vh;
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 12%;
    right: 13px;
    }

    .chatbot-widget {
    bottom: 12px;
    right: 12px;
    align-items: flex-end;
    gap: 8px;
  }
  
  .floating-message {
    margin-bottom: 0;
    margin-top: 5px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 5px;
    max-width: 160px;
    padding: 10px 12px;
  }
  
  .floating-message::before {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 5px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ffffff;
    border-bottom: 8px solid transparent;
    left: auto;
  }
  
  .floating-message::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 14px;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid rgba(255, 255, 255, 0.3);
    border-bottom: 9px solid transparent;
    left: auto;
  }
  
  #chatbot-toggle {
    width: 60px;
    height: 60px;
  }
  
  .image-container {
    width: 65px;
    height: 65px;
    top: -18px;
  }
  
  #chatbot {
    bottom: 75px;
  }

  #chatbot.visible {
    bottom: 12px;
  }
  
  .frame {
    height: 55vh;
    border-radius: 12px;
  }
  
  .close-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .chatbot-widget {
    bottom: 10px;
    right: 10px;
  }
  
  #chatbot-toggle {
    width: 55px;
    height: 55px;
  }
  
  .image-container {
    width: 60px;
    height: 60px;
    top: -15px;
  }
  
  .floating-message {
    max-width: 140px;
    padding: 8px 10px;
  }
  
  .message-text {
    font-size: 11px;
  }
  
  #chatbot {
    width: 98vw;
    right: 1vw;
    bottom: 70px;
  }

  #chatbot.visible {
    bottom: 10px;
  }
  
  .frame {
    height: 50vh;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  #chatbot {
    bottom: 60px;
    right: 15px;
    width: 70vw;
  }

  #chatbot.visible {
    bottom: 10px;
  }
  
  .frame {
    height: 75vh;
    max-height: 300px;
  }
  
  .chatbot-widget {
    bottom: 10px;
    right: 10px;
  }
}

@media (hover: none) and (pointer: coarse) {
  #chatbot-toggle:hover {
    transform: none;
  }
  
  .close-btn:hover {
    transform: none;
  }
  
  .chatbot-widget:hover .floating-message {
    transform: none;
  }
  
  #chatbot-toggle:active {
    transform: scale(0.95);
  }
}

/* ============================================
   ESTILOS ADICIONALES Y UTILITARIOS
   ============================================ */
.red-social .social-icon {
  fill: white;
  transition: fill 0.3s ease;
}

.red-social a:hover .social-icon {
  fill: #044bff;
}

.uno {
  font-size: medium;
  font-weight: bold;
}

@media only screen and (max-width: 800px) {
  #contenedor-div-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .contact-section {
    max-width: 100%;
    margin: 0 auto;
  }
  
  .contact-heading {
    margin-bottom: 20px;
  }
  
  .contact-form {
    margin-bottom: 20px;
  }
  
  .container-contact img {
    max-width: 100%;
    height: auto;
  }
  
  .pie-pagina {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
  }

  .red-social a {
    display: block;
    margin-bottom: 10px;
  }

  .grupo-1, .grupo-2 {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
  }
}

/* ============================================
   ESTILOS QUE NO ESTÁN EN EL HTML PERO SE MANTIENEN
   ============================================ */
#portfolioGallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

#portfolioGallery img {
  border-radius: var(--border-radius);
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/9;
  transition: var(--transition);
}

#portfolioGallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: inherit;
  transition: var(--transition);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .section {
    padding: 1rem;
  }
  
  #portfolioGallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 480px) {
  :root {
    --border-radius: 6px;
  }
  
  button, .btn {
    padding: 0.6rem 1rem;

  }
  
  form {
    padding: 0.5rem;
  }
}