/* base.css - Estilos base para Smart Tribe con variables */

/* =======================
   VARIABLES (modo claro)
======================= */
:root {
  /* Marca */
  --color-principal: #00A746;
  --color-principal-claro: #33B76A;
  --color-principal-oscuro: #007F36;
  --color-secundario: #008CBA;
  --color-acento: #FFD700;
    
  --color-texto-input: #000;

  /* Estados */
  --color-success: #28A745;
  --color-error: #DC3545;
  
  --color-fondo-destacado: linear-gradient(61deg,rgba(128, 207, 72, 1) 0%, rgba(134, 222, 33, 1) 50%, rgba(237, 234, 83, 1) 100%);;

  /* Neutros de fondo y texto */
  --color-fondo-body: linear-gradient(to right, #002f6c, #0051a2);
  
  --color-fondo-body-inverso: linear-gradient(to left, #002f6c, #0051a2);
  
  --color-texto-body: white;
  --color-fondo-input: #FFFFFF;

  /* Cabecera y pie */
  --color-fondo-header: #001d3d;
  --color-texto-header: #FFFFFF;
  --color-fondo-footer: #001d3d;
  --color-texto-footer: #CCCCCC;

  /* Navegación */
  --color-nav-link: white;
  --color-nav-link-hover: #c7ffde;

  /* Botones */
  --color-form-button-bg: var(--color-principal);
  --color-form-button-text: #FFFFFF;
  --color-form-button-hover: var(--color-principal-claro);
  
  --color-form-bg: var(--color-fondo-body-inverso);
  
}

/* =======================
   MODO OSCURO
======================= */
body.modo-oscuro {
  /* Variables de color para modo oscuro */
  --color-fondo-body: linear-gradient(to right, #121212, #1f1f1f);
  --color-texto-body: #EEEEEE;
  --color-fondo-header: #1A1A1A;
  --color-texto-header: #EEEEEE;
  --color-fondo-footer: #1A1A1A;
  --color-texto-footer: #AAAAAA;
  --color-nav-link: #EEEEEE;
  --color-nav-link-hover: #00e676;
  --color-form-bg: #1A1A1A;
  --color-form-input-bg: #2A2A2A;
  --color-form-text: #EEEEEE;
  --color-form-button-bg: #00A746;      /* o un verde más suave si quieres */
  --color-form-button-text: #FFFFFF;
  --color-form-button-hover: #007F36;
  --color-box-bg: #242424;
  --color-texto-input: #000;
  --color-box-shadow: rgba(0, 0, 0, 0.7);
}

/* Reset de enlaces: nada de azul ni subrayado */
a {
  color: inherit;         /* hereda el color del contenedor */
  text-decoration: none;  /* quita el subrayado */
}

/* Opcional: define tu propio hover */
a:hover,
a:focus {
  color: var(--color-nav-link-hover);
  text-decoration: none;
  outline: none;
}


.gradient-text {
  /* 1) Definimos un degradado como fondo */
background: var(--color-fondo-destacado);
  
  /* 2) Recortamos el fondo al texto */
  -webkit-background-clip: text;
  background-clip: text; /* para navegadores estándar */

  /* 3) Hacemos el color del texto transparente */
  color: transparent;

  /* Opcional: ajustes de tipografía */
  font-size: 3rem;
  font-weight: bold;
}

/* =======================
   RESET & UTILIDADES
======================= */
/* al principio de tu style.css */
html {
  scroll-behavior: smooth;
}

/* cuando el menú está abierto, difuminamos main y footer */
body.menu-open main,
body.menu-open footer {
  filter: blur(5px);
  transition: filter 0.3s ease;
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: var(--color-fondo-body);
  color: var(--color-texto-body);
  font-family: Arial, sans-serif;
  line-height: 1.6;
}
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  flex: 1;
}

/* =======================
   NAVBAR
======================= */
header {
  background: var(--color-fondo-header);
}
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
}

/* Cuando tenga esta clase, se ocultará hacia arriba */
.header--hidden {
  transform: translateY(-100%);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav__logo img {
  height: 40px;
  border-radius: 0.375rem;
}
.nav__logo span{
    font-size: 1.5rem;
}

.nav__menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  
  /* <-- empuja el menú hasta la derecha */
  margin-left: auto;
}
.nav__menu a {
  text-decoration: none;
  color: var(--color-nav-link);
  font-weight: bold;
  transition: color 0.3s ease;
    
    
}
.nav__menu a:hover {
  color: var(--color-nav-link-hover);
}
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
    margin-left: 1rem;
}

