@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;600;700&family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #ffffff;
    --bg-alt: #f6f6f6;
    --text-main: #121212;
    --text-muted: #767676;
    --chinese-red: #8B0000; /* Milan Red (Deep Dark Red) */
    --chinese-gold: #FFB100; /* Orange Gold (Vibrant Golden Orange) */
    --accent-red: var(--chinese-red);
    --accent-gold: var(--chinese-gold);
    --accent-blue: var(--accent-red);
    --accent-orange: var(--accent-gold);
    --accent-white: #ffffff;
    --accent-primary: var(--accent-red);
    --accent-secondary: var(--accent-gold);
    --analyst-primary: #00d2ff;
    --border-color: #dcdcdc;
    --font-heading: 'Lora', serif;
    --font-body: 'Inter', Helvetica, Arial, sans-serif;
}




.header-logo {
    height: 75px;
    width: auto;
    margin-right: 15px;
    vertical-align: middle;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--accent-red);
}


body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
}

p {
    text-align: justify;
}


.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--accent-primary);
    padding: 10px 0 0 0;
    border-bottom: 4px solid var(--accent-orange);
}



.main-header .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Corrected: Align to start (left) */
}

.logo-container {
    padding: 20px 0;
    display: flex;
    justify-content: flex-start; /* Corrected: Aligns logo to left */
    align-items: center;
    width: 100%;
}

.logo {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    text-transform: uppercase;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-the {
    font-size: 0.9rem;
    letter-spacing: 3px;
    font-weight: 500;
    margin-bottom: -2px;
    color: var(--accent-orange);
}

.logo-main {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: #ffffff;
}

.logo-main span {
    color: var(--accent-orange);
}

.nav-links {
    display: flex;
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 12px 0;
    width: 100%;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-secondary);
}

.login-btn {
    margin-left: auto;
    color: var(--accent-secondary) !important;
}

/* Ticker Section */
.all-tickers-wrapper {
    width: 100%;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-gold);
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-gap: 20px;
    margin-top: 10px; /* Reduced since ticker is above */
    margin-bottom: 40px;
    border-top: 2px solid var(--accent-gold);
    padding-top: 20px;
    height: 800px; /* Base height for alignment */
}

/* Hero Section Alternate Layout */
.hero-section.hero-right {
    grid-template-columns: 1fr 2fr !important;
}
.hero-section.hero-right .lead-card {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 3 !important;
}
.hero-section.hero-right .sub-card:nth-child(2) {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
}
.hero-section.hero-right .sub-card:nth-child(3) {
    grid-column: 1 / 2 !important;
    grid-row: 2 / 3 !important;
}

/* Hero Slideshow */
.hero-slideshow {
    position: relative;
    height: 800px;
    margin-top: 10px;
    margin-bottom: 40px;
    border-top: 2px solid var(--accent-gold);
    border-bottom: 2px solid var(--accent-gold);
    
    /* Full-width break-out trick */
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.slideshow-slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease-in-out;
}

.slideshow-slide .card-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.slideshow-slide .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.slideshow-slide .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 40px;
    background: rgba(0, 0, 0, 0.7);
    border-top: 3px solid var(--accent-gold);
    color: #fff;
    z-index: 5;
}

.slideshow-slide .card-content h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(139, 0, 0, 0.7);
    color: #fff;
    border: 2px solid var(--accent-gold);
    width: 60px;
    height: 60px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 100;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slideshow-nav:hover {
    background: var(--accent-red);
    transform: translateY(-50%) scale(1.1);
}

.slideshow-nav.prev {
    left: 30px;
}

.slideshow-nav.next {
    right: 30px;
}

.slideshow-dots {
    text-align: center;
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    z-index: 100;
}

