:root {
    --primary-color: #D32F2F;
    /* News Red */
    --bg-color: #f6f6f6;
    --text-color: #121212;
    --white: #ffffff;
    --font-heading: 'Rozha One', serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- NAVIGATION --- */
.navbar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-link {
    text-decoration: none;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--white);
}

.search-box {
    display: flex;
    gap: 5px;
}

.inputPlace {
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    width: 200px;
}

.btn {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    background: #222;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    background: #000;
}

.nav-links {
    display: flex;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0;
    overflow-x: auto;
}

.nav-item {
    background: none;
    border: none;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
}

.nav-item:hover {
    text-decoration: underline;
    color: #ffeb3b;
}

/* --- NEWS LAYOUT --- */
main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    min-height: 80vh;
}

.section_title {
    margin: 40px 0 20px;
    font-size: 1.8rem;
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    color: #333;
    font-family: var(--font-heading);
}

.hero-card {
    display: flex;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 40px;
}

.hero-img {
    width: 60%;
    height: 400px;
    object-fit: cover;
}

.hero-content {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    text-decoration: none;
    color: var(--text-color);
    margin-bottom: 10px;
}

.section-tag {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.parent {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.2rem;
    font-family: var(--font-heading);
    text-decoration: none;
    color: var(--text-color);
}

/* --- WEATHER MODAL (Newspaper Theme) --- */
.modal-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.weather-paper {
    background: var(--white);
    width: 100%;
    max-width: 700px;
    border-top: 5px solid var(--primary-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 30px;
    border-radius: 4px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--primary-color);
}

.w-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Weather Main Section */
.w-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.w-city {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 5px;
}

.w-sub {
    color: #666;
    font-size: 0.9rem;
}

.w-date {
    color: #999;
    font-size: 0.85rem;
    margin-top: 5px;
}

.w-temp-group {
    text-align: right;
}

.w-temp {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.w-condition {
    font-weight: 500;
    color: #444;
    font-size: 1.1rem;
}

.w-icon {
    width: 64px;
    height: 64px;
}

.divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* Weather Grid Details */
.w-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.w-box {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #eee;
    text-align: center;
}

.w-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.w-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #222;
}

.w-small {
    font-size: 0.8rem;
    color: #666;
    margin-top: 3px;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #888;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
    border-top: 5px solid var(--primary-color);
}

footer {
    background-color: #1a1a1a;
    color: #888;
    padding: 50px 20px;
    margin-top: 60px;
    font-size: 0.9rem;
    text-align: center;
    border-top: 5px solid #D32F2F;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-weight: bold;
}

.footer-links a:hover {
    color: white;
}

/* Mobile */
@media (max-width: 768px) {
    .hero-card {
        flex-direction: column;
    }

    .hero-img {
        width: 100%;
        height: 250px;
    }

    .nav-top,
    .w-header,
    .w-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .w-temp-group {
        text-align: center;
    }

    .search-box,
    .inputPlace {
        width: 100%;
    }
}