.nav__close{
    display: none;
    background: none;
}

/* mostrar la X cuando el menú está activo */
.nav__menu.nav__menu--active .nav__close {
  display: block;
}

.menu-icon {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color-texto-body);
  position: relative;
}
.menu-icon::before,
.menu-icon::after {
  content: "";
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color-texto-body);
  position: absolute;
  left: 0;
}
.menu-icon::before { top: -8px; }
.menu-icon::after  { top:  8px; }

/* botón de cerrar en esquina */
.nav__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  list-style: none;
  font-size: 1.5rem;
  color: var(--color-texto-body);
  cursor: pointer;
  line-height: 1;
}

/* cuando esté activo, lo mostramos */
.nav__menu.nav__menu--active {
  transform: translateX(0);
}

/* =======================
   HERO (mejor distribución con Flexbox)
======================= */
.section--hero {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly; /* distribuye uniformemente los elementos */
  align-items: center;           /* centra horizontalmente */
  text-align: center;
  min-height: calc(100vh - 40px); /* altura total menos header/footer */
  padding: 0 1rem;               /* solo padding horizontal */
  gap: 1.5rem;                   /* espacio uniforme entre items */
}

.section--hero h1 {
  margin: 0;                     /* elimina márgenes innecesarios */
  font-size: 2.5rem;
  line-height: 1.2;
}

.section--hero p {
  margin: 0;
  max-width: 600px;
}

.section__actions {
  display: flex;
  gap: 1rem;
  margin: 0;                     /* quitamos el margin-top para que lo gestione el gap */
}

/* =======================
   BOTONES
======================= */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.3s ease;
}
.btn--primary {
  background: var(--color-form-button-bg);
  color: var(--color-form-button-text);
}
.btn--primary:hover {
  background: var(--color-form-button-hover);
}
.btn--secondary {
  background: transparent;
  border: 2px solid var(--color-nav-link);
  color: var(--color-nav-link);
}
.btn--secondary:hover {
  background: rgba(255,255,255,0.1);
}

/* =======================
   FOOTER
======================= */
.footer {
  background: var(--color-fondo-footer);
  color: var(--color-texto-footer);
  text-align: center;
  padding: 1rem;
}

/* =======================
   SECCIONES ESPECÍFICAS
======================= */

/* Container común para secciones */
.section {
  padding: 4rem 1rem;
}
.section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--color-texto-body);
}