.slideshow-dots .dot {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin: 0 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.slideshow-dots .dot.active, .slideshow-dots .dot:hover {
    background: var(--accent-gold);
}

/* Stock Ticker - Premium Horizontal Widget */
.stock-ticker-container {
    width: 100%;
    background: linear-gradient(180deg, #0a0a0a 0%, #151515 100%);
    border-top: 1px solid rgba(255, 177, 0, 0.3);
    border-bottom: 1px solid rgba(255, 177, 0, 0.2);
    overflow: hidden;
    z-index: 100;
    margin-top: 0; 
    box-shadow: none; /* Removed heavy shadow */
    position: relative;
}

/* Edge Fade Overlays */
.stock-ticker-container::before,
.stock-ticker-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 50;
    pointer-events: none;
}

.stock-ticker-container::before {
    left: 130px; /* Offset for labels */
    background: linear-gradient(to right, #0a0a0a, transparent);
}

.stock-ticker-container::after {
    right: 0;
    background: linear-gradient(to left, #151515, transparent);
}

.ticker-row {
    display: flex;
    white-space: nowrap;
    padding: 0;
    border-bottom: none; /* Removed dark line */
    position: relative;
    height: 45px;
    align-items: center;
}

.ticker-row:last-child {
    border-bottom: none;
}

.ticker-label {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(139, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 0 20px;
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 0.7rem;
    z-index: 60;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: none; /* Removed heavy shadow */
    min-width: 130px;
    justify-content: flex-start;
    border-right: 2px solid var(--accent-gold);
}

.ticker-label::after {
    content: "";
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    margin-left: 10px;
    box-shadow: 0 0 10px #2ecc71;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.ticker-content {
    display: flex;
    animation: ticker-scroll 80s linear infinite;
    padding-left: 150px;
}

.ticker-row:nth-child(2) .ticker-content {
    animation-duration: 95s;
    animation-direction: reverse;
}

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

.stock-item {
    display: flex;
    align-items: center;
    margin-right: 60px;
    font-family: 'Inter', sans-serif;
    padding: 6px 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: background 0.3s;
}

.stock-item:hover {
    background: rgba(255,255,255,0.08);
}

.stock-symbol {
    font-weight: 800;
    margin-right: 12px;
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.stock-name {
    font-size: 0.65rem;
    color: var(--accent-gold);
    margin-right: 15px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.8;
}

.stock-price {
    font-weight: 700;
    margin-right: 12px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.stock-change {
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
}

.stock-change.up { background: rgba(46, 204, 113, 0.1); color: #2ecc71; }
.stock-change.down { background: rgba(231, 76, 60, 0.1); color: #e74c3c; }

.stock-change.up::before { content: '+'; margin-right: 1px; }
.stock-change.down::before { content: ''; margin-right: 1px; }

@media screen and (max-width: 900px) {
    .hero-section { height: auto; grid-template-rows: auto; }
}



.hero-card {
    background: #000;
    text-decoration: none;
    color: #ffffff;
    display: block;
    overflow: hidden;
    position: relative;
    height: 100%;
    transition: transform 0.3s;
}

.hero-card:hover {
    transform: scale(0.98);
}

.hero-card .card-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s;
}

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




.lead-card {
    grid-row: span 2;
}

.lead-card .lead-card {
    grid-row: span 2;
}

.sub-card {
    display: block;
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--accent-primary);
    z-index: 5;
    height: 35%;
    box-sizing: border-box;
    border-top: 3px solid var(--accent-gold);
}

.sub-card .card-content {
    padding: 12px 20px;
}




.category-tag {
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: capitalize;
    display: block;
    margin-bottom: 5px;
}

.card-content h2 {
    font-family: 'Poppins', sans-serif;
    margin: 0 0 5px 0;
    font-size: 1.8rem;
    font-weight: 600; /* Lighter weight Poppins */
    line-height: 1.1;
    color: #ffffff;
    text-transform: uppercase;
}

.sub-card .card-content h2 {
    font-size: 1.05rem;
}

.card-content p {
    font-family: var(--font-body);
    color: var(--accent-gold); /* Gold excerpt text */
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
}

.sub-card .card-content p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
    margin-top: 5px;
}


/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 30px;
    margin-bottom: 60px;
}

.category-column {
    border-top: 2px solid var(--accent-secondary);
    padding-top: 10px;
}

.spotlight-section {
    grid-column: 1 / -1;
    background: #121212;
    padding: 60px 0;
    margin: 40px 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    color: #fff;
}

.spotlight-section::before {
    content: "SPOTLIGHT";
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.03);
    letter-spacing: 20px;
    line-height: 1;
    pointer-events: none;
}

.spotlight-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-secondary);
    margin: 0 0 40px 0;
    text-transform: uppercase;
    border-bottom: 5px solid var(--accent-secondary);
    display: inline-block;
    position: relative;
    z-index: 10;
}

.spotlight-slideshow {
    position: relative;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.spotlight-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    z-index: 1;
}

.spotlight-gallery {
    display: flex;
    flex-direction: row;
    width: 100%;
    transition: transform 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.spotlight-wrapper {
    position: relative;
    flex: 0 0 100vw;
    width: 100vw;
}

.spotlight-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(139, 0, 0, 0.7); /* Milan Red with transparency */
    color: #fff;
    border: 2px solid var(--accent-gold);
    width: 70px;
    height: 70px;
    font-size: 2.2rem;
    cursor: pointer;
    z-index: 100;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.spotlight-nav:hover {
    background: var(--accent-red);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 25px rgba(0,0,0,0.7);
}

.spotlight-prev {
    left: 40px;
}

.spotlight-next {
    right: 40px;
}

@media screen and (max-width: 1000px) {
    .spotlight-nav {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    .spotlight-prev { left: 15px; }
    .spotlight-next { right: 15px; }
}

.spotlight-banner {
    display: block;
    position: relative;
    width: 100%;
    height: 80vh; /* Taller height for full-page feel */
    min-height: 500px;
    max-height: 900px;
    overflow: hidden;
    text-decoration: none;
}

.spotlight-banner-img-container {
    width: 100%;
    height: 100%;
}

.spotlight-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.spotlight-banner:hover .spotlight-banner-img {
    transform: scale(1.08);
}

.spotlight-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 150px 0 0 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.spotlight-banner-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.1;
    width: 100%;
    background: var(--accent-red);
    padding: 30px 0;
    border-left: 20px solid var(--accent-gold);
    text-transform: uppercase;
    box-sizing: border-box;
    display: block;
}

/* Ensure the text inside the full-width title aligns with the site container */
.spotlight-banner-title {
    padding-left: calc((100vw - 1260px) / 2 + 20px); 
    padding-right: 5%;
}

@media screen and (max-width: 1340px) {
    .spotlight-banner-title {
        padding-left: 40px;
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 900px) {
    .spotlight-banner-title {
        font-size: 1.8rem;
        padding-left: 20px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .spotlight-banner {
        height: 60vh;
    }
}

.spotlight-admin-tools {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.admin-link {
    background: rgba(139, 0, 0, 0.9);
    color: #fff;
    padding: 8px 15px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s;
}

.admin-link:hover {
    background: #ef4444;
}

.admin-link.delete {
    background: rgba(0, 0, 0, 0.7);
}

@media screen and (max-width: 900px) {
    .spotlight-banner-title {
        font-size: 2rem;
    }
    .spotlight-banner {
        height: 40vh;
    }
}

.category-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 0 0 15px 0;
    text-transform: capitalize;
    transition: color 0.2s;
}

.category-column a:hover .category-title {
    color: var(--accent-gold);
}


.list-card {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    text-decoration: none;
    color: var(--text-main);
}

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

.list-card:hover h4 {
    color: var(--accent-gold);
}

.list-img {
    width: 120px;
    height: 80px;
    margin-right: 15px;
    flex-shrink: 0;
}

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

.list-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.list-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--accent-red);
    transition: color 0.2s;
}

.list-content .date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* Large List Variant (Category Page) */
.large-list .list-img {
    width: 300px;
    height: 180px;
}

.large-list .list-content h4 {
    font-size: 1.6rem;
}

/* Article Page */
.article-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
}
.article-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.article-header {
    margin-bottom: 20px;
}

.article-title {
    font-family: 'Poppins', sans-serif;
    color: var(--accent-red);
    font-size: 2.5rem;
    line-height: 1.15;
    margin-bottom: 15px;
    font-weight: 800;
}


.article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--accent-gold);
    border-bottom: 1px solid var(--accent-gold);
    padding: 10px 0;
    margin-bottom: 20px;
    font-family: var(--font-body);
}

