/*
Theme Name: Rose Malayalam V1
Author: J Chacko
Version: 3.6
Description: Restored stable version with forced BIG label colors and grid spacing.
*/

/* --- 1. GLOBAL RESET & TYPOGRAPHY --- */
body { margin: 0; padding: 0; font-family: 'Inter', sans-serif; background: #f4f6f8; color: #333; line-height: 1.8; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: "Malayalam Sangam MN", sans-serif; font-weight: 500; line-height: 1.4; margin: 0; color: #1a1a1a; }
a { text-decoration: none !important; color: inherit !important; transition: 0.2s; }
a:hover { color: #303A91 !important; }
img { max-width: 100%; height: auto; display: block; border-radius: 6px; }

/* --- 2. HEADER & BRANDING --- */
.main-header { width: 100%; background: #fff; }

.branding-row { 
    background: #fff; 
    padding: 12px 0; 
    text-align: center; 
    /* This creates the smooth shrinking animation */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
}

.branding-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; }

.site-logo { 
    width: 220px; 
    height: auto; 
    display: block; 
    margin: 0 auto; 
    /* This ensures the logo itself scales smoothly */
    transition: width 0.4s ease, max-width 0.4s ease; 
}

.header-sub-meta { 
    font-size: 11px; 
    color: #888; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px; 
    font-weight: 500; 
    text-transform: uppercase;
    transition: opacity 0.3s ease, height 0.3s ease;
}
.currency-gold { color: #b8860b; font-weight: bold; }

/* --- 3. STICKY DYNAMICS --- */
.sticky-container { 
    position: sticky; 
    top: 0; 
    z-index: 9999; 
    background: #fff; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); 
    width: 100%; 
}

/* SHRUNK STATE: These rules trigger when scrolling down */
.is-sticky .branding-row { 
    padding: 5px 0; /* Tighten vertical space */
}

.is-sticky .site-logo { 
    width: 150px !important; /* Forces the shrink */
    max-width: 150px !important;
}

.is-sticky .header-sub-meta { 
    height: 0; 
    opacity: 0; 
    overflow: hidden; 
    margin: 0; 
    pointer-events: none;
}

.category-nav { background: #fff; border-bottom: 3px solid #303A91; overflow-x: auto; white-space: nowrap; display: block !important; }
.category-nav a { display: inline-block; padding: 12px 18px; font-weight: bold; text-transform: uppercase; font-size: 13px; color: #333 !important; }
.category-nav a.active { background: #303A91; color: #fff !important; }

/* --- 4. MAIN LAYOUT GRID --- */
.main-wrapper { 
    max-width: 1240px; 
    margin: 0 auto; 
    padding: 15px; 
    box-sizing: border-box; 
    display: flex; 
    flex-direction: column; 
}

/* MOBILE: Hide everything except the news feed */
.col-center { width: 100%; display: block !important; }
.col-left, .col-right { display: none !important; } /* Hard hide on mobile */

@media (min-width: 1024px) {
    .main-wrapper { 
        display: grid; 
        grid-template-columns: 280px minmax(0, 1fr) 300px; 
        grid-template-areas: "leftside main content"; 
        gap: 40px; 
        padding: 30px 15px; 
        align-items: start; 
    }
    
    /* DESKTOP: Show sidebars */
    .col-left { display: block !important; grid-area: leftside; border-right: 1px solid #e0e0e0; padding-right: 25px; }
    .col-center { grid-area: main; overflow: hidden; }
    .col-right { display: flex !important; grid-area: content; border-left: 1px solid #e0e0e0; padding-left: 25px; min-width: 300px; }
}
}/* --- 5. COMPONENT STYLING & AD SPACE --- */

.top-ad-space { 
    background: transparent; 
    text-align: center; 
    padding: 10px 0; 
    border-bottom: 1px solid #eee; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    min-height: 100px; 
}

@media (min-width: 1024px) { 
    .top-ad-space { min-height: 150px; } 
}

.adsense-wrap {
    width: 100%;
    max-width: 970px;
    margin: 0 auto;
    overflow: hidden;
}

.top-ad-space small { 
    display: block; 
    color: #bbb; 
    font-size: 10px; 
    margin-bottom: 8px; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
}

/* Hero News - Main Featured Story */
.hero-news { 
    margin-bottom: 40px; 
    background: #fff; 
    padding-bottom: 25px; 
    border-bottom: 2px solid #eee;
}
.hero-news h2 { font-size: 26px; margin-top: 15px; font-weight: 600; line-height: 1.4; color: #1a1a1a !important; }

/* BIG NEWS LABEL - THE COLOR FIX */
.big-label { 
    background-color: #ed1c24 !important; 
    color: #ffffff !important; 
    font-size: 11px; 
    padding: 3px 10px; 
    border-radius: 3px; 
    display: inline-block; 
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* Standard Feed News Rows */
.news-row { display: flex; flex-direction: row-reverse; gap: 15px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee; align-items: flex-start; }
.news-row .thumb-box { flex: 0 0 110px; }
.news-row img { width: 110px; height: 80px; object-fit: cover; border-radius: 4px; }
.news-row h3 { flex: 1; font-size: 17px; font-weight: 500; line-height: 1.5; color: #222 !important; }
 

/* ... (Keep your top-ad-space, hero-news, and news-row code above this) ... */

/* --- CLASSIFIEDS GRID BRUTE FORCE FIX --- */
.classifieds-strip { 
    margin: 40px 0; 
    padding: 20px 0; 
    border-top: 2px solid #eee; 
    border-bottom: 2px solid #eee; 
    background: #fff;
    clear: both; /* Prevents previous floats from messing up the grid */
}

/* Force 2 columns on mobile NO MATTER WHAT */
.classifieds-grid { 
    display: grid !important; 
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 15px !important; 
    padding: 0 10px !important;
}

@media (min-width: 1024px) { 
    .classifieds-grid { grid-template-columns: repeat(3, 1fr) !important; } 
}

/* Fix for the item containers */
.classified-item, .classifieds-grid article {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 10px !important;
}

.classified-item .thumb-box, .classifieds-grid .thumb-box {
    width: 100% !important;
    aspect-ratio: 4/3 !important; 
    background: #f0f0f0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    margin-bottom: 10px !important;
}

.classified-item img, .classifieds-grid img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important; 
    display: block !important;
}

.classified-item h4, .classifieds-grid h4 { 
    font-size: 14px !important; 
    font-weight: 500 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Sidebar Stacking Fix */
.col-left .news-row, .col-right .news-row { flex-direction: column !important; gap: 10px; }
.col-left .news-row img, .col-right .news-row img { width: 100% !important; height: 160px !important; }

/* --- 6. TICKER & FOOTER --- */
.news-ticker { background: #1a1a1a; color: #fff; display: flex; align-items: center; height: 40px; overflow: hidden; }
.ticker-label { background: #ed1c24; padding: 0 15px; height: 100%; display: flex; align-items: center; font-weight: bold; }

footer { background: #1a1a1a; color: #bbb; padding: 40px 15px; text-align: center; }
footer h4 { color: #fff; border-bottom: 2px solid #303A91; padding-bottom: 10px; margin-bottom: 15px; text-align: left; }