html,body{
  margin: 0;
  padding: 0;
  width: 100vw;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
  

}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  top: 0;

}
main{
    top: 0;
    margin: 0;
    position: relative;
    
}
.side-bar{
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    width: 67px;
    height: 210px;
    position: fixed;
    z-index: 3000;
    right: 0;
    top: 40%;
    box-shadow: 1px 1px 10px 2px #34343460;
    
}

.side-box{
    background-color: #c8a94c;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 2px;
    transition: 0.2s;
}

.side-box:hover{
    opacity: 0.8;
}

.side-box img{
    width: 30px;
    margin: auto;
   
}

header{
    position: absolute;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
}



.banner-black{
    
    background-color: rgba(0, 0, 0, 0.859);
    border-bottom: 0.5px rgba(225, 225, 225, 0.574) solid;
    color: #ebeae5;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-content: center;
    width: 100vw;
    height: 35px;
    
   
    
}

.banner-black div {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.banner-black img{
    width: 20px;
    opacity: 0.6;
}
.banner-black div p {
    font-weight: 100;
    opacity: 0.8;
    font-size: 13px;

}


.navbar{
    display: flex;
    flex-direction: row;
    justify-content: space-around; 
    width: 100vw;
    height: 95px;
    background-color: rgba(0, 0, 0, 0.308);
    background: linear-gradient(to bottom, #151515d1,#1616160b );
    border-bottom: 0.5px rgba(225, 225, 225, 0.574) solid;
    align-items: center;
    margin-top: 35px;
    position: fixed;
    z-index: 1500;
    transition: top 0.4s ease, background-color 0.7s ease;
   

}

.navbar.scrolled{
    background-color: #161616;
}

.navbar-menu{
    display: flex;
    flex-direction: row;
    
}



li{
    padding: 0 20px;
    font-weight: 600;
    color: #e1dbc5;
    font-size: 15px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
    list-style: none;
    
    
}



ul.submenu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background-color: #111111d7;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 1rem;
  position: absolute;
  z-index: 1500;
  top: 75px;
  width: auto;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}



.submenu li {
  list-style: none;
  padding: 0;
  
 
}

.submenu li a {
  color: #e1dbc5;
  font-size: 11px;
  font-weight: 100;
  text-transform:uppercase;
  text-decoration: none;
   padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background 0.2s ease;
  
}

.submenu li a:hover {
  background-color: #2a2a2a;
}

li.has-submenu.active .submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.has-submenu a{
    padding: 0 20px;
    font-weight: 600;
    color: #e1dbc5;
    font-size: 15px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}



.navbar.scrolled {
  margin-top: 0;
  background-color: #161616;
}

.banner-black.hidden {
  transform: translateY(-100%);
}

/* MAIN */

.first-section{
    background-image: url(images/rococo-2.jpg);
    background-size:cover;
    background-position: center;
    width: 100vw;
    height: 100vh;
    position: relative;
    margin: 0;
    padding: 0;
       
}



.ppal-text{
   
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap:20px;
    width: 70%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align:  center;
    
}

.ppal-text p{
    font-weight: 600;
    font-size: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    color: #f3f0ec;
}

h1{
    font-size: 70px;
    margin-bottom: 2rem;
    width: auto;
    text-shadow: 1px 1px 4px rgba(22, 22, 22, 0.337);
    color: #ffffff;
}

.ppal-text p,
.ppal-text h1,
.ppal-text button {
  opacity: 0;
  transform: translateX(-100%);
  animation: slideIn 2s ease-out forwards;
}

.ppal-text p {
  animation-delay: 0s;
}

.ppal-text h1 {
  animation-delay: 0.4s;
}

.ppal-text button {
  animation-delay: 0.8s;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}


.exhibition-info-btn{
    padding: 1rem 1.3rem;
    width: 15%;
    border-radius: 30px;
    border: 0.5px solid #333;
    box-shadow: 1px 1px 10px 1px #2f2f2f;
    color: #626262;
    font-size: 13px;
    font-weight: 500;
    background-color: #f3f0ec;
    
}

.second-section{
    width: 100vw;
    height: 60vh;
    background-color: #e8e4d5;
    position: relative;
     
}

.information-ilustracion{
    background-image: url(/images/carbonilla2.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right;
    position: relative;
    width:100%;
    height: 100%;
    opacity: 0.2;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 20%, black 100%);

}





.information{
 
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    width: 50%;
    position: absolute;
     top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
   
    
}



.welcome{
    
    padding-bottom: 20px;
    margin-top: 0;
    font-size: 43px;
    font-weight: 700;
    padding-left: 0;
    text-wrap: balance;
    color: #333;
    width: 100%;
    text-shadow: 0.6px 0.6px 0.5px rgba(58, 58, 58, 0.2);

  
}

.txt-welcome{
    font-weight: 100;
    text-align: left;
    line-height: 1.3;
    width: 100%;
    text-wrap: balance;
    font-family: 'Times New Roman', Times, serif;
    color: #7e7d7d;
}

.more-about{
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    
    
}

.more-about a{
    color: #333;
    text-decoration: none;
    font-size: 15px;
    width: 18%;
}

.more-about-arrow{
    width: 30px;
}


.third-section{
    width: 100vw;
    background-color: #f2f2de;
    position: relative;
    display: flex;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    
}

.exhibitions-section{
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    width: 65%;
    margin: auto;
    padding-top: 4rem;
    padding-bottom: 5rem;
}


.upcoming{
   
    padding-left: 0;
    font-size: 40px;
    font-weight: 600;
    width: 100%;
    
    
}


.upcoming-title{
    display: flex;
    flex-direction: row;
    align-items: center;
    border-bottom: 2px solid black;
    padding-bottom: 1rem;
    
}

.upcoming-title a{
    text-decoration: none;
    color: #333;
    width: 30%;
    font-size: 15px;
    
}


.upcoming-arrow{
    width: 30px;
}

.photos-exhibitions{
    display: flex;
    justify-content: center;
    flex-direction: row;
    max-width: 100%;
    height: auto; /* se adaptara al alto que le de a la imagen para no cortarlas */
    
}

.img-exhibition{
    width: 100%; /* ocupa el 100% del ancho maximo*/
    max-width: 280px;
    aspect-ratio: 1/0.8; /*mantiene forma cuadrada*/
    object-fit: cover;
    display: block;
    overflow-x: hidden;
}

.exhibition-one, .exhibition-two, .exhibition-three {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #5a5a5a;
    
}


.description{
    font-size: 13px;
    font-weight: 300;
    padding: 1rem 2rem;
    flex: 3;
    text-align:start;
    line-height: 1.7;
    margin: 0;
}

.title-one, .title-two, .title-three{
    flex: 2;
    
}
.obra{
    font-weight: 700;
    margin-bottom: 0;
    margin-top: 0;
    font-size: 19px;
    
}

.date{
    font-size: 13px;
    font-weight: 500;

}

.button-obra{
    border-radius: 15px;
    background-color: transparent;
    border: 0.5px solid #5a5a5a;
    color: #333;
    flex: 1;
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0.5px 0.5px 0.5px rgba(38, 38, 38, 0.2);

   
}

.black-section{
    background-color: #1c1c1c;
    height: 60vh;
    width: 100vw;
    position: relative;
    
  
    
}

.ilustracion-newsletter{
    background-image: url(/images/bodegon.png);
    background-size: cover;
    background-position: center;
    position: absolute;
    width: 100vw;
    height: 100%;
    opacity: 0.3;
    pointer-events: none;
   
}

.newsletter{
    position: absolute;
    display: flex;
    flex-direction: column;
    color: #e8e4d5;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.fourth-section{
    background-color: #e8e4d5;
    height: auto;
}

.title-newsletter{
    font-size: 50px;
    font-weight: 600;
    color: #e1dbc5;
}

.text-newsletter{
    font-weight: 200;
    color: #e1dbc5;
    font-size: 17px;
}


form{
    text-align: center;
    width: 64%;
    display: flex;
    flex-direction: column;
    margin: auto;
}

.input-email {
  padding-right: 40px; /* espacio para que no tape el ícono */
  font-size: 1rem;
  height: 2.5rem;
  border-radius: 15px;
  border: 1px solid #e1dbc5;
  background-color: #1c1c1cc5;
  opacity: 0.9;
  padding: 20px;
}

.input-apply{
    background: transparent;
    letter-spacing: 1px;
    color: #e1dbc5;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin-top: 1rem;
    
}

.terms-condition{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
}

.terms-condition p{
    font-weight: 100;
    font-size: 12px;
    
}
.collection-info{
    width: 65%;
    margin: auto;
    padding-top: 6rem;
    padding-bottom: 5rem;
}



.collection{
    font-size: 40px;
    border-bottom: 2px solid black;
    padding-bottom: 1rem;
    padding-left: 0;
    font-weight: 700;
}

/*GRID*/

.collection-grid{
    display: grid;
    grid-template-columns: repeat(3,1fr);
    grid-auto-rows: auto;
    gap: 3rem;
    width: 100%;
    margin: auto;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.text-collection{
    margin-top: 1.5rem;
    font-weight: 300;
    font-size: 17px;
    line-height: 1.3;
    color: #696969;
}

.grid-item{
    padding: 1rem;
    display: flex;
    flex-direction: column; 
    gap: 0.5rem;
    
}

.item4{
    grid-column: 1;
    grid-row: 2;
    transform: translateY(-17%);
}

.item6{
    grid-column: 3;
    grid-row: 2;
    transform: translateY(-12%);
}



.grid-item img{
    width: 97%;
    height: auto;
    box-shadow: 1px 1px 10px #909090d5;
    transition: 0.5s ease 0.1s;
    border: 0.3px solid #333;
}

.grid-item img:hover{
    opacity: 0.6;
    width: 100%;
}

.grid-caption{
    font-weight: 600;
    font-size: 20px;
    
}

.grid-description{
    font-size: 15px;
    font-weight: 500;
    color: #8b8989;
    
}

/* FOOTER */

footer{
    height: 46vh;
    background-color: #161616;
   
}

.footer-info{
     display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding-top: 4em;
    padding-bottom: 3rem;
    margin: auto;
    border-bottom: 0.5px solid #8b8989b1;
    width: 70%;
}

.info{
    display: flex;
    flex-direction: column;
    color: #e1dbc5;
    gap: 1rem;
}

.social{
   
    display: flex;
    flex-direction: column;
    color: #e1dbc5;
    height: 80%;
    gap: 1rem;
}

.links{
    display: flex;
    flex-direction: column;
    color: #e1dbc5;
    height: 80%;
    gap: 1rem;
}

.links2{
    display: flex;
    flex-direction: column;
    color: #d1ccb8;
    height: 80%;
    gap: 1rem;
}


.info a, .social a, .links a, .links2 a {
    font-weight: 100;
    font-size: 13px;
    text-decoration: none;
}

.info .ft-museo{
    font-weight: 800;
    font-size: 30px;
    color: #bd9f46;
}

.social .ft-titulo{
    font-weight: 400;
    font-size: 30px;
}

.links .lk-titulo{
    font-weight: 400;
    font-size: 30px;
}

.links2 .inf-titulo{
    font-weight: 400;
    font-size: 30px;
}


.footer-terms{
    display: flex;
    width: 70%;
    margin: auto;
    margin-top: 1.5rem;
    justify-content: end;
    
}

.terms-txt{
    font-size: 14px;
    color: #d1ccb8;
    font-weight: 200;
    
}

/* MÓVIL (≤768px) */
@media screen and (max-width: 768px) {
  
    .banner-black{
        display: none;
    }

    .navbar {
    flex-direction: column;
    height: auto;
    margin-top: 0;
    justify-content: center;
    align-items: start;
    background-color: #0d0d0d;
    
  }

  .hamburger {
    display: block;
    font-size: 32px;
    color: #e1dbc5;
    cursor: pointer;
    z-index: 2000;
    padding: 10px;
  }

  .navbar-menu {
    display: none;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    background-color: #161616;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 1.5rem;
    z-index: 1500;
  }

  .navbar-menu.menu-open {
    display: flex;
  }

  .navbar-logo {
    z-index: 2001;
  }

  .navbar-menu li {
    padding: 10px 0;
    font-size: 16px;
    width: 100%;
  }

  .navbar-menu .has-submenu {
    width: 100%;
  }

  .navbar-menu .submenu {
    position: relative;
    top: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding-left: 1rem;
    margin-top: 0.5rem;
    background-color: transparent;
    border: none;
    box-shadow: none;
  }

  .navbar-menu .submenu li a {
    font-size: 14px;
    padding: 5px 0;
    color: #ccc;
  }

  .navbar-menu .submenu li a:hover {
    background-color: #2a2a2a;
  }

  .side-bar {
    display: none;
  }

  h1 {
    font-size: 38px;
    text-align: center;
  }

  .ppal-text {
    width: 90%;
    gap: 15px;
  }

  .ppal-text p {
    font-size: 16px;
  }

  .exhibition-info-btn {
    width: 60%;
    padding: 0.8rem;
  }

  .second-section {
    height: auto;
    padding: 2rem 1rem;
    
  }

  .information {
    width: 90%;
    text-align: center;
    transform: none;
    top: 0;
    left: 0;
    position: relative;
    margin: auto;
  }

  .welcome {
    font-size: 30px;
  }

  .txt-welcome {
    font-size: 15px;
    text-align: center;
  }

  .more-about {
    justify-content: center;
  }

  .more-about a {
    width: auto;
  }

  .third-section {
    flex-direction: column;
    padding: 1rem;
  }

  .exhibitions-section {
    width: 90%;
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .upcoming-title{
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap:20px;
  }
  .photos-exhibitions {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .exhibition-one, .exhibition-two, .exhibition-three {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .title-one, .title-two, .title-three {
    width: 100%;
  }

  .description {
    padding: 0;
    font-size: 14px;
  }



  .newsletter {
    width: 90%;
    padding: 1rem;
  }

  .title-newsletter {
    font-size: 32px;
    text-align: center;
  }

  .text-newsletter {
    font-size: 15px;
    text-align: center;
  }

  form {
    width: 100%;
  }


.collection-info{
    width: 80vw;
    margin: 0 auto;
}
.collection-grid {
   grid-template-columns: 1fr;
    grid-template-rows: auto;
    width: 100%;
    gap: 2rem;
  }

  .grid-item img {
    width: 100%;
  }

   .item4, .item6 {
    grid-column: auto !important;
    grid-row: auto !important;
    transform: none;
  }
  footer {
    height: auto;
    padding: 2rem 1rem;
  }

  .footer-info {
    flex-direction: column;
    gap: 2rem;
    width: 90%;
  }

  .footer-terms {
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
  }
}