.article-image {
    width: 100%;
    height: auto;
    margin-bottom: 25px;
    display: block;
}

.article-content {
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.15rem;
    color: var(--text-main);
    font-family: var(--font-body);
}

.article-content h2 {
    font-family: 'Poppins', sans-serif;
    color: var(--accent-blue);
    margin-top: 40px;
    border-bottom: 2px solid var(--accent-orange);
    padding-bottom: 10px;
    font-weight: 700;
}

footer {
    background: var(--accent-primary);
    padding: 60px 0;
    font-family: var(--font-body);
    color: #ffffff;
    margin-top: 60px;
    text-align: center;
    border-top: 4px solid var(--accent-orange);
}


.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.footer-logo {
    height: 30px;
    width: auto;
}

footer p {
    margin: 0;
    opacity: 0.8;
}

/* Forms & Admin Dashboard common styles */
.admin-container {
    max-width: 800px;
    margin: 40px auto;
    background: var(--bg-alt);
    padding: 30px;
    border: 2px solid var(--accent-red);
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-main);
}
.form-control {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-body);
}

.btn {
    padding: 10px 20px;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    font-family: var(--font-body);
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.btn:hover {
    background: #6B0000;
}

a {
    color: var(--accent-red);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-gold);
}


/* Paragraph Reset */
.article-content { line-height: 1.5; }
.article-content p { margin: 0 0 0.6rem 0 !important; padding: 0 !important; }


