/* 
  KenStack AI News - Pixel Perfect CSS
  Based on provided requirements
*/

:root {
    --primary-blue: #1d4ed8;
    --dark-blue: #0d2b75;
    --purple: #6c4cff;
    --yellow: #ffd633;
    --white: #ffffff;
    --gray-bg: #f5f7fb;
    --text-color: #222222;
    --nav-gradient-1: #111c72;
    --nav-gradient-2: #182f96;
    --hero-gradient-1: #0d2b75;
    --hero-gradient-2: #1239b6;
    --hero-gradient-3: #1b58db;
    --card-shadow: 0 12px 30px rgba(0,0,0,.08);
    --card-hover-shadow: 0 18px 40px rgba(0,0,0,.15);
    --radius-hero: 24px;
    --radius-card: 18px;
    --radius-btn: 50px;
    --radius-img: 16px;
    --transition: .35s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--gray-bg);
    color: var(--text-color);
    line-height: 1.5;
}

/* Container */
.main-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(to right, var(--nav-gradient-1), var(--nav-gradient-2));
    height: 70px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    color: var(--white);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: auto;
    height: 40px;
    background: transparent;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--white);
}

.logo-icon img {
    width: 100%;
    height: 35px;
    border-radius: 8px;
    filter: invert(1.2) hue-rotate(190deg) brightness(2.5);
}

.brand h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    font-family: sans-serif;
}

.brand h1 span {
    color: #f0d90b;
}

.brand p {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.nav-center ul {
    display: flex;
    gap: 5px;
    align-items: center;
}

.nav-center a {
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
}

.nav-center a:hover, .nav-center a.active {
    background-color: var(--purple);
    color: var(--white);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: transparent;
    color: var(--white);
    font-size: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.1);
}

.btn-subscribe {
    background-color: var(--purple);
    color: var(--white);
    padding: 10px 24px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 14px;
}

.btn-subscribe:hover {
    background-color: #5b3ce6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 76, 255, 0.3);
}

.profile-btn {
    background: rgba(255,255,255,0.15);
}

/* Grid Layouts */
.top-row {
    display: grid;
    grid-template-columns: 70% calc(30% - 20px);
    gap: 20px;
    margin-bottom: 20px;
}

.bottom-row {
    display: grid;
    grid-template-columns: 65% calc(35% - 20px);
    gap: 20px;
}

/* Hero Section */
.hero-card {
    height: 320px;
    border-radius: var(--radius-hero);
    position: relative;
    overflow: hidden;
    color: var(--white);
    box-shadow: var(--card-shadow);

    display: flex;
    align-items: center;
    padding: 0 50px;

    /* Gradient + Robot Background */
    background:
        linear-gradient(135deg,
            rgba(8, 32, 83, 0.95),
            rgba(10, 54, 150, 0.192),
            rgba(0, 110, 255, 0.034)
        ),
        url("../assets/images/background_img.png");

    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover, auto 115%;
}

/* Subtle background overlay (circuit pattern approximation) */
.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        radial-gradient(circle at center,
            rgba(255,255,255,.10) 1px,
            transparent 1px);

    background-size: 20px 20px;
    opacity: .45;
    z-index: 1;
}


.hero-content {
    position: relative;
    z-index: 2;
    max-width: 60%;
}

.hero-content h2 {
    font-size: 46px; /* slightly smaller than 54 to fit */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
}

.hero-content h2 span {
    color: var(--yellow);
}

.hero-content p {
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 25px;
}

.btn-yellow {
    background-color: var(--yellow);
    color: #000;
    padding: 12px 28px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-yellow:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 214, 51, 0.4);
}

.hero-image-container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    max-width: 50%;
}

