/* --- Floating Action Button Group (NewsMap version - no FAB +) --- */
.fab-group {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-end;
    pointer-events: none; /* Let children handle pointer events */
}
.fab-group > button,
.fab-group > .horizontal-btn-group,
.fab-group > .news-carousel-wrapper,
.fab-group > .top-btn-row,
.fab-group > .search-controls {
    pointer-events: auto;
}

/* Top button row for home and carousel buttons */
.top-btn-row {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

/* Remove FAB plus button styles (not used in NewsMap) */
.fab {
    display: none; /* Hidden in NewsMap - reactions are on news cards */
}

/* --- Horizontal Button Group for Time Filters --- */
.horizontal-btn-group {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
}

/* --- Time Filter Container with Expandable Animation --- */
.time-filter-container {
    display: flex;
    flex-direction: row-reverse; /* Items appear from right to left */
    align-items: center;
    gap: 12px;
    position: relative;
}

/* Primary button positioning - always stays in the same visual position */
.time-filter-btn.primary {
    order: -1; /* Always appears at the rightmost position in row-reverse */
}

.time-filter-btn:not(.primary) {
    order: 0;
}

.time-filter-container.expanded .time-filter-btn:not(.primary) {
    animation: slideIn 0.3s ease-out forwards;
    pointer-events: auto;
}

.time-filter-container:not(.expanded) .time-filter-btn:not(.primary) {
    animation: slideOut 0.3s ease-out forwards;
    pointer-events: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(20px) scale(0.8);
    }
}

/* Initially hide non-primary buttons */
.time-filter-container:not(.expanded) .time-filter-btn:not(.primary) {
    opacity: 0;
    transform: translateX(20px) scale(0.8);
    width: 0;
    min-width: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* assets/css/main.css */

/* --- CSS Variables for Theming --- */
:root {
    --font-family: 'Inter', sans-serif;

    /* Light Theme */
    --background-color-light: #f4f7f9;
    --text-color-light: #1a1a1a;
    --header-bg-light: rgba(255, 255, 255, 0.8);
    --fab-bg-light: #007bff;
    --fab-text-light: #ffffff;
    --modal-bg-light: #ffffff;
    --modal-shadow-light: 0 5px 15px rgba(0,0,0,0.1);
    --button-bg-light: #007bff;
    --button-text-light: #ffffff;
    --button-hover-bg-light: #0056b3;
    --border-color-light: #e0e0e0;
    --button-secondary-bg-light: rgba(255, 255, 255, 0.7); /* NUOVO: Sfondo per pulsanti secondari */

    /* Dark Theme */
    --background-color-dark: #1a1d21;
    --text-color-dark: #e1e1e1;
    --header-bg-dark: rgba(26, 29, 33, 0.8);
    --fab-bg-dark: #4a90e2;
    --fab-text-dark: #ffffff;
    --modal-bg-dark: #2c3035;
    --modal-shadow-dark: 0 5px 20px rgba(0,0,0,0.4);
    --button-bg-dark: #4a90e2;
    --button-text-dark: #ffffff;
    --button-hover-bg-dark: #357abd;
    --border-color-dark: #444;
    --button-secondary-bg-dark: #2c3035; /* NUOVO: Sfondo solido per pulsanti secondari */
}

/* --- General Styles --- */
body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevents scrollbars from appearing next to the full-screen map */
    background-color: var(--background-color-light);
    color: var(--text-color-light);
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Improve text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.dark-theme {
    background-color: var(--background-color-dark);
    color: var(--text-color-dark);
}

/* --- Map Container --- */
#cesiumContainer {
    height: 100vh;
    width: 100vw;
    z-index: 1;
}

/* Force sharp rendering on high-DPI displays */
#cesiumContainer canvas {
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Disable blue tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Cesium adds its own UI elements, let's hide the default animation/timeline controls for a cleaner look */
.cesium-viewer-animationContainer,
.cesium-viewer-timelineContainer,
.cesium-viewer-bottom {
    display: none !important;
}

