/* AllNewz - Optimized CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: #fff;
    color: #000;
    font-size: 16px;
    line-height: 1.5;
}

/* Market Ticker */
.market-ticker {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 101;
    height: 40px;
}

.ticker-track {
    display: flex;
    gap: 40px;
    animation: scroll 60s linear infinite;
    whitespace: nowrap;
    padding: 8px 0;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.ticker-symbol {
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

.ticker-price {
    color: #000;
    font-family: 'Courier New', monospace;
}

.ticker-change {
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.ticker-change.positive {
    color: #16a34a;
}

.ticker-change.negative {
    color: #dc2626;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.3333%);
    }
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 24px;
    position: sticky;
    top: 40px;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-svg {
    height: 40px;
    width: auto;
}

/* Search Bar */
.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 24px;
    padding: 4px 8px 4px 20px;
    transition: background 0.2s;
}

.search-form:focus-within {
    background: #e8e8e8;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 15px;
    outline: none;
    color: #000;
}

.search-input::placeholder {
    color: #999;
}

.search-button {
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s;
}

.search-button:hover {
    color: #000;
}

.search-button svg {
    width: 20px;
    height: 20px;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f5f5f5;
}

.suggestion-icon {
    color: #999;
    font-size: 16px;
}

.suggestion-text {
    flex: 1;
    font-size: 15px;
    color: #333;
}

.suggestion-corrected {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.suggestion-lang {
    font-size: 12px;
    color: #999;
}

.search-container {
    position: relative;
}

/* Holiday Widget - Flat Minimalistic Design */
.holiday-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.holiday-widget:hover {
    background: #ececec;
    border-color: #d0d0d0;
}

.holiday-widget.bank-holiday {
    background: #fff3e0;
    border-color: #ffe0b2;
    color: #e65100;
}

.holiday-widget.bank-holiday:hover {
    background: #ffe0b2;
}

.holiday-widget.market-holiday {
    background: #e3f2fd;
    border-color: #bbdefb;
    color: #1565c0;
}

.holiday-widget.market-holiday:hover {
    background: #bbdefb;
}

.holiday-widget.both-holiday {
    background: #fce4ec;
    border-color: #f8bbd0;
    color: #c2185b;
}

.holiday-widget.both-holiday:hover {
    background: #f8bbd0;
}

.holiday-widget.weekend {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #666;
}

.holiday-widget.weekend:hover {
    background: #ececec;
}

.holiday-icon {
    font-size: 14px;
    display: flex;
    align-items: center;
}

.holiday-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 16px;
    min-width: 280px;
    max-width: 320px;
    display: none;
    z-index: 10000;
}

@media (max-width: 768px) {
    .holiday-dropdown {
        right: -10px;
        min-width: 250px;
    }
}

.holiday-dropdown.active {
    display: block;
}

.holiday-dropdown-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.upcoming-holiday {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.upcoming-holiday:last-child {
    border-bottom: none;
}

.upcoming-holiday-date {
    font-size: 12px;
    color: #666;
}

.upcoming-holiday-name {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    margin-top: 2px;
}

.upcoming-holiday-tags {
    margin-top: 4px;
    display: flex;
    gap: 6px;
}

.holiday-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f5f5f5;
    color: #666;
}

.holiday-tag.bank {
    background: #fff3e0;
    color: #e65100;
}

.holiday-tag.market {
    background: #e3f2fd;
    color: #1976d2;
}

@media (max-width: 768px) {
    .holiday-widget {
        font-size: 11px;
        padding: 4px 10px;
        gap: 6px;
    }
    .holiday-icon {
        font-size: 12px;
    }
}

/* Main Navigation */
.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    gap: 32px;
    overflow-x: auto;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    position: sticky;
    top: 73px;
    z-index: 99;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #E53935;
    border-bottom-color: #E53935;
}

/* Category Header */
.category-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 32px 24px 0;
}

.category-header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.category-title {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: capitalize;
}

.subcategory-nav {
    display: flex;
    gap: 28px;
    overflow-x: auto;
}

.subcategory-nav a {
    padding: 12px 0;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
}

.subcategory-nav a.active {
    color: #000;
    border-bottom-color: #000;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
}

/* Content Area */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Layout Pattern 1: 3-Column Small Cards */
.layout-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.card-small {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-small-image {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 4px;
}

.card-small-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card-small:hover .card-small-image img {
    transform: scale(1.05);
}

.card-small h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    flex-grow: 1;
    margin-bottom: 8px;
}

