/* ========================= */
/* BASE Y PALETA DE COLORES */
/* ========================= */
:root {
  --color-primary: #1e3a8a;
  --color-secondary: #f97316;
  --color-bg-light: #f9fafb;
  --color-text-dark: #374151;
  --color-text-secondary: #6b7280;
  --color-orange-light: #fdba74;
  --color-orange-strong: #ea580c;
  --color-blue-gray: #64748b;
  --color-green-success: #10b981;
  --color-blue: #3b82f6;
  --color-gold: #f59e0b;
}
/* Colores para las tarjetas de servicios */
.servicio-web { background: #e0f2fe; }          /* azul claro */
.servicio-movil { background: #fef3c7; }        /* amarillo suave */
.servicio-troubleshooting { background: #dcfce7; } /* verde claro */
.servicio-ecommerce { background: #f3e8ff; }    /* violeta suave */
.servicio-soporte { background: #fee2e2; }      /* rojo suave */
.servicio-apps { background: #cffafe; }         /* celeste */
.servicio-correos { background: #ede9fe; }      /* lila */
.servicio-marketing { background: #fef9c3; }    /* amarillo pastel */


/* Tipografía base */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  background: var(--color-bg-light);
  color: var(--color-text-dark);
  line-height: 1.6;
}

/* ========================= */
/* ENCABEZADO */
/* ========================= */
header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to right, var(--color-primary), #000);
  padding: 1rem 2rem;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

header nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: var(--color-secondary);
}

/* Logo */
.logo-flotante {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10; /* asegura que quede por encima del hero */
}

.logo-flotante img {
  height: 250px;
  transition: transform 0.3s ease;
}

.logo-flotante img:hover {
  transform: scale(1.05);
}

/* ========================= */
/* HERO */
/* ========================= */
.hero {
  position: relative;
  text-align: center;
  padding: 5rem 2rem;
  background: url("img/fondo-hero.png") center/cover no-repeat;
  color: white;
  overflow: hidden;
}

/* Overlay semitransparente */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  filter: grayscale(60%) brightness(0.8);
  transition: all 0.5s ease;
  z-index: 0; /* debajo del logo */
}

/* Al pasar el mouse, se quita el filtro y se aclara el overlay */
.hero:hover::before {
  background: rgba(0,0,0,0.1); /* overlay más tenue */
  filter: none;
}

/* Texto encima del overlay */
.hero h1,
.hero p,
.hero .btn {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.hero p {
  font-size: 1.2rem;
  color: #f9fafb;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

.hero .btn {
  background: var(--color-secondary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}
.hero .btn:hover {
  background: var(--color-orange-strong);
}


.btn {
  background: var(--color-secondary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn:hover {
  background: var(--color-orange-strong);
}
/* ========================= */
/* QUIENES SOMOS */
/* ========================= */
#quienes-somos {
  text-align: center;
  background: var(--color-bg-light);
  padding: 3rem 2rem;
}

#quienes-somos h2 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 2rem;
}

#quienes-somos .card {
  /*background: white;*/
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

#quienes-somos .card:hover {
  transform: translateY(-5px);
}

#quienes-somos .card img {
  height: 200px;
  width: 200px;        /* asegura proporción cuadrada */
  object-fit: cover;   /* recorta la imagen si no es cuadrada */
  border-radius: 50%;  /* convierte el cuadrado en círculo */
  margin-bottom: 1rem;
  border: 4px solid #fff; /* opcional: borde blanco para resaltar */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* opcional: sombra */
}


#quienes-somos .card h2 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

/* Colores inspirados en el logo Ideòpata */
.card.ideopata {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: #ffffff;
}

.card.mision {
  background: linear-gradient(135deg, #c2410c 0%, #f97316 50%, #c2410c 100%);
  color: #ffffff;
}


.card.vision {
  background: linear-gradient(135deg, #1e3a8a 0%, #f97316 100%);
  color: #ffffff;
}

/* Asegura que los textos estén por encima del fondo */
#quienes-somos .card h2,
#quienes-somos .card p {
  position: relative;
  z-index: 1;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}


/* ========================= */
/* SECCIONES GENERALES */
/* ========================= */
section {
  padding: 3rem 2rem;
}

.cards {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.card {
  flex: 1;
  background: white;
  border: 1px solid var(--color-blue-gray);
  padding: 2rem;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card h2, .card h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
/* ========================= */
/* SERVICIOS COLOREADOS */
/* ========================= */
#servicios {
  text-align: center;
  background: var(--color-bg-light);
  padding: 3rem 2rem;
}

#servicios h2 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 2rem;
}

#servicios .card {
  color: var(--color-text-dark);
  font-weight: 500;
  border: none; /* quitamos borde gris para que resalte el color */
}

/* Colores diferenciados */
.servicio-web {
  background: #e0f2fe; /* azul claro */
}
.servicio-movil {
  background: #fef3c7; /* amarillo suave */
}
.servicio-troubleshooting {
  background: #dcfce7; /* verde claro */
}
.servicio-ecommerce {
  background: #f3e8ff; /* violeta suave */
}
.servicio-soporte {
  background: #fee2e2; /* rojo suave */
}
.servicio-apps {
  background: #cffafe; /* celeste */
}
.servicio-correos {
  background: #ede9fe; /* lila */
}
.servicio-marketing {
  background: #fef9c3; /* amarillo pastel */
}

/* Hover para dar efecto */
#servicios .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}


/* ========================= */
/* PACKS */
/* ========================= */
#packs {
  text-align: center;
  background: var(--color-bg-light);
}

#packs h2 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

#packs p {
  max-width: 600px;
  margin: 0 auto 2rem auto;
  color: var(--color-text-secondary);
}

.pack {
  border-top: 6px solid var(--color-primary);
  display: flex;              /* organiza contenido en columna */
  flex-direction: column;
  justify-content: space-between; /* empuja el botón hacia abajo */
  height: 100%;               /* asegura misma altura */
}

.pack ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.pack ul li {
  margin: 0.5rem 0;
  color: var(--color-text-secondary);
}

/* Colores diferenciados */
.pack-inicial {
  border-top-color: var(--color-green-success);
}
.pack-crecimiento {
  border-top-color: var(--color-blue);
}
.pack-premium {
  border-top-color: var(--color-gold);
}

/* Botón alineado abajo */
.pack .btn {
  margin-top: auto;       /* fuerza al botón a quedar abajo */
  align-self: center;     /* centra horizontalmente */
}
/* Igualar altura de todas las tarjetas */
.pack {
  min-height: 350px;        /* altura mínima uniforme */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pack .btn {
  margin-top: auto;
  align-self: center;
}



/* ========================= */
/* PORTAFOLIO */
/* ========================= */
#portafolio {
  text-align: center;
  background: var(--color-bg-light);
  padding: 3rem 2rem;
}

#portafolio h2 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

#portafolio p {
  max-width: 600px;
  margin: 0 auto 2rem auto;
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Tarjetas de proyectos */
#portafolio .cards {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

#portafolio .card {
  flex: 1 1 300px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#portafolio .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

#portafolio .card img {
  max-width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

#portafolio .card h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

#portafolio .card p {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

/* Botones de proyectos */
#portafolio .btn {
  background: var(--color-secondary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

#portafolio .btn:hover {
  background: var(--color-orange-strong);
}

#portafolio .btn-secundario {
  background: #d946ef; /* magenta para diferenciar */
}

#portafolio .btn-secundario:hover {
  background: #a21caf;
}

/* Responsive */
@media (max-width: 768px) {
  #portafolio .cards {
    flex-direction: column;
    gap: 1.5rem;
  }
}


/* ========================= */
/* CONTACTO */
/* ========================= */
#contacto {
  text-align: center;
}

