/* CSS Variables */
:root {
    /* Layout */
    --max-width: 1200px;
    --container-padding: 1.5rem;
    --grid-gap: 2rem;
    --card-padding: 1.5rem;
    
    /* Typography */
    --font-sans: "Grandview",ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;

    /* Transitions */
    --transition-base: color 0.3s ease;
    --transition-colors: color 0.2s ease;
}

/* Theme Variants */
[data-theme="light1"] {
    --primary-color: #2563eb;
    --primary-gradient: linear-gradient(135deg, #2563eb, #4f46e5);
    --secondary-gradient: linear-gradient(135deg, #4b5563, #6b7280);
    --text-color: #1f2937;
    --text-secondary: #4b5563;
    --bg-color: #0D1B2A; /* Changed from #f8fafc to dark blue */
    --border-color: rgba(31, 41, 55, 0.1);
    --header-bg: rgba(255, 255, 255, 0.9);
    --card-bg: rgba(255, 255, 255, 0.93);
    --card-hover-gradient: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(79, 70, 229, 0.05));
    --primary-color-rgb: 37, 99, 235;
    --bg-color-rgb: 248, 250, 252; /* Changed from 248, 250, 252 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.15); /* Slightly adjusted for dark bg */
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.2), 0 1px 2px -1px rgb(0 0 0 / 0.15); /* Slightly adjusted for dark bg */
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.25), 0 2px 4px -2px rgb(0 0 0 / 0.2); /* Slightly adjusted for dark bg */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --glow-sm: 0 0 5px rgba(37, 99, 235, 0.2);
    --glow-md: 0 0 15px rgba(37, 99, 235, 0.3);
    --border-gradient: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(79, 70, 229, 0.2));
    --accent-gradient: linear-gradient(45deg, var(--primary-color), transparent);
    --grid-line: rgba(var(--primary-color-rgb), 0.1);
    --cyber-circuit: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 10 L70 10 M30 10 L30 30 L10 30 L10 70 L30 70 L30 90 L70 90 L70 70 L90 70 L90 30 L70 30 L70 10 M50 30 L50 70 M30 50 L70 50' stroke='%232563eb' stroke-width='0.5' fill='none' opacity='0.15'/%3E%3C/svg%3E");
}