.hero-robot {
    padding-right: 0;
    height: 120%;
    max-height: 380px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    margin-bottom: -20px;

    /* Left-side fade */
    -webkit-mask-image: linear-gradient(to right,
        transparent 0%,
        rgba(0,0,0,0.2) 10%,
        rgba(0,0,0,0.6) 20%,
        rgba(0,0,0,1) 35%,
        rgba(0,0,0,1) 100%);
    mask-image: linear-gradient(to right,
        transparent 0%,
        rgba(0,0,0,0.2) 10%,
        rgba(0,0,0,0.6) 20%,
        rgba(0,0,0,1) 35%,
        rgba(0,0,0,1) 100%);
}

/* Trending Panel */
.trending-panel {
    background-color: var(--nav-gradient-2);
    border-radius: var(--radius-card);
    padding: 24px;
    color: var(--white);
    box-shadow: var(--card-shadow);
    height: 320px;
    display: flex;
    flex-direction: column;
}

.trending-header {
    margin-bottom: 15px;
}

.trending-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    background-color: rgba(255,255,255,0.15);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 14px;
}

.trending-list{
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trending-list:hover{
    animation-play-state:paused;
}

.trending-wrapper{
    height: 420px;
    overflow: hidden;
    position: relative;
}


.trending-card{
    display:flex;
    align-items:center;
    gap:15px;
    padding:10px;
    border-radius:12px;
    background:rgba(255, 255, 255, 0.801);
    border:1px solid rgba(255,255,255,.1);
    transition:.4s;
}

.trending-list.move{
    transition: transform .8s ease;
}

.trending-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2), 0 0 15px rgba(29, 78, 216, 0.5); /* Blue glow */
    background:linear-gradient(135deg, #d1d1d1, #b8b8b8);
}

@keyframes scrollNews{
    0%{
        transform:translateY(0);
    }
    100%{
        transform:translateY(calc(-50%));
    }
}

.trending-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.trending-info h4 {
    color: black;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 5px;
}

.trending-info p {
    font-size: 12px;
    color: rgba(29, 29, 29, 0.6);
}

/* Latest News & Categories Common */
.latest-news-card, .categories-card, .ad-card {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    padding: 30px;
}

.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 250px;
    border: 2px dashed #cbd5e1;
}

.ad-content span {
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 15px;
}

.ad-content h3 {
    font-size: 20px;
    color: var(--dark-blue);
    margin-bottom: 10px;
}

.ad-content p {
    font-size: 14px;
    color: #475569;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-blue);
}

.purple-icon {
    color: var(--purple);
    font-size: 24px;
}

.yellow-icon {
    color: #eab308; /* slightly darker yellow for visibility on white */
    font-size: 24px;
}

.view-all {
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 600;
}

.view-all:hover {
    text-decoration: underline;
}

/* Latest News Grid */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.news-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
    cursor: pointer;
    padding: 15px;
    border-radius: 16px;
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.news-img {
    width: 100%;
    height: 180px;
    border-radius: var(--radius-img);
    object-fit: cover;
}

.news-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark-blue);
}

.news-content p {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #888;
}

.news-meta span:first-child {
    color: var(--primary-blue);
    font-weight: 500;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.category-pill {
    background-color: #f1f5f9;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.category-pill i {
    color: var(--primary-blue);
}

.category-pill:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: scale(1.03);
}

.category-pill:hover i {
    color: var(--white);
}

/* Responsive styles are in css/responsive.css */


/* --- NEW SECTIONS STYLES --- */

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--nav-gradient-1), var(--nav-gradient-2));
    border-radius: var(--radius-card);
    padding: 60px 40px;
    text-align: center;
    color: var(--white);
    margin-top: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}
.newsletter-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}
.newsletter-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}
.newsletter-section p {
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 30px;
}
.newsletter-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border-radius: var(--radius-btn);
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
}
.btn-subscribe-large {
    background-color: var(--yellow);
    color: #000;
    padding: 14px 30px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 15px;
}
.btn-subscribe-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 214, 51, 0.4);
}
.privacy-note {
    font-size: 12px !important;
    margin-bottom: 0 !important;
    color: rgba(255,255,255,0.6) !important;
}
.privacy-note a {
    color: var(--yellow);
    text-decoration: underline;
}
.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    z-index: 1;
}
.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
}
.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
}

