/* ===== Google Fonts Import ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ===== Universal Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif; /* Modern font */
}

body {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease;
    padding: 20px;
    background-color: #f0f0f0; /* Lighter background for light theme */
    color: #333333; /* Dark text for better contrast on light backgrounds */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ===== Navigation Menu Styles ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.3); /* Frosted white */
    backdrop-filter: blur(10px);
    border-radius: 50px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.navbar a {
    color: #333;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 30px;
    transition: background 0.3s ease, color 0.3s ease;
    font-weight: 500;
    white-space: nowrap; /* Prevents text from wrapping */
}
.navbar a:hover, .navbar a.active {
    background: #333;
    color: #fff;
}
.navbar .logo {
    font-size: 1.6em;
    font-weight: 700;
    color: #333;
    flex-shrink: 0; /* Prevents the logo from shrinking */
}
.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===== Main Weather App Styles (Home Page) ===== */
.search-box {
    text-align: center;
    margin-bottom: 30px;
}
.search-box input {
    padding: 15px 30px;
    width: 100%;
    max-width: 400px;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    outline: none;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.7);
    color: #333;
    transition: all 0.3s ease;
}
.search-box input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}
.search-box input:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #3498db;
}

/* Base style for main content cards (frosted glass) */
.current-weather,
.content-card {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.current-weather {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.weather-info { text-align: center; }
.temperature { font-size: 5em; font-weight: 700; }
.description { font-size: 1.6em; margin: 10px 0; text-transform: capitalize; opacity: 0.9; }
.details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.detail-item { background: rgba(0, 0, 0, 0.05); padding: 20px; border-radius: 15px; text-align: center; }
.weekly-forecast { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 15px; }
.forecast-card { 
    background: rgba(255, 255, 255, 0.3); 
    backdrop-filter: blur(10px); 
    border-radius: 20px; 
    padding: 20px; 
    text-align: center; 
    border: 1px solid rgba(255, 255, 255, 0.4); 
}
.weather-icon { font-size: 3.5em; margin: 15px 0; }
.error { color: #d32f2f; text-align: center; margin-top: 20px; display: none; background: rgba(255, 0, 0, 0.1); padding: 10px; border-radius: 10px;}

/* ===== Styles for Content Pages (About & Documentation) ===== */
.content-card {
    padding: 40px; /* Overriding base padding for more space on content pages */
}
.content-card h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
}
.content-card h3 {
    font-size: 1.6em;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}
.content-card p, .content-card li {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 15px;
    opacity: 0.9;
}
.content-card ul, .content-card ol {
    list-style-position: inside;
    padding-left: 10px;
}
.content-card li strong {
    font-weight: 600;
}

/* ===== Responsive Design ===== */

/* For standard tablets and large phones */
@media (max-width: 768px) {
    body { 
        padding: 15px; 
    }
    .navbar {
        padding: 8px 15px; /* Reduced padding */
    }
    .navbar .logo {
        font-size: 1.4em;
    }
    .navbar a {
        padding: 6px 12px; /* Reduced padding */
        font-size: 0.9em;
    }
    .nav-links {
        gap: 5px; /* Reduced gap */
    }
    .temperature {
        font-size: 4em;
    }
    .description {
        font-size: 1.4em;
    }
    .content-card {
        padding: 30px;
    }
    .content-card h1 {
        font-size: 2.2em;
    }
    .content-card h3 {
        font-size: 1.4em;
    }
    .current-weather {
        grid-template-columns: 1fr; /* Stack the two columns vertically */
        gap: 25px;
    }
}

/* For mobile phones */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    .navbar {
        padding: 6px 8px; /* Further reduced padding */
        overflow-x: auto;   /* Allows horizontal scrolling if content overflows */
        -ms-overflow-style: none;  /* Hides scrollbar for IE and Edge */
        scrollbar-width: none;  /* Hides scrollbar for Firefox */
    }
    .navbar::-webkit-scrollbar {
        display: none; /* Hides scrollbar for Chrome, Safari and Opera */
    }
    .navbar .logo {
        font-size: 1.1em;
    }
    .navbar a {
        font-size: 0.8em;
        padding: 5px 6px; /* Further reduced padding */
    }
    .nav-links {
        gap: 0.5px; /* Further reduced gap */
    }
    .current-weather, .content-card {
        padding: 20px;
        border-radius: 20px;
    }
    .temperature {
        font-size: 3.5em;
    }
    .description {
        font-size: 1.2em;
    }
    .details {
        grid-template-columns: 1fr; /* Stack the smaller detail items as well */
    }
    .content-card h1 {
        font-size: 1.8em;
    }
    .content-card h3 {
        font-size: 1.2em;
    }
    .content-card p, .content-card li {
        font-size: 1em;
    }
    .search-box input {
        padding: 15px 25px;
        font-size: 15px;
    }
}

