/* Reset básico */
* {
  margin: 0; padding: 0; box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #111;
  background: #fff;
  line-height: 1.5;
  scroll-behavior: smooth;
}

/* Header fijo con blur */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255 255 255 / 0.7);
  backdrop-filter: saturate(180%) blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  z-index: 999;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.05);
  font-weight: 600;
  letter-spacing: 0.06em;
}

header .logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #222;
}

header nav a {
  color: #444;
  text-decoration: none;
  margin-left: 2.5rem;
  font-size: 1rem;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: #007BFF;
}

/* Para que el contenido no quede debajo del header */
main, .hero {
  padding-top: 80px;
}

/* Hero slider */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
}

.hero-text {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  z-index: 10;
}


.swiper-button-next,
.swiper-button-prev {
  color: #fff;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  transition: background 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(0,0,0,0.7);
}

.swiper-pagination-bullet {
  background: rgba(255,255,255,0.7);
  opacity: 1;
  width: 12px;
  height: 12px;
  margin: 0 6px !important;
  transition: background 0.3s ease;
}

.swiper-pagination-bullet-active {
  background: #007BFF;
}

/* Texto hero centrado */
.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 800px;
  transform: translate(-50%, -50%);
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 3.8rem;
  text-align: center;
  text-shadow: 0 0 20px rgba(0,0,0,0.7);
  pointer-events: none;
  user-select: none;
}

/* Portfolio */
.portfolio {
  max-width: 1200px;
  margin: 3rem auto 6rem;
  padding: 0 1rem;
}

.portfolio h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
  color: #222;
  text-align: center;
  letter-spacing: 0.05em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 1.5rem;
}

.grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgb(0 0 0 / 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.grid img:hover {
  transform: scale(1.07);
  box-shadow: 0 14px 40px rgb(0 0 0 / 0.25);
}

/* About y Contact */
.about, .contact {
  max-width: 720px;
  margin: 0 auto 4rem;
  padding: 0 1rem;
  font-size: 1.1rem;
  color: #444;
  letter-spacing: 0.02em;
}

.about h2, .contact h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #222;
  text-align: center;
}

/* Footer */
footer {
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: #999;
  text-align: center;
  border-top: 1px solid #eee;
  letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-text {
    font-size: 2.4rem;
  }
  header nav a {
    margin-left: 1.2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero-text {
    font-size: 1.8rem;
  }
  header {
    padding: 1rem 1.5rem;
  }
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
}

.contact-form button {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.contact-form button:hover {
  background-color: #555;
}

.form-message {
  margin-top: 1rem;
  font-weight: bold;
  color: green;
  display: none;
}

.form-message.visible {
  display: block;
}


.form-message.success {
  color: #155724;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
}

.portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  padding: 2rem;
}


/* Slider hero */
.hero {
  position: relative;
  width: 100vw;
  height: 80vh;
  overflow: hidden;
}

.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  background-position: center;
  background-size: cover;
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
  z-index: 10;
  text-align: center;
}
/* Galería portfolio */
.portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 2rem;
  background: #f9f9f9;
}

.portfolio img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Estilos formulario contacto */
#contactForm {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#contactForm input,
#contactForm textarea {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  transition: border-color 0.3s ease;
}

#contactForm input:focus,
#contactForm textarea:focus {
  border-color: #0077cc;
  outline: none;
}

#contactForm button {
  padding: 12px;
  font-size: 1.1rem;
  background-color: #82b2d4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#contactForm button:hover {
  background-color: #005fa3;
}

/* Mensaje de estado */
#formMessage {
  text-align: center;
  font-weight: 600;
  margin-top: 8px;
  min-height: 1.5em;
  user-select: none;
}

#contactForm textarea {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  min-height: 120px; /* Más alto */
  transition: border-color 0.3s ease;
}

#portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 10px; /* fila base */
  gap: 10px;
}

#portfolio img {
  width: 100%;
  height: auto;
  grid-row-end: span var(--row-span);
  object-fit: cover;
}