/* Mobile Responsiveness */
@media screen and (max-width: 900px) {
    .logo {
        font-size: 1.9rem;
    }

    .header-logo {
        height: 50px;
        margin-right: 12px;
    }
    
    .hero-section {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        padding-top: 0;
        border-top: none;
    }

    .hero-card {
        display: flex;
        flex-direction: column;
        height: auto;
        margin-bottom: 25px;
        background: var(--bg-alt);
        position: static;
    }

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

    .hero-card .card-image {
        position: static;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .hero-card .card-content {
        position: static;
        height: auto;
        background: var(--bg-alt);
        padding: 20px;
        border-top: 4px solid var(--accent-primary);
        color: var(--text-main);
    }

    .hero-card h2 {
        color: var(--accent-primary);
        font-size: 1.5rem;
        margin: 10px 0;
    }

    .hero-card p {
        color: var(--text-muted);
        font-size: 1rem;
        margin: 0;
    }

    .hero-card .category-tag {
        color: var(--accent-secondary);
        position: static;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .toolkit-grid {
        grid-template-columns: 1fr;
    }

    .article-title {
        font-size: 2rem;
    }

    /* Floating Hamburger Menu Logic */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 60px;
        height: 60px;
        background: var(--accent-orange);
        border-radius: 50%;
        position: fixed;
        bottom: 30px;
        right: 30px;
        z-index: 2000;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        cursor: pointer;
        transition: transform 0.2s;
    }

    .menu-toggle:active {
        transform: scale(0.9);
    }

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: #fff;
        margin: 3px 0;
        transition: 0.3s;
    }

    .nav-links {
        display: none; /* Hidden by default */
        flex-direction: column;
        width: 100%;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        background: rgba(86, 0, 0, 0.98); /* Deep Milan Red */
        padding: 80px 20px;
        z-index: 1500;
        box-shadow: none;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        width: 100%;
        box-sizing: border-box;
    }

    .nav-links form {
        padding: 15px 20px;
        width: 100%;
        box-sizing: border-box;
        margin: 0 !important;
    }

    .nav-links form input {
        width: 100% !important;
    }

    .login-btn {
        margin-left: 0;
        border-bottom: none !important;
    }
    
    .main-header .container {
        position: relative;
    }

    /* List Card Mobile Logic */
    .list-card.large-list {
        flex-direction: column;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .large-list .list-img {
        width: 100% !important;
        height: auto !important;
        min-height: 200px; /* helpful for visuals */
        margin-right: 0;
        margin-bottom: 15px;
    }

    .list-content {
        padding: 0 !important;
    }
}

@media screen and (min-width: 901px) {
    .menu-toggle {
        display: none;
    }
}

/* Dark mode rules */
body.dark-mode {
    --bg-color: #121212;
    --bg-alt: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
}
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    padding: 6px 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2100;
    transition: background 0.3s;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.1);
}
.main-header .container {
    position: relative;
}

/* Tech News Ticker */
.tech-news-ticker {
    width: 100%;
    background: linear-gradient(90deg, #1a1a1a, #2c3e50);
    overflow: hidden;
    height: 34px; /* Tighter height */
    display: flex;
    align-items: center;
    z-index: 90;
    box-shadow: none; /* Removed shadow */
    position: relative; /* Contain the absolute label */
}

.tech-news-ticker .ticker-label {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(139, 0, 0, 0.95); /* Match Milan Red */
    backdrop-filter: blur(10px);
    color: #fff;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 60;
    box-shadow: none; /* Removed shadow */
    white-space: nowrap;
    border-right: 2px solid var(--accent-gold); /* Match Gold Border */
    min-width: 130px;
}

.tech-news-ticker .ticker-label::after {
    content: "";
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    margin-left: 10px;
    box-shadow: 0 0 10px #2ecc71;
    animation: pulse-green 2s infinite;
}

.tech-news-ticker .ticker-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding-left: 120px; /* Offset for the label */
}

.tech-news-ticker .ticker-move {
    display: flex;
    white-space: nowrap;
    animation: tech-ticker-scroll 50s linear infinite;
}

.tech-news-ticker .ticker-move:hover {
    animation-play-state: paused;
}

@keyframes tech-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    padding: 0 40px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.ticker-item:hover {
    color: var(--accent-gold);
}

.ticker-source {
    background: rgba(255, 177, 0, 0.2);
    color: var(--accent-gold);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-right: 15px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 177, 0, 0.3);
}