.card-small h3 a {
    color: #000;
    text-decoration: none;
}

.card-small h3 a:hover {
    color: #0066cc;
}

.card-credit {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Layout Pattern 2: Featured Large Card */
.layout-featured {
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.card-featured {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 32px;
    cursor: pointer;
}

.card-featured-image {
    width: 100%;
    height: 280px;
    background: #f5f5f5;
    overflow: hidden;
    border-radius: 4px;
}

.card-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card-featured:hover .card-featured-image img,
.layout-featured:hover .card-featured-image img {
    transform: scale(1.05);
}

.card-featured-content h2 {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 16px;
}

.card-featured-content h2 a {
    color: #000;
    text-decoration: none;
}

.card-featured-content h2 a:hover {
    color: #0066cc;
}

/* Layout Pattern 3: Section with 4-Column Cards */
.section-header {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
}

.layout-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.card-medium {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-medium-image {
    width: 100%;
    height: 160px;
    background: #f5f5f5;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 4px;
}

.card-medium-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card-medium:hover .card-medium-image img {
    transform: scale(1.05);
}

.card-medium h4 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    flex-grow: 1;
    margin-bottom: 8px;
}

.card-medium h4 a {
    color: #000;
    text-decoration: none;
}

.card-medium h4 a:hover {
    color: #0066cc;
}

/* Trending Section (10 cards per row, responsive) */
.trending-section {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 2px solid #e0e0e0;
}

.trending-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-icon {
    color: #E53935;
    font-size: 20px;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
}

.trending-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border: 1px solid #f0f0f0;
}

.trending-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #e0e0e0;
}

.trending-card-image {
    width: 100%;
    height: 80px;
    background: #f5f5f5;
    overflow: hidden;
}

.trending-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.trending-card:hover .trending-card-image img {
    transform: scale(1.05);
}

