/* css/main.css - FINAL, UNIFIED & CORRECTED VERSION */

/* 1. ROOT VARIABLES & GENERAL STYLES */
:root {
    --primary-blue: #0056b3; --dark-blue: #2c3e50; --light-grey-bg: #f4f7f6; --medium-grey: #707070;
    --text-dark: #333333; --text-light: #777777; --white: #ffffff; --border-color: #e0e0e0;
}
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; color: var(--text-dark); margin: 0; background-color: var(--white); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 2. HEADER & HERO */
.header { background: var(--white); padding: 15px 20px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.logo { font-size: 1.5em; font-weight: bold; color: var(--primary-blue); flex-shrink: 1; }
.hero { background-image: url('../images/realppty_banner.jpg'); background-size: cover; background-position: center center; position: relative; color: var(--white); text-align: center; padding: 100px 20px; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1; }
.hero h1, .hero p { position: relative; z-index: 2; }
.hero h1 { font-size: 2.8em; font-weight: bold; margin: 0 0 15px 0; }
.hero p { font-size: 1.1em; max-width: 600px; margin: 0 auto; color: #e0e0e0; }

/* 3. MAIN LAYOUT & SIDEBAR */
.main-content-grid { padding-top: 30px; display: flex; flex-direction: column; gap: 30px; }
#traffic-column { order: -1; }
@media (min-width: 992px) {
    .main-content-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; }
    #traffic-column { order: 0; }
}
.section { padding: 0; }
.section-title { text-align: left; font-size: 1.8em; margin-bottom: 15px; color: var(--primary-blue); }

/* 4. NEWS FEED & TAGS */
.news-feed { background: var(--white); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 20px; }
.news-item, .news-item-full-width { padding: 12px 0; border-top: 1px solid #f0f0f0; }
.news-item { display: flex; align-items: center; gap: 15px; }
.news-feed > div:first-child { border-top: none; }
.news-time { font-size: 0.9em; color: var(--text-light); white-space: nowrap; }
.news-title { flex-grow: 1; text-decoration: none; color: var(--text-dark); }
.news-title:hover { color: var(--primary-blue); text-decoration: underline; }
.icymi-header { margin-top: 40px; }
.no-news-message { padding: 20px; text-align: center; color: var(--text-light); }

/* 5. TRAFFIC CAMERAS & MODAL */
.camera-grid-container { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.camera-card { border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,0.05); display: flex; flex-direction: column; }
.camera-card img { width: 100%; display: block; cursor: pointer; aspect-ratio: 4 / 3; object-fit: cover; background-color: #e9ecef; }
.camera-placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background-color: #f8f9fa; color: #adb5bd; font-size: 2em; }
.camera-info { padding: 8px 10px; text-align: center; background-color: #f8f9fa; border-top: 1px solid var(--border-color); }
.camera-name { font-size: 0.85em; font-weight: 500; color: var(--text-dark); }
.camera-update-time { text-align: center; font-size: 0.8em; color: var(--text-light); margin-top: 15px; }
.error-text { font-size: 0.9em; color: var(--text-light); padding: 20px; text-align: center; }
.modal { visibility: hidden; opacity: 0; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); display: flex; justify-content: center; align-items: center; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal.is-visible { visibility: visible; opacity: 1; }
.modal-content { display: block; max-width: 90%; max-height: 90%; }
.modal-close { position: absolute; top: 20px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; }

/* 6. ADVERTISING SLOTS */
.ad-slot { margin: 30px auto; line-height: 0; }
.ad-slot img { width: 100%; height: auto; display: block; }
.ad-slot-top-leaderboard { max-width: 970px; }
.ad-slot-mid-page { max-width: 728px; margin: 40px auto; }
.ad-slot-skyscraper { max-width: 300px; }
.ad-slot-mpu { max-width: 300px; }
.ad-slot-mobile-large { max-width: 320px; }
.ad-slot-mobile-small { max-width: 320px; }
.ad-slot-in-feed { width: 100%; margin: 15px 0; }
.mobile-only { display: none; }
@media (max-width: 991px) {
    .desktop-only { display: none; }
    .mobile-only { display: flex; }
}

/* 7. HEADER WIDGETS */
.data-nav { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.data-nav-item { display: flex; align-items: center; gap: 8px; font-size: 0.9em; color: var(--text-dark); }
.data-nav-item .fa-solid { font-size: 1.1em; }
.data-nav-item .text-yellow-500 { color: #f59e0b; }
.data-nav-item .text-blue-500 { color: #3b82f6; }
.data-nav-item .text-gray-500 { color: #6b7280; }
.data-nav-item .text-orange-500 { color: #f97316; }
#weather-widget .fa-solid, #exchange-rate-widget .fa-solid, .data-nav-item .fa-clock { color: var(--primary-blue); }
.data-nav-item .font-medium { font-weight: 600; }
@media (max-width: 640px) { .data-nav-item .hidden { display: none; } }

/* 8. FOOTER */
.footer { background: var(--dark-blue); color: var(--white); text-align: center; padding: 30px 20px; margin-top: 40px; }
.footer a { color: var(--white); margin: 0 10px; }

/* 9. YOUTUBE & INSTAGRAM EMBEDS */
.video-item, .instagram-media { padding-top: 15px; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin-bottom: 10px; border-radius: 8px; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.video-title { display: block; font-weight: 600; color: var(--text-dark); text-decoration: none; padding: 0 5px; }
.video-title:hover { color: var(--primary-blue); text-decoration: underline; }

/* 10. CONTENT PAGE STYLING */
.content-page { padding-top: 40px; padding-bottom: 60px; max-width: 800px; }
.content-page h1 { font-size: 2.8em; color: var(--primary-blue); border-bottom: 2px solid var(--border-color); padding-bottom: 10px; margin-bottom: 15px; }
.content-page h2 { font-size: 1.8em; color: var(--dark-blue); margin-top: 40px; margin-bottom: 15px; }
.content-page p { line-height: 1.8; margin-bottom: 20px; color: var(--text-dark); }
.breadcrumb { font-size: 0.9em; color: var(--text-light); margin-bottom: 25px; }
.breadcrumb a { color: var(--primary-blue); }

/* 11. TAG STYLING */
.tag-container { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 15px; }
.news-item-full-width .tag-container { margin-left: 0; margin-top: 10px; justify-content: flex-start; }
.tag { font-size: 0.7em; font-weight: 600; padding: 3px 9px; border-radius: 12px; color: var(--white); text-transform: uppercase; white-space: nowrap; }
.tag-rts { background-color: #0077b6; }
.tag-property { background-color: #c97b63; }
.tag-sez { background-color: #5a189a; }
.tag-shopping { background-color: #e63946; }
.tag-sport { background-color: #43aa8b; }
.tag-metro { background-color: #f9844a; }
.tag-lifestyle { background-color: #1f8a70; }
.tag-food { background-color: #d00000; }
.tag-tech { background-color: #023e8a; }
.tag-education { background-color: #8338ec; }
.tag-videos { background-color: #ff0000; }
.tag-cafes { background-color: #6f4e37; }
.tag-entertainment { background-color: #9d4edd; }

/* 12. NEW: TAG FILTER BAR STYLING */
.tag-filter-bar { display: flex; align-items: center; gap: 15px; padding: 15px 20px; background-color: #f8f9fa; border-radius: 8px; margin: 40px 0; flex-wrap: wrap; }
.filter-label { font-weight: 600; color: var(--text-dark); white-space: nowrap; }
.tags-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-filter { font-family: inherit; font-size: 0.85em; font-weight: 500; padding: 5px 12px; border-radius: 15px; border: 1px solid var(--border-color); background-color: var(--white); color: var(--text-light); cursor: pointer; transition: all 0.2s ease; }
.tag-filter:hover { background-color: #e9ecef; border-color: #ced4da; }
.tag-filter.active { background-color: var(--primary-blue); color: var(--white); border-color: var(--primary-blue); font-weight: 600; }