#contacto form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#contacto form input,
#contacto form textarea {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

#contacto form input:focus,
#contacto form textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(30,58,138,0.2);
}

#contacto form button {
  background: var(--color-primary);
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s ease;
}

#contacto form button:hover {
  background: #0f172a;
}

#contacto p {
  margin-top: 1rem;
  color: var(--color-text-secondary);
}

/* ========================= */
/* FOOTER */
/* ========================= */
footer {
  text-align: center;
  background: var(--color-primary);
  color: white;
  padding: 1.5rem;
  font-size: 0.9rem;
}

/* ========================= */
/* BOTÓN VOLVER ARRIBA */
/* ========================= */
#btn-volver-arriba {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  background: var(--color-secondary);
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: background 0.3s ease, transform 0.3s ease;
  justify-content: center;
  align-items: center;
}
#btn-volver-arriba:hover {
  background: var(--color-orange-strong);
  transform: scale(1.1);
}
#btn-volver-arriba svg {
  width: 24px;
  height: 24px;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */
@media (max-width: 1024px) {
  .logo-flotante img {
    height: 150px;
  }
  nav ul {
    gap: 1rem;
  }
  .cards {
    flex-direction: column;
  }
}
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }
  .logo-flotante {
    position: relative;
    margin-top: 1rem;
    order: -1;
    text-align: center;
    width: 100%;
  }
  .logo-flotante img {
    height: 120px;
    max-width: 100%;
  }
}