/* =======================
   FEATURES (Características)
======================= */
.section--features {
  background: rgba(0,0,0,0.05);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.feature-card {
  background: var(--color-form-bg);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px var(--color-box-shadow);
  text-align: center;
}
.feature-card img {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}
.feature-card h3 {
  margin-bottom: 0.5rem;
  color: var(--color-principal);
}
.feature-card p {
  color: var(--color-texto-body);
  font-size: 0.95rem;
}

/* =======================
   GRID CLIENTES AJUSTADA
======================= */
.clients-grid {
  display: grid;
  /* cada columna entre 100px y el 1fr disponible */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  /* cada fila al menos 100px de alto, y puede crecer si es necesario */
  grid-auto-rows: minmax(100px, auto);
  gap: 1.3rem;
  justify-items: center;
  align-items: start; /* arranca cada item arriba de su celda */
}

/* Cada “tarjeta” ocupa toda la celda y centra su contenido */
.client-item {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}

/* Evita que los iconos absolutos influyan en el auto-row */
.client-item .social-icons {
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease, bottom 0.3s ease;
}
/* Contenedor de icono fijo */
.social-icons {
  display: flex;               /* flex en línea */
  flex-direction: row;         /* fila */
  justify-content: space-between; /* espacio alrededor de cada icono */
  align-items: center;         /* centrado vertical */
  width: 100%;                 /* ocupa todo el ancho del .client-item */
  max-width: 120px;            /* limita cuánto crece (ajusta a tu gusto) */
  
}

/* Cambio de color al hover */
.social-icons a{
    width: 16px;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .social-icons a{
        font-size: 1.8rem;
    }
    
}

.social-icons a:hover {
  color: var(--color-nav-link-hover);
}

/* Si necesitas que el <i> ocupe todo el contenedor: */


.social-icons i {
  display: flex;               /* flex en línea */
  flex-direction: row;         /* fila */
  justify-content: space-around; /* espacio alrededor de cada icono */
  align-items: center;         /* centrado vertical */
  width: 100%;                 /* ocupa todo el ancho del .client-item */
  max-width: 120px;            /* limita cuánto crece (ajusta a tu gusto) */
  margin-top: 0.5rem;          /* separa un poco de la imagen */
  color: var(--color-nav-link);
}

/* Hover: animi y muestra iconos */
.client-item:hover {
  transform: translateY(-5px);
}
.client-item:hover .social-icons {
  bottom: -1.5rem;
  opacity: 1;
}


/* =======================
   LOGOS
======================= */
.client-logo {
  /* que no se encoja por debajo de 100px de alto */
  min-height: 100px;
  /* que no supere nunca el ancho de la celda */
  width: 100%;
  max-width: 200px;      /* opcional: límite superior en anchura */
  object-fit: contain;
  padding: 0.5rem;
  box-sizing: border-box;
  background-color: var(--color-clientes-bg);
  border-radius: 1.5rem;
}



/* =======================
   PRICING (Precios)
======================= */
.section--pricing {
  background: transparent;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.pricing-card {
  background: var(--color-form-bg);
  padding: 2rem;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  text-align: center;
  box-shadow: 0 2px 8px var(--color-box-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pricing-card.recommended {
  border-color: var(--color-principal);
  transform: translateY(-5px);
}
.pricing-card h3 {
  margin-bottom: 1rem;
  color: var(--color-principal-oscuro);
}
.pricing-card .price {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--color-principal);
}
.pricing-card .price span {
  font-size: 1rem;
  font-weight: normal;
  color: var(--color-texto-body);
}
.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.pricing-card ul li {
  margin: 0.5rem 0;
  color: var(--color-texto-body);
  font-size: 0.95rem;
}
.pricing-card .btn {
  margin-top: 1.5rem;
}

/* =======================
   TESTIMONIALS (Testimonios)
======================= */
.section--testimonials {
  background: rgba(0,0,0,0.05);
}
.testimonials-slider {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}
.testimonial {
  background: var(--color-form-bg);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px var(--color-box-shadow);
}
.testimonial p {
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--color-texto-body);
}
.testimonial footer {
  text-align: right;
  font-weight: bold;
  color: var(--color-principal-claro);
}

/* =======================
   CONTACT (Contacto)
======================= */
.section--contact {
  background: transparent;
}
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-form-bg);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px var(--color-box-shadow);
}
.contact-form .form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}
.contact-form label {
  margin-bottom: 0.5rem;
  color: var(--color-texto-body);
  font-weight: bold;
}
.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 0.375rem;
  background: var(--color-fondo-input);
  color: var(--color-texto-input);
  font-size: 1rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-principal);
}
.contact-form button {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
}

/* =======================
   RESPONSIVE (móvil)
======================= */
@media (max-width: 768px) {
  /* Ocultamos el toggle por defecto */
  .nav__toggle {
    display: block;
  }

  /* Hacemos el menú un panel fijo fuera de pantalla */
  .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 240px;
    margin: 0;
    padding: 2rem 1rem;
    background: var(--color-fondo-header);
    flex-direction: column;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  /* Sólo cuando tenga la clase active lo mostramos */
  .nav__menu.nav__menu--active {
    transform: translateX(0);
  }

  /* Ocultamos cualquier scrollbar lateral si estuviese visible */
  body {
    overflow-x: hidden;
  }
}



