/* General Body Styles */
body {
  font-family: 'Heebo', Arial, sans-serif;
  background-color: #f8f9fa; /* bg-gray-50 */
  color: #1f2937; /* text-gray-800 */
  direction: rtl;
  margin: 0;
}

/* Header Styles */
.site-header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-container {
  max-width: 112rem; /* max-w-7xl */
  margin: 0 auto;
  padding: 0 1rem; /* px-4 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem; /* h-16 */
  position: relative;
  z-index: 2;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* space-x-2 */
}

.logo-icon-wrapper {
  width: 2.5rem; /* w-10 */
  height: 2.5rem; /* h-10 */
  background-image: linear-gradient(to bottom right, #3b82f6, #8b5cf6); /* bg-gradient-to-br from-blue-600 to-purple-600 */
  border-radius: 0.5rem; /* rounded-lg */
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon-wrapper .icon {
    color: white;
}

.logo-text h1 {
  font-size: 1.25rem; /* text-xl */
  font-weight: 700; /* font-bold */
  background-image: linear-gradient(to right, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
}

.logo-text p {
  font-size: 0.75rem; /* text-xs */
  color: #6b7280; /* text-gray-500 */
  margin: 0;
}

.desktop-nav {
  display: none; /* hidden */
}

@media (min-width: 768px) { /* md: */
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* space-x-6 */
  }
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* space-x-2 */
  padding: 0.5rem 0.75rem; /* px-3 py-2 */
  border-radius: 0.5rem; /* rounded-lg */
  transition: all 0.2s;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  color: #4b5563; /* text-gray-600 */
}

.nav-button:hover {
  color: #2563eb; /* hover:text-blue-600 */
  background-color: #f9fafb; /* hover:bg-gray-50 */
}

.nav-button.active {
  background-color: #dbeafe; /* bg-blue-100 */
  color: #1d4ed8; /* text-blue-700 */
}

.mobile-menu-button {
  display: block;
  padding: 0.5rem; /* p-2 */
  border-radius: 0.5rem; /* rounded-lg */
  transition: background-color 0.2s;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) { /* md: */
    .mobile-menu-button {
        display: none;
    }
}

.mobile-menu-button:hover {
  background-color: #f3f4f6; /* hover:bg-gray-100 */
}

.mobile-nav {
    display: none;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    z-index: 100;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    border-radius: 0 0 1rem 1rem;
}

.mobile-nav.open {
    display: block;
}

/* Search Bar Styles */
.search-bar-container {
    background-color: white;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); /* shadow-sm */
    border: 1px solid #e5e7eb; /* border-gray-200 */
    padding: 1rem; /* p-4 */
    margin-bottom: 1.5rem; /* mb-6 */
}

.search-bar-flex {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* gap-4 */
}

@media (min-width: 768px) { /* md: */
    .search-bar-flex {
        flex-direction: row;
    }
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input-wrapper .icon {
    position: absolute;
    right: 0.75rem; /* right-3 */
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af; /* text-gray-400 */
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem; /* py-3 pr-10 pl-4 */
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 0.5rem; /* rounded-lg */
    text-align: right;
}

.search-input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: transparent;
    box-shadow: 0 0 0 2px #3b82f6; /* ring-2 focus:ring-blue-500 */
}

.search-actions-wrapper {
    display: flex;
    gap: 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .search-actions-wrapper {
        width: auto;
    }
}

.location-button {
    flex-grow: 1;
    border: 1px solid var(--border-color); 
    background-color: white; 
    padding: 0.75rem 1rem; 
    border-radius: 0.5rem; 
    font-size: 1rem; 
    cursor: pointer; 
    width: 100%; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    justify-content: center;
}

.radius-filter {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem; /* space-x-2 */
}

.radius-filter .icon {
    color: #9ca3af; /* text-gray-400 */
}

.radius-select {
    padding: 0.75rem; /* px-3 py-3 */
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 0.5rem; /* rounded-lg */
    text-align: right;
    background-color: white;
    width: 100%;
}

.radius-select:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: transparent;
    box-shadow: 0 0 0 2px #3b82f6; /* ring-2 focus:ring-blue-500 */
}

/* Global Styles */
/* Page Visibility Utility */
.page-hidden {
    display: none !important;
}

