* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variables CSS para consistencia */
:root {
  --color-principal: #f06529;
  --color-secundario: #b7410e;
  --color-fondo: #f5f0e6;
  --color-texto: #2c2c2c;
  --color-header: #2f2f2f;
  --color-hover: #ec4a04;
  --color-hover-dark: #8a2e0a;
  --fuente-principal: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fuente-titulos: "Playfair Display", Georgia, serif;

  /* Variables específicas para tema claro */
  --bg-body: #f5f0e6;
  --bg-card: #ffffff;
  --bg-section: #ffffff;
  --text-primary: #2c2c2c;
  --text-secondary: #5a5a5a;
  --border-color: #e0e0e0;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --shadow-dark: rgba(0, 0, 0, 0.25);
}

/* Tema oscuro */
[data-theme="dark"] {
  --color-fondo: #1a1a1a;
  --color-texto: #e0e0e0;
  --color-header: #0d0d0d;

  /* Variables específicas para tema oscuro */
  --bg-body: #3a3a3a;
  --bg-card: #2a2a2a;
  --bg-section: #252525;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --border-color: #404040;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --shadow-dark: rgba(0, 0, 0, 0.6);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--fuente-principal);
  background-color: var(--bg-body) !important;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

section {
  padding: 1rem 1rem;
  background-color: var(--bg-section) !important;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px var(--shadow-light);
  transition: background-color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--fuente-titulos);
  color: var(--color-secundario);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h5 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

/* Header */
header {
  height: 100px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  align-items: center;
  justify-content: space-between !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background-color: #2f2f2f;
}

.logo-aa img {
  max-height: 80px;
  width: auto;
  border-radius: 50%;
}

header .navbar-nav .nav-item .nav-link {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

header .navbar-nav {
  width: auto !important;
  align-items: center !important;
  margin-left: 15rem !important;
}

header .nav-link {
  color: #f5f0e6 !important;
}

header .nav-link:hover {
  color: #f8795c !important;
  font-weight: bold;
}

header .nav-item {
  margin-left: 0.3rem;
  font-size: 0.8rem;
}

.logo-cp {
  display: flex;
  align-items: center;
  padding: 0;
  position: fixed;
  max-width: 250px;
  left: 0.5rem;
  top: 0.25rem;
  img {
    max-height: 80px;
    width: auto;
    border-radius: 8px;
  }
}

.logo-aa {
  position: fixed;
  right: 1.5rem;
  top: 0.25rem;
  z-index: 1000; /* Asegura que el logo esté por encima del resto del contenido */
  border-radius: 50%;
  cursor: pointer;
}

/* Botón de cambio de tema */
.theme-toggle-btn {
  position: fixed;
  right: 150px;
  top: 30px;
  z-index: 1001;
  background-color: var(--color-principal);
  border: 2px solid var(--color-secundario);
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px var(--shadow-medium);
  font-size: 1.2rem;
}

.theme-toggle-btn:hover {
  background-color: var(--color-hover);
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 12px var(--shadow-dark);
}

.theme-toggle-btn:active {
  transform: scale(0.95) rotate(0deg);
}

.theme-toggle-btn i {
  transition: transform 0.3s ease;
}

section {
  scroll-margin-top: 120px; /* Ajusta este valor según la altura de tu header */
}

/* Carrusel */

#hero {
  margin-top: 6rem;
  width: 100%;
  max-width: 1320px !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#hero .carousel-item img {
  height: 500px;
  width: 100%;
  object-fit: cover;
  margin-top: 0;
}

#hero .carousel-caption {
  padding: 1.5rem;
  border-radius: 10px;
  bottom: 2rem;
}

#hero .carousel-caption h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  background-color: rgba(44, 44, 44, 0.7);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
  line-height: 1.2;
}

#hero .carousel-caption p {
  color: #fff;
  font-size: clamp(1rem, 2vw, 1.5rem);
  background-color: rgba(44, 44, 44, 0.7);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}


/* Botones - Estilos mejorados y consistentes */
.btn {
  font-family: var(--fuente-principal);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.625rem 1.5rem;
  border-radius: 6px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  text-align: center;
  line-height: 1.5;
}

.btn:focus {
  outline: 2px solid var(--color-principal);
  outline-offset: 2px;
}

/* Botón primario del carrusel */
.carousel-caption .btn-primary {
  background-color: var(--color-principal);
  border-color: var(--color-principal);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.carousel-caption .btn-primary:hover {
  background-color: var(--color-hover);
  border-color: var(--color-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Botones en cards de 3 columnas */
.col-md-3 .btn,
.col-md-4 .btn {
  background-color: var(--color-principal);
  border-color: var(--color-secundario);
  color: #fff;
  width: 100%;
  font-weight: 500;
}

.col-md-3 .btn:hover,
.col-md-4 .btn:hover {
  background-color: var(--color-hover);
  border-color: var(--color-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Botones en secciones de 2 columnas */
.col-md-6 .btn {
  background-color: var(--color-principal);
  border-color: var(--color-secundario);
  color: #fff;
  padding: 0.75rem 2rem;
  font-weight: 500;
}

.wap-algoritmos {
  margin-top: 0.5rem;
}

.wap-algoritmos .btn {
  width: 100%;
  background-color: green !important ;
}

.wap-algoritmos .btn:hover {
  background-color: darkgreen !important ;
}

.col-md-6 .btn:hover {
  background-color: var(--color-hover-dark);
  border-color: var(--color-hover-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Botón outline oscuro */
.btn-outline-dark {
  background-color: transparent;
  border-color: var(--color-texto);
  color: var(--color-texto);
  font-weight: 500;
}

.btn-outline-dark:hover {
  background-color: var(--color-secundario);
  border-color: var(--color-secundario);
  color: #fff;
  transform: translateY(-2px);
}

#contacto {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 15px;
  margin-bottom: 1rem;
}

#contacto .buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

/* Cards - Soporte para tema oscuro */
.card {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.card:hover {
  box-shadow: 0 6px 16px var(--shadow-medium);
  transform: translateY(-4px);
}

.card-body {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.card-title {
  color: var(--color-secundario) !important;
}

.card-text {
  color: var(--text-secondary) !important;
}

/* Secciones */
section {
  background-color: var(--bg-body);
  color: var(--text-primary);
}

/* Footer */
footer {
  display: flex;
  flex-direction: row;
  width: 100%;
  align-items: center;
  justify-content: space-around;
  background-color: var(--color-header);
  color: #f5f0e6;
  transition: background-color 0.3s ease;
}

footer .copy a {
  text-decoration: none !important;
  color: #f5f0e6 !important;
  font-weight: 500;
  transition: all 0.3s ease;
}

footer .copy a:hover {
  color: #f06529 !important;
  text-decoration: underline !important;
}

footer a:hover {
  color: #b7410e;
}

.logo-cp-ft {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100px;

  img {
    max-height: 80px;
    width: auto;
    border-radius: 8px;
  }
}

.logo-aa-ft {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100px;

  img {
    max-height: 80px;
    width: auto;
    border-radius: 50%;
  }
}

.copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100px;
  justify-content: center;
}

.copy p {
  margin: 0;
  font-size: 0.8rem;
}

.copy a {
  color: #f5f0e6;
  text-decoration: none;
  margin: 0;
}

.copy a:hover {
  color: #b7410e;
}
