/* ===== שיפורי תגובתיות ===== */

/* מכשירים קטנים מאוד (טלפונים, פחות מ-480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    header {
        padding: 12px 0;
    }
    
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .nav {
        display: flex;
        gap: 15px;
        justify-content: center;
        width: 100%;
    }
    
    .nav a {
        margin: 0;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: var(--text-2xl);
        margin: 30px 0 20px;
        text-align: center;
    }
    
    .section-title::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .content-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
    }
    
    .sidebar.collapsed {
        width: 100%;
        height: auto;
    }
    
    .sidebar.collapsed .sidebar-content {
        opacity: 1;
        pointer-events: auto;
    }
    
    .sidebar.collapsed::after {
        display: none;
    }
    
    .main-content {
        order: 1;
    }
    
    .hot-grid,
    .items-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hot-card,
    .item-card {
        margin-bottom: 0;
    }
    
    footer {
        padding: 20px 0;
        font-size: 0.9rem;
    }
    
    .footer-brand {
        flex-direction: column;
        gap: 10px;
    }
}

/* טלפונים גדולים וטאבלטים קטנים (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .header-inner {
        flex-wrap: wrap;
    }
    
    .nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
        justify-content: center;
    }
    
    .section-title {
        font-size: var(--text-2xl);
        margin: 35px 0 25px;
    }
    
    .content-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    
    .sidebar {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .hot-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* טאבלטים (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .content-wrapper {
        gap: 30px;
    }
    
    .sidebar {
        width: 250px;
    }
    
    .hot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .items-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* מחשבים ניידים (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
    .container {
        max-width: 1200px;
    }
    
    .hot-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* התאמות לטקסט */
@media (max-width: 768px) {
    h1, .h1 { font-size: var(--text-3xl); }
    h2, .h2 { font-size: var(--text-2xl); }
    h3, .h3 { font-size: var(--text-xl); }
    
    .lead-text {
        font-size: var(--text-base);
    }
    
    .hero-caption h3 {
        font-size: 1.2rem;
    }
    
    .hero-caption p {
        font-size: 0.9rem;
    }
}

/* התאמות לטאבלטים בפריסה אנכית */
@media (max-width: 1024px) and (orientation: portrait) {
    .premium-hero {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(200px, auto);
    }
    
    .hero-item {
        max-height: 250px;
    }
}

/* התאמות לטאבלטים בפריסה אופקית */
@media (max-width: 1024px) and (orientation: landscape) {
    .premium-hero {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* התאמות למצב כף יד (handheld) */
@media (hover: none) and (pointer: coarse) {
    /* הסרת אפקטים התלויים ב-hover */
    .hot-card:hover,
    .item-card:hover,
    .card:hover {
        transform: none;
    }
    
    .nav a::after {
        display: none;
    }
    
    /* הגדלת אזורי לחיצה */
    a, button, .hero-item, .hot-card, .item-card {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* התאמות לטאצ' */
    .hot-link,
    .item-link {
        padding: 12px 24px;
    }
}

/* תמיכה במצב כהה אוטומטי */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-neutral-50: #1a1a1a;
        --color-neutral-100: #2d2d2d;
        --color-neutral-200: #404040;
        --color-neutral-300: #545454;
        --color-neutral-400: #686868;
        --color-neutral-500: #7c7c7c;
        --color-neutral-600: #909090;
        --color-neutral-700: #a4a4a4;
        --color-neutral-800: #b8b8b8;
        --color-neutral-900: #f0f0f0;
    }
}

/* תמיכה במצב חיסכון בסוללה */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* תמיכה בקונטרסט גבוה */
@media (prefers-contrast: high) {
    :root {
        --color-primary-500: #8f3e23;
        --color-secondary-500: #2d6159;
    }
    
    .section-title::after {
        height: 4px;
    }
}

/* תמיכה במצב קריאה */
@media (prefers-reduced-transparency: reduce) {
    .hero-item::before,
    .hero-caption {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* התאמות להדפסה */
@media print {
    .nav,
    .sidebar,
    .hero-item,
    .hot-link,
    .item-link,
    footer {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    .hot-card,
    .item-card {
        break-inside: avoid;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}