:root {
  --fondo: #ffffff;
  --texto: #000000;
  --acento: #000000f1;
  --gris: #444;
}

/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* BODY */
body {
  font-family: "Georgia", serif;
  background-color: var(--fondo);
  color: var(--texto);
  line-height: 1.6;
}

/* HEADER */
.header-principal {
  padding: 120px 20px;
  text-align: center;
  background: linear-gradient(to bottom, #470b0b, #470b0b);
}

/* IMAGEN */
.header-principal img {
  display: block;
  margin: 100px auto;
  max-width: 500px;
  width: 100%;
  height: auto;
}

/* TITULO */
.header-principal h1 {
  font-size: 2.5rem;
  font-weight: 200;
  letter-spacing: 2px;
  color: #ffffff;
  font-family: "Didot", serif;
}

/* TEXTO */
.header-principal p {
  max-width: 600px;
  margin: 20px auto 0;
  color: #aaa;
  font-style: italic;
}

/* ========================= */
/* 📱 TABLET */
@media (max-width: 992px) {
  .header-principal {
    padding: 80px 20px;
  }

  .header-principal img {
    margin: 60px auto;
    max-width: 400px;
  }

  .header-principal h1 {
    font-size: 2rem;
  }
}

/* ========================= */
/* 📱 MÓVIL */
@media (max-width: 600px) {
  .header-principal {
    padding: 60px 15px;
  }

  .header-principal img {
    margin: 40px auto;
    max-width: 280px;
  }

  .header-principal h1 {
    font-size: 1.6rem;
    letter-spacing: 1px;
  }

  .header-principal p {
    font-size: 0.9rem;
    padding: 0 10px;
  }
}

.menu-links a {
  color: white;
  text-decoration: none;
  padding: 0 12px;
  border-right: 1px solid rgba(255,255,255,0.4);
}

.menu-links a:last-child {
  border-right: none;
}

/* HEADER SECUNDARIO */
.header-secundario {
  padding: 20px 20px;
  text-align: center;
  background: linear-gradient(to bottom, #470b0b, #470b0b);
  /*background: url('imagenes/banner4.gif') no-repeat center center;
  background-size: cover; /* asegura que cubra todo el header */ 
}
.menu-links-secundario a {
  color: rgb(255, 255, 255);
  text-decoration: none;
  padding: 0 12px;
  border-right: 1px solid rgba(255,255,255,0.4);
}

.menu-links-secundario a:last-child {
  border-right: none;
}
/* SECCIONES */
.titulo-seccion {
  text-align: center;
  margin-bottom: 20px;
  font-family: "Didot", serif;
}

section {
  padding: 50px 20px;
  max-width: 1000px;
  margin: auto;
}

h2 {
  color: var(--acento);
  margin-bottom: 20px;
  letter-spacing: 1px;
  font-family: "Didot", serif;
}

/* SOBRE MI */
.sobre-mi p {
  max-width: 700px;
}

.sobre-mi-wrapper {
  position: relative;
  max-width: 78ch;
  margin: 0 auto;
}

/* Vista inicial / preview */
.preview {
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  opacity: 1;
  transition: opacity 0.4s ease;
  cursor: pointer;
}

.preview img {
  display: inline-block;
  max-width: 100%;
}

.preview p {
  margin-left: 30px; /* ajusta el valor a tu gusto */
}

.preview span {
  display: block;
  margin-top: 16px;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Texto completo */
.full {
  opacity: 0;
  position: absolute;
  inset: 0;
  text-align: justify;
  line-height: 1.7;
  transition: opacity 0.4s ease;
}

.sobre-mi-wrapper:hover .preview {
  opacity: 0;
}

.sobre-mi-wrapper:hover .full {
  opacity: 1;
}

/* BIO */
.bio {
  text-align: justify;
  max-width: 95ch;
  margin: 0 auto;
  background-color: #ffffff;
}

/* GALERÍA Y DESTACADOS*/
.galeria {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.obra {
  background-color: #1a1a1a;
  padding: 20px;
  border-left: 4px solid var(--acento);
}

.obra h3 {
  margin-bottom: 10px;
  color: #ddd;
  font-family: "Didot", serif;
}

.obra p {
  color: #aaa;
  font-size: 0.95rem;
}

.imagen-obra {
  height: 320px;
  overflow: hidden;
  margin-bottom: 15px;
}

.imagen-obra img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 30px 20px;
  border-top: 1px solid var(--gris);
  color: #777;
  font-size: 0.9rem;
}

.galeria-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.galeria-galeria div {
  aspect-ratio: 1 / 1; /* todas cuadradas */
  overflow: hidden;
}

.galeria-galeria img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* MODAL - GENERAL */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  cursor: default;
  animation: fadeIn 0.3s ease;
}

/* CONTENIDO DEL MODAL */
.modal-contenido {
  display: flex;
  flex-direction: row;
  max-width: 900px;
  width: 100%;
  background-color: var(--fondo);
  padding: 20px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  opacity: 0.90;
}

/* IMAGEN DENTRO DEL MODAL */
.modal-contenido img {
  max-width: 50%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 20px;
}

#concepto-obra {
  white-space: pre-line; /* respeta saltos de línea \n en el texto */
}


/* TEXTO DESCRIPTIVO DEL MODAL */
.modal-texto {
  flex: 1;
  overflow-y: auto;
}

.modal-texto h3 {
  margin-top: 0;
  color: var(--acento);
  font-family: "Monaco", serif;
}

.modal-texto p {
  line-height: 1.5;
  color: var(--texto);
}

/* BOTÓN CERRAR */
.cerrar {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  background: rgba(255, 255, 255, 1);
  border: none;
  cursor: pointer;
  color: #333;
}

.modal-full {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-full img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.cerrar-full {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 767px) {
  .sobre-mi-wrapper {
    position: static;
  }

  .preview {
  display: none;
}

  .full {
    position: static;
    opacity: 1;
  }

  .modal-contenido {
    flex-direction: column;
    max-height: 90vh;
  }

  .modal-contenido img {
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }
}

/* RESPONSIVE PC */
@media (min-width: 768px) {
  header h1 {
    font-size: 3.5rem;
  }

  .galeria {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ANIMACIONES */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

@keyframes aparecer {
  from {opacity: 0; transform: scale(0.95);}
  to {opacity: 1; transform: scale(1);}
}

.slider {
  position: relative;      /* 👈 referencia para las imágenes */
  width: 90%;
  max-width: 600px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  overflow: hidden;
}

.slide {
  position: absolute;      /* 👈 IMPORTANTE */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}