/* ============================
   MangoBox – styles.css pulido FINAL
   ============================ */

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #fdfdfd;
  color: #222;
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ============================
   Navbar
   ============================ */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 12px 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-img {
  width: 140px;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ffeb3b;
}

/* Botón modo oscuro */
#modo-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1500;
  padding: 8px 14px;
  background: #ffeb3b;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

#modo-toggle:hover {
  background: #ffe000;
}

/* Menú hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background: #333;
  transition: background 0.3s ease;
}

/* Responsive nav */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    gap: 30px;
    padding-top: 80px;
    width: 250px;
    transition: right 0.3s ease;
  }

  .nav-links.show {
    right: 0;
  }

  .hamburger {
    display: flex;
  }
}

/* ============================
   Slider
   ============================ */
.slider {
  overflow: hidden;
  border-radius: 12px;
  margin: 20px auto;
  max-width: 100%;
}

.slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.slides img {
  width: 100%;
  flex-shrink: 0;
  object-fit: cover;
}

/* ============================
   Secciones destacadas
   ============================ */
.inicio-destacada {
  padding: 40px 20px;
  text-align: center;
}

.inicio-destacada h2 {
  margin-bottom: 20px;
  font-size: 1.8em;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.genero-box {
  background: #f0f0f0;
  border: 2px solid #ffeb3b;
  border-radius: 10px;
  padding: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.genero-box:hover {
  transform: scale(1.05);
  background: #e0e0e0;
}

/* ============================
   Tarjetas de obras
   ============================ */
.slider-container {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 20px;
  scroll-snap-type: x mandatory;
}

.slider-container::-webkit-scrollbar {
  display: none;
}

.obra-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  text-align: center;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 20px;
  transition: transform 0.3s ease;
}

.obra-card:hover {
  transform: translateY(-5px);
}

.obra-card img {
  width: 100%;
  border-radius: 10px;
}

.obra-card h3 {
  margin-top: 15px;
  font-size: 20px;
}

.obra-card p {
  font-size: 14px;
  color: #555;
}

.btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 15px;
  background: #007BFF;
  color: white;
  border-radius: 5px;
  text-decoration: none;
}

.btn:hover {
  background: #0056b3;
}

/* ============================
   Comentario lector
   ============================ */
.comentario-lector {
  padding: 30px 20px;
  font-style: italic;
  text-align: center;
  background: #f9f9f9;
}

/* ============================
   Modales
   ============================ */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 1200;
}

.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  color: #222;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  background: none;
  border: none;
  color: #ffeb3b;
  cursor: pointer;
}

/* ============================
   Footer
   ============================ */
footer {
  background: #fff;
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 0.9em;
}

footer a {
  color: #ffeb3b;
  margin: 0 10px;
  text-decoration: none;
}

/* ============================
   Perfil
   ============================ */
.perfil-container {
  margin: 50px auto;
  max-width: 700px;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  color: #222;
  transition: 0.3s;
}

.perfil-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.perfil-foto {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffc947;
  transition: 0.3s;
}

.perfil-info h2,
.perfil-info p,
.perfil-info a {
  text-align: center;
  color: #222;
}

.perfil-info a {
  text-decoration: none;
  color: #007BFF;
}

#perfilForm input,
#perfilForm textarea,
#perfilForm button {
  background: #fff;
  color: #222;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  width: 100%;
  margin-bottom: 10px;
  transition: 0.3s;
}

#editarBtn {
  background: #ffeb3b;
  color: #222;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

#editarBtn:hover {
  background: #ffe000;
}

.btn-volver {
  background-color: #ffc947;
  color: #2e2e2e;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-top: 20px;
}

.btn-volver:hover {
  background-color: #ffdb70;
}

/* ============================
   Modo oscuro
   ============================ */
body.modo-oscuro {
  background-color: #121212;
  color: #eee;
}

body.modo-oscuro .navbar,
body.modo-oscuro footer,
body.modo-oscuro .slider-container,
body.modo-oscuro .modal-content,
body.modo-oscuro .grid-container,
body.modo-oscuro .obra-card,
body.modo-oscuro .genero-box,
body.modo-oscuro .perfil-container {
  background-color: #1e1e1e;
  color: #f5f5f5;
}

body.modo-oscuro .genero-box {
  background-color: #333;
  border-color: #ffeb3b;
}

body.modo-oscuro .hamburger div {
  background-color: #f5f5f5;
}

body.modo-oscuro .nav-links {
  background-color: #1e1e1e;
}

body.modo-oscuro .nav-links a {
  color: #ffeb3b;
}

body.modo-oscuro #modo-toggle {
  background-color: #333;
  color: #f5f5f5;
}

body.modo-oscuro #modo-toggle:hover {
  background-color: #444;
}

body.modo-oscuro .comentario-lector {
  background-color: #1a1a1a;
  color: #ccc;
}

body.modo-oscuro .close-modal {
  color: #ffeb3b;
}

body.modo-oscuro #perfilForm input,
body.modo-oscuro #perfilForm textarea,
body.modo-oscuro #perfilForm button {
  background: #2b2b2b;
  color: #f5f5f5;
  border: 1px solid #444;
}

body.modo-oscuro .perfil-foto {
  border-color: #ffc947;
}

body.modo-oscuro .perfil-info h2,
body.modo-oscuro .perfil-info p,
body.modo-oscuro .perfil-info a {
  color: #f5f5f5;
}

body.modo-oscuro .perfil-info a {
  color: #ffc947;
}