#newsletter {
    scroll-margin-top: 90px; /* Adjust to your navbar height */
}

/* Events Timeline */
.events-section {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    padding: 40px;
    margin-top: 40px;
}
.timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    padding-left: 20px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e2e8f0;
}
.timeline-item {
    display: flex;
    gap: 30px;
    position: relative;
}
.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-blue);
    border: 3px solid #bfdbfe;
    z-index: 2;
}
.timeline-content {
    background: var(--gray-bg);
    border-radius: var(--radius-card);
    padding: 20px;
    display: flex;
    gap: 20px;
    width: 100%;
    transition: var(--transition);
}
.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
    background: var(--white);
}
.event-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
}
.event-details {
    flex: 1;
}
.event-details h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 10px;
}
.event-meta {
    display: flex;
    gap: 15px;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 15px;
}
.event-meta i {
    color: var(--primary-blue);
}
.event-details p {
    font-size: 14px;
    color: #475569;
    margin-bottom: 15px;
}
.btn-primary-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 8px 24px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 14px;
}
.btn-primary-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* FAQ Section */
.faq-section {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    padding: 40px;
    margin-top: 40px;
}
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    text-align: left;
    background: #f8fafc;
    padding: 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}
.faq-question:hover {
    background: #f1f5f9;
}
.faq-question i {
    transition: transform 0.3s ease;
}
.faq-item.active .faq-question i {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--white);
}
.faq-answer p {
    padding: 20px;
    color: #475569;
    font-size: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Contact Section */
.contact-section {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    padding: 40px;
    margin-top: 40px;
}
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
}
.contact-left h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 15px;
}
.contact-left p {
    color: #475569;
    margin-bottom: 30px;
    font-size: 15px;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}
.info-item i {
    font-size: 20px;
    color: var(--purple);
    background: #f1f5f9;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.info-item h5 {
    font-size: 16px;
    color: var(--dark-blue);
    margin-bottom: 5px;
}
.info-item span {
    font-size: 14px;
    color: #64748b;
}
.contact-socials {
    display: flex;
    gap: 15px;
}
.contact-socials a {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}
.contact-socials a:hover {
    background: var(--dark-blue);
    transform: translateY(-3px);
}
.contact-form {
    background: var(--gray-bg);
    padding: 30px;
    border-radius: 16px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-blue);
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-blue);
}
.btn-primary {
    background: linear-gradient(135deg, var(--nav-gradient-1), var(--primary-blue));
    color: var(--white);
    padding: 14px 30px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 15px;
    width: 100%;
}
.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.4);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--nav-gradient-1);
    color: rgba(255,255,255,0.8);
    padding: 60px 20px 20px;
    margin-top: 60px;
}
.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.footer-brand h2 {
    color: var(--white);
    font-size: 24px;
    font-weight: 800;
}
.footer-brand span {
    color: var(--yellow);
}
.footer-col p {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}
.footer-socials {
    display: flex;
    gap: 10px;
}
.footer-socials a {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}
.footer-socials a:hover {
    background: var(--yellow);
    color: #000;
}
.footer-col h4 {
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}
.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col ul a {
    font-size: 14px;
    transition: var(--transition);
}
.footer-col ul a:hover {
    color: var(--yellow);
    padding-left: 5px;
}
.mini-newsletter {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-btn);
    overflow: hidden;
}
.mini-newsletter input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 15px;
    color: var(--white);
    outline: none;
    font-family: inherit;
}
.mini-newsletter input::placeholder {
    color: rgba(255,255,255,0.5);
}
.mini-newsletter button {
    background: var(--yellow);
    color: #000;
    padding: 0 20px;
}
.mini-newsletter button:hover {
    background: var(--white);
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    gap: 10px;
}
.footer-bottom p {
    margin-bottom: 0;
}
.footer-admin-link {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    transition: var(--transition);
}
.footer-admin-link:hover {
    color: var(--yellow);
}

/* Scroll To Top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}
.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}
.scroll-to-top:hover {
    background: var(--dark-blue);
    transform: translateY(-3px);
}

/* Events & newsletter responsive styles are in css/responsive.css */


