/* Variables para colores */
:root {
  --primary: #9b87f5;
  --primary-dark: #7E69AB;
  --primary-light: #E5DEFF;
  --destructive: #ea384c;
  --destructive-dark: #C72A3D;
  --text-primary: #222222;
  --text-secondary: #555555;
  --background: #ffffff;
  --background-footer: #f8f8f8;
  --border: #e1e1e1;
  --muted: #8E9196;
}

/* Modo Oscuro */
body.dark-mode {
  --primary: #b6aaff;
  --primary-dark: #6c5fa3;
  --primary-light: #2a223a;
  --destructive: #ff6b81;
  --destructive-dark: #c0392b;
  --text-primary: #f4f4f4;
  --text-secondary: #cccccc;
  --background: #181824;
  --background-footer: #232336;
  --border: #2a2a3a;
  --muted: #8888aa;
}

/* Boton del modo oscuro */
#toggle-dark, .toggle-dark {
  display: flex;
  background-color: var(--background);
  width: 1.3rem;
  height: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

#toggle-dark i, .toggle-dark i{
  color: var(--primary);
  font-size: 1rem;
}

/* Estilos generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Contenedor para la barra de navegacion */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Estilo de links */
a {
  text-decoration: none;
  color: var(--primary);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Botones */
/* Primario */
.primary-button {
  background-color: var(--primary);
  color: var(--background);
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  display: inline-block;
  transition: all 0.3s ease;
}

.primary-button:hover {
  background-color: var(--primary-dark);
  color: var(--background);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--border);
}

/* Secundario */
.secondary-button {
  background-color: transparent;
  color: var(--primary);
  padding: 11px 23px;
  border-radius: 6px;
  font-weight: 500;
  display: inline-block;
  border: 1px solid var(--primary);
  transition: all 0.3s ease;
}

.secondary-button:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

/* Boton delineado */
.outlined-button {
  background-color: transparent;
  color: var(--primary);
  padding: 11px 23px;
  border-radius: 6px;
  font-weight: 500;
  display: inline-block;
  border: 1px solid var(--primary);
  transition: all 0.3s ease;
}

.outlined-button:hover {
  background-color: var(--primary-light);
}

/* Boton de eliminar */
.delete-button {
    border: 1px solid var(--border);
    background-color: var(--destructive);
    color: var(--background);
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
}

.delete-button:hover {
    background-color: var(--destructive-dark);
    color: var(--background);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--border);
}

/* Barra de navegación */
.navbar {
  background-color: var(--background);
  box-shadow: 0 2px 10px var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-logo {
  font-size: 1.3rem;
  color: var(--text-primary);
  font-weight: 700;
}

.navbar-links {
  display: flex;
  gap: 1.5rem;
}

.navbar-links a {
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
}

.navbar-links a.active {
  color: var(--primary);
}

.navbar-links a.emergency-btn {
  color: var(--destructive);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Seccion del mensaje superior principal */
.hero-section {
  background: linear-gradient(to bottom, var(--primary-light), var(--background));
  padding: 5rem 2rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  animation: fadeIn 0.5s ease-out;
}

.hero-text {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  animation: fadeIn 0.5s ease-out 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  animation: fadeIn 0.5s ease-out 0.4s both;
}

/* Pie de Pagina */
.footer {
  background-color: var(--background-footer);
  padding-top: 3rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 0 2rem;
}

.footer-section h3 {
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.footer-section p {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--muted);
}

.footer-section ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Media Queries */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

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

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .emergency-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .service-card {
    padding: 1.2rem;
  }
}

/* Menu móvil */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background);
  z-index: 200;
  padding: 2rem;
  flex-direction: column;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  cursor: pointer;
  color: var(--text-primary);
}

.mobile-menu a {
  font-size: 1.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* Ventana modal */
dialog {
  position: fixed;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: fit-content;
  overflow: auto;
  background-color: var(--background);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px var(--border);
  border-radius: 12px;
  color: var(--text-primary);
}

@media screen and (max-width: 768px) {
  dialog {
    width: 90%;
  }
}

/* Mensajes de error */
.error {
  display: block;
  margin-top: 5px;
  text-align: left;
  color: var(--destructive);
  font-size: 0.9em;
}

/* Icono*/
.icon {
  background-color: var(--background);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}

.icon i {
  color: var(--primary);
  font-size: 1.5rem;
}

/* Boton para manuales */
.icon-faq {
  position: fixed;
  z-index: 1;
  bottom: 5px;
  right: 2%;
  background-color: var(--background);
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}

.icon-faq i {
  color: var(--primary);
  font-size: 2rem;
}

.icon-faq:hover {
  color: var(--background);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--border);
}

.icon-faq i:hover {
  color: var(--primary-dark);
}

#faq a, #faq button{
  border: 1px solid var(--border);
  padding: 13px 24px;
  font-size: 1rem;
  margin: 5px;
}

#faq video {
  max-width: 100%;
  height: 30%;
}