/* --- Header --- */
.main-header {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: var(--header-bg-light);
    padding: 8px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    transition: background-color 0.3s ease;
    max-width: 90vw;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.header-title {
    text-align: center;
}

body.dark-theme .main-header {
    background-color: var(--header-bg-dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.main-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.main-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Header Search Bar */
.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color-light);
    border-radius: 20px;
    padding: 6px 14px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    min-width: 200px;
}

.header-search:focus-within {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

body.dark-theme .header-search {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-theme .header-search:focus-within {
    background: rgba(0, 0, 0, 0.6);
    border-color: #3b82f6;
}

.header-search .search-icon {
    font-size: 16px;
    opacity: 0.6;
}

#header-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    min-width: 150px;
}

#header-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.header-clear-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.header-search:focus-within .header-clear-btn,
.header-clear-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.header-clear-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

body.dark-theme .header-clear-btn {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-theme .header-clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Floating Action Button (FAB) --- */
.fab {
    width: 58px;
    height: 58px;
    background-color: var(--fab-bg-light);
    color: var(--fab-text-light);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    transform: translateZ(0);
    position: relative; /* For pseudo-element positioning */
}

.fab::before,
.fab::after {
    content: '';
    position: absolute;
    background-color: var(--fab-text-light);
    transition: transform 0.2s ease-out;
}

/* Vertical bar of the plus */
.fab::before {
    left: 50%;
    top: 30%;
    bottom: 30%;
    width: 3px;
    transform: translateX(-50%);
}

/* Horizontal bar of the plus */
.fab::after {
    top: 50%;
    left: 30%;
    right: 30%;
    height: 3px;
    transform: translateY(-50%);
}

body.dark-theme .fab {
    background-color: var(--fab-bg-dark);
}

.fab:active {
    /* MODIFICATO: Aggiunto un effetto "bounce" più pronunciato */
    transform: scale(0.9) translateZ(0);
    transition-duration: 0.1s; /* Rende la pressione più reattiva */
}

/* --- Theme & Home Buttons (Final Corrected Version) --- */
.theme-btn {
    width: 58px;
    height: 58px;
    background-color: var(--button-secondary-bg-light);
    border: 1px solid var(--border-color-light);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative; /* Cruciale per il posizionamento assoluto degli wrapper */
    overflow: hidden;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .main-header h1 {
        font-size: 1.2rem;
    }
    
    .main-header p {
        font-size: 0.8rem;
    }
    
    .header-search {
        min-width: 160px;
    }
    
    #header-search-input {
        min-width: 120px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .main-header {
        top: 5px;
        padding: 6px 12px;
    }
    
    .main-header h1 {
        font-size: 1rem;
    }
    
    .main-header p {
        font-size: 0.75rem;
    }
    
    .header-search {
        padding: 5px 10px;
        min-width: 140px;
    }
}

/* --- Time Filter Buttons (for News timeframe) --- */
.time-filter-btn {
    min-width: 54px;
    height: 54px;
    background-color: var(--button-secondary-bg-light);
    border: 2px solid var(--border-color-light);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    white-space: nowrap;
}

.time-filter-btn.primary {
    /* Primary button always visible with news indicator */
    position: relative;
}

.time-filter-container:not(.expanded) .time-filter-btn.primary::after {
    content: '📰';
    position: absolute;
    right: -4px;
    top: -4px;
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.time-filter-btn.active {
    background-color: var(--fab-bg-light);
    color: var(--fab-text-light);
    border-color: var(--fab-bg-light);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

body.dark-theme .time-filter-btn {
    background-color: var(--button-secondary-bg-dark);
    border-color: var(--border-color-dark);
    color: var(--text-color-dark);
}

body.dark-theme .time-filter-btn.active {
    background-color: var(--fab-bg-dark);
    color: var(--fab-text-dark);
    border-color: var(--fab-bg-dark);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.time-filter-btn:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

@media (hover: hover) and (pointer: fine) {
    .time-filter-btn:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
}

/* --- Custom Filter Dropdowns --- */
.custom-dropdown-wrapper {
    position: relative;
    margin: 0;
}

.filter-toggle-btn {
    width: 54px;
    height: 54px;
    padding: 0;
}

.filter-toggle-btn.active .icon-wrapper {
    background: linear-gradient(135deg, var(--fab-bg-light), var(--primary-light));
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

body.dark-theme .filter-toggle-btn.active .icon-wrapper {
    background: linear-gradient(135deg, var(--fab-bg-dark), var(--primary-dark));
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.custom-dropdown-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    min-width: 240px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--border-color-light);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.custom-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

body.dark-theme .custom-dropdown-menu {
    background: rgba(30, 30, 40, 0.95);
    border-color: var(--border-color-dark);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dropdown-header {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-color-light);
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 123, 255, 0.05));
    border-bottom: 1px solid var(--border-color-light);
}

body.dark-theme .dropdown-header {
    color: var(--text-color-dark);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), rgba(74, 144, 226, 0.05));
    border-bottom-color: var(--border-color-dark);
}

.dropdown-options {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: var(--border-color-light);
    border-radius: 3px;
}

body.dark-theme .dropdown-options::-webkit-scrollbar-thumb {
    background: var(--border-color-dark);
}

.dropdown-option {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color-light);
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.dropdown-option:hover {
    background: rgba(0, 123, 255, 0.1);
    transform: translateX(4px);
}

.dropdown-option.active {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.2), rgba(0, 123, 255, 0.1));
    color: var(--fab-bg-light);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

body.dark-theme .dropdown-option {
    color: var(--text-color-dark);
}

body.dark-theme .dropdown-option:hover {
    background: rgba(74, 144, 226, 0.15);
}

body.dark-theme .dropdown-option.active {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.25), rgba(74, 144, 226, 0.15));
    color: var(--fab-bg-dark);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.theme-btn:active {
    /* MODIFICATO: Aggiunto un effetto "bounce" più pronunciato */
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition-duration: 0.1s;
}

@media (hover: hover) and (pointer: fine) {
    .fab:hover {
        transform: scale(1.1) translateZ(0);
    }

    .theme-btn:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
}

body.dark-theme .theme-btn {
    background-color: var(--button-secondary-bg-dark);
    border-color: var(--border-color-dark);
}

/* --- Icon Wrappers & Icons (SOLUZIONE DEFINITIVA) --- */
.icon-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Usa Flexbox per un centraggio robusto */
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrapper span {
    font-size: 1.9rem;
    /* Normalizza il comportamento dell'icona per un centraggio perfetto */
    line-height: 1;
    display: inline-block;
    /* RIMOSSO: La traslazione manuale era l'errore */
}

body.dark-theme .icon-wrapper span {
    color: var(--text-color-dark);
}

/* --- Icon Animation Logic --- */
#theme-switcher .moon-wrapper {
    opacity: 0;
    transform: scale(0) rotate(-90deg);
}

