@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');

:root {
  --color-bg: #1E1E2F;
  --color-accent: #E94F37;
  --color-text: #FFFFFF;
  --color-text-secondary: #CCCCCC;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

/* HEADER */
header {
  background-color: var(--color-bg);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

/* LOGO COMO ENLACE */
.logo {
  font-size: 1.6em;
  font-weight: bold;
  color: var(--color-accent);
  text-decoration: none;
}

.logo:hover {
  color: #ff684b;
}

/* NAV */
nav {
  display: flex;
  gap: 25px;
}

nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  background-color: var(--color-accent);
  left: 0;
  bottom: -5px;
  transition: width 0.3s ease-in-out;
}

nav a:hover {
  color: var(--color-accent);
}

nav a:hover::after {
  width: 100%;
}

/* HERO */
#hero {
  min-height: 68vh;
  background: linear-gradient(135deg, rgba(30,30,47,0.85), rgba(30,30,47,0.9)), url('media/fondo.jpg') center center / cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  color: var(--color-text);
  position: relative;
}

.hero-content {
  max-width: 700px;
  animation: fadeInScale 1.2s ease forwards;

}

.animate-hero-title {
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: clamp(0.5rem, 2vw, 1.5rem);
  letter-spacing: 0.03em;
}

.hero-subtitle {
  font-weight: 300;
  font-size: 1.3em;
  margin-bottom: 30px;
  color: #ddd;
}

.btn-hero {
  background-color: var(--color-accent);
  color: var(--color-text);
  padding: 14px 36px;
  font-size: 1.2em;
  font-weight: 700;
  border-radius: 30px;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 6px 12px rgba(233, 79, 55, 0.5);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-hero:hover {
  background-color: #ff684b;
  transform: scale(1.05);
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

#somos-partner-dahua {
  padding: 100px 20px;
  background-color: var(--color-bg);
}

.img-container-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.img-container-grid img {
  width: 100%;
  border-radius: 12px;
  transition: transform 0.3s ease;
  object-fit: cover;
  height: 200px;
}

.img-container-grid img:hover {
  transform: scale(1.05);
}

.texto h2 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.color-resaltado {
  color: var(--color-accent);
}

.texto p {
  font-size: 1.2em;
  max-width: 800px;
  line-height: 1.5;
}

#nuestros-servicios {
  scroll-margin-top: 100px;
  background-color: #2e2e4a;
  padding: 60px 20px 100px;
}

#nuestros-servicios h2 {
  text-align: center;
  font-size: 2.8em;
  margin-bottom: 50px;
}

.tecnologias {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.carta {
  background-color: var(--color-bg);
  padding: 25px 40px;
  border-radius: 14px;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.5em;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
  transition: background-color 0.3s ease;
}

.carta:hover {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

.modal-toggle {
  display: none;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(30,30,47,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 2000;
  overflow-y: auto;
}

.modal-content {
  background-color: var(--color-bg);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  padding: 30px 40px;
  color: var(--color-text);
  box-shadow: 0 0 40px rgba(0,0,0,0.7);
}

.modal-close {
  position: fixed;
  top: 15px;
  right: 25px;
  font-size: 3em;
  color: var(--color-accent);
  cursor: pointer;
  font-weight: 700;
  user-select: none;
}

#modal1-toggle:checked ~ .modal1,
#modal2-toggle:checked ~ .modal2,
#modal3-toggle:checked ~ .modal3 {
  display: flex;
}

#contacto {
  scroll-margin-top: 100px;
  padding: 60px 20px 80px;
  background-color: #1E1E2F;
}

.contacto-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  max-width: 1100px;
  margin: auto;
  flex-wrap: wrap;
}

.contact-info {
  flex: 1;
  min-width: 280px;
}

.contact-info ul {
  list-style: none;
  font-weight: 500;
  font-size: 1.1em;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

.btn-maps {
  display: inline-block;
  padding: 14px 28px;
  background-color: var(--color-accent);
  color: var(--color-text);
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-maps:hover {
  background-color: #ff684b;
}

.contact-map {
  flex: 1;
  min-width: 280px;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0,0,0,0.7);
}

#Entra-ya {
  scroll-margin-top: 60px;
  background-color: #292947;
  padding: 60px 20px 90px;
  text-align: center;
  color: var(--color-text);
}

#Entra-ya h2 {
  font-size: 2.6em;
  margin-bottom: 40px;
}