/* --- MEGA MENU STYLES --- */
.dropdown-item {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-toggle i {
    transition: transform 0.3s ease;
}

.dropdown-item.show .dropdown-toggle i, 
.dropdown-item:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0,0,0,.12);
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 200;
    margin-top: 15px; /* space between nav and dropdown */
    text-align: left;
}

/* Pseudo-element bridge for hover gap */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}

/* Override nav-center styles for mega menu links */
.nav-center .mega-menu a {
    display: block;
    font-size: 14px;
    font-weight: 400;
    padding: 0;
    border-radius: 0;
    background: transparent !important;
    color: inherit;
    text-decoration: none;
}

.dropdown-item.show .mega-menu, .dropdown-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.categories-mega-menu {
    width: 1200px;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.mega-menu-heading {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.mega-menu-heading i {
    color: var(--primary-blue);
}

.mega-menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-center .mega-menu .mega-menu-list a {
    color: #475569 !important;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-center .mega-menu .mega-menu-list a:hover, 
.nav-center .mega-menu .mega-menu-list a:focus {
    background-color: #eef4ff !important;
    color: var(--primary-blue) !important;
    outline: none;
    text-decoration: underline;
}

.events-dropdown {
    width: 600px;
}

.events-dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-center .mega-menu .events-list a {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.2s ease;
    color: var(--text-color) !important;
}

.nav-center .mega-menu .events-list a:hover, 
.nav-center .mega-menu .events-list a:focus {
    background-color: #eef4ff !important;
    outline: none;
}

.nav-center .mega-menu .events-list a i {
    font-size: 18px;
    color: var(--primary-blue);
    margin-top: 3px;
    transition: transform 0.2s ease;
}

.nav-center .mega-menu .events-list a:hover i {
    transform: rotate(-10deg) scale(1.1);
}



.nav-center .mega-menu .events-list a .event-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark-blue);
    margin-bottom: 3px;
    transition: color 0.2s ease;
}

.nav-center .mega-menu .events-list a:hover .event-title {
    color: var(--primary-blue);
}

.event-desc {
    display: block;
    font-size: 12px;
    color: #666;
}

.mt-4 {
    margin-top: 24px;
}

/* Mega menu responsive overrides are in css/responsive.css */


/* --- AI NEWS LISTING PAGE STYLES --- */
.ai-news-page {
    padding-top: 20px;
}
.breadcrumb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 20px;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #64748b;
}
.breadcrumb a {
    color: var(--primary-blue);
    font-weight: 500;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb .active {
    color: var(--dark-blue);
    font-weight: 600;
}
.page-header {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 70px 50px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-card);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}
.header-bg-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-image: radial-gradient(circle at 80% 20%, rgba(29, 78, 216, 0.04) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(108, 76, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}
.header-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}
.header-content h1 {
    font-size: 42px;
    color: var(--dark-blue);
    margin-bottom: 15px;
    font-weight: 800;
}
.header-content p {
    font-size: 16px;
    color: #475569;
    margin-bottom: 30px;
    line-height: 1.6;
}
.header-stats {
    display: flex;
    gap: 30px;
}
.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-blue);
}
.stat-label {
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.search-filters-section {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 20px;
}
.search-bar-wrapper {
    margin-bottom: 20px;
}
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    padding: 5px 25px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-bar:focus-within {
    border-color: #cbd5e1;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.search-icon {
    color: #94a3b8;
    font-size: 18px;
    margin-right: 15px;
}
.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 0;
    font-size: 16px;
    font-family: inherit;
    color: var(--dark-blue);
}
.clear-search-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    display: none;
}
.clear-search-btn:hover {
    color: #ef4444;
}
.news-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.topic-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.filter-pill {
    background: #f8fafc;
    border: 1px solid transparent;
    color: #475569;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-pill:hover {
    background: #f1f5f9;
    color: var(--dark-blue);
}
.filter-pill.active {
    background: var(--dark-blue);
    color: var(--white);
    border-color: var(--dark-blue);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.secondary-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.filter-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-dropdown label {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-blue);
}
.filter-dropdown select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: var(--white);
    font-family: inherit;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    outline: none;
}
.filter-dropdown select:focus {
    border-color: var(--primary-blue);
}
.content-type-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.type-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}
.type-btn:hover {
    color: var(--primary-blue);
    background: #f1f5f9;
}
.type-btn.active {
    color: var(--primary-blue);
    background: #eef2ff;
}

