/* Self-hosted Nunito Sans Variable Font */
@font-face {
    font-family: 'Nunito Sans';
    src: url('fonts/NunitoSans-VariableFont_YTLC,opsz,wdth,wght.ttf') format('truetype-variations');
    font-weight: 200 1000;
    font-style: normal;
    font-display: swap;
}

/* Self-hosted Lora Variable Font for captions */
@font-face {
    font-family: 'Lora';
    src: url('fonts/Lora-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lora';
    src: url('fonts/Lora-Italic-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito Sans', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    text-align: center;
    position: relative;
}

body.home-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Images/Earth_Mars_v4_transp.png');
    background-size: 50%;
    background-position: center calc(50% + 0px);
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: -1;
}

body.kbo-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Images/Pluto NH-credit_NASA-JHUAPL-SwRI.webp');
    background-size: auto 100%;
    background-position: center bottom;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: -1;
}

header {
    width: 100%;
    background: transparent;
    color: white;
    padding: 0;
    margin-bottom: 20px;
}

.banner {
    width: 100%;
    aspect-ratio: 3.86;
    background-image: url('Images/banner-dallol-hanjin.jpg');
    background-size: cover;
    background-position: center;
    background-color: transparent;
    position: relative;
}

.banner-text {
    position: absolute;
    bottom: 10%;
    left: 40px;
    max-width: 75%;
    background: transparent;
    color: white;
    padding: 25px 50px;
    font-size: 2.5em;
    text-align: left;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.photo-credit {
    position: absolute;
    bottom: 2%;
    left: 2%;
    font-size: 0.6em;
    color: white;
    opacity: 0.7;
}

.banner-overlay-image {
    position: absolute;
    bottom: 7%;
    right: 2%;
    height: 75%;
    width: auto;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.back-button {
    display: inline-block;
    margin: 20px 0;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.back-button-container {
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.back-button:hover {
    background-color: #45a049;
}

h1 {
    color: #333;
    margin: 40px 0 20px 0;
    font-size: 1.5em;
    font-weight: 300;
    text-align: center;
    letter-spacing: 0.5px;
}

h1 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

h1 a:hover {
    color: #FF8C00;
    text-decoration: underline;
}

h2 {
    color: #B22222;
    margin: 30px 0 15px 0;
    font-size: 1.2em;
    font-weight: 300;
    text-align: left;
    letter-spacing: 0.5px;
    padding: 0;
}
h3 {
    color: #B22222;
    margin: 20px 0 10px 0;
    font-size: 1.1em;
    font-weight: 300;
    text-align: left;
    letter-spacing: 0.5px;
    padding: 0;
}

figcaption {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-top: 8px;
    text-align: center;
    line-height: 1.4;
}

.grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.box {
    background-color: #fff;
    padding: 30px;
    text-align: center;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 250px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: #FF8C00;
    background-color: #fffaf0;
}

.box a {
    text-decoration: none;
    color: #333;
    display: block;
    font-size: 0.95em;
}

.logo-space {
    text-align: center;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    min-height: 100px;
}

.content-space {
    margin: 20px auto;
    padding: 30px 50px 30px 30px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    min-height: 300px;
    text-align: left;
}

footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    aspect-ratio: 1.65;
    height: 60px;
    background-image: url('Images/logo-footer.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 3px;
    display: block;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 0.8;
}

.footer-text {
    flex: 1;
    min-width: 250px;
    font-size: 0.9em;
    text-align: left;
}

.footer-text p {
    margin: 5px 0;
}

@media (max-width: 992px) {
    .grid-container {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .banner-text {
        font-size: 1.1em;
        padding: 15px 20px;
        left: 20px;
        max-width: 70%;
    }
    
    .photo-credit {
        font-size: 0.5em;
    }
    
    .box {
        width: 200px;
        padding: 15px;
        font-size: 0.9em;
    }
    
    h1 {
        font-size: 1.3em;
    }
    
    .grid-container {
        max-width: 98%;
    }
}

@media (max-width: 480px) {
    .banner-text {
        font-size: 0.95em;
        padding: 10px 15px;
        left: 10px;
        max-width: 75%;
    }
    
    .photo-credit {
        font-size: 3px;
    }    

    .box {
        width: 100%;
        max-width: 250px;
    }
    
    main {
        padding: 20px 15px;
    }
}

/* Social media links */
.contact-line {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-links {
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
}

.social-links a {
    color: #999;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.social-links a:hover {
    color: #4CAF50;
}

.social-links svg {
    display: block;
}