[data-theme="light2"] {
    --primary-color: #21c1d6;
    --primary-gradient: linear-gradient(135deg, #ff00aa, #00ccff);
    --secondary-gradient: linear-gradient(135deg, #ff00aa, #7700ff);
    --text-color: #161b22;
    --text-secondary: #30363d;
    --bg-color: #f2f2f7;
    --border-color: rgba(0, 255, 140, 0.3);
    --header-bg: rgba(242, 242, 247, 0.85);
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-hover-gradient: linear-gradient(135deg, rgba(0, 255, 140, 0.1), rgba(0, 204, 255, 0.1));
    --shadow-sm: 0 2px 4px 0 rgba(0, 255, 140, 0.15);
    --shadow: 0 4px 6px -1px rgba(0, 255, 140, 0.2);
    --shadow-md: 0 6px 12px -2px rgba(0, 255, 140, 0.25);
    --glow-sm: 0 0 5px rgba(0, 255, 140, 0.3);
    --glow-md: 0 0 15px rgba(195, 0, 255, 0.4);
    --border-gradient: linear-gradient(135deg, rgba(0, 255, 140, 0.4), rgba(0, 204, 255, 0.4));
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-lg: 0.5rem;
    --primary-color-rgb: 0, 255, 140;
    --bg-color-rgb: 242, 242, 247;
    --grid-line: rgba(255, 0, 170, 0.07);
    --accent-gradient: linear-gradient(45deg, #00ff8c, #ff00aa);
    --cyber-circuit: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 10 L25 10 L25 20 L35 20 L35 10 L45 10 L45 30 L55 30 L55 20 L65 20 L65 30 L75 30 L75 50 L85 50 L85 70 L75 70 L75 60 L65 60 L65 80 L55 80 L55 90 L45 90 L45 80 L35 80 L35 70 L25 70 L25 80 L15 80 Z' fill='none' stroke='%2300ccff' stroke-width='0.5' opacity='0.2'/%3E%3C/svg%3E");
}

[data-theme="dark1"] {
    --primary-color: #00ff9d;
    --primary-gradient: linear-gradient(135deg, #00ff9d, #00ccff);
    --secondary-gradient: linear-gradient(135deg, #00cc7d, #00a3cc);
    --text-color: #e0ffff;
    --text-secondary: #00ccff;
    --bg-color: #0a0a0f;
    --border-color: rgba(0, 255, 157, 0.2);
    --header-bg: rgb(10, 10, 15);
    --card-bg: rgba(20, 20, 30, 0.95);
    --card-hover-gradient: linear-gradient(135deg, rgba(0, 255, 157, 0.1), rgba(0, 204, 255, 0.1));
    --shadow-sm: 0 0 5px rgb(0 255 157 / 0.3);
    --shadow: 0 0 15px rgb(0 255 157 / 0.2), 0 0 5px rgb(0 204 255 / 0.2);
    --shadow-md: 0 0 25px rgb(0 255 157 / 0.2), 0 0 8px rgb(0 204 255 / 0.3);
    --glow-sm: 0 0 10px rgba(0, 255, 157, 0.3);
    --glow-md: 0 0 20px rgba(0, 255, 157, 0.4);
    --border-gradient: linear-gradient(135deg, rgba(0, 255, 157, 0.3), rgba(0, 204, 255, 0.3));
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-lg: 0.5rem;
    --primary-color-rgb: 0, 255, 157;
    --bg-color-rgb: 10, 10, 15;
    --cyber-circuit: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 40 L40 40 L40 10 L60 10 L60 40 L90 40 M50 40 L50 60 M10 60 L40 60 L40 90 L60 90 L60 60 L90 60' stroke='%2300ff9d' stroke-width='0.8' fill='none' opacity='0.2'/%3E%3Ccircle cx='50' cy='50' r='3' fill='%2300ff9d' opacity='0.15'/%3E%3C/svg%3E");
    --grid-line: rgba(0, 255, 157, 0.15);
}

[data-theme="dark2"] {
    --primary-color: #C09A6B; /* Gold/Bronze */
    --primary-gradient: linear-gradient(135deg, #C09A6B, #A07D4F); /* Gold to darker gold */
    --secondary-gradient: linear-gradient(135deg, #1C2C4C, #101820); /* Deep blue to darker blue/charcoal */
    --text-color: #F0E6D2; /* Warm off-white */
    --text-secondary: #BDBDBD; /* Light grey for secondary text */
    --bg-color: #0A0F1A; /* Very dark, slightly desaturated blue */
    --border-color: rgba(192, 154, 107, 0.25); /* Subtle gold border */
    --header-bg: linear-gradient(180deg, rgba(10, 15, 26, 0.92), rgba(16, 24, 32, 0.88)); /* Subtle dark gradient */
    --card-bg: linear-gradient(160deg, rgba(20, 30, 42, 0.92), rgba(12, 18, 30, 0.9)); /* Subtle dark blue gradient */
    --card-hover-gradient: linear-gradient(135deg, rgba(192, 154, 107, 0.2), rgba(160, 125, 79, 0.3)); /* Enhanced gold sheen */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 5px rgba(192, 154, 107, 0.15);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(192, 154, 107, 0.2);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.4), 0 0 15px rgba(192, 154, 107, 0.25);
    --glow-sm: 0 0 8px rgba(192, 154, 107, 0.3);
    --glow-md: 0 0 16px rgba(192, 154, 107, 0.4);
    --border-gradient: linear-gradient(135deg, rgba(192, 154, 107, 0.3), rgba(160, 125, 79, 0.4));
    --radius-sm: 0.3rem; /* Slightly more defined edges for Art Deco feel */
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --primary-color-rgb: 192, 154, 107;
    --bg-color-rgb: 10, 15, 26;
    --cyber-circuit: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='0' y1='20' x2='100' y2='20' stroke='%23C09A6B' stroke-width='0.75' opacity='0.15'/%3E%3Cline x1='0' y1='40' x2='100' y2='40' stroke='%23C09A6B' stroke-width='0.5' opacity='0.15'/%3E%3Cline x1='0' y1='60' x2='100' y2='60' stroke='%23C09A6B' stroke-width='0.75' opacity='0.15'/%3E%3Cline x1='0' y1='80' x2='100' y2='80' stroke='%23C09A6B' stroke-width='0.5' opacity='0.15'/%3E%3C/svg%3E");
    --grid-line: rgba(192, 154, 107, 0.1); /* Subtle gold grid lines */
}

/* Base Styles */
html {
    overflow-x: hidden;
    width: 100vw;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        var(--cyber-circuit),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 200px, 50px 50px, 50px 50px;
    background-position: center center;
    background-attachment: fixed;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 0;
}

/* Theme-specific background adjustments */
[data-theme="light1"] body {
    background-image: 
        var(--cyber-circuit),
        radial-gradient(circle at 0% 100%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
}

[data-theme="light2"] body {
    background-image: 
        var(--cyber-circuit),
        radial-gradient(circle at 100% 0%, rgba(255, 0, 170, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(0, 204, 255, 0.03) 0%, transparent 50%),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
}

[data-theme="dark1"] body {
    background-image: 
        var(--cyber-circuit),
        radial-gradient(circle at 100% 0%, rgba(0, 255, 157, 0.08) 0%, transparent 60%),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
}

[data-theme="dark2"] body {
    background-image: 
        var(--cyber-circuit), /* New Art Deco lines */
        linear-gradient(170deg, rgba(var(--primary-color-rgb), 0.03) 0%, transparent 30%), /* Subtle gold hint */
        linear-gradient(10deg, rgba(28, 44, 76, 0.05) 0%, transparent 30%), /* Subtle blue hint */
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-color: var(--bg-color); /* Ensure solid base */
}

/* Layout Components */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Header and Navigation */
body > header {
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 1rem 0;
    background: var(--header-bg);
    border-bottom: 1px solid transparent;
    border-image: var(--border-gradient);
    border-image-slice: 1;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
    width: 100vw;
    left: 0;
    right: 0;
    margin: 0;

    &:hover {
        box-shadow: var(--shadow-md), var(--glow-sm);
    }

    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: var(--max-width);
        margin: 0 auto;
        padding: 0 var(--container-padding);
        box-sizing: border-box;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    line-height: 1.3;
    font-weight: 600;
    margin: 0 0 1rem;
}

h1 { font-size: var(--font-size-4xl); letter-spacing: -0.025em; }
h2 { font-size: var(--font-size-3xl); letter-spacing: -0.025em; }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin: 0 0 0.5rem;
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--text-color);
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.5;
    color: white;
    background: var(--primary-gradient);
    border: 1px solid rgba(var(--primary-color-rgb), 0.5); /* Subtle border matching primary color */
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: filter 0.3s ease, box-shadow 0.3s ease; /* Added transition */
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
}

.button:hover {
    box-shadow: var(--shadow-md), var(--glow-sm);
    filter: brightness(1.15); /* Slightly increased brightness */
}

.button:hover::before {
    opacity: 1;
}

/* Share buttons */
.share-buttons {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    color: var(--text-color);
    background: var(--card-bg);
    transition: all 0.2s ease;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--glow-sm);
}

.share-button svg {
    width: 1.2em;
    height: 1.2em;
}

/* Platform-specific colors on hover */
.share-button.twitter:hover,
.share-button.linkedin:hover,
.share-button.facebook:hover,
.share-button.email:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* Responsive design */
@media (max-width: 480px) {
    .share-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Utils */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

/* New Modern Layout Styles */
.main-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.main-nav {
    flex: 1;
    margin: 0 2rem;
}

.nav-tags {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
    font-weight: 600;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--primary-gradient);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
    }

    &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--primary-gradient);
        transition: color 0.3s ease;
    }

    &:hover::before,
    &.active::before {
        opacity: 0.1;
    }

    &:hover::after,
    &.active::after {
        width: 100%;
    }

    &:hover,
    &.active {
        color: var(--primary-color);
        text-shadow: var(--glow-sm);
    }
}

.controls {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.logo-section {
    flex-shrink: 0;
    position: relative;

    img {
        height: 2rem;
        width: auto;
        padding: 0 1rem;
        transition: transform 0.3s ease;

        &:hover {
            filter: brightness(1.1);
        }
    }

    &::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--primary-gradient);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    &:hover::after {
        opacity: 1;
    }
}

.logo {
    display: flex;
    align-items: center;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.025em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: text-shadow 0.3s ease;

    &:hover {
        text-shadow: var(--glow-sm);
    }
}

/* Main content */
main {
    flex: 1;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem var(--container-padding);
    overflow-x: hidden;
}

/* News items */
.news-item {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-color);
}

.news-content h3 {
    margin: 0 0 0.5rem;
}

.news-content a {
    color: var(--text-color);
    text-decoration: none;
}

.news-content a:hover {
    color: var(--primary-color);
}

.news-meta {
    color: #6b7280;
    font-size: var(--font-size-sm);
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    width: 100%;
    padding: 1.5rem 0;
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

.copyright {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0;
}

.featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .section-link .arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .event-card-compact .event-date {
    margin-right: 0;
    margin-left: var(--event-gap-sm);
}

[dir="rtl"] .location i,
[dir="rtl"] .duration i {
    margin-right: 0;
    margin-left: var(--event-gap-sm);
}

/* Section Headers and Links */
.section-header {
    padding: 0rem 0;
    text-align: right;
    background-color: var(--color-bg-alt);
    font-size: 0.5rem;
}

.section-title {
    font-size: var(--font-size-2xl);
    color: var(--text-secondary);
    font-style: italic;
    margin: 0 0 0.75rem 0;
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.section-description {
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-secondary);
    max-width: 800px;
}

.section-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: inherit;
    text-decoration: none;
    transition: var(--transition-colors);
}

.section-link:hover {
    color: var(--primary-color);
}

.section-link .arrow {
    font-size: 1.2em;
    transition: transform 0.2s ease;
}

.section-link:hover .arrow {
    transform: translateX(4px);
}

[dir="rtl"] .section-link:hover .arrow {
    transform: translateX(-4px);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius:  var(--radius-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 95%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    color: var(--text-color);
}

.form-group textarea {
    resize: vertical;
}

/* Partners Grid */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.partner-card {
    display: block;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    background: var(--bg-color);
    transition: transform 0.2s;
}

.partner-card:hover {
    box-shadow: var(--shadow-md), var(--glow-sm);
}

.partner-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.partner-info h3 {
    margin: 0 0 0.5rem;
    font-size: var(--font-size-xl);
}

.partner-info p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: #6b7280;
}

/* Main Layout with Sidebar */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.content-area {
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius);
}

