/* --- Home Layout with Sidebar --- */
.home-layout-with-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.home-main-column {
    width: 100%;
}

.ad-sidebar-column {
    width: 100%;
    margin-top: 20px;
}

.sidebar-sticky-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Sidebar Box Styles */
.widget-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 20px;
    border: 1px solid #f0f0f0;
}

/* Base resets */
.ad-sidebar-column .widget-box {
    margin-bottom: 0;
}

/* --- Individual Widget Styles --- */
.ad-slider-widget {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    overflow: hidden;
    padding: 0 !important;
    border: none !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.ad-slider-widget .swiper {
    width: 100%;
    height: 100%;
}

.ad-slider-widget img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-list-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid #ff4444;
    padding-bottom: 0.5rem;
    color: #333;
}

.video-list-item {
    display: flex;
    gap: 12px;
    align-items: center;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.video-list-item:not(:last-child) {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f5f5f5;
}

.video-list-item:hover {
    transform: translateX(5px);
}

.video-item-image {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.video-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: #444;
}

.video-list-item:hover .video-item-title {
    color: #ff4444;
}

.whatsapp-widget {
    width: 100%;
    aspect-ratio: 3 / 1;
    border-radius: 12px;
    overflow: hidden;
    padding: 0 !important;
}

.whatsapp-widget a {
    display: block;
    width: 100%;
    height: 100%;
}

.whatsapp-widget img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.whatsapp-widget a:hover img {
    transform: scale(1.05);
}

/* ══════════════════════════════════════
   Weather Widget — Vaikom Vartha
   ══════════════════════════════════════ */

:root {
    --weather-blue: #1565C0;
    --weather-blue-light: #E3F2FD;
    --weather-blue-mid: #42A5F5;
    --ink: #111111;
    --ink-soft: #5A5A5A;
    --ink-muted: #909090;
    --border: #E0DADA;
    --bg: #FAFAF8;
    --bg-card: #FFFFFF;
}

/* ── Sidebar Box Wrapper ── */
.sidebar-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.sidebar-head {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    background: var(--bg-card);
}

.sidebar-head .sidebar-head-icon {
    font-size: 15px;
    line-height: 1;
}

/* ── Widget Body ── */
.weather-widget {
    padding: 16px;
    position: relative;
    min-height: 160px;
}

/* ── Loading State ── */
.weather-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    gap: 10px;
    color: var(--ink-muted);
    font-size: 13px;
}

.weather-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--weather-blue);
    border-radius: 50%;
    animation: weatherSpin .8s linear infinite;
}

@keyframes weatherSpin {
    to { transform: rotate(360deg); }
}

/* ── Error State ── */
.weather-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    gap: 8px;
    text-align: center;
    color: var(--ink-muted);
    font-size: 12px;
    padding: 0 8px;
}

.weather-error-icon {
    font-size: 28px;
    opacity: .5;
}

.weather-retry-btn {
    margin-top: 6px;
    font-size: 11px;
    color: var(--weather-blue);
    background: none;
    border: 1px solid var(--weather-blue);
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, color .15s;
}

.weather-retry-btn:hover {
    background: var(--weather-blue);
    color: #fff;
}

/* ── Main Content (hidden until loaded) ── */
.weather-content {
    display: none;
}

.weather-content.loaded {
    display: block;
}

/* ── Location Row ── */
.weather-location-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.weather-city-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 5px;
}

.weather-city-name::before {
    content: '📍';
    font-size: 12px;
}

.weather-date {
    font-size: 11px;
    color: var(--ink-muted);
}

/* ── Main Temp Row ── */
.weather-main-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.weather-icon-wrap {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-icon-wrap img {
    width: 52px;
    height: 52px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
}

.weather-temp-main {
    font-size: 42px;
    font-weight: 300;
    color: var(--ink);
    line-height: 1;
    letter-spacing: -1px;
}

.weather-temp-unit {
    font-size: 20px;
    font-weight: 400;
    color: var(--ink-soft);
    vertical-align: super;
}

.weather-feels {
    font-size: 11px;
    color: var(--ink-muted);
    margin-top: 3px;
}

/* ── Description ── */
.weather-desc {
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 14px;
    text-transform: capitalize;
    font-weight: 500;
}

/* ── Stat Cards ── */
.weather-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.weather-stat {
    text-align: center;
    background: var(--weather-blue-light);
    border-radius: 7px;
    padding: 9px 4px 8px;
    position: relative;
    overflow: hidden;
}

.weather-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--weather-blue-mid);
    opacity: .4;
    border-radius: 7px 7px 0 0;
}

