body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  color: #222;
  background-color: #fff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  background-color: #000;
  padding: 1rem 0;
  z-index: 1000;
  width: 100%;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #FF8C00;
}

/* HERO */
.hero {
  position: relative;
  background: url('imagenes/fondo-hero.jpg') no-repeat center center/cover;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
  text-align: center;
  color: white;
}

/* Capa de color azul encima de la imagen */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(1, 112, 185, 0.85); /* overlay azul semi-transparente */
  z-index: 0;
}

.hero h1,
.hero h2,
.hero .btn {
  position: relative;
  z-index: 1; /* asegura que queden encima del overlay */
}


.btn {
  background: #FF8C00;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: background 0.3s ease, transform 0.3s ease;
}

.btn:hover {
  background: #e27a00;
  transform: scale(1.05);
}

/* PORTFOLIO */
.portfolio {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filters button {
  background: #ddd;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.filters button.active {
  background: #FF8C00;
  color: white;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.card {
  background: #f8f8f8;
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card.hidden {
  display: none !important;
}

.card h3 {
  margin-top: 0;
  text-align: center;
  color: #0170B9;
}

.card p {
  margin: 0.5rem 0;
}

/* SOBRE MÍ */
.about {
  background: #FF8C00;
  color: white;
  text-align: center;
  padding: 3rem 1rem;
}

.about p {
  max-width: 700px;
  margin: 0 auto;
}

/* CONTACTO */
.contact {
  text-align: center;
  padding: 3rem 1rem;
}

.contact a {
  color: #0170B9;
  text-decoration: none;
  font-weight: bold;
}

.contact a:hover {
  text-decoration: underline;
}

/* FOOTER */
footer {
  background: #000;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* RESPONSIVE */
@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero h1 {
    font-size: 3rem;
  }
}

/* ANIMACIÓN */
.card {
  opacity: 0;
  transform: translateY(20px);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
