/* styles.css */

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #0e1117;
  color: #f0f0f0;
}

header {
  background: linear-gradient(120deg, #005eff, #00c8ff);
  color: white;
  padding: 60px 20px 100px;
  text-align: center;
  position: relative;
}

header h1 {
  font-size: 3em;
  margin: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}

header p {
  font-size: 1.2em;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

header h1.active,
header p.active {
  opacity: 1;
  transform: translateY(0);
}

nav {
  position: sticky;
  top: 0;
  background-color: #0e1117;
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

nav h2 {
  margin: 0;
  font-weight: 600;
}

nav a {
  color: #f0f0f0;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 300;
  transition: color 0.3s;
}

nav a:hover {
  color: #00c8ff;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
  border-radius: 5px; 
}

.contenido {
  padding: 40px 20px;
  max-width: 1000px;
  margin: auto;
}

.contenido h2 {
  color: #00c8ff;
}

.servicios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.servicio {
  background: #1c1f26;
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.servicio:hover {
  transform: translateY(-5px);
}

.servicio h3 {
  margin-top: 0;
  color: #00c8ff;
}

.servicio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  background: #1c1f26;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Estilo para los bloques de servicios que son enlaces */
a.servicio {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #1c1f26;
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

a.servicio:hover {
  transform: translateY(-5px);
}

.cta {
  margin: 50px 0;
  text-align: center;
}

.cta a {
  background: #00c8ff;
  color: #0e1117;
  padding: 15px 30px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.3s;
}

.cta a:hover {
  background: #0090cc;
}

.formulario {
  background: #1c1f26;
  padding: 30px;
  border-radius: 10px;
  margin-top: 40px;
}

.formulario label {
  display: block;
  margin-bottom: 8px;
  font-weight: 300;
}

.formulario input,
.formulario textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: none;
  border-radius: 5px;
  background: #2a2e38;
  color: #f0f0f0;
}

.formulario button {
  background: #00c8ff;
  color: #0e1117;
  border: none;
  padding: 12px 25px;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.formulario button:hover {
  background: #0090cc;
}

footer {
  text-align: center;
  padding: 20px;
  background: #0e1117;
  color: #888;
  margin-top: 50px;
  font-size: 0.9em;
}

/* Fade-in effect */
.fade-in {
    opacity: 0;
    animation: fadeIn 2s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
      opacity: 1;
    }
}

/* Reveal effect */
/* Revelar solo elementos con clase reveal que NO estén dentro de header */
.reveal:not(header *) {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal.active:not(header *) {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  header h1 {
    font-size: 2em;
  }

  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  nav a {
    margin: 5px 0 0 0;
  }
}

.email a {
  color: #0090cc;
}

.redes-sociales {
  margin-top: 20px;
  text-align: left;
}

.redes-sociales a {
  display: inline-block;
  margin: 0 15px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.redes-sociales a:hover {
  transform: scale(1.2);
}

.redes-sociales img {
  width: 32px;
  height: 32px;
}

.contacto-info {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}

.texto-contacto {
  flex: 1 1 400px;
}

.imagen-contacto {
  flex: 1 1 300px;
  text-align: right;
}

.imagen-contacto img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}
