/* --- style.css --- */
/* This is a mobile-first responsive stylesheet */

/* 1. Basic Setup & Mobile Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    width: 95%;
    max-width: 1600px; /* Give it a much larger max-width */
    margin: 0 auto;
}

/* Header & Navigation (Mobile First) */
.main-header {
    background: #598f8a;
    color: #fff;
    padding: 1rem 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between; /* Pushes logo and nav to opposite ends */
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav li {
    display: inline-block; /* Puts them side-by-side */
    margin-left: 15px;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
}

/* Main Content Area */
.main-content {
    padding: 2rem 0;
}

/* Footer */
.main-footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

.forecast-card {
    display: flex; /* This puts the image and text side-by-side */
    align-items: center; /* This vertically aligns them nicely */
    background: #fff;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover; /* This makes sure the image scales nicely */
    border-radius: 5px;
    margin-right: 1rem;
}

.card-details {
    flex-grow: 1; /* Allows the text to take up the remaining space */
}



.badge.active-journey {
    background-color: #28a745; /* A nice green for active journeys */
    color: white;
}

.card-grid {
    display: grid;
    /* This is the magic part:
       - It creates as many columns as will fit.
       - Each column will be a minimum of 220px wide.
       - They will share the available space equally (1fr).
    */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem; /* The space between cards */
}

.in-port-card {
    background: #fff;
    border-radius: 5px;
    padding: 0.75rem; /* Reduced padding for a tighter look */
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex; /* Using flexbox for better internal alignment */
    flex-direction: column;
}

.in-port-thumbnail {
    width: 100%; /* Thumbnail now fills the card width */
    height: 100px; /* Reduced height */
    object-fit: contain; /* This is the change: ensures the whole image is visible */
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.in-port-card h5 {
    margin: 0.5rem 0;
    font-size: 1rem; /* Slightly smaller heading */
}

.in-port-card p {
    font-size: 0.8rem; /* Smaller text for details */
    color: #555;
    margin-bottom: 0.5rem;
    flex-grow: 1; /* Pushes the badge to the bottom */
}

.badge.active-journey {
    background-color: #28a745;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    align-self: center; /* Center the badge */
}

.captains-log {
    font-style: italic;
    font-size: 0.75rem;
    color: #777;
    margin-top: auto; /* Pushes it to the bottom */
}


/* 2. Tablet and Desktop Styles (The "Cascading" Magic) */
/* This media query applies styles ONLY when the screen is 768px or wider */

@media (min-width: 768px) {
    
    .logo {
        font-size: 2rem; /* Make the logo bigger on larger screens */
    }

    .main-nav a {
        font-size: 1.1rem; /* Make nav links slightly bigger */
    }
    
    .main-content {
        padding: 3rem 0;
    }

    /* Example of a two-column layout for larger screens */
    .two-column-layout {
        display: flex;
        gap: 2rem; /* Creates space between the columns */
    }
    .main-column {
        flex: 3; /* Takes up 3/4 of the space */
    }
    .sidebar-column {
        flex: 1; /* Takes up 1/4 of the space */
        background: #fff;
        padding: 1rem;
        border-radius: 5px;
    }
}
