/* RESET */
*{
    box-sizing:border-box;
    margin:0;
    padding:0;
}

body{
    font-family: 'Segoe UI', sans-serif;
    background:#0f1115;
    color:#eee;
    line-height:1.6;
}

/* ================= LOGO FLOTANTE ================= */
.floating-logo{
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
}

/* IMAGEN */
.floating-logo img{
    width: clamp(140px, 18vw, 260px);
    height: auto;
    display: block;
    object-fit: contain;
}


/* MOBILE */
@media (max-width:768px){
     .dark-btn{
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .dark-btn .text{
        display: none;
    }

    .dark-btn .icon{
        font-size: 1rem;
    }

    .floating-logo{
        top: 15px;
        left: 15px;
    }

    .floating-logo img{
        width: clamp(120px, 38vw, 180px);
    }
}



/* CONTENEDOR */
.container{
    width:90%;
    max-width:1100px;
    margin:auto;
    padding:40px 0;
}

/* TITULO */
h1{
    text-align:center;
    margin-bottom:30px;
    font-size:28px;
}

/* BUSCADOR */
.search-box{
    display:flex;
    justify-content:center;
    gap:10px;
    margin-bottom:40px;
}

.search-box input{
    flex:1;
    max-width:350px;
    padding:12px;
    border-radius:8px;
    border:none;
    outline:none;
}

.search-box button{
    padding:12px 18px;
    border:none;
    background:#7ad7e0;
    color:#000;
    border-radius:8px;
    cursor:pointer;
    font-weight:600;
}

/* GRID POSTS */
.posts{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:25px;
}

/* CARD */
.card{
    background:#161a20;
    padding:15px;
    border-radius:14px;
    transition:.3s ease;
}

.card:hover{
    transform:translateY(-6px);
}

.card img{
    width:100%;
    height:200px;
    object-fit:cover;
    border-radius:12px;
    margin-bottom:15px;
}

.card h2{
    font-size:18px;
    margin-bottom:10px;
}

.card h2 a{
    color:#fff;
    text-decoration:none;
}

.card p{
    font-size:14px;
    color:#bbb;
}

/* POST INDIVIDUAL */
.post-img{
    width:100%;
    max-height:400px;
    object-fit:cover;
    border-radius:14px;
    margin:20px 0;
}

.content{
    font-size:20px;
    color:#ddd;
}

.leer-mas{
    display:inline-block;
    margin-top:10px;
    text-decoration:none;
    font-weight:bold;
    color:#ff7a00; /* naranja */
    transition:0.3s;
}

.leer-mas:hover{
    opacity:0.7;
}


/* ======= FOOTER ======= */
.footer-copy {
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
  color: #777;
  
}

.footer-copy p {
  margin: 0;
  color: #777;
}


/* ======= BACK TO HERO ======= */
.back-to-hero {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  background: #FFB86A;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-hero:hover {
  transform: translateY(-5px);
  background: #333;
}

.back-to-hero.show {
  opacity: 1;
  visibility: visible;
}

.back-btn-2 {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s ease;
}

.back-btn-2:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* MOBILE */
@media(max-width:768px){

    h1{
        font-size:22px;
    }

    .search-box{
        flex-direction:column;
        align-items:stretch;
    }

    .search-box input{
        max-width:100%;
    }

    .search-box button{
        width:100%;
    }

    .card img{
        height:180px;
    }

}