.formulario-contacto {
  max-width: 600px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.formulario-contacto input,
.formulario-contacto textarea {
  padding: 14px;
  border-radius: 8px;
  border: none;
  font-size: 1em;
  background-color: #fff;
  color: #000;
  font-weight: 500;
  resize: vertical;
}

.formulario-contacto textarea {
  min-height: 120px;
}

.contact-map {
  flex: 0 0 240px;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

.btn-enviar {
  background-color: var(--color-accent);
  color: var(--color-text);
  padding: 14px 24px;
  border: none;
  border-radius: 30px;
  font-size: 1.2em;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-enviar:hover {
  background-color: #ff684b;
}

.footer-privacy-link,
.footer-privacy-link:visited,
.footer-privacy-link:hover,
.footer-privacy-link:active,
.footer-privacy-link:focus {
  color: white !important;
  text-decoration: none !important;
}

.privacy-link,
.privacy-link:visited,
.privacy-link:hover,
.privacy-link:active,
.privacy-link:focus {
  color: white !important;
  text-decoration: underline !important;
}

/* Estilos mejorados para el formulario */
.formulario-contenedor {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  background: rgba(46, 46, 74, 0.8);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #ffffff;
}

.formulario-contacto input[type="text"],
.formulario-contacto input[type="email"],
.formulario-contacto input[type="tel"],
.formulario-contacto textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  font-size: 1em;
  background-color: rgba(30,30,47,0.7);
  color: #ffffff;
  transition: all 0.3s ease;
}

.formulario-contacto input:focus,
.formulario-contacto textarea:focus {
  outline: none;
  border-color: #E94F37;
  box-shadow: 0 0 0 2px rgba(233, 79, 55, 0.3);
}

.formulario-contacto textarea {
  min-height: 150px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin: 30px 0;
}

.checkbox-group input {
  width: auto;
  margin-right: 12px;
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: normal;
  font-size: 0.95em;
}

.btn-enviar {
  background-color: #E94F37;
  color: white;
  border: none;
  padding: 16px 30px;
  font-size: 1.1em;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(233, 79, 55, 0.4);
}

.btn-enviar:hover {
  background-color: #ff684b;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 79, 55, 0.6);
}

.legal-text {
  font-size: 0.8em;
  color: #CCCCCC;
  margin-top: 20px;
  text-align: center;
  line-height: 1.5;
}

/* Asegura que los enlaces en el checkbox se vean bien en móviles */
@media (max-width: 768px) {
  .checkbox-group .privacy-link {
    white-space: nowrap;
  }
  
  .formulario-contenedor {
    padding: 20px;
  }
}

footer {
  background-color: #111;
  padding: 30px 20px;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.9em;
}

.telefono-whatsapp .telefono-link,
.telefono-whatsapp .telefono-link:visited,
.telefono-whatsapp .telefono-link:hover,
.telefono-whatsapp .telefono-link:active,
.telefono-whatsapp .telefono-link:focus {
  color: #ffffff !important;
  text-decoration: none;
  -webkit-text-fill-color: #ffffff !important; /* iOS Safari */
}
.modal-img {
  width: 100%;
  aspect-ratio: 16 / 9; /* Mantiene proporción de video/imagen horizontal */
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.camera-dome-anim {
  margin-top: 20px;
  width: 64px;
  height: 64px;
  margin-left: auto;
  margin-right: auto;
  animation: dome-rotate 6s linear infinite;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.formulario-contenedor {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  background: rgba(46, 46, 74, 0.8);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #ffffff;
}

.formulario-contacto input[type="text"],
.formulario-contacto input[type="email"],
.formulario-contacto input[type="tel"],
.formulario-contacto textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  font-size: 1em;
  background-color: rgba(30,30,47,0.7);
  color: #ffffff;
  transition: all 0.3s ease;
}

.formulario-contacto input:focus,
.formulario-contacto textarea:focus {
  outline: none;
  border-color: #E94F37;
  box-shadow: 0 0 0 2px rgba(233, 79, 55, 0.3);
}

.formulario-contacto textarea {
  min-height: 150px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin: 30px 0;
}

.checkbox-group input {
  width: auto;
  margin-right: 12px;
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: normal;
  font-size: 0.95em;
}

.btn-enviar {
  background-color: #E94F37;
  color: white;
  border: none;
  padding: 16px 30px;
  font-size: 1.1em;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(233, 79, 55, 0.4);
}

.btn-enviar:hover {
  background-color: #ff684b;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 79, 55, 0.6);
}

.legal-text {
  font-size: 0.8em;
  color: #CCCCCC;
  margin-top: 20px;
  text-align: center;
  line-height: 1.5;
}

/* Responsive para el formulario */
@media (max-width: 768px) {
  .formulario-contenedor {
    padding: 20px;
  }
  
  .checkbox-group label {
    font-size: 0.85em;
  }
}


@keyframes dome-rotate {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}
/* RESPONSIVE */
@media (max-width: 768px) {
  .tecnologias {
    flex-direction: column;
    align-items: center;
  }

  header .container {
    flex-direction: column;
    gap: 10px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Ajuste adicional en móvil para el título hero */
  .animate-hero-title {
    font-size: clamp(1.6rem, 7vw, 3rem);
  }

  .img-container-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contacto-grid {
    flex-direction: column;
    align-items: center;
  }

  .telefono-whatsapp {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
    font-weight: 600;
  }

  .telefono-whatsapp .telefono-link,
  .telefono-whatsapp .telefono-link:visited,
  .telefono-whatsapp .telefono-link:hover,
  .telefono-whatsapp .telefono-link:active,
  .telefono-whatsapp .telefono-link:focus {
    color: #ffffff !important;
    text-decoration: none;
    -webkit-text-fill-color: #ffffff !important; /* iOS Safari */
  }

  .telefono-whatsapp .telefono-link:hover {
    text-decoration: underline;
  }

  .whatsapp-link svg {
    display: inline-block;
    vertical-align: middle;
  }
  .telefono-whatsapp .telefono-link {
    color: #ffffff !important;
  }

}

/* NUEVO: Estilo para que la dirección se vea siempre blanca y sin subrayado */
.direccion-link,
.direccion-link:visited {
  color: white !important;
  text-decoration: none !important;
}

.direccion-link:hover,
.direccion-link:focus,
.direccion-link:active {
  color: white !important;
  text-decoration: none !important;
  cursor: pointer;
}