/**
 * Welion Battery News Widget Styles - TELJES VERZIÓ
 * 
 * Design hogy illeszkedjen a Welion Battery oldal stílusához
 * Modern, professzionális energetikai vállalat megjelenés
 * + Országjelzés funkcionalitás
 * + MODAL TÁMOGATÁS
 */

/* ========== MAIN CONTAINER ========== */
.news-widget {
    width: 100%;
    max-width: 1400px; /* Nagyobb max szélesség */
    margin: 0 auto;
    padding: 60px 20px;
    font-family: 'Arial', 'Helvetica', sans-serif;
    background: #f8f9fa;
    position: relative;
    overflow-x: auto; /* Horizontal scroll ha szükséges */
    overflow-y: visible;
}

.news-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0066cc, #4da6ff, #0066cc);
    background-size: 200% 100%;
    animation: gradient-slide 3s ease-in-out infinite;
}

@keyframes gradient-slide {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ========== HEADER ========== */
.news-widget-header {
    text-align: center;
    margin-bottom: 40px;
}

.news-widget-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    position: relative;
}

.news-widget-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #0066cc;
}

.news-widget-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0;
}

/* ========== CAROUSEL CONTAINER ========== */
.news-carousel {
    position: relative;
    width: 100%;
    height: 380px;
    perspective: 1200px;
    margin: 0 auto;
    min-width: 1000px; /* Minimum szélesség a 5-card layout-hoz */
}

.news-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible; /* Biztosítja, hogy a side kártyák láthatóak legyenek */
}

/* ========== NEWS CARDS ========== */
.news-card {
    position: absolute;
    width: 350px;
    height: 320px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 25px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    border: 2px solid transparent;
    touch-action: pan-y; /* Allow vertical scrolling, prevent horizontal */
    top: 50%; /* Explicit top pozíció */
    transform: translateY(-50%); /* Központosítás */
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0066cc, #4da6ff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover::before {
    opacity: 1;
}

.news-card:hover {
    cursor: pointer;
}

.news-card:hover .news-card-title {
    color: #0066cc;
}

.news-card:active {
    transform: translateY(-50%) scale(0.98);
}

/* Card positions - 5 cards layout - JAVÍTOTT POZÍCIÓK */
.news-card.prev2 {
    left: 10%;
    transform: translateY(-50%) scale(0.75) rotateY(35deg);
    opacity: 0.4;
    z-index: 0;
}

.news-card.prev {
    left: 25%;
    transform: translateY(-50%) scale(0.85) rotateY(20deg);
    opacity: 0.7;
    z-index: 1;
}

.news-card.active {
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 3;
    box-shadow: 0 8px 40px rgba(0, 102, 204, 0.2);
}

.news-card.next {
    right: 25%;
    transform: translateY(-50%) scale(0.85) rotateY(-20deg);
    opacity: 0.7;
    z-index: 1;
}

.news-card.next2 {
    right: 10%;
    transform: translateY(-50%) scale(0.75) rotateY(-35deg);
    opacity: 0.4;
    z-index: 0;
}

.news-card.hidden {
    opacity: 0;
    transform: translateY(-50%) scale(0.7);
    z-index: 0;
}

/* ========== CARD CONTENT ========== */
.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.news-card-category {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 20px;
    color: #ffffff;
    flex-shrink: 0;
}