/* Daily Tech News Refactor */
.media-review-section {
    background: var(--bg-main);
    padding: 0 0 20px 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    background: var(--accent-red);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    padding: 15px 0;
    margin-bottom: 30px;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 2px solid var(--accent-gold);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.media-grid {
    display: flex;
    flex-direction: column;
    gap: 0; /* Remove gap */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.source-row {
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    border: none; /* Let grid handle outer border */
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    height: 100px;
}

.source-row:last-child {
    border-bottom: none;
}

.dark-mode .source-row {
    background: rgba(255,255,255,0.02);
}

.source-label {
    width: 130px;
    min-width: 130px;
    height: 100%;
    background: var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    text-align: center;
    border-right: 2px solid var(--accent-gold); /* Match Ticker style */
    position: relative;
    z-index: 5;
    box-shadow: 5px 0 15px rgba(0,0,0,0.2);
}

.source-title-small {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.carousel-container-compact {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.source-stories-carousel {
    display: flex;
    gap: 0;
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.media-card {
    flex: 0 0 33.333%; /* Show exactly 3 stories */
    max-width: 33.333%;
    height: 100%;
    padding: 0 25px;
    display: flex;
    flex-direction: column; /* Stack title and date */
    justify-content: center;
    align-items: flex-start;
    border: none;
    border-right: 1px solid var(--border-color);
    background: transparent;
}

.media-card:last-child {
    border-right: none;
}

.media-card h4 {
    font-size: 1rem; /* Increased size */
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    font-weight: 600;
    width: 100%;
}

.media-card h4 a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.media-card h4 a:hover {
    color: var(--accent-gold);
}

.story-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Overlay Navigation */
.carousel-nav.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    background: rgba(0,0,0,0.2);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0; /* Hidden until hover */
}

.source-row:hover .carousel-nav.overlay {
    opacity: 1;
}

.carousel-nav.overlay:hover {
    background: rgba(139, 0, 0, 0.8);
}

.carousel-nav.prev { left: 0; }
.carousel-nav.next { right: 0; }

/* AI News Summary Drawer Refinement */
.ai-summary-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 50%; /* Half page width */
    height: 100vh;
    background: #ffffff; /* Solid White */
    border-left: 1px solid var(--accent-gold);
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: -15px 0 50px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: row;
}

.ai-summary-drawer.open {
    transform: translateX(0);
}

.ai-summary-tab {
    position: absolute;
    left: -42px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    background: var(--accent-red);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 30px 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 3001;
}

.ai-summary-tab span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 3px;
    white-space: nowrap;
}

.ai-summary-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.drawer-header {
    background: #f8f8f8;
    padding: 20px 40px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    text-transform: uppercase;
    font-weight: 800;
}

.ai-summary-content {
    flex: 1;
    padding: 40px 60px;
    overflow-y: auto;
    font-family: var(--font-body);
    line-height: 1.8;
    font-size: 1.1rem;
    color: #1a1a1a; /* Dark text on white */
}

.ai-summary-content h2.summary-title {
    color: var(--accent-red);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 30px;
    text-transform: uppercase;
    border-bottom: 3px solid var(--accent-red);
    padding-bottom: 10px;
    display: inline-block;
    width: auto;
}

.ai-summary-content p {
    margin-top: 0;
    margin-bottom: 8px;
}

.ai-summary-content strong {
    color: #000;
    font-weight: 700;
}

.card-meta .read-more {
    display: none; /* Keep it clean as flat text */
}

/* AI Summary Section */
.llm-button-container {
    text-align: center;
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.summary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 60px;
    background: var(--accent-red); /* More prevalent */
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.3);
}

.summary-btn:hover:not(:disabled) {
    transform: translateY(-5px);
    background: #a00000;
    box-shadow: 0 15px 35px rgba(139, 0, 0, 0.5);
    color: #fff;
}

.summary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #636e72; /* Grey default */
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.status-indicator.online {
    background: #2ecc71; /* Green */
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
    animation: pulse-green 2s infinite;
}

.ai-summary-wrapper {
    background: var(--bg-alt);
    border-radius: 16px;
    padding: 40px;
    margin: 40px 0;
    border: 1px solid var(--border-color);
    display: none; /* Hidden by default */
}

.dark-mode .ai-summary-wrapper {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.05);
}

.ai-summary-content {
    line-height: 1.8;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-main);
}

.ai-summary-content h2 {
    display: none; /* Hide any accidental headers */
}

/* Mobile Responsiveness for AI Drawer */
@media (max-width: 768px) {
    .ai-summary-drawer {
        width: 100%;
    }
    
    .ai-summary-content {
        padding: 30px 25px;
        font-size: 1rem;
    }
    
    .drawer-header {
        padding: 15px 20px;
    }
}