body.dark-theme #theme-switcher .sun-wrapper {
    opacity: 0;
    transform: scale(0) rotate(90deg);
}

body.dark-theme #theme-switcher .moon-wrapper {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}


/* --- Emoji Marker on Map --- */
.emoji-marker {
    font-size: 2rem; /* Adjust size of emoji on map */
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    background: transparent;
    border: none;
}

/* --- Modal Styles --- */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--modal-bg-light);
    color: var(--text-color-light);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--modal-shadow-light);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

body.dark-theme .modal-content {
    background-color: var(--modal-bg-dark);
    color: var(--text-color-dark);
    box-shadow: var(--modal-shadow-dark);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--text-color-light);
}
body.dark-theme .close-btn:hover {
    color: var(--text-color-dark);
}

#emoji-picker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    max-height: 200px;
    overflow-y: scroll; /* Always show scrollbar to prevent layout shift */
    padding-right: 5px; /* Add a little space for the scrollbar */
}

/* Custom Scrollbar for Emoji Picker */
#emoji-picker::-webkit-scrollbar {
    width: 14px;
}

#emoji-picker::-webkit-scrollbar-track {
    background: transparent;
}

#emoji-picker::-webkit-scrollbar-thumb {
    background-color: var(--border-color-light);
    border-radius: 6px;
    border: 4px solid var(--modal-bg-light); /* Creates padding around thumb */
}

