@import url("https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=Lora&display=swap");

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Lora", serif;
  background: #f5f3ef; /* neutro cálido */
  color: #2e241a;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  z-index: 1000;
}

.logo {
  font-family: "Cinzel Decorative", serif;
  font-size: 1.6rem;
  color: #3a2e23;
  font-weight: 700;
  letter-spacing: 1px;
}

.menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: #3a2e23;
  font-family: "Lora", serif;
  font-weight: bold;
  position: relative;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #b89e55;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #b89e55;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Botón hamburguesa */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: #3a2e23;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 65px;
    right: 0;
    width: 70%;
    background: rgba(245, 242, 235, 0.97);
    padding: 1.5rem;
    box-shadow: -2px 2px 12px rgba(0,0,0,0.1);
    border-radius: 8px 0 0 8px;
  }
  .menu.show {
    display: flex;
  }
  .menu li {
    margin-bottom: 1rem;
  }
  .menu-toggle {
    display: block;
  }
}

/* ===== HERO ===== */
.hero {
  height: 100vh;
  background: url("../img/fotofachada.jpg") center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero-overlay {
  background: rgba(40,35,25,0.5);
  padding: 2.5rem;
  border-radius: 12px;
  max-width: 700px;
}

.hero h1 {
  font-family: "Cinzel Decorative", serif;
  font-size: 3rem;
  color: #fffdf6;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #f2eee6;
  margin-bottom: 2rem;
}

.btn {
  background: #b89e55;
  color: #fff;
  padding: 0.9rem 1.8rem;
  border-radius: 50px;
  font-weight: bold;
  text-decoration: none;
  font-family: "Cinzel Decorative", serif;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: all 0.4s ease, transform 0.2s ease;
}

.btn:hover {
  background: #9e8742;
  transform: translateY(-3px) scale(1.05);
}


/* ===== SECCIONES ===== */
.section {
  padding: 90px 20px;
  text-align: center;
}

.section h2 {
  font-family: "Cinzel Decorative", serif;
  font-size: 2.2rem;
  color: #2a1f13;
  margin-bottom: 1rem;
}

.section h2::after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  background: #b89e55;
  margin: 0.8rem auto 2rem;
  border-radius: 2px;
}

/* Sobre el museo */
/* Por defecto, 3 tarjetas por fila */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Pantallas medianas: 2 tarjetas por fila si es menor a 900px */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Pantallas pequeñas: 1 tarjeta por fila si es menor a 600px */
@media (max-width: 600px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) { .about-grid {grid-template-columns: 1fr; }} /* todo apilado */


.about-card {
  background: rgba(255,255,255,0.95);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.about-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.about-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}
.card-content {
  padding: 1.6rem;
}
.about-card h3 {
  font-family: "Cinzel Decorative", serif;
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
  color: #2b2215;
}
.about-card p {
  font-size: 1rem;
  color: #463a2a;
}

/* ===== FOOTER ===== */
.footer {
  background: #2b2116;
  color: #f2eee6;
  text-align: center;
  padding: 2rem 1rem;
  font-family: "Lora", serif;
  font-size: 0.95rem;
  border-top: 3px solid #b89e55;
}

/* ===== RESPONSIVE ===== */
@media(max-width:768px){
  .hero h1{font-size:2rem;}
  .hero-overlay{padding:1.8rem;}
  .section h2{font-size:2rem;}
}
@media(max-width:480px){
  .hero-overlay{padding:1.3rem;}
  .btn{font-size:0.9rem;padding:0.8rem 1.4rem;}
  .about-card img{height:200px;}
}

/* ===== CONTEXTO HISTÓRICO RESPONSIVO ===== */
.history-card-responsive {
    display: flex;
    flex-wrap: wrap; /* permite que la imagen y el texto se acomoden según el espacio */
    gap: 1.8rem;
    background: rgba(255,255,255,0.95);
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    padding: 1.8rem;
    max-width: 1200px;
    margin: 0 auto;
}

.history-card-responsive img {
    flex: 1 1 300px; /* crece o encoge según el espacio disponible */
    max-width: 400px;
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
}

.history-text {
    flex: 2 1 400px;
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #2e241a;
}

.history-text p{
    text-align: left;
}

/* Mobile responsive */
@media(max-width: 1000px) {
    .history-card-responsive {
        flex-direction: column;
        align-items: center;
        text-align: left;
    }
    .history-card-responsive img,
    .history-text {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
