/* ======= Estilos Generales ======= */
body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  font-size: 16px;
  background: linear-gradient(135deg, #000000, #150a32);
  line-height: 1.6;
  color: #333;
}
span {
  color: #ff6600;
}
.btn {
  margin-right: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 0.7rem;
  background: linear-gradient(45deg, #ff6600, #0056d2);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-border-radius: 0.7rem;
  -moz-border-radius: 0.7rem;
  -ms-border-radius: 0.7rem;
  -o-border-radius: 0.7rem;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
}
.btn:hover {
  background: linear-gradient(45deg, #0056d2, #ff6600);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 15px rgba(0,0,0,0.5);
  -webkit-transform: translateY(-3px) scale(1.05);
  -moz-transform: translateY(-3px) scale(1.05);
  -ms-transform: translateY(-3px) scale(1.05);
  -o-transform: translateY(-3px) scale(1.05);
}

/* ======= Header ======= */
header {
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease;
  -webkit-transition: background 0.3s ease;
  -moz-transition: background 0.3s ease;
  -ms-transition: background 0.3s ease;
  -o-transition: background 0.3s ease;
}
header.scrolled {
  background: rgba(255, 255, 255, 0.95);
}
header .container.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}
header .brand h1 {
  font-size: 1.7rem;
  color: #0056d2;
  margin: 0;
}
header .menu a {
  margin-left: 1.8rem;
  text-decoration: none;
  color: #000000;
  font-weight: 500;
  transition: background-color, color,padding .8s ease;
  -webkit-transition: background-color, color,padding .8s ease;
  -moz-transition: background-color, color,padding .8s ease;
  -ms-transition: background-color, color,padding .8s ease;
  -o-transition: background-color, color,padding .8s ease;
}
header .menu a.btn {
  padding: 0.5rem 1rem;
  background-color: #0056d2;
  color: #fff;
  border-radius: 10rem;
  transition: padding, font-size .8s ease;
  -webkit-transition: padding, font-size .8s ease;
  -moz-transition: padding, font-size .8s ease;
  -ms-transition: padding, font-size .8s ease;
  -o-transition: padding, font-size .8s ease;
  -webkit-border-radius: 10rem;
  -moz-border-radius: 10rem;
  -ms-border-radius: 10rem;
  -o-border-radius: 10rem;
}
header .menu a:hover {
  background-color:#0056d2;
  border-radius: 10rem;
  padding: .5rem 1rem;
  color: #fff;
  font-size: 1.1rem;
  -webkit-border-radius: 10rem;
  -moz-border-radius: 10rem;
  -ms-border-radius: 10rem;
  -o-border-radius: 10rem;
}
header .menu a.btn:hover{
    padding: 0.55rem 1.01rem;
    font-size: 1.1rem;
}
.menu-toggle {
  display: none; /* se muestra solo en móviles */
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #0056d2;
}

/* Menú por defecto */
header .menu {
  display: flex;
  gap: 1.5rem;
}

/* ======= Hero Section ======= */
/* ======= Hero slide ======= */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8); /* oscurece el video */
  z-index: -1;
}

.hero-slider {
  position: relative;
  width: 80%;
  max-width: 1000px;
  text-align: center;
}

.hero-slide {
  display: none;
  animation: fade 0.8s ease-in-out;
  -webkit-animation: fade 0.8s ease-in-out;
}

.hero-slide.active {
  display: block;
}

.hero-slide-content img {
  max-width: 400px;
  margin-bottom: 0.5rem;
}

.hero-slide-content h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.hero-slide-content p {
  font-size: 1.2rem;
  color: #ddd;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(20px); -webkit-transform: translateY(20px); -moz-transform: translateY(20px); -ms-transform: translateY(20px); -o-transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); -webkit-transform: translateY(0); -moz-transform: translateY(0); -ms-transform: translateY(0); -o-transform: translateY(0); }
}

/* Botones slide - abajo */
.hero-prev, .hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  -webkit-transition: background 0.3s;
  -moz-transition: background 0.3s;
  -ms-transition: background 0.3s;
  -o-transition: background 0.3s;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
}
.hero-prev:hover, .hero-next:hover {
  background: rgba(0,0,0,0.8);
}
.hero-prev { left: 1rem; }
.hero-next { right: 1rem; }

/* Dots */
.hero-dots {
  position: absolute;
  bottom: 2rem;
  width: 100%;
  text-align: center;
}
.hero-dots .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 6px;
  background: #aaa;
  border-radius: 50%;
  cursor: pointer;
}
.hero-dots .dot.active {
  background: #fff;
}
/* ======= Animaciones de entrada en slide ======= */
.slide-content {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
  -webkit-transform: translateX(50px);
  -moz-transform: translateX(50px);
  -ms-transform: translateX(50px);
  -o-transform: translateX(50px);
  -webkit-transition: all 0.8s ease;
  -moz-transition: all 0.8s ease;
  -ms-transition: all 0.8s ease;
  -o-transition: all 0.8s ease;
}
.slide.active .slide-content {
  opacity: 1;
  transform: translateX(0);
  -webkit-transform: translateX(0);
  -moz-transform: translateX(0);
  -ms-transform: translateX(0);
  -o-transform: translateX(0);
}