body.dark-theme #emoji-picker::-webkit-scrollbar-thumb {
    background-color: var(--border-color-dark);
    border-color: var(--modal-bg-dark);
}

.emoji-option {
    font-size: 2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: transform 0.2s, background-color 0.2s;
}

.emoji-option:hover {
    transform: scale(1.2);
}

.emoji-option.selected {
    background-color: rgba(0, 123, 255, 0.2);
    transform: scale(1.2);
}
body.dark-theme .emoji-option.selected {
    background-color: rgba(74, 144, 226, 0.3);
}

#submit-mood-btn {
    /* Hidden - reactions now auto-submit on emoji click */
    display: none !important;
}

/* Legacy styles kept for backward compatibility */
body.dark-theme #submit-mood-btn {
    display: none !important;
}

#submit-mood-btn:hover:not(:disabled) {
    background-color: var(--button-hover-bg-light);
}
body.dark-theme #submit-mood-btn:hover:not(:disabled) {
    background-color: var(--button-hover-bg-dark);
}

#submit-mood-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
body.dark-theme #submit-mood-btn:disabled {
    background-color: #555;
}

#modal-status {
    /* Hidden - feedback now shown outside modal */
    display: none !important;
}

/* --- Responsive Design --- */
@media (max-width: 600px) {
    .main-header {
        padding: 8px 15px; /* A bit more vertical padding */
        width: auto; /* Let it size to its content */
        max-width: 95%; /* But don't let it touch the edges */
    }
    .main-header h1 {
        font-size: 1.1rem;
    }
    .main-header p {
        font-size: 0.75rem;
        white-space: nowrap; /* This is the key: prevents the subtitle from wrapping */
    }
    .fab-group {
        right: 10px;
        bottom: 10px;
        gap: 10px;
    }
    .top-btn-row {
        gap: 8px;
    }
    .latest-news-btn {
        width: auto !important;
        height: 50px !important;
        min-width: 120px !important;
        padding: 0 14px !important;
        border-radius: 25px !important;
    }
    .latest-news-btn .carousel-text {
        font-size: 13px;
    }
    .horizontal-btn-group {
        gap: 8px;
    }
    .fab {
        width: 50px;
        height: 50px;
        font-size: 2rem;
        line-height: 50px;
    }
    .theme-btn {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    .time-filter-btn {
        min-width: 46px;
        height: 46px;
        font-size: 0.75rem;
        padding: 0 6px;
    }
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    /* Sidebar responsive */
    .news-sidebar {
        width: 100% !important;
        max-width: 100%;
    }
    
    .news-card {
        margin-bottom: 12px;
    }
    
    .news-image {
        height: 150px;
    }
}

/* ========================================
   NEWS SIDEBAR STYLES
   ======================================== */

/* Sidebar backdrop for click-outside-to-close */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    z-index: 1999;
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.news-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 450px;
    max-width: 90vw;
    height: 100vh;
    background-color: var(--modal-bg-light);
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    overflow: hidden;
}

body.dark-theme .news-sidebar {
    background-color: var(--modal-bg-dark);
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
}

.news-sidebar.active {
    right: 0;
}

.sidebar-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.close-sidebar-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.05);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    color: var(--text-color-light);
}

body.dark-theme .close-sidebar-btn {
    background-color: rgba(255,255,255,0.1);
    color: var(--text-color-dark);
}

.close-sidebar-btn:hover {
    background-color: rgba(0,0,0,0.1);
    transform: rotate(90deg);
}

body.dark-theme .close-sidebar-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-top: 60px;
    padding-bottom: 100px; /* Extra space at bottom for mobile to prevent last card truncation */
}

.sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

body.dark-theme .sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
}

/* Sidebar Header */
.sidebar-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color-light);
}

body.dark-theme .sidebar-header {
    border-bottom-color: var(--border-color-dark);
}

.sidebar-header h2 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color-light);
}

body.dark-theme .sidebar-header h2 {
    color: var(--text-color-dark);
}