.ai-news-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}
.featured-news-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(226, 232, 240, 0.8);
    margin-bottom: 40px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.featured-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
    border-color: rgba(203, 213, 225, 1);
}
.featured-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}
.featured-content {
    padding: 40px;
}
.featured-content .category-badge {
    margin-bottom: 15px;
    display: inline-block;
}
.featured-content h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark-blue);
    margin-bottom: 15px;
    line-height: 1.3;
}
.featured-content p {
    font-size: 16px;
    color: #475569;
    margin-bottom: 25px;
    line-height: 1.6;
}
.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.author-details {
    display: flex;
    flex-direction: column;
}
.author-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-blue);
}
.publish-date {
    font-size: 12px;
    color: #64748b;
}
.article-stats {
    display: flex;
    gap: 15px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}
.article-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: var(--white);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.action-btn:hover {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    background: #f1f5f9;
}
.read-more-btn {
    padding: 8px 20px;
    font-size: 14px;
}

.news-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}
.news-list-item {
    background: var(--white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.news-list-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
    border-color: rgba(203, 213, 225, 1);
}
.news-list-item .img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.news-list-item .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.news-list-item:hover .img-wrapper img {
    transform: scale(1.05);
}
.news-list-item .category-badge.small {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 11px;
    padding: 4px 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: rgba(59, 131, 246, 0.5); /* Transparent blue */
    color: #ffffff;
    font-weight: 700;
    border-radius: 10px;
}
.news-list-item .item-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.news-list-item h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 10px;
    line-height: 1.4;
}
.news-list-item p {
    font-size: 14px;
    color: #475569;
    margin-bottom: 15px;
    line-height: 1.6;
    flex: 1;
}
.news-list-item .item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 15px;
}
.news-list-item .item-meta .author {
    font-weight: 600;
    color: var(--dark-blue);
}
.news-list-item .item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}
.news-list-item .stats {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #94a3b8;
}
.news-list-item .actions {
    display: flex;
    gap: 8px;
}
.news-list-item .icon-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
}
.news-list-item .icon-btn:hover {
    color: var(--primary-blue);
}

.pagination-wrapper {
    text-align: center;
    margin-bottom: 40px;
}
.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    font-size: 16px;
}
.ai-news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    border: 1px solid rgba(226, 232, 240, 0.8);
}
.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}
.compact-news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.compact-news-list li {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
.compact-news-list .rank {
    font-size: 24px;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1;
}
.compact-info a {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-blue);
    line-height: 1.4;
    display: block;
    margin-bottom: 5px;
    transition: color 0.2s;
}
.compact-info a:hover {
    color: var(--primary-blue);
}
.compact-info .time {
    font-size: 12px;
    color: #94a3b8;
}
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
}
.tag:hover {
    background: var(--primary-blue);
    color: var(--white);
}
.mini-newsletter-widget p {
    font-size: 14px;
    color: #475569;
    margin-bottom: 15px;
}
.mini-newsletter-widget form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mini-newsletter-widget input {
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}
.mini-newsletter-widget input:focus {
    border-color: var(--primary-blue);
}
.ad-widget {
    text-align: center;
    background: #f8fafc;
}
.ad-label {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.ad-placeholder {
    width: 100%;
    height: 250px;
    background: #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    border-radius: 8px;
    font-weight: 600;
}
.ad-placeholder .small {
    font-size: 12px;
    font-weight: 400;
    margin-top: 5px;
}

/* AI News page responsive styles are in css/responsive.css */