.trending-card-content {
    padding: 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.trending-card-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.trending-card-source {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: auto;
    padding-top: 4px;
}

.trending-card-source .source-favicon {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    object-fit: contain;
}

/* Responsive trending grid */
@media (max-width: 1400px) {
    .trending-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 1200px) {
    .trending-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1024px) {
    .trending-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .trending-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Feed Ad Container - Only visible when ad loads */
.feed-ad-container {
    margin: 32px 0;
    padding: 20px 0;
    text-align: center;
    min-height: 0;
}

.feed-ad-container:empty,
.feed-ad-container .adsbygoogle:empty {
    display: none;
    margin: 0;
    padding: 0;
}

.feed-ad-container .adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

/* Hide parent container if ad doesn't load */
.feed-ad-container:has(.adsbygoogle[data-ad-status="unfilled"]) {
    display: none;
}

/* Category Section (Grouped Layout for Home Page) */
.category-section {
    margin-bottom: 24px;
}

.category-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
}

.category-section-title {
    font-size: 22px;
    font-weight: 600;
    text-transform: capitalize;
}

.category-count {
    font-size: 14px;
    color: #999;
    font-weight: 400;
}

.category-more-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.category-more-button:hover {
    color: #000;
    transform: translateX(2px);
}

.view-all-container {
    text-align: center;
    padding-top: 20px;
}

.view-all-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.view-all-button:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Compact Card (UPSC-style for grouped layout) */
.compact-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.compact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.compact-card.has-ai-summary .ai-summary-badge {
    display: block;
}

.ai-summary-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(26, 115, 232, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
    display: none;
}

.compact-card-image {
    width: 100%;
    height: 140px;
    background: #f5f5f5;
    overflow: hidden;
}

.compact-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.compact-card:hover .compact-card-image img {
    transform: scale(1.05);
}

.compact-card-content {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.compact-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-card-summary {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: auto;
}

.compact-card-source {
    color: #1a73e8;
    font-weight: 500;
}

.compact-card-time {
    color: #999;
}

/* Layout Pattern 4: 2-Column Large Cards */
.layout-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.card-large {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-large-image {
    width: 100%;
    height: 240px;
    background: #f5f5f5;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 4px;
}

.card-large-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card-large:hover .card-large-image img {
    transform: scale(1.05);
}

.card-large h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}

.card-large h3 a {
    color: #000;
    text-decoration: none;
}

.card-large h3 a:hover {
    color: #0066cc;
}

.card-large-summary {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 8px;
}

/* Layout Pattern 5: List View (More News Section) */
.layout-list {
    padding-bottom: 32px;
    border-bottom: 1px solid #e0e0e0;
}

.list-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
}

.card-list {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.card-list:last-child {
    border-bottom: none;
}

.card-list-content {
    flex: 1;
}

.card-list-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.card-list h5 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.card-list h5 a {
    color: #000;
    text-decoration: none;
}

.card-list h5 a:hover {
    color: #0066cc;
}

.card-list-image {
    width: 120px;
    min-width: 120px;
    height: 80px;
    background: #f5f5f5;
    overflow: hidden;
    border-radius: 4px;
}

.card-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 150px;
    height: fit-content;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-ad {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
    border-radius: 4px;
    min-height: 0;
}

/* Hide sidebar ad container when ad doesn't load */
.sidebar-ad:empty,
.sidebar-ad .adsbygoogle:empty {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
}

.sidebar-ad .adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

/* Hide parent container if ad doesn't load */
.sidebar-ad:has(.adsbygoogle[data-ad-status="unfilled"]) {
    display: none;
}

.sidebar-ad-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Metadata */
.article-meta {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

.article-meta-flex {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

/* Share Button */
.share-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: auto;
    outline: none;
    transition: background 0.2s;
}

.share-btn:hover {
    background: #f0f0f0;
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: #666;
}

.share-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 8px;
    min-width: 160px;
    z-index: 1000;
    display: none;
}

.share-menu.active {
    display: block;
}

.share-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
    text-decoration: none;
}

.share-menu-item:hover {
    background: #f5f5f5;
}

.share-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Footer */
.footer {
    background: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    padding: 48px 24px 24px;
    margin-top: 64px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    color: #000;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #000;
}

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.footer-bottom p {
    margin: 8px 0;
}

.footer-legal {
    font-size: 12px;
    color: #999;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .layout-3col,
    .layout-4col {
        grid-template-columns: repeat(2, 1fr);
    }

    .layout-featured {
        grid-template-columns: 1fr;
    }

    .card-featured {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    /* Header - Mobile Optimization */
    .header {
        padding: 12px 16px;
    }

    .header-content {
        gap: 12px;
        flex-wrap: wrap;
    }

    .logo-svg {
        height: 32px;
    }

    /* Hide holiday widget on very small screens */
    .holiday-widget {
        display: none;
    }

    /* Search - Full width on mobile */
    .search-container {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .search-form {
        padding: 6px 12px 6px 16px;
    }

    .search-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Main Navigation - Horizontal scroll */
    .main-nav {
        padding: 12px 16px;
        gap: 24px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }

    .main-nav::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

    .main-nav a {
        font-size: 15px;
    }

    /* Category Header */
    .category-header {
        padding: 24px 16px 0;
    }

    .category-title {
        font-size: 28px;
        margin-bottom: 16px;
    }

    /* Main Container */
    .main-container {
        padding: 20px 16px;
        gap: 24px;
    }

    /* Mobile Grid - YouTube-style smaller cards showing more content */
    .layout-3col,
    .layout-4col,
    .layout-2col {
        grid-template-columns: repeat(2, 1fr); /* 2 columns instead of 1 */
        gap: 12px; /* Tighter gap for more content */
    }

    /* Compact cards optimized for smaller mobile grid */
    .compact-card-image {
        height: 100px; /* Smaller image height */
    }

    .compact-card-content {
        padding: 10px; /* Reduced padding */
    }

    .compact-card-title {
        font-size: 13px; /* Smaller title */
        line-height: 1.3;
        -webkit-line-clamp: 2; /* Max 2 lines */
    }

    .compact-card-summary {
        font-size: 12px; /* Smaller summary */
        -webkit-line-clamp: 1; /* Only 1 line for summary */
        margin-bottom: 8px;
    }

    .compact-card-meta {
        font-size: 10px; /* Smaller meta text */
    }

    /* Featured Card - Stack on mobile */
    .card-featured {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-featured-image {
        height: 200px;
    }

    .card-featured-content h2 {
        font-size: 22px;
        margin-bottom: 12px;
    }

    /* Small Cards - Adjust image size */
    .card-small-image {
        height: 180px;
    }

    .card-small h3 {
        font-size: 16px;
    }

    /* Medium Cards */
    .card-medium-image {
        height: 180px;
    }

    .card-medium h4 {
        font-size: 15px;
    }

    /* Large Cards */
    .card-large-image {
        height: 200px;
    }

    .card-large h3 {
        font-size: 20px;
    }

    .card-large-summary {
        font-size: 15px;
    }

    /* List Cards */
    .card-list {
        gap: 12px;
    }

    .card-list-image {
        width: 100px;
        min-width: 100px;
        height: 75px;
    }

    .card-list h5 {
        font-size: 15px;
    }

    /* Topic Columns */
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .topics-header {
        font-size: 24px;
    }

    .topic-column {
        padding: 16px;
    }

    .topic-column-header {
        font-size: 18px;
    }

    /* Sources Section */
    .sources-section {
        padding: 32px 0 48px;
        margin-top: 32px;
    }

    .sources-header h2 {
        font-size: 22px;
    }

    /* Footer */
    .footer {
        padding: 32px 16px 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Sidebar - Hide on mobile or show at bottom */
    .sidebar {
        display: none;
    }
}

@media (max-width: 640px) {
    .layout-3col,
    .layout-4col,
    .layout-2col {
        grid-template-columns: 1fr;
    }

    .category-title {
        font-size: 24px;
    }

    .card-featured-content h2 {
        font-size: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Even smaller text on very small screens */
    .card-small h3 {
        font-size: 15px;
    }

    .card-medium h4 {
        font-size: 14px;
    }

    .card-large h3 {
        font-size: 18px;
    }
}

/* iPhone SE and smaller - Extra compact */
@media (max-width: 375px) {
    .header {
        padding: 10px 12px;
    }

    .logo-svg {
        height: 28px;
    }

    .main-nav {
        padding: 10px 12px;
        gap: 20px;
    }

    .category-title {
        font-size: 22px;
    }

    .card-featured-content h2 {
        font-size: 18px;
    }

    .main-container {
        padding: 16px 12px;
    }
}

/* Location Permission Banner */
.location-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 16px;
    max-width: 400px;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.location-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.location-banner-content svg {
    color: #1976d2;
    flex-shrink: 0;
    margin-top: 2px;
}

.location-banner-text {
    flex: 1;
}

.location-banner-text strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
    color: #000;
}

.location-banner-text p {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.location-banner-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.location-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.location-btn-allow {
    background: #1976d2;
    color: #fff;
}

.location-btn-allow:hover {
    background: #1565c0;
}

.location-btn-dismiss {
    background: #f5f5f5;
    color: #666;
}

.location-btn-dismiss:hover {
    background: #e0e0e0;
}

@media (max-width: 768px) {
    .location-banner {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: none;
        border-radius: 0;
        border-bottom: none;
        border-left: none;
        border-right: none;
    }
}

/* Layout Pattern: Topic Columns (Google News Style) */
.layout-topics {
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
}

.topics-header {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.topics-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.topic-column {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.topic-column-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* TEMPORARY: Bihar Election Column Styling (until Nov 20, 2025) */
.bihar-election-column {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    position: relative;
    overflow: hidden;
}

.bihar-election-column::before {
    content: '🗳️';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 48px;
    opacity: 0.1;
}

.bihar-election-column .topic-column-header {
    color: #e65100;
    border-bottom-color: #ff9800;
    font-size: 18px;
}

.bihar-election-column .topic-icon {
    font-size: 22px;
}

.topic-column-icon {
    font-size: 24px;
}

.topic-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.topic-card:last-child {
    margin-bottom: 0;
}

.topic-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.topic-card-source {
    font-size: 12px;
    font-weight: 600;
    color: #0066cc;
}

.topic-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

.topic-card-title a {
    color: #000;
    text-decoration: none;
}

.topic-card-title a:hover {
    color: #0066cc;
}

.topic-card-image {
    width: 100%;
    height: 140px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.topic-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.topic-card:hover .topic-card-image img {
    transform: scale(1.05);
}

.topic-card-time {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 1024px) {
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .topics-grid {
        grid-template-columns: 1fr;
    }
}

.topic-icon {
    font-size: 20px;
    filter: grayscale(20%);
}

/* Sources Section (Google News Style) */
.sources-section {
    padding: 48px 0 64px;
    margin-top: 48px;
    border-top: 2px solid #e0e0e0;
}

.sources-header {
    margin-bottom: 32px;
}

.sources-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #000;
}

.sources-header p {
    font-size: 14px;
    color: #666;
}

.sources-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.source-showcase-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.source-showcase-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.source-showcase-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.source-favicon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}

.source-logo-name {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    flex: 1;
}

.source-showcase-label {
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    display: inline-block;
    width: fit-content;
}

.source-stories {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.source-story-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.source-story-item:hover {
    background: #f8f9fa;
}

.source-story-content {
    flex: 1;
}

.source-story-category {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.source-story-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.source-story-image {
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.source-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.source-showcase-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.source-showcase-time {
    font-size: 12px;
    color: #999;
}

@media (max-width: 1024px) {
    .sources-carousel {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .sources-carousel {
        grid-template-columns: 1fr;
    }

    .sources-header h2 {
        font-size: 24px;
    }
}

/* Article Preview Modal - Redesigned */
.article-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-preview-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.article-preview-modal {
    background: #fff;
    border-radius: 1.25rem;
    max-width: 28vw;
    min-width: 320px;
    width: 92%;
    height: 70vh; /* Fixed height - don't resize when ad fails to load */
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 0, 0, 0.1);
    transform: translateY(30px) scale(0.92);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.article-preview-overlay.active .article-preview-modal {
    transform: translateY(0) scale(1);
}

.article-preview-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-preview-close:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg) scale(1.05);
}

.article-preview-close svg {
    width: 1rem;
    height: 1rem;
    stroke: #fff;
    stroke-width: 2.5;
}

.article-preview-hero {
    width: 100%;
    height: 30vh;
    max-height: 180px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 1.25rem 1.25rem 0 0;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.article-preview-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%; /* Smart positioning - slightly above center for better face crops */
    transition: object-position 0.3s ease;
}

/* For portrait images (taller than wide), center vertically */
.article-preview-hero img[data-orientation="portrait"] {
    object-position: center center;
}

/* For landscape images (wider than tall), focus on upper portion for faces */
.article-preview-hero img[data-orientation="landscape"] {
    object-position: center 35%;
}

/* For square-ish images */
.article-preview-hero img[data-orientation="square"] {
    object-position: center 40%;
}

/* Placeholder for articles without images */
.article-preview-hero-placeholder {
    background: #f5f5f5; /* Light gray background */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.placeholder-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 8px;
}

.placeholder-text {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    text-align: center;
    padding: 0 20px;
}

/* Gradient overlay for seamless blend (only for images, not placeholder) */
.article-preview-hero:not(.article-preview-hero-placeholder)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px; /* Increased for smoother gradient */
    background: linear-gradient(to bottom,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.2) 25%,
        rgba(255,255,255,0.6) 60%,
        rgba(255,255,255,0.9) 85%,
        rgba(255,255,255,1) 100%
    );
    pointer-events: none;
}

.article-preview-content {
    padding: 1rem 1.25rem;
    margin-top: -1rem;
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* No negative margin for placeholder */
.article-preview-hero-placeholder + .article-preview-content {
    margin-top: 0;
    padding-top: 16px;
}

/* Hide scrollbar but keep functionality */
.article-preview-content::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.article-preview-content {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.article-preview-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.625rem;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.article-preview-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: #666;
    flex-wrap: wrap;
}

.article-preview-publisher {
    font-weight: 500;
    color: #1a73e8;
}

.article-preview-time {
    color: #888;
    font-size: 0.7rem;
}

.article-preview-share {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.article-preview-share:hover {
    background: #f5f5f5;
}

.article-preview-share svg {
    width: 1.125rem;
    height: 1.125rem;
    stroke: #666;
}

.article-preview-read-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.article-preview-section {
    margin-bottom: 12px;
}

.article-preview-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-preview-section-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.7;
    color: #1a73e8;
}

.article-preview-ai-summary {
    color: #333;
    line-height: 1.6;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    font-weight: 400;
}


.article-preview-rss-content {
    color: #444;
    line-height: 1.6;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.article-preview-rss-content p {
    margin-bottom: 0.75rem;
}

.article-preview-tags {
    font-size: 0.625rem;
    color: #bbb;
    line-height: 1.6;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

.article-preview-actions {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-preview-source-link {
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 400;
    transition: color 0.2s ease;
    display: inline-block;
}

.article-preview-source-link:hover {
    color: #1557b0;
    text-decoration: underline;
}

/* AdSense Ad Slot - Only visible when ad loads */
.article-preview-ad-slot {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    min-height: 0;
}

.article-preview-ad-slot:empty,
.article-preview-ad-slot .adsbygoogle:empty {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
}

.article-preview-ad-slot .adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

/* Mobile Responsive - Full screen modal (leaving top menu visible) */
@media (max-width: 768px) {
    .article-preview-overlay {
        padding: 0; /* No padding for full-screen effect */
        align-items: flex-end; /* Align to bottom */
    }

    .article-preview-modal {
        max-width: 100vw;
        height: calc(100vh - 73px); /* Full height minus header (73px) */
        max-height: calc(100vh - 73px);
        width: 100%;
        border-radius: 16px 16px 0 0; /* Rounded top corners only */
        margin-top: 73px; /* Space for header */
    }

    .article-preview-hero {
        height: 200px; /* Fixed height for mobile */
        max-height: 200px;
        border-radius: 16px 16px 0 0;
    }

    .article-preview-close {
        top: 0.875rem;
        right: 0.875rem;
        width: 2.5rem;
        height: 2.5rem;
        background: rgba(0, 0, 0, 0.8); /* Darker for better visibility */
    }

    .article-preview-close svg {
        width: 1rem;
        height: 1rem;
    }

    .article-preview-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
        font-weight: 700;
    }

    .article-preview-content {
        padding: 1rem 1.25rem;
    }

    .article-preview-meta {
        font-size: 0.75rem;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .article-preview-share svg {
        width: 1.125rem;
        height: 1.125rem;
    }

    .article-preview-ai-summary {
        font-size: 0.875rem;
        margin-bottom: 1rem;
        line-height: 1.6;
    }

    .article-preview-tags {
        font-size: 0.625rem;
        margin-bottom: 1rem;
    }

    .article-preview-source-link {
        font-size: 0.8rem;
    }

    /* Enable smooth scrolling on mobile */
    .article-preview-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* Landscape phones and small tablets - 3 column grid */
@media (min-width: 640px) and (max-width: 768px) {
    .layout-3col,
    .layout-4col,
    .layout-2col {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on larger phones */
        gap: 14px;
    }
}

/* Personalization Toggle Button */
.personalize-toggle {
    background: none;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding: 0;
    margin-left: 12px;
}

.personalize-toggle:hover {
    border-color: #007bff;
    background: #f0f7ff;
}

.personalize-toggle.active {
    background: #007bff;
    border-color: #007bff;
}

.personalize-toggle svg {
    width: 20px;
    height: 20px;
    stroke: #666;
    transition: all 0.3s ease;
}

.personalize-toggle.active svg {
    stroke: #fff;
}

.personalize-toggle .icon-on {
    display: none;
}

.personalize-toggle.active .icon-off {
    display: none;
}

.personalize-toggle.active .icon-on {
    display: block;
}

/* Personalization Toast Notification */
.personalization-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.personalization-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .personalize-toggle {
        width: 38px;
        height: 38px;
        margin-left: 8px;
    }

    .personalize-toggle svg {
        width: 18px;
        height: 18px;
    }

    .personalization-toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
        font-size: 13px;
        padding: 14px 18px;
    }
}

/* PWA Install Banner */
.install-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 73px;
    z-index: 98;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

/* Hide install banner on desktop */
@media (min-width: 1024px) {
    .install-banner {
        display: none !important;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.install-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.install-banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.install-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.install-banner-text strong {
    font-size: 16px;
    font-weight: 600;
}

.install-banner-text span {
    font-size: 13px;
    opacity: 0.9;
}

.install-banner-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.install-banner-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.install-banner-button:active {
    transform: translateY(0);
}

.install-banner-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.2s;
    flex-shrink: 0;
}

.install-banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .install-banner-content {
        padding: 12px 16px;
        gap: 12px;
    }

    .install-banner-icon {
        width: 40px;
        height: 40px;
    }

    .install-banner-text strong {
        font-size: 14px;
    }

    .install-banner-text span {
        font-size: 12px;
    }

    .install-banner-button {
        padding: 8px 16px;
        font-size: 13px;
    }

    .install-banner-close {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    .install-banner-text span {
        display: none;
    }

    .install-banner-button {
        padding: 8px 12px;
    }
}