.sidebar-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(0,0,0,0.6);
    text-transform: capitalize;
}

body.dark-theme .sidebar-subtitle {
    color: rgba(255,255,255,0.6);
}

/* News Cards */
.news-card {
    background-color: var(--background-color-light);
    border: 1px solid var(--border-color-light);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    /* Animation for fade-in effect */
    opacity: 0;
    transform: translateX(30px);
    animation: slideInCard 0.5s ease forwards;
}

@keyframes slideInCard {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

body.dark-theme .news-card {
    background-color: #2a2d32;
    border-color: var(--border-color-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

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

body.dark-theme .news-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.news-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--border-color-light);
}

body.dark-theme .news-image {
    background-color: var(--border-color-dark);
}

.news-content {
    padding: 16px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.8rem;
}

.news-category {
    background-color: var(--fab-bg-light);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

body.dark-theme .news-category {
    background-color: var(--fab-bg-dark);
}

.news-time {
    color: rgba(0,0,0,0.5);
    font-weight: 500;
}

body.dark-theme .news-time {
    color: rgba(255,255,255,0.5);
}

.news-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-color-light);
}

body.dark-theme .news-title {
    color: var(--text-color-dark);
}

.news-description {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(0,0,0,0.7);
}

body.dark-theme .news-description {
    color: rgba(255,255,255,0.7);
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid var(--border-color-light);
    font-size: 0.8rem;
    color: rgba(0,0,0,0.6);
}

body.dark-theme .news-footer {
    border-top-color: var(--border-color-dark);
    color: rgba(255,255,255,0.6);
}

.news-source {
    font-weight: 600;
}

.news-reactions {
    font-weight: 500;
}

/* Emoji Stats */
.emoji-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
    padding: 10px;
    background-color: rgba(0,0,0,0.03);
    border-radius: 8px;
}

body.dark-theme .emoji-stats {
    background-color: rgba(255,255,255,0.05);
}

.emoji-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background-color: white;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: default;
    transition: all 0.2s ease;
}

body.dark-theme .emoji-stat {
    background-color: #3a3d42;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.emoji-stat:hover {
    transform: scale(1.05);
}

/* Clickable emoji stat styles - matching carousel reaction badges */
.emoji-stat.clickable {
    cursor: pointer;
    user-select: none;
}

.emoji-stat.clickable:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.emoji-stat.clickable:active {
    transform: scale(0.95);
}

body.dark-theme .emoji-stat.clickable:hover {
    background: rgba(74, 144, 226, 0.3);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
}

.emoji-stat small {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-color-light);
}

body.dark-theme .emoji-stat small {
    color: var(--text-color-dark);
}

/* News Action Buttons */
.news-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.news-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

.news-btn-primary {
    background-color: var(--button-bg-light);
    color: var(--button-text-light);
}

body.dark-theme .news-btn-primary {
    background-color: var(--button-bg-dark);
    color: var(--button-text-dark);
}