.slide-content img {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease 0.3s;
  -webkit-transform: translateY(30px);
  -moz-transform: translateY(30px);
  -ms-transform: translateY(30px);
  -o-transform: translateY(30px);
  -webkit-transition: all 0.8s ease 0.3s;
  -moz-transition: all 0.8s ease 0.3s;
  -ms-transition: all 0.8s ease 0.3s;
  -o-transition: all 0.8s ease 0.3s;
}
.slide.active .slide-content img {
  opacity: 1;
  transform: translateY(0);
  -webkit-transform: translateY(0);
  -moz-transform: translateY(0);
  -ms-transform: translateY(0);
  -o-transform: translateY(0);
}
/* ======= Sobre Mi Section ======= */
.about {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6rem 2rem;
  gap: 2rem;
  background-color: #ffffff;
}
.about-text {
  flex: 1 1 400px;
}
.about-text h2 {
  font-size: 2rem;
  color: #0056d2;
  margin-bottom: 1rem;
}

.about-text p {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.about-image {
  flex: 1 1 400px;
  text-align: center;
}
.about-image img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ======= Menú Hamburguesa ======= */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #0056d2;
} 

/* ======= Proyectos Section ======= */
.projects {
  padding: 6rem 2rem;
  background: #f7f7f7;
  text-align: center;
}

.projects h2 {
  font-size: 2.2rem;
  color: #0056d2;
  margin-bottom: 1rem;
}

.projects p {
  max-width: 700px;
  margin: 0 auto 3rem auto;
  font-size: 1.1rem;
  color: #333;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #0056d2;
}

.project-info p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1rem;
}
/* ======= Modal de Proyectos ======= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.modal-content img {
  max-height: 250px;
  object-fit: cover;
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ======= Servicios Section ======= */
.services {
  padding: 6rem 2rem;
  background: #fff;
  text-align: center;
}

.services h2 {
  font-size: 2.2rem;
  color: #0056d2;
  margin-bottom: 1rem;
}

.services p {
  max-width: 700px;
  margin: 0 auto 3rem auto;
  font-size: 1.1rem;
  color: #333;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.service-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.service-card h3 {
  font-size: 1.3rem;
  margin: 1rem 0 0.5rem 0;
  color: #0056d2;
}

.service-card p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1rem;
  padding: 0 1rem;
}
/* ======= Blog ======= */
.blog {
  padding: 6rem 2rem;
  background: #f7f7f7;
  text-align: center;
}
.blog h2, .blog-card h3  {
  font-size: 2.2rem;
  color: #0056d2;
  margin-bottom: 1rem;
}
.blog-card a  {
  color: #fff;
}
.blog-card h3  {
  font-size: 1.2rem;
}

.blog p {
  max-width: 700px;
  margin: 0 auto 3rem auto;
  font-size: 1.1rem;
  color: #333;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.blog-card {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  -webkit-transition: transform 0.3s ease;
  -moz-transition: transform 0.3s ease;
  -ms-transition: transform 0.3s ease;
  -o-transition: transform 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-5px);
}
.blog-card a {
  display: inline-block;
  margin-top: 1rem;
  font-weight: bold;
  text-decoration: none;
}

/* ======= Footer Contacto ======= */
footer {
  background: #0a0a0a;
  color: #fff;
  padding: 4rem 2rem;
  text-align: center;
}

footer h2 {
  font-size: 2rem;
  color: #ff6600;
  margin-bottom: 2rem;
}

.footer-container {
  max-width: 600px;
  margin: 0 auto;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #ddd;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  background: #1a1a1a;
  color: #fff;
  outline: none;
  transition: all 0.3s ease;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  background: #222;
  box-shadow: 0 0 8px rgba(255, 102, 0, 0.6);
}

.form-group input[type="file"] {
  background: transparent;
  color: #ccc;
  font-size: 0.9rem;
}

button.btn {
  padding: 0.9rem;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #ff6600, #ff3300);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
}

button.btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #ff3300, #cc2900);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  -webkit-transform: translateY(-2px);
  -moz-transform: translateY(-2px);
  -ms-transform: translateY(-2px);
  -o-transform: translateY(-2px);
}
/* Recaptcha form */
form div[data-netlify-recaptcha] {
  margin: 1rem 0;
  display: flex;
  justify-content: center;
}
.recaptcha-wrapper {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Redes sociales */
.socials {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.socials a {
  color: #fff;
  font-size: 1.4rem;
  transition: transform 0.3s, color 0.3s;
}

.socials a:hover {
  color: #ff6600;
  transform: scale(1.2);
}
/* Modal de confirmación */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.form-error {
  color: #ff4d4d;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  display: none;
  text-align: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  position: relative;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ======= Media Queries Responsivas ======= */

/* Tablets */
@media (max-width: 1024px) {
  header .container.nav {
    padding: 1rem 1.5rem;
  }
  
  .hero {
    flex-direction: column;
    padding: 5rem 2rem;
  }

  .hero-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .about {
    flex-direction: column;
    padding: 4rem 2rem;
    gap: 1.5rem;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

/* Móviles */
@media (max-width: 600px) {
  .menu-toggle {
    display: block;
    z-index: 1100;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #0056d2;
  }

  header .menu {
    display: none;
    position: fixed;
    top: 60px; /* debajo del header */
    left: 0;
    width: 100%;
    height: calc(100vh - 60px); /* ocupa toda la pantalla debajo del header */
    background: #000; /* fondo negro sólido */
    flex-direction: column;
    justify-content: center; /* centra verticalmente */
    align-items: center; /* centra horizontalmente */
    gap: 2.5rem;
    z-index: 1050;
  }

  header .menu.show {
    display: flex;
  }

  header .menu a {
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
  }

  header .menu a:hover {
    color: #ff6600;
  }
}