.sidebar-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    margin: 0 0 1rem;
    font-size: var(--font-size-xl);
}

.sidebar-section p {
    margin: 0 0 1rem;
    font-size: var(--font-size-sm);
    color: var(--text-color);
}


/* Partners Block */
.partners-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    transition: transform 0.2s;
}

.partner-logo:hover {
    transform: translateY(-2px);
}

.partner-logo img {
    max-width: 100%;
    height: 40px;
    object-fit: contain;
}

.text-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: var(--font-size-sm);
}

.text-link:hover {
    text-decoration: underline;
}

/* Responsive Layout */
@media (max-width: 1024px) {
    /* Styles moved to 768px breakpoint */

    .partners-compact {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

/* Compact Article Card */
.article-card-compact {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.article-card-compact .article-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 0.25rem;
    overflow: hidden;
}

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

.article-card-compact .article-content {
    flex: 1;
    min-width: 0;
}

.article-card-compact h3 {
    margin: 0 0 0.25rem;
    font-size: var(--font-size-sm);
    line-height: 1.25;
}

.article-card-compact h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.article-card-compact h3 a:hover {
    color: var(--primary-color);
}

.article-card-compact .article-meta {
    font-size: var(--font-size-xs);
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.article-card-compact .source-link {
    color: var(--primary-color);
    text-decoration: none;
}

.article-card-compact .source-link:hover {
    text-decoration: underline;
}

.article-card-compact .summary {
    font-size: var(--font-size-xs);
    margin: 0;
    color: var(--text-color);
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Section Headers */
.articles h2 a,
.news h2 a,
.sidebar-section h2 a,
.sidebar-section h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.articles h2 a:hover,
.news h2 a:hover,
.sidebar-section h2 a:hover,
.sidebar-section h3 a:hover {
    color: var(--primary-color);
}


/* Featured Content Area */
.featured-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.main-featured {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.featured-article-main {
    position: relative;
    height: 500px;
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: white;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
    border: 1px solid transparent;
    border-image: var(--border-gradient);
    border-image-slice: 1;
    animation: none;
}

.featured-article-main:hover {
    box-shadow: var(--shadow-md), var(--glow-sm);
}

.featured-article-main::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    z-index: -1;
    filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-article-main:hover::before {
    opacity: 0.5;
}

.featured-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.featured-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    z-index: 1;
}

.featured-image-wrapper:hover::before {
    opacity: 0.2;
}

.featured-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-article-main .article-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6rem 2rem 2rem;
    background: linear-gradient(transparent, rgba(10, 15, 26, 0.5) 20%, rgba(10, 15, 26, 0.9)); /* Darker, richer gradient */
    z-index: 1;
}

.featured-article-main .article-content h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: none;
}

.featured-article-main .article-content p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.featured-article-main .article-content time {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.sub-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.featured-article-small {
    position: relative;
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: white;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
    border: 1px solid transparent;
    border-image: var(--border-gradient);
    border-image-slice: 1;
}

.featured-article-small:hover {
    box-shadow: var(--shadow-md), var(--glow-sm);
}

.featured-article-small .featured-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.featured-article-small .article-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 1.5rem 1.5rem;
    background: linear-gradient(transparent, rgba(10, 15, 26, 0.7), rgba(10, 15, 26, 0.95)); /* Darker, richer gradient */
    z-index: 1;
}

.featured-article-small .article-content h3 {
    font-size: var(--font-size-xl);
    margin: 0;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

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

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

    .featured-article-main {
        height: 400px;
    }

    .featured-article-main .article-content h1 {
        font-size: 1.75rem;
    }

    .featured-article-small {
        height: 250px;
    }
}

.news-item-small {
    display: flex;
    gap: 1rem;
    padding: 1rem 0.7rem 1.1rem 0.7rem;
    border-bottom: 1px solid var(--border-color);
}

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

.news-item-small .news-image {
    flex: 0 0 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.news-item-small .news-image picture,
.news-item-small .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-item-small .news-content {
    flex: 1;
    min-width: 0;
}

.news-item-small h4 {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.news-item-small h4 a {
    color: var(--text-color);
    text-decoration: none;
}

.news-item-small h4 a:hover {
    color: var(--primary-color);
}

.news-item-small time {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}


/* Bottom Section */
.bottom-section {
    display: flex; /* Changed from grid */
    flex-direction: column; /* Added */
    gap: 2rem;
}

.bottom-main-layout { /* New rule */
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.short-news,
.news-feed {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.0rem;
    box-shadow: var(--shadow);
}

.news-card {
    display: flex; 
    gap: 1rem; 
    padding: 0.75rem 0; /* Reduced vertical padding */
    border-bottom: 1px solid var(--border-color);
}

.news-card-image { 
    flex: 0 0 120px; /* Adjust width as needed */
    height: 90px; /* Adjust height as needed */
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.news-card-image img { /* New rule */
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.news-card-content { /* Renamed from .card-content for news feed */
    display: flex;
    flex-direction: column; 
    justify-content: flex-start; 
    align-items: flex-start;
    position: relative;
    padding: 0; 
    flex-grow: 1; 
    z-index: 1;
}

.news-card-content.no-image { /* Renamed from .card-content.no-image */
    padding: 1rem 0; 
}

.news-card-description { /* New style for description */
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-top: 0.25rem; /* Small space below title */
    line-height: 1.4;
}

.news-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
  }

.card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-gradient);
    opacity: 0;
}

.article-card:hover .card-content::before {
    opacity: 1;
}

.categories,
.tags {
    display: flex;
    gap: 0.5rem 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.category,
.tag {
    background: var(--card-bg);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    font-size: var(--font-size-sm);
    display: inline-block;
    border: 1px solid transparent;
    border-image: var(--border-gradient);
    border-image-slice: 1;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.3s ease;
}

.category:hover,
.tag:hover {
    background: var(--card-hover-gradient);
    color: var(--primary-color);
    box-shadow: var(--glow-sm);
}

.side-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.roboreview-section,
.events-section,
.partners-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.partner-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.partner-item img {
    max-width: 100%;
    height: auto;
}

/* Roboreview Section */
.review-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.review-item:last-child {
    border-bottom: none;
    margin-bottom: 1rem;
}

.review-content {
    flex: 1;
}

.review-content h4 {
    margin: 0 0 0.5rem;
    font-size: var(--font-size-base);
}

.review-content h4 a {
    color: var(--text-color);
    text-decoration: none;
}

.review-content h4 a:hover {
    color: var(--primary-color);
}

.review-meta {
    display: flex;
    gap: 1rem;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.rating {
    color: var(--primary-color);
    font-weight: 500;
}

.review-summary {
    font-size: var(--font-size-sm);
    margin: 0;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--grid-gap);
    padding: var(--grid-gap) 0;
}

/* Content Cards */
.content-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    border: 1px solid transparent;
    border-image: var(--border-gradient);
    border-image-slice: 1;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), var(--glow-sm);
}

.content-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    opacity: 0.1;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.content-card:hover::before {
    opacity: 0.05;
}

.content-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-image:hover::after {
    opacity: 0.1;
}

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

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

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.75rem;
    position: relative;
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.content-card:hover .card-title {
    opacity: 1;
}

.card-description {
    font-size: 0.925rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between; /* Places date/author left, tags right */
    align-items: flex-start; /* Align tops of the two groups */
    gap: 1rem;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    width: 100%;

}

.date-author-info { /* New style block */
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Adjust as needed for spacing between date and author */
    width: 50%;
}

.card-meta .author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-meta .author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
}

.card-meta .author-name {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.content-card:hover .card-meta .author-name {
    color: var(--primary-color);
}

.card-meta .date {
    color: var(--text-secondary);
    margin-left: auto;
    vertical-align: left;
}

.card-tags {
    display: flex;
    flex-direction: column; /* Stack tags vertically */
    gap: 0.25rem; /* Space between stacked tags */
    /* flex-wrap: wrap; /* Not needed for vertical stacking of few items */
    /* margin-top: 0.5rem; /* Removed as parent align-items handles top alignment */
    align-items: flex-start; /* Align tags to the start (left) of their column */
    width: 50%;
    vertical-align: left;
}

.card-tag {
    font-size: var(--font-size-xs);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--border-color);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.content-card:hover .card-tag {
    /* background: var(--primary-color); */
    /* color: var(--bg-color); */
}

/* Video-specific modifications */
.video-card .card-image {
    aspect-ratio: 16/9; /* Maintain video aspect ratio */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in { animation: fadeIn 0.3s ease-in; }

.article-card:nth-child(2),
.article-card:nth-child(3),
.article-card:nth-child(n+4) {
    animation: none;
}

.article-card:hover,
.content-card:hover,
.partner-card:hover,
.partner-logo:hover,
.featured-article-main:hover {
    box-shadow: var(--shadow-md), var(--glow-sm);
}

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

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: color 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Author Links */
.author-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.author-link:hover {
    text-decoration: underline;
}

/* Author Page */
.author-page {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.author-header {
    text-align: center;
    margin-bottom: 3rem;
}

.author-role {
    color: var(--text-muted);
    font-weight: 500;
    margin: 0.5rem 0;
}

.author-location {
    color: var(--text-muted);
    margin: 0.5rem 0;
}

.author-social {
    margin: 1rem 0;
}

.author-social a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 0.5rem;
}

.author-social a:hover {
    color: var(--primary-color);
}

.author-interests {
    margin: 2rem 0;
}

.author-interests ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.author-interests li {
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.author-articles {
    margin-top: 3rem;
}

/* Image Handling */
.featured-hero {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.featured-hero img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.card-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

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

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

.thumbnail-image {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

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

/* Image loading states */
.img-fluid {
    opacity: 1;
}

/* Responsive image adjustments */
@media (max-width: 768px) {
    .featured-hero {
        max-height: 400px;
    }

    .card-image {
        aspect-ratio: 3/2;
    }
}

/* Article Layout */
.magazine-article {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

.magazine-article .featured-image {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 0;
    z-index: 1;
}

.magazine-article .featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.article-content h2 {
    margin-top: 2rem;
}

.article-tags {
    margin-top: 2rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-content-container {
    position: relative;
    margin: auto 0;
    padding: 0 1rem;
    max-width: 1000px;
    z-index: 2;
}

.article-header {
    text-align: center;
    margin-bottom: 0rem;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

.article-header h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: 1rem;
    color: var(--text-color);
}

.article-meta {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.article-content {
    padding: 2rem;
    background: var(--card-bg);
    border: 0px;
    position: relative;
    z-index: 2;
    margin: 0 auto;
    border-radius: var(--radius);
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-color);
}

.article-content blockquote {
    background: var(--card-bg);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
}

.article-footer {
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Make sure images in the content are properly contained */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
}

/* News Article Styles */
.news-article {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.news-article .featured-image {
    width: 100%;
    height: 400px;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
}

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

.news-article .featured-image:hover img {
    transform: scale(1.05);
}

.news-article .article-content-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.news-article .article-header {
    margin-bottom: 2rem;
    text-align: center;
}

.news-article .article-header h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: 1rem;
    line-height: 1.2;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.news-article .article-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-article .article-content {
    line-height: 1.8;
}

.news-article .article-content p,
.news-article .article-content ul,
.news-article .article-content ol {
    margin-bottom: 1.5rem;
}

.news-article .article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Add box-sizing to all elements */
*, *::before, *::after {
    box-sizing: border-box;
}


/* =========================
   Unified Menu & Hamburger
   ========================= */

/* Hamburger Button & Lines */
.hamburger-button,
.hamburger-button.unified-menu-trigger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    height: 3rem;
    width: 3rem;
    flex-direction: column;
    justify-content: space-around;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
}
.hamburger-line {
    display: block;
    width: 1.5rem;
    height: 2px;
    background-color: var(--text-color);
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger-button.active .hamburger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger-button.active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-button.active .hamburger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hamburger/Settings Button Visibility */
.hamburger-button.unified-menu-trigger { display: inline-flex; }
#settings-btn.unified-menu-trigger { display: none; }

/* Desktop: Hide Hamburger, Show Settings */
@media (min-width: 769px) {
    .hamburger-button.unified-menu-trigger { display: none; }
    #settings-btn.unified-menu-trigger {
        display: inline-flex;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        height: 3rem;
        width: 3rem;
        flex-direction: column;
        justify-content: space-around;
        z-index: 1001;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.2s ease;
    }
    #settings-btn.unified-menu-trigger:hover { color: var(--primary-color); }
    /* Make settings button hamburger lines work like hamburger button */
    #settings-btn.unified-menu-trigger .hamburger-line {
        display: block;
        width: 1.5rem;
        height: 2px;
        background-color: var(--text-color);
        transition: transform 0.3s, opacity 0.3s;
    }
    #settings-btn.unified-menu-trigger.active .hamburger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    #settings-btn.unified-menu-trigger.active .hamburger-line:nth-child(2) { opacity: 0; }
    #settings-btn.unified-menu-trigger.active .hamburger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* Mobile: Show Hamburger, Hide Desktop Nav */
@media (max-width: 768px) {
    .hamburger-button { display: flex; }
    .desktop-nav { display: none; }
    .top-nav { justify-content: space-between; }
}

/* =========================
   Unified Menu Panel
   ========================= */
.unified-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    color: var(--text-color);
    box-shadow: var(--shadow-md, -5px 0 15px rgba(0,0,0,0.2));
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.4s;
    transform: translateX(100%); /* Default slide from right */
    visibility: hidden;
    animation: unifiedMenuFadeIn 0.33s cubic-bezier(0.4,0.8,0.2,1);
}
body:not(.unified-menu-open) .unified-menu {
    transform: translateX(100%) !important; /* Keep hidden off-right */
    visibility: hidden !important;
}
body.unified-menu-open .unified-menu {
    transform: translateX(0);
    visibility: visible;
}
@media (min-width: 769px) {
    .unified-menu {
        left: auto;
        right: 0;
        width: 350px;
        max-width: 80vw;
        transform: translateX(100%);
        border-left: 1px solid var(--border-color, rgba(255,255,255,0.1));
        border-right: none;
    }
    .unified-menu-section:first-child { display: none !important; }
}

/* Glassmorphism & Theme Variants */
.unified-menu {
    background: rgba(var(--bg-color-rgb, 19,17,28), 0.85);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    border-left: 2px solid var(--primary-color, #bf00ff);
    box-shadow: 0 0 32px 0 rgba(var(--primary-color-rgb,191,0,255), 0.12), 0 2px 24px 0 rgba(0,0,0,0.18);
    transition: transform 0.35s cubic-bezier(0.4,0.8,0.2,1), background 0.3s, box-shadow 0.3s;
}
body[data-theme^="light"] .unified-menu {
    background: rgba(var(--bg-color-rgb, 248,250,252), 0.92);
    border-left: 2px solid var(--primary-color, #2563eb);
    box-shadow: 0 0 32px 0 rgba(var(--primary-color-rgb,37,99,235), 0.10), 0 2px 24px 0 rgba(0,0,0,0.10);
}

/* Unified Menu Backdrop */
.unified-menu-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(120deg, rgba(var(--primary-color-rgb,191,0,255),0.10) 0%, rgba(0,0,0,0.65) 100%);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(2px);
    transition: opacity 0.25s, visibility 0.25s;
}
body.unified-menu-open .unified-menu-backdrop {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when menu is open */
html.unified-menu-open,
body.unified-menu-open,
body.menu-open {
    overflow: hidden;
}

/* =========================
   Unified Menu Structure
   ========================= */
.unified-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--container-padding, 1.5rem);
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.1));
    flex-shrink: 0;
}
.unified-menu-title {
    margin: 0;
    font-size: var(--font-size-lg, 1.125rem);
    font-weight: 600;
    color: var(--text-secondary, #aaa);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.unified-menu-close {
    background: none;
    border: none;
    color: var(--text-secondary, #aaa);
    font-size: 1.8rem;
    line-height: 1;
    padding: 0.25rem;
    cursor: pointer;
    transition: color 0.2s ease;
}
.unified-menu-close:hover { color: var(--primary-color, #fff); }

.unified-menu-body {
    padding: 1.5rem var(--container-padding, 1.5rem);
    overflow-y: auto;
    flex-grow: 1;
}
.unified-menu-section { margin-bottom: 2rem; }
.unified-menu-section-title {
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--text-secondary, #aaa);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.05));
    padding-bottom: 0.5rem;
}

/* =========================
   Unified Menu Navigation
   ========================= */
.unified-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.unified-menu-link {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-radius: var(--radius-sm, 0.375rem);
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: var(--font-size-base, 1rem);
    border: 1px solid transparent;
    text-align: left;
    background-color: transparent;
}
.unified-menu-link:hover {
    background-color: rgba(var(--primary-color-rgb, 0, 255, 157), 0.1);
    color: var(--primary-color);
    border-color: rgba(var(--primary-color-rgb, 0, 255, 157), 0.2);
}
.unified-menu-link.active {
    background-color: rgba(var(--primary-color-rgb, 0, 255, 157), 0.15);
    color: var(--primary-color);
    font-weight: 600;
    border-color: rgba(var(--primary-color-rgb, 0, 255, 157), 0.3);
}

/* =========================
   Theme & Language Options
   ========================= */
.theme-option, .language-option,
.unified-menu .unified-menu-option {
    flex: 1;
    min-width: 80px;
    padding: 0.75rem;
    text-align: center;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    font-size: var(--font-size-sm);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
    width: 100%;
}
.theme-option.active, .language-option.active,
.unified-menu .unified-menu-option.active {
    background: var(--primary-gradient, var(--primary-color));
    color: #fff;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 0 8px 0 rgba(var(--primary-color-rgb, 191, 0, 255), 0.15);
}
.unified-menu .unified-menu-option {
    /* Glassmorphism/consistency overrides */
    color: var(--primary-color);
    border: 1.5px solid var(--border-color, #333);
    font-weight: 500;
}
.unified-menu .unified-menu-option:hover {
    background: rgba(var(--primary-color-rgb, 191, 0, 255), 0.12);
    color: var(--primary-color);
    border-color: var(--primary-color);
    text-shadow: none;
}
.theme-option:hover, .language-option:hover {
    background-color: rgba(var(--primary-color-rgb, 0, 255, 157), 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Option Grids */
.unified-menu .theme-options,
.unified-menu .language-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
}
.unified-menu .language-options {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
}

/* Theme selector adjustments */
.theme-option {
    display: flex;
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    gap: 0.75rem;
}

/* Hover and active states */
.theme-option:hover {
    background: rgba(var(--primary-color-rgb), 0.05);
}

.theme-option.active {
    background: rgba(var(--primary-color-rgb), 0.1);
}

/* =========================
   Controls
   ========================= */
.controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =========================
   RTL Support
   ========================= */
[dir="rtl"] {
    text-align: right;
    direction: rtl;
    line-height: 1.6;
    letter-spacing: 0;
}
[dir="rtl"] ul, [dir="rtl"] ol {
    padding-right: 1.5em;
    padding-left: 0;
}
[dir="rtl"] table { text-align: right; }
[dir="rtl"] blockquote {
    border-right: 4px solid var(--primary-color, #ddd);
    border-left: none;
    padding-right: 1em;
    padding-left: 0;
}
[dir="rtl"] .mixed-content {
    display: flex;
    flex-direction: row-reverse;
}
[dir="rtl"] figure { margin: 1em 0 1em 1em; }
[dir="rtl"] figcaption { text-align: right; }

/* =========================
   Miscellaneous
   ========================= */
/* iOS viewport fix */
@-ms-viewport { width: device-width; }
@viewport { width: device-width; }

/* Unified Menu Animation */
@keyframes unifiedMenuFadeIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-nav {
        margin: 0 1rem;
    }
    
    .nav-tags {
        gap: 0.5rem;
    }
    
    .nav-item {
        padding: 0.375rem 0.75rem;
        font-size: var(--font-size-sm);
    }

    .sub-featured,
    .featured-content,
    .video-section,
    .bottom-section {
        grid-template-columns: 1fr;
    }

    .featured-article-main {
        height: 300px;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
    }

    .container {
        padding: 0 1rem;
        width: 100%;
    }

    header {
        padding: 0.5rem 0;
        width: 100%;
        
        nav {
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            padding: 0.5rem 1rem;
            width: 100%;
        }
    }

    .main-nav {
        margin: 1rem 0;
        width: 100%;
    }

    .nav-tags {
        justify-content: flex-start;
        padding: 0.5rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .controls {
        width: auto;
        justify-content: flex-end;
        display: flex;
        gap: 1rem;
        flex-shrink: 0;
    }

    /* Force all images to stay within their containers */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Ensure tables don't overflow */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Adjust content grid for mobile */
    .content-grid {
        grid-template-columns: 1fr;
        padding: 1rem 0;
    }

    /* Adjust featured content layout */
    .featured-content {
        margin: 0;
    }

    header nav {
        padding: 0 1rem;
    }

    main {
        padding: 1.5rem 1rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Make main layout single column on mobile */
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        margin-top: 2rem;
    }

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

    .news-feed { /* Hide news-feed on mobile */
        display: none;
    }

    .video-section { /* Add margin above video section on mobile */
        margin-top: 2rem; /* Or var(--grid-gap) if you prefer using variables */
    }

    /* Responsive adjustments for cards */
    .card-content {
        padding: 1rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-description {
        font-size: var(--font-size-sm);
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .card-meta {
        padding-top: 0.75rem;
    }

    /* Responsive adjustments for featured articles */
    .featured-article-main {
        height: 400px;
    }

    .featured-article-main .article-content h1 {
        font-size: 1.75rem;
    }

    .featured-article-small {
        height: 250px;
    }

    /* Responsive image adjustments */
    .featured-hero {
        max-height: 400px;
    }

    .card-image {
        aspect-ratio: 3/2;
    }

    /* Responsive article layout adjustments */
    .article-content-container {
        margin-top: -50px;
    }

    .article-header,
    .article-content,
    .article-footer {
        padding: 1.5rem;
    }

    .news-article .article-header h1 {
        font-size: var(--font-size-3xl);
    }

    /* Responsive news article adjustments */
    .news-article {
        padding: 1rem;
    }

    .news-article .featured-image {
        height: 300px;
    }

    .news-article .article-content-container {
        padding: 1.5rem;
    }

}

/* Event Card Compact */
.event-card-compact {
    display: flex;
    flex-direction: column; /* Ensure items stack vertically */
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden; /* Important for child border-radius on image */
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.event-image-header { /* New or modified */
    width: 100%;
    max-height: 180px; /* Adjust as needed */
    overflow: hidden;
}

.event-image-header .event-header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-details-compact-wrapper { /* New wrapper style */
    display: flex;
    padding: 1rem;
    gap: 1rem;
}

.event-date {
    flex-shrink: 0;
    text-align: center;
    width: 50px;
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.25rem;
    height: fit-content;
}

.event-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-date .month {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    line-height: 1;
}

.event-content {
    flex: 1;
}

.event-content h4 {
    margin: 0 0 0.5rem;
    font-size: var(--font-size-base);
    line-height: 1.3;
}

.event-content h4 a {
    color: var(--text-color);
    text-decoration: none;
}

.event-content h4 a:hover {
    color: var(--primary-color);
}

.event-details {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.event-details .location,
.event-details .duration {
    margin-bottom: 0.25rem;
}

.event-type {
    margin-top: 0.5rem;
}

.content-card:hover,
.card-link:hover .content-card {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.event-content-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.event-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-date {
    text-align: center;
    min-width: 60px;
    padding: 0.5rem;
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.event-date .day {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: bold;
    line-height: 1.2;
}

.event-date .month {
    display: block;
    text-transform: uppercase;
    font-size: var(--font-size-xs);
    margin-top: 0.1rem;
}