/* CSS Document */

/* --- 1. GENERAL STYLES --- */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #0f2e21; /* Dark forest green */
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- 2. NAVBAR --- */
/* (Same as your homepage) */
.nav {
    padding: 18px 45px;
    background: transparent;
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: center; /* This centers the .navlinks block */
    position: relative;
}
.brand {
    position: absolute;
    left: 45px;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    color: white;
}
.navlinks a {
    margin: 0 15px;
    text-decoration: none;
    color: #d8f5e0;
    font-weight: 500;
}
.navlinks a.active,
.navlinks a:hover {
    background: #3ea174;
    padding: 6px 14px;
    border-radius: 14px;
    color: white;
}

/* --- 3. HOME PAGE HERO --- */
/* (Styles for index.html) */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px;
    min-height: 90vh; /* Taller section */
    gap: 40px;
}
.hero-content {
    flex: 1;
    max-width: 35%; /* Smaller text area */
    text-align: left;
}
.hero-content h1 {
    font-size: 3rem;
    color: white;
}
.hero-content p {
    font-size: 1.1rem;
    color: #d8f5e0;
}
.hero-image {
    flex: 1.5;
    max-width: 60%; /* Wider image area */
    text-align: right;
}
.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 0 18px rgba(0,0,0,0.4);
}

/* --- 4. BUTTONS (Global) --- */
.btn {
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-weight: bold;
    margin-right: 15px;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}
.btn.primary {
    background-color: #3ea174;
    color: white;
    border: 2px solid #3ea174;
}
.btn.primary:hover {
    background-color: #52b88a;
}
.btn.secondary {
    background-color: transparent;
    color: #d8f5e0;
    border: 2px solid #3ea174;
}
.btn.secondary:hover {
    background-color: #3ea174;
    color: white;
}

/* --- 5. CITY PAGE STYLES (New!) --- */

/* This centers the main content on the page */
main.container {
    max-width: 1100px;
    margin: 0 auto; /* Centers the content */
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Main card style for search and custom city */
.card {
    background-color: #1a4a3a; /* A slightly lighter green */
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

/* The grid of city cards */
.grid {
    display: grid;
    /* This is from your inline style, now in the CSS */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* Style for the city cards inside the grid */
.grid .card {
    margin-bottom: 0; /* Remove extra margin for grid items */
    display: flex;
    flex-direction: column;
}
.grid .card .h2 {
    margin-bottom: 10px;
}
.grid .card .muted {
    flex-grow: 1; /* Pushes the button to the bottom */
}
/* Style for the "Use this city" button */
.grid .card .btn {
    background-color: transparent;
    color: #d8f5e0;
    border: 2px solid #3ea174;
    text-align: center;
    width: 100%;
    padding: 10px 0;
    margin: 10px 0 0 0;
    box-sizing: border-box;
}
.grid .card .btn:hover {
    background-color: #3ea174;
    color: white;
}

/* Typography styles from your HTML */
.h2 {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    margin: 0 0 10px 0;
}
.muted {
    color: #d8f5e0;
    font-size: 1rem;
    line-height: 1.5;
    margin-top: 0;
}

/* Form input styles */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #d8f5e0;
}
input[type="text"],
input[id="q"],
input[id="customCity"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    background-color: #0f2e21; /* Match body */
    border: 2px solid #3ea174;
    color: white;
    border-radius: 14px;
    box-sizing: border-box; /* Very important! */
}
input::placeholder {
    color: #a0a0a0;
}
/* Container for the custom city input/button */
.custom-city-group {
    display: flex;
    gap: 10px;
}
.custom-city-group input {
    flex: 1; /* Input takes up remaining space */
}
.custom-city-group .btn {
    margin-right: 0;
}


/* --- 6. FOOTER --- */
/* (Same as your homepage) */
footer {
    text-align: center;
    padding: 20px;
    margin-top: auto; /* Pushes footer to the bottom */
    color: #a0a0a0;
}

/* --- 7. CITY PAGE IMPROVEMENTS --- */
/* This is the new code you wanted to add */

/* * This makes the top 'Choose a city' card and 
 * bottom 'My city isn't listed' card "invisible".
 * We target the first and last card inside the main container.
*/
main.container > .card:first-child,
main.container > .card:last-child {
    background-color: transparent;
    padding: 0; /* Remove the card padding */
    border-radius: 0; /* Remove the card radius */
    margin-bottom: 40px; /* Add more space between sections */
}

/* Give the grid some space from the search section */
.grid {
    margin-top: 40px;
}

/* * Add interactivity to the city cards
 * This makes them "pop" when you hover over them.
*/
.grid .card {
    /* Add a subtle border to match the background */
    border: 2px solid #1a4a3a; 
    /* Add a smooth transition for the hover effect */
    transition: all 0.3s ease; 
}

.grid .card:hover {
    transform: translateY(-5px); /* Lift the card up slightly */
    border-color: #3ea174; /* Highlight the border */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); /* Add a soft shadow */
}

/* Clean up the 'Continue' button on the custom city input */
.custom-city-group .btn {
    border-radius: 14px; /* Match the input field's radius */
    padding: 12px 24px;
}