@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700&display=swap');

body {
    background-image: url('./assets/fondo.jpg');

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}
.logo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.logo-img {
    width: 120px;
    height: auto;
    display: block;
}
.nasa-logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: #fff;
    background: #0b3d91;
    padding: 0.2em 0.5em;
    border-radius: 0.3em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.grid {
    display: grid;
    gap: 8rem;
    margin-top: 3rem;
}
@media (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 1199px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}
.card {
    background: white;
    border-radius: 10px;
    box-shadow:
            0 -5px 8px rgba(255, 200, 0, 0.7),
            5px 0 8px rgba(255, 120, 0, 0.5),
            -5px 0 8px rgba(255, 120, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: scale(1.03);
    box-shadow:
            0 -5px 8px rgba(255, 200, 0, 0.7),
            5px 0 8px rgba(255, 120, 0, 0.5),
            -5px 0 8px rgba(255, 120, 0, 0.5),
            0 4px 12px rgba(0,0,0,0.3);
}
.card img,
.card iframe {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-content h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}
.card-content small {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}
.truncate {
    font-size: 0.9rem;
    line-height: 1.4;
    height: 10rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin: 0;
}
.truncate::-webkit-scrollbar {
    width: 6px;
}
.truncate::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}
.buttons {
    display: none;
    justify-content: center;
    gap: 3rem;
    margin: 3rem auto;
}
#load-more,
#load-less {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    border: none;
    background: #0b3d91;
    color: white;
    transition: background 0.2s;
}
#load-more:hover,
#load-less:hover {
    background: #092f6b;
}
#load-less[disabled],
#load-more[disabled] {
    opacity: 0.5;
    cursor: default;
}
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 4rem;
    height: 4rem;
    background: #ff6f00;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.7rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow:
            0 0 6px rgba(255,111,0,0.7),
            0 2px 4px rgba(0,0,0,0.2);
    transition: background 0.2s, box-shadow 0.2s, opacity 0.3s;
    z-index: 1000;
}
#back-to-top.show {
    display: flex;
    opacity: 0.9;
}
#back-to-top:hover {
    background: #ffa000;
    box-shadow:
            0 0 20px rgba(255,160,0,0.9),
            0 0 30px rgba(255,200,0,0.6),
            0 4px 8px rgba(0,0,0,0.3);
    opacity: 1;
}