.news-btn-primary:hover {
    background-color: var(--button-hover-bg-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

body.dark-theme .news-btn-primary:hover {
    background-color: var(--button-hover-bg-dark);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.news-btn-emoji {
    background-color: transparent;
    border: 2px solid var(--border-color-light);
    color: var(--text-color-light);
}

body.dark-theme .news-btn-emoji {
    border-color: var(--border-color-dark);
    color: var(--text-color-dark);
}

.news-btn-emoji:hover {
    background-color: rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

body.dark-theme .news-btn-emoji:hover {
    background-color: rgba(255,255,255,0.1);
}

.news-btn:active {
    transform: scale(0.98);
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.skeleton-card {
    background: linear-gradient(90deg, 
        var(--border-color-light) 25%, 
        rgba(0,0,0,0.05) 50%, 
        var(--border-color-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

body.dark-theme .skeleton-card {
    background: linear-gradient(90deg, 
        #2a2d32 25%, 
        rgba(255,255,255,0.05) 50%, 
        #2a2d32 75%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-image {
    width: 100%;
    height: 180px;
    background-color: rgba(0,0,0,0.1);
}

.skeleton-content {
    padding: 16px;
}

.skeleton-line {
    height: 16px;
    background-color: rgba(0,0,0,0.1);
    margin-bottom: 8px;
    border-radius: 4px;
}

body.dark-theme .skeleton-line {
    background-color: rgba(255,255,255,0.1);
}

.skeleton-line.short {
    width: 60%;
}

/* Modal Updates */
.modal-description {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    color: rgba(0,0,0,0.6);
    text-align: center;
}

body.dark-theme .modal-description {
    color: rgba(255,255,255,0.6);
}

/* Notification System (Bottom-left toast) */
.notification {
    position: fixed;
    bottom: 24px;
    left: 24px;
    max-width: 400px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(-120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 0.95rem;
    line-height: 1.5;
}

.notification.show {
    transform: translateX(0);
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    color: rgba(0, 0, 0, 0.87);
}

.notification-warning {
    border-left: 4px solid #ff9800;
}

.notification-error {
    border-left: 4px solid #f44336;
}

.notification-info {
    border-left: 4px solid #2196f3;
}

/* Dark theme notifications */
body.dark-theme .notification {
    background: #2a2a2a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-theme .notification-message {
    color: rgba(255, 255, 255, 0.87);
}

@media (max-width: 768px) {
    .notification {
        left: 16px;
        right: 16px;
        max-width: calc(100% - 32px);
        bottom: 80px; /* Above FAB buttons */
    }
}

body.dark-theme .modal-description {
    color: rgba(255,255,255,0.6);
}

/* --- News Carousel Panel --- */
/* DESKTOP (>768px): Always visible carousel in bottom-left corner */
/* MOBILE (≤768px): Button with modal popup (original behavior) */

.news-carousel-wrapper {
    position: relative;
    display: flex;
}

/* === DESKTOP STYLES (>768px) === */
@media (min-width: 769px) {
    /* Hide the button on desktop */
    .latest-news-btn {
        display: none !important;
    }
    
    /* Close button (X) for desktop carousel */
    .carousel-close-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        background: rgba(0, 0, 0, 0.5);
        color: white;
        border: none;
        border-radius: 50%;
        font-size: 18px;
        font-weight: bold;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        transition: all 0.3s ease;
        opacity: 0.7;
    }
    
    .carousel-close-btn:hover {
        opacity: 1;
        background: rgba(0, 0, 0, 0.7);
        transform: rotate(90deg);
    }
    
    /* Expand button (Latest News) - shown when carousel is hidden */
    .carousel-expand-btn {
        position: fixed;
        bottom: 24px;
        left: 24px;
        padding: 12px 24px;
        background: rgba(59, 130, 246, 0.9);
        color: white;
        border: none;
        border-radius: 24px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        display: none;
        align-items: center;
        gap: 8px;
        z-index: 1100; /* Higher than panel and map */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
        opacity: 0;
        transform: translateY(20px);
        pointer-events: auto; /* Ensure clickable */
    }
    
    .carousel-expand-btn:hover {
        background: rgba(59, 130, 246, 1);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    }
    
    body.dark-theme .carousel-expand-btn {
        background: rgba(74, 144, 226, 0.9);
    }
    
    body.dark-theme .carousel-expand-btn:hover {
        background: rgba(74, 144, 226, 1);
    }
    
    /* Carousel: Single card bottom-left, rotates automatically */
    .news-carousel-panel {
        display: block !important;
        position: fixed;
        bottom: 24px;
        left: 24px;
        right: auto;
        width: 600px; /* Single card width - wider for better readability */
        max-width: calc(100vw - 200px); /* Leave space for FAB buttons */
        background: transparent; /* No container background */
        backdrop-filter: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        z-index: 900;
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
        /* Smooth transitions for hide/show */
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    /* Hide carousel controls (arrows, dots) on desktop */
    .carousel-dots-small {
        display: none !important; /* Hide dots on desktop */
    }
    
    /* Show arrows on desktop - positioned at extreme left/right */
    .carousel-panel-controls {
        display: block !important; /* Changed from flex to block */
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none; /* Let clicks pass through except on buttons */
        z-index: 10;
    }
    
    /* Carousel arrow buttons - minimal text only, no background at all */
    .carousel-btn-small {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: auto !important;
        height: auto !important;
        background: none !important; /* Completely no background */
        border: none !important;
        outline: none !important;
        color: rgba(255, 255, 255, 0.8) !important;
        font-size: 48px !important; /* Large thin arrows */
        font-weight: 300 !important; /* Thin */
        line-height: 1 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        pointer-events: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        /* Remove any box styling */
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    /* Left arrow at extreme left margin */
    .carousel-btn-small:first-child {
        left: 16px !important;
    }
    
    /* Right arrow at extreme right margin */
    .carousel-btn-small:last-child {
        right: 16px !important;
    }
    
    .carousel-btn-small:hover {
        color: rgba(255, 255, 255, 1) !important;
        transform: translateY(-50%) scale(1.15) !important;
        text-shadow: none !important; /* No shadow */
        background: none !important;
        box-shadow: none !important;
    }
    
    .carousel-btn-small:active {
        transform: translateY(-50%) scale(0.9) !important;
    }
    
    body.dark-theme .carousel-btn-small {
        background: none !important; /* No background in dark theme */
        box-shadow: none !important;
        color: rgba(255, 255, 255, 0.8) !important;
    }
    
    body.dark-theme .carousel-btn-small:hover {
        background: none !important; /* No background on hover */
        box-shadow: none !important;
        color: rgba(255, 255, 255, 1) !important;
    }
    
    /* Track: Single card container */
    .carousel-panel-track {
        position: relative;
        width: 100%;
        height: 200px; /* Single card height */
        overflow: hidden;
        border-radius: 16px;
        background: transparent;
    }
    
    /* Cards: One visible at a time, others hidden */
    .news-card-mini {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        opacity: 0;
        transform: translateX(100%);
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(255, 255, 255, 0.92) !important;
        backdrop-filter: blur(20px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
        border-radius: 16px;
        overflow: hidden;
        display: flex !important;
        flex-direction: row;
        pointer-events: auto;
    }
    
    /* Active card: Visible and centered */
    .news-card-mini.active {
        opacity: 1 !important;
        transform: translateX(0) !important;
        z-index: 2;
    }
    
    /* Previous card: Slide out to left */
    .news-card-mini.prev {
        opacity: 0 !important;
        transform: translateX(-100%) !important;
        z-index: 1;
    }
    
    body.dark-theme .news-card-mini {
        background: rgba(30, 30, 40, 0.92) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* No hover effect on card - disabled */
    .news-card-mini.active:hover {
        /* Keep original state - no animation */
    }
    
    body.dark-theme .news-card-mini.active:hover {
        /* Keep original state - no animation */
    }
}

/* === MOBILE STYLES (≤768px) === */
@media (max-width: 768px) {
    /* Hide desktop-only carousel controls on mobile */
    .carousel-close-btn,
    .carousel-expand-btn {
        display: none !important;
    }
    
    /* Keep original button behavior */
    .latest-news-btn {
        width: auto !important;
        min-width: 150px !important;
        height: 58px !important;
        padding: 0 20px !important;
        border-radius: 29px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .latest-news-btn .carousel-text {
        font-size: 15px;
        font-weight: 600;
        color: white;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Modal popup on mobile (original behavior) */
    .news-carousel-panel {
        display: none;
        position: absolute;
        bottom: calc(100% + 12px);
        right: 0;
        width: 600px;
        max-width: calc(100vw - 48px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        padding: 16px;
        z-index: 1000;
    }
    
    .news-carousel-panel.active {
        display: block;
    }
    
    body.dark-theme .news-carousel-panel {
        background: rgba(30, 30, 30, 0.98);
    }
}

.carousel-panel-track {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-radius: 12px;
}

.news-card-mini {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

body.dark-theme .news-card-mini {
    background: rgba(50, 50, 50, 0.9);
}

.news-card-mini.active {
    opacity: 1;
    transform: translateX(0);
}

.news-card-mini.prev {
    transform: translateX(-100%);
    opacity: 0;
}

.news-card-image {
    width: 240px;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    flex-shrink: 0;
}

.news-card-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.news-card-body::-webkit-scrollbar {
    display: none;
}

.news-card-category {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    align-self: flex-start;
}

body.dark-theme .news-card-category {
    background: rgba(59, 130, 246, 0.2);
}

.news-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: var(--text-primary);
    /* Limit to 2 lines with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.news-card-source {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.news-card-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.news-card-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    width: 100%; /* Force new line */
}

.reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

/* Clickable reaction badges */
.reaction-badge.clickable {
    cursor: pointer;
    user-select: none;
}

.reaction-badge.clickable:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.reaction-badge.clickable:active {
    transform: scale(0.95);
}

body.dark-theme .reaction-badge {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-theme .reaction-badge.clickable:hover {
    background: rgba(74, 144, 226, 0.3);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
}

.news-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.news-card-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-read {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-read:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-react {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

body.dark-theme .btn-react {
    background: rgba(59, 130, 246, 0.2);
}

.btn-react:hover {
    background: rgba(59, 130, 246, 0.2);
}

.carousel-panel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.carousel-btn-small {
    width: 32px;
    height: 32px;
    border: none;
    background: none !important;
    color: #3b82f6;
    border-radius: 0;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s; /* Only transform transition */
    line-height: 1;
    box-shadow: none !important; /* No shadow */
}

body.dark-theme .carousel-btn-small {
    background: none !important;
    box-shadow: none !important;
}

.carousel-btn-small:hover {
    background: none !important;
    box-shadow: none !important; /* No shadow on hover */
    transform: scale(1.1);
}

.carousel-dots-small {
    display: flex;
    gap: 6px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dot.active {
    background: #3b82f6;
    width: 24px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    /* Mobile: panel centrato verticalmente per evitare i pulsanti */
    .news-carousel-panel {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        bottom: auto !important;
        width: 85vw !important;
        max-width: 350px !important;
        padding: 12px !important;
        right: auto !important;
        max-height: 420px !important;
    }
    
    .carousel-panel-track {
        display: flex !important;
        flex-direction: row !important;
        gap: 0 !important;
        height: 320px !important;
        min-height: 320px !important;
        overflow: visible !important;
        position: relative !important;
    }
    
    /* Card verticale compatta */
    .news-card-mini {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    /* Immagine compatta */
    .news-card-image {
        width: 100% !important;
        height: 140px !important;
        flex-shrink: 0 !important;
        object-fit: cover !important;
    }
    
    /* Contenuto compatto */
    .news-card-body {
        flex: 1 !important;
        padding: 10px !important;
        gap: 6px !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .news-card-category {
        font-size: 10px !important;
        padding: 3px 8px !important;
        width: fit-content !important;
    }
    
    .news-card-title {
        font-size: 15px !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        font-weight: 600 !important;
        /* Limit to 2 lines with ellipsis */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .news-card-source,
    .news-card-time {
        font-size: 12px !important;
    }
    
    .news-card-reactions {
        display: flex !important;
        gap: 4px !important;
        flex-wrap: wrap !important;
        margin-top: 8px !important;
        width: 100% !important;
    }
    
    .reaction-badge {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
    
    .news-card-actions {
        flex-direction: row !important;
        gap: 8px !important;
        margin-top: auto !important;
    }
    
    .news-card-btn {
        height: 38px !important;
        font-size: 13px !important;
        padding: 0 14px !important;
        flex: 1 !important;
    }
    
    /* Pulsante Latest News mobile */
    .latest-news-btn {
        min-width: 120px !important;
        height: 48px !important;
        font-size: 13px !important;
        border-radius: 24px !important;
    }
    
    /* Controls compatti */
    .carousel-panel-controls {
        margin-top: 8px !important;
    }
    
    .carousel-nav-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }
    
    .carousel-dots {
        gap: 4px !important;
    }
    
    .carousel-dot {
        width: 6px !important;
        height: 6px !important;
    }
}