.news-card-country {
    font-size: 1.2rem;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: help;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-card-country:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.news-card-category.research {
    background: linear-gradient(135deg, #6a4c93, #9b59b6);
}

.news-card-category.industrial {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.news-card-category.residential {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.news-card-category.ev {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.news-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-footer {
    position: absolute;
    bottom: 20px;
    left: 25px;
    right: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

.news-card-source {
    font-weight: 600;
    color: #0066cc;
}

.news-card-date {
    font-style: italic;
}

/* Priority badge for cards */
.news-card-priority {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #b8860b;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    z-index: 2;
}

/* ========== NAVIGATION ========== */
.news-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #0066cc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 1.2rem;
    color: #0066cc;
}

.news-carousel-nav:hover {
    background: #0066cc;
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.news-carousel-nav.prev {
    left: 20px;
}

.news-carousel-nav.next {
    right: 20px;
}

/* Large desktop navigation positioning */
@media (min-width: 1200px) {
    .news-carousel-nav {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    .news-carousel-nav.prev {
        left: 40px;
    }
    
    .news-carousel-nav.next {
        right: 40px;
    }
}

@media (min-width: 1400px) {
    .news-carousel-nav.prev {
        left: 60px;
    }
    
    .news-carousel-nav.next {
        right: 60px;
    }
}

/* ========== PROGRESS INDICATOR ========== */
.news-progress {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.news-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-progress-dot.active {
    background: #0066cc;
    transform: scale(1.2);
}

.news-progress-dot:hover {
    background: #4da6ff;
}

/* ========== AUTO-PLAY INDICATOR ========== */
.news-autoplay-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
}

.news-autoplay-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0066cc;
    position: relative;
    overflow: hidden;
}

.news-autoplay-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 50%;
    transform: scale(0);
    animation: autoplay-progress 30s linear infinite;
}

@keyframes autoplay-progress {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* ========== MODAL STYLES ========== */

/* Modal overlay and container */
.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.news-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.news-modal-container {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
    transform-origin: center center;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Close animation */
.news-modal.closing .news-modal-container {
    animation: modalSlideOut 0.2s ease-in forwards;
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
}

/* Modal header */
.news-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #0066cc, #4da6ff);
    color: white;
}

.news-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.news-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.news-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal content */
.news-modal-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

/* Loading state - JAVÍTOTT ANIMÁCIÓ */
.news-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    color: #666;
}

.news-modal-loading p {
    margin: 0;
    font-size: 1.1rem;
    color: #0066cc;
    font-weight: 500;
    animation: pulse 2s ease-in-out infinite;
}

.news-modal-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulsing effect for loading text */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Article content */
.news-modal-article {
    padding: 30px;
}

.news-modal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.news-modal-source {
    font-weight: 600;
    color: #0066cc;
}

.news-modal-date {
    font-style: italic;
}

.news-modal-images {
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.news-modal-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.news-modal-image:hover {
    transform: scale(1.02);
}

/* Single image full width */
.news-modal-images.single-image .news-modal-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}

/* Multiple images grid */
.news-modal-images.multiple-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.news-modal-images.multiple-images .news-modal-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.news-modal-article-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 20px;
}

.news-modal-article-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 30px;
}

.news-modal-article-content p {
    margin-bottom: 15px;
}

.news-modal-article-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0066cc;
    margin: 25px 0 15px 0;
}

/* Modal footer */
.news-modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.news-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.news-modal-btn-primary {
    background: #0066cc;
    color: white;
}

.news-modal-btn-primary:hover {
    background: #0052a3;
    transform: translateY(-1px);
}

.news-modal-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.news-modal-btn-secondary:hover {
    background: #e9ecef;
}

/* Error state */
.news-modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    text-align: center;
}

.news-modal-error p {
    color: #dc3545;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* ========== MODAL SCROLLBAR STYLING ========== */
.news-modal-content::-webkit-scrollbar {
    width: 8px;
}

.news-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.news-modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.news-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Large Desktop optimalization - FIRST */
@media (min-width: 1200px) {
    .news-widget {
        padding: 80px 40px;
    }
    
    .news-carousel {
        height: 420px;
        min-width: 1200px;
        max-width: 1400px;
    }
    
    .news-card {
        width: 380px;
        height: 350px;
        padding: 30px;
    }
    
    .news-card.prev2 {
        left: 5%;
        transform: translateY(-50%) scale(0.8) rotateY(30deg);
        opacity: 0.5;
    }
    
    .news-card.prev {
        left: 22%;
        transform: translateY(-50%) scale(0.9) rotateY(15deg);
        opacity: 0.8;
    }
    
    .news-card.next {
        right: 22%;
        transform: translateY(-50%) scale(0.9) rotateY(-15deg);
        opacity: 0.8;
    }
    
    .news-card.next2 {
        right: 5%;
        transform: translateY(-50%) scale(0.8) rotateY(-30deg);
        opacity: 0.5;
    }
    
    .news-card-title {
        font-size: 1.4rem;
    }
    
    .news-card-description {
        font-size: 1rem;
    }
    
    .news-modal-container {
        max-width: 900px;
    }
    
    .news-modal-article {
        padding: 40px;
    }
    
    .news-modal-article-title {
        font-size: 2rem;
    }
    
    .news-modal-article-content {
        font-size: 1.2rem;
    }
}

@media (min-width: 1400px) {
    .news-widget {
        padding: 100px 60px;
    }
    
    .news-carousel {
        height: 450px;
        min-width: 1300px;
    }
    
    .news-card {
        width: 400px;
        height: 380px;
        padding: 35px;
    }
    
    .news-card.prev2 {
        left: 8%;
        transform: translateY(-50%) scale(0.82) rotateY(25deg);
        opacity: 0.6;
    }
    
    .news-card.prev {
        left: 24%;
        transform: translateY(-50%) scale(0.92) rotateY(12deg);
        opacity: 0.85;
    }
    
    .news-card.next {
        right: 24%;
        transform: translateY(-50%) scale(0.92) rotateY(-12deg);
        opacity: 0.85;
    }
    
    .news-card.next2 {
        right: 8%;
        transform: translateY(-50%) scale(0.82) rotateY(-25deg);
        opacity: 0.6;
    }
    
    .news-card-title {
        font-size: 1.5rem;
    }
    
    .news-card-description {
        font-size: 1.1rem;
    }
}

/* Tablet and smaller */
@media (max-width: 1199px) {
    .news-carousel {
        min-width: auto; /* Reset min-width for smaller screens */
    }
}

@media (max-width: 768px) {
    .news-widget {
        padding: 40px 15px;
    }
    
    .news-widget-title {
        font-size: 1.8rem;
    }
    
    .news-widget-subtitle {
        font-size: 1rem;
    }
    
    .news-carousel {
        height: 280px;
        perspective: 800px;
    }
    
    .news-card {
        width: 300px;
        height: 250px;
        padding: 18px;
    }
    
    /* Tablet nézetben 3 kártya */
    .news-card.prev2,
    .news-card.next2 {
        display: none;
    }
    
    .news-card.prev {
        left: -80px;
        transform: translateY(-50%) scale(0.8) rotateY(25deg);
        opacity: 0.6;
    }
    
    .news-card.next {
        right: -80px;
        transform: translateY(-50%) scale(0.8) rotateY(-25deg);
        opacity: 0.6;
    }
    
    .news-card-header {
        margin-bottom: 12px;
    }
    
    .news-card-category {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    
    .news-card-country {
        font-size: 1.1rem;
        padding: 3px 7px;
    }
    
    .news-card-title {
        font-size: 1.15rem;
        -webkit-line-clamp: 2;
    }
    
    .news-card-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
    }
    
    .news-carousel-nav {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    
    .news-carousel-nav.prev {
        left: 5px;
    }
    
    .news-carousel-nav.next {
        right: 5px;
    }
    
    /* Modal tablet */
    .news-modal {
        padding: 10px;
    }
    
    .news-modal-container {
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .news-modal-header {
        padding: 20px 25px;
    }
    
    .news-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .news-modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
    
    .news-modal-article {
        padding: 25px;
    }
    
    .news-modal-article-title {
        font-size: 1.5rem;
    }
    
    .news-modal-article-content {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .news-modal-footer {
        flex-direction: column;
    }
    
    .news-modal-btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .news-modal-images.multiple-images {
        grid-template-columns: 1fr;
    }
    
    .news-modal-images.multiple-images .news-modal-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .news-widget {
        padding: 25px 10px;
    }
    
    .news-widget-title {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }
    
    .news-widget-subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .news-carousel {
        height: 240px;
        perspective: 600px;
    }
    
    .news-card {
        width: 280px;
        height: 200px;
        padding: 15px;
    }
    
    /* Mobil nézetben csak az aktív kártya + halvány preview */
    .news-card.prev2,
    .news-card.next2 {
        display: none;
    }
    
    .news-card.prev,
    .news-card.next {
        opacity: 0.2;
        pointer-events: none;
    }
    
    .news-card.prev {
        left: -100px;
        transform: translateY(-50%) scale(0.7);
    }
    
    .news-card.next {
        right: -100px;
        transform: translateY(-50%) scale(0.7);
    }
    
    .news-card-header {
        margin-bottom: 10px;
    }
    
    .news-card-category {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .news-card-country {
        font-size: 1rem;
        padding: 2px 6px;
    }
    
    .news-card-title {
        font-size: 1rem;
        -webkit-line-clamp: 2;
        margin-bottom: 8px;
    }
    
    .news-card-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        margin-bottom: 15px;
    }
    
    .news-card-footer {
        bottom: 15px;
        left: 15px;
        right: 15px;
        font-size: 0.8rem;
    }
    
    .news-carousel-nav {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .news-carousel-nav.prev {
        left: 2px;
    }
    
    .news-carousel-nav.next {
        right: 2px;
    }
    
    .news-progress {
        bottom: -15px;
        gap: 6px;
    }
    
    .news-progress-dot {
        width: 10px;
        height: 10px;
    }
    
    .news-autoplay-indicator {
        top: 12px;
        right: 12px;
        font-size: 0.75rem;
        gap: 4px;
    }
    
    .news-autoplay-icon {
        width: 14px;
        height: 14px;
    }
    
    /* Modal mobile */
    .news-modal {
        padding: 0;
        align-items: stretch;
    }
    
    .news-modal-container {
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .news-modal-header {
        padding: 15px 20px;
    }
    
    .news-modal-header h2 {
        font-size: 1.1rem;
    }
    
    .news-modal-close {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
    
    .news-modal-article {
        padding: 20px;
    }
    
    .news-modal-article-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .news-modal-article-content {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .news-modal-article-content h3 {
        font-size: 1.1rem;
        margin: 20px 0 10px 0;
    }
    
    .news-modal-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        margin-bottom: 15px;
    }
    
    .news-modal-loading {
        padding: 40px 20px;
    }
    
    .news-modal-error {
        padding: 40px 20px;
    }
    
    .news-modal-btn {
        padding: 16px 20px;
        font-size: 0.95rem;
    }
    
    .news-modal-images.single-image .news-modal-image {
        max-height: 200px;
    }
    
    .news-modal-images.multiple-images .news-modal-image {
        height: 120px;
    }
}

/* Extra kis kijelzők (iPhone SE, stb.) */
@media (max-width: 360px) {
    .news-widget {
        padding: 20px 8px;
    }
    
    .news-widget-title {
        font-size: 1.4rem;
    }
    
    .news-widget-subtitle {
        font-size: 0.9rem;
    }
    
    .news-carousel {
        height: 220px;
    }
    
    .news-card {
        width: 260px;
        height: 180px;
        padding: 12px;
    }
    
    .news-card.prev,
    .news-card.next {
        opacity: 0.2;
    }
    
    .news-card.prev {
        left: -140px;
    }
    
    .news-card.next {
        right: -140px;
    }
    
    .news-card-title {
        font-size: 0.95rem;
        -webkit-line-clamp: 2;
    }
    
    .news-card-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
    
    .news-carousel-nav {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
    
    .news-autoplay-indicator {
        top: 10px;
        right: 10px;
        font-size: 0.7rem;
        gap: 3px;
    }
    
    .news-autoplay-icon {
        width: 12px;
        height: 12px;
    }
    
    .news-progress {
        bottom: -12px;
        gap: 4px;
    }
    
    .news-progress-dot {
        width: 8px;
        height: 8px;
    }
    
    /* Modal extra small */
    .news-modal-header {
        padding: 12px 15px;
    }
    
    .news-modal-header h2 {
        font-size: 1rem;
    }
    
    .news-modal-close {
        width: 28px;
        height: 28px;
        font-size: 1.1rem;
    }
    
    .news-modal-article {
        padding: 15px;
    }
    
    .news-modal-article-title {
        font-size: 1.2rem;
    }
    
    .news-modal-article-content {
        font-size: 0.9rem;
    }
    
    .news-modal-btn {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
}

/* ========== LOADING STATE ========== */
.news-widget.loading {
    opacity: 0.7;
    pointer-events: none;
}

.news-widget.loading .news-carousel {
    opacity: 0.6;
    pointer-events: none;
}

.news-widget.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

/* ========== ACCESSIBILITY ========== */
.news-card:focus,
.news-carousel-nav:focus,
.news-progress-dot:focus,
.news-modal-close:focus,
.news-modal-btn:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* ========== MODAL DARK MODE SUPPORT ========== */
@media (prefers-color-scheme: dark) {
    .news-modal-container {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .news-modal-header {
        border-bottom-color: #333;
    }
    
    .news-modal-article-title {
        color: #ffffff;
    }
    
    .news-modal-article-content {
        color: #e0e0e0;
    }
    
    .news-modal-meta {
        color: #aaa;
    }
    
    .news-modal-source {
        color: #4da6ff;
    }
    
    .news-modal-footer {
        border-top-color: #333;
    }
    
    .news-modal-btn-secondary {
        background: #333;
        color: #ffffff;
        border-color: #555;
    }
    
    .news-modal-btn-secondary:hover {
        background: #444;
    }
    
    .news-modal-content::-webkit-scrollbar-track {
        background: #2a2a2a;
    }
    
    .news-modal-content::-webkit-scrollbar-thumb {
        background: #555;
    }
    
    .news-modal-content::-webkit-scrollbar-thumb:hover {
        background: #666;
    }
}

/* ========== MOTION PREFERENCES ========== */
@media (prefers-reduced-motion: reduce) {
    .news-card,
    .news-carousel-track,
    .news-carousel-nav {
        transition: none;
    }
    
    .news-autoplay-icon::after {
        animation: none;
    }
    
    .news-widget::before {
        animation: none;
    }
    
    .news-modal-container {
        animation: none;
    }
    
    .news-modal.closing .news-modal-container {
        animation: none;
    }
    
    .news-modal-spinner {
        animation: none;
    }
    
    .news-modal-image {
        transition: none;
    }
    
    .news-modal-btn {
        transition: none;
    }
    
    .news-modal-close {
        transition: none;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
    .news-modal-overlay {
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: none;
    }
    
    .news-modal-container {
        border: 2px solid #000;
    }
    
    .news-modal-btn {
        border: 2px solid currentColor;
    }
    
    .news-modal-btn-primary {
        border-color: #ffffff;
    }
    
    .news-modal-btn-secondary {
        border-color: #000000;
    }
}

/* Mobile-specific optimizations */
@media (max-width: 768px) and (orientation: portrait) {
    .news-carousel {
        height: 260px;
    }
    
    .news-card {
        width: 290px;
        height: 230px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .news-widget {
        padding: 30px 15px;
    }
    
    .news-carousel {
        height: 200px;
    }
    
    .news-card {
        width: 280px;
        height: 170px;
        padding: 12px;
    }
    
    .news-card-title {
        font-size: 1rem;
        -webkit-line-clamp: 1;
    }
    
    .news-card-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .news-modal {
        position: static !important;
        background: white !important;
        box-shadow: none !important;
    }
    
    .news-modal-overlay {
        display: none !important;
    }
    
    .news-modal-container {
        max-width: none !important;
        max-height: none !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .news-modal-header {
        background: white !important;
        color: black !important;
        border-bottom: 2px solid #000 !important;
    }
    
    .news-modal-close,
    .news-modal-footer {
        display: none !important;
    }
    
    .news-modal-article-content {
        color: black !important;
    }
    
    .news-modal-image {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
}