:root {
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --background-color: #f8fafc; /* A very light gray */
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--background-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.site-header {
    background-color: white;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-icon-wrapper {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-inline-end: 0.75rem;
}

.logo-icon-wrapper .icon {
    font-size: 1.5rem;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.logo-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.desktop-nav { display: none; }
@media (min-width: 768px) { .desktop-nav { display: flex; gap: 0.5rem; } }

.nav-button {
    background-color: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.nav-button:hover { background-color: #f1f5f9; color: var(--text-primary); }
.nav-button.active { background-color: var(--primary-color); color: white; }

.mobile-menu-button { display: block; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
@media (min-width: 768px) { .mobile-menu-button { display: none; } }



/* Hero Section */
.hero-section { text-align: center; padding: 3rem 1rem; }
.hero-title { font-size: 2.5rem; font-weight: bold; margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.25rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

@media (max-width: 767px) {
    .hero-section {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }
}

.radar-status { text-align: center; color: var(--text-secondary); margin-bottom: 1rem; min-height: 1.5em; /* Prevents layout shift */ }

/* Search Bar */
.search-bar-container { background-color: white; border-radius: 0.75rem; padding: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.08); border: 1px solid var(--border-color); margin-bottom: 2rem; position: relative; }
.search-bar-flex { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.search-input-wrapper { flex-grow: 1; display: flex; align-items: center; gap: 0.5rem; background-color: #f8fafc; padding: 0.5rem 1rem; border-radius: 0.5rem; min-width: 200px; }
.search-input { border: none; background: transparent; outline: none; width: 100%; font-size: 1rem; }

.search-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 1.2rem; /* Match icon size */
    color: #64748b; /* --text-secondary */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease-in-out;
}

.search-btn:hover {
    color: #1e293b; /* --text-primary */
}
.location-btn, .filter-btn, .radius-select { border: 1px solid var(--border-color); background-color: white; padding: 0.75rem 1rem; border-radius: 0.5rem; font-size: 1rem; cursor: pointer; }

.filter-btn.active, .filter-btn.has-filter {
  background: #e11d48 !important;
  color: #fff !important;
  border-color: #e11d48 !important;
}
.filter-btn.active .icon, .filter-btn.has-filter .icon {
  color: #fff !important;
}
.location-btn, .filter-btn { display: flex; align-items: center; gap: 0.5rem; }

/* Filter Tags Cloud */
.search-actions-wrapper { position: relative; }
.filter-tags-cloud {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 320px;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    padding: 1rem;
    z-index: 100;
    transition: all 0.3s ease;
}

.close-filters-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 0.5rem;
    margin-right: 0;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}
.close-filters-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

@media (max-width: 767px) {
  .filter-tags-cloud {
    left: 0;
    right: 0;
    width: auto;
    min-width: 180px;
    max-width: 100vw;
    margin: 0 auto;
    top: 100%;
    transform: none;
    border-radius: 0 0 0.75rem 0.75rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  }
  .search-bar-container {
    position: relative;
    z-index: 20;
  }
}

@media (max-width: 767px) {
  .filter-tags-cloud {
    left: 0;
    right: 0;
    width: auto;
    min-width: 180px;
    max-width: 100vw;
    margin: 0 auto;
    top: 100%;
    transform: none;
    border-radius: 0 0 0.75rem 0.75rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  }
  .search-bar-container {
    position: relative;
    z-index: 20;
  }
}


.filter-tags-cloud.hidden {
    display: none;
}

.filter-tags-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.filter-tags-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.clear-filters-btn {
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.clear-filters-btn:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.filter-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.filter-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    opacity: 0.7;
    background: #f4f4f5 !important;
    color: #888 !important;
    box-shadow: none;
    filter: grayscale(0.9) brightness(1.1);
}

.filter-tag:hover {
    opacity: 0.9;
    border-color: #cbd5e1;
}

.filter-tag.selected {
    opacity: 1;
    border-color: rgba(0,0,0,0.2);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    filter: none;
    background: unset !important;
    /* אל תדרוס את ה-inline style */
}

/* Main Content Grid */
.main-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1024px) { .main-grid { grid-template-columns: 1fr 1fr; } }

.column-header { text-align: center; margin-bottom: 0; }
.column-header h3 { font-size: 1.75rem; font-weight: bold; }
.column-header p { color: var(--text-secondary); }

/* Store List */
.results-container { display: flex; flex-direction: column; gap: 1rem; }

button#location-btn.active {
    background-color: #3b82f6 !important;
    color: white !important;
    border-color: #3b82f6 !important;
}

button#location-btn.active .icon {
    color: white !important;
}

/* Store Card */
.store-card { 
    background-color: white; 
    border: 1px solid var(--border-color); 
    border-radius: 0.75rem; 
    padding: 1.5rem; 
    display: flex; 
    gap: 1.5rem; 
    align-items: flex-start; 
    transition: all 0.2s ease-in-out; 
}
.store-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); 
}
.store-card:hover .navigate-btn {
    transform: scale(1.05);
}
.store-distance { 
    font-size: 1.5rem; 
    font-weight: bold; 
    color: var(--primary-color); 
    text-align: center; 
    flex-shrink: 0;
}
.store-distance span { 
    font-size: 0.875rem; 
    font-weight: normal; 
    color: var(--text-secondary); 
    display: block; 
}
.store-details { 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    align-self: stretch;
}
.store-details h4 { 
    font-size: 1.25rem; 
    font-weight: bold; 
    margin: 0 0 0.5rem; 
}
.store-info { 
    display: flex; 
    align-items: center;
    gap: 0.5rem; 
    font-size: 0.875rem; 
    color: var(--text-secondary); 
    margin-bottom: 0.5rem;
}
.store-info .icon {
    width: 1rem;
    height: 1rem;
    color: var(--text-secondary);
}

/* --- Terms Page Styles --- */
.terms-page-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1rem;
}