.weather-stat-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--weather-blue);
    line-height: 1.1;
}

.weather-stat-label {
    font-size: 10px;
    color: var(--ink-muted);
    margin-top: 3px;
    letter-spacing: .02em;
}

/* ── Min/Max Bar ── */
.weather-minmax {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 12px;
    color: var(--ink-soft);
}

.weather-minmax-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

.weather-minmax-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: linear-gradient(to right, #42A5F5, #EF5350);
    border-radius: 99px;
    transition: width .5s ease;
}

.weather-min { color: #42A5F5; font-weight: 600; }
.weather-max { color: #EF5350; font-weight: 600; }

/* ── Forecast Strip ── */
.weather-forecast {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.forecast-day {
    text-align: center;
    padding: 6px 2px;
    border-radius: 6px;
    cursor: default;
    transition: background .15s;
}

.forecast-day:hover {
    background: var(--bg);
}

.forecast-day-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.forecast-day-icon {
    font-size: 18px;
    margin: 2px 0;
    line-height: 1;
}

.forecast-day-temp {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    margin-top: 3px;
}

.forecast-day-low {
    font-size: 10px;
    color: var(--ink-muted);
}

/* ── Update time ── */
.weather-updated {
    text-align: right;
    font-size: 10px;
    color: var(--ink-muted);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    transition: color .15s;
}

.weather-updated:hover {
    color: var(--weather-blue);
}

.weather-refresh-icon {
    font-size: 11px;
    display: inline-block;
    transition: transform .3s;
}

.weather-updated:hover .weather-refresh-icon {
    transform: rotate(180deg);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .weather-temp-main { font-size: 36px; }
    .weather-stats { gap: 6px; }
    .weather-stat-val { font-size: 14px; }
}

/* --- Obituary Widget --- */
.obituary-list-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
    color: #333;
}

.obituary-list-item {
    display: flex;
    gap: 15px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.obituary-list-item:not(:last-child) {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #eee;
}

.obituary-list-item:hover {
    transform: translateX(5px);
}

.obituary-item-image-wrapper {
    position: relative;
    flex-shrink: 0;
}

.obituary-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #eee;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.obituary-item-name {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.obituary-list-item:hover .obituary-item-name {
    color: #555;
}

.obituary-item-bouquet {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 25px;
    height: 25px;
    background: #fff;
    border-radius: 50%;
    padding: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    color: #666;
    z-index: 10;
}

/* --- Hot News Widget --- */
.hotnews-list-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid #e65100;
    padding-bottom: 0.5rem;
    color: #222;
    animation: titleVibrantPulse 2.5s infinite ease-in-out;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hotnews-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: fire-flicker 1.5s infinite ease-in-out;
    transform-origin: bottom center;
}

@keyframes fire-flicker {
    0%, 100% { transform: scale(1) rotate(-3deg); filter: drop-shadow(0 0 2px rgba(255, 152, 0, 0.4)); }
    50% { transform: scale(1.1) rotate(3deg); filter: drop-shadow(0 0 6px rgba(255, 87, 34, 0.8)); }
}

.hotnews-list-item {
    display: flex;
    gap: 12px;
    align-items: center;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
    padding: 8px 0;
    border-radius: 6px;
}

.hotnews-list-item:not(:last-child) {
    margin-bottom: 0.5rem;
    border-bottom: 1px dashed #eee;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.hotnews-list-item:hover {
    transform: translateX(5px);
}

.hotnews-item-image {
    width: 70px;
    height: 50px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hotnews-item-title {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    color: #444;
}

.hotnews-list-item:hover .hotnews-item-title {
    color: #e65100;
}

/* --- Desktop Layout --- */
@media (min-width: 1024px) {
    .home-layout-with-sidebar {
        flex-direction: row;
        align-items: flex-start;
        gap: 30px;
    }
    .home-main-column {
        flex: 1;
        min-width: 0;
    }
    .ad-sidebar-column {
        width: 320px;
        flex-shrink: 0;
        margin-top: 0;
    }
    .sidebar-sticky-container {
        position: sticky;
        top: 80px;
    }
}