.terms-content section h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.terms-content .legal-notice {
    background-color: #f0f4f8;
    border-right: 4px solid var(--primary-color);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.additional-terms li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.additional-terms li::before {
    content: '';
    display: block;
    width: 0.5rem; /* 8px */
    height: 0.5rem; /* 8px */
    background-color: var(--primary-color);
    border-radius: 50%;
    margin-top: 0.4em;
    flex-shrink: 0;
}

.contact-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.site-footer-bottom {
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    color: var(--text-secondary);
}
.gift-card-tags { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.5rem; 
    margin-bottom: 1rem; 
}
.tag { 
    padding: 0.25rem 0.75rem; 
    border-radius: 9999px; 
    font-size: 0.75rem; 
    font-weight: 500; 
    white-space: nowrap; 
}
.navigate-btn {
    width: calc(100% - 2.5rem);
    margin-left: 2.5rem;
    background-image: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    margin-top: auto;
    transform-origin: center;
}
.navigate-btn:hover {
    background-image: linear-gradient(to right, #2563eb, #1d4ed8);
}
.navigate-btn .icon {
    width: 1rem;
    height: 1rem;
}

/* Radar Map */
.radar-map-column { background-color: var(--card-background); border-radius: 0.75rem; padding: 2rem; box-shadow: 0 4px 6px var(--shadow-color); border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; position: relative; }
.radar-container { position: relative; width: 300px; height: 300px; border-radius: 50%; background-color: #eef2ff; display: flex; align-items: center; justify-content: center; margin-top: 2rem; }

.radar-sweep {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    background: conic-gradient(
        from var(--sweep-angle, 0deg),
        transparent 0deg,
        rgba(79, 70, 229, 0.2) 40deg,
        transparent 80deg
    );
}

.radar-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(79, 70, 229, 0.5);
    transform: scale(0);
    opacity: 0;
    animation: pulse-expand 2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes pulse-expand {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(1);
        opacity: 0;
    }
}
.radar-rings { position: absolute; width: 100%; height: 100%; }
.ring { position: absolute; border: 1px dashed rgba(79, 70, 229, 0.3); border-radius: 50%; }
.ring:nth-child(1) { width: 25%; height: 25%; top: 37.5%; left: 37.5%; }
.ring:nth-child(2) { width: 50%; height: 50%; top: 25%; left: 25%; }
.ring:nth-child(3) { width: 100%; height: 100%; top: 0; left: 0; }
.radar-center-dot { width: 12px; height: 12px; background-color: var(--primary-color); border-radius: 50%; border: 2px solid white; z-index: 2; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.radar-dots { position: absolute; width: 100%; height: 100%; z-index: 1; }
.store-dot { position: absolute; width: 12px; height: 12px; background-color: #ef4444; border-radius: 50%; border: 2px solid white; transform: translate(-50%, -50%); animation: dot-pulse 1.5s infinite ease-in-out; }

@keyframes dot-pulse { 
    0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.7; } 
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; } 
}

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

/* Stats Section */
.stats-section { background-color: white; border-radius: 0.75rem; padding: 2rem; box-shadow: 0 4px 12px rgba(0,0,0,0.08); border: 1px solid var(--border-color); margin-top: 3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stat-item { text-align: center; }
.stat-number { font-size: 2rem; font-weight: bold; color: var(--primary-color); }
.stat-label { color: var(--text-secondary); }

/* Terms of Use */
.terms-content section h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.terms-content .legal-notice {
    background-color: #f0f4f8;
    border-right: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

.terms-content .legal-notice h4 {
    margin-top: 0;
    color: var(--primary-color);
}

.terms-content section p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.terms-content section ul {
    list-style-position: inside;
    padding-right: 1.5rem;
    margin-bottom: 1rem;
}

.terms-content section li {
    margin-bottom: 0.5rem;
}

.terms-content .final-agreement {
    margin-top: 2rem;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color-dark);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}
