:root {
  /* Jerusalem Hills Brand Colors (from logo) */
  --primary: #91D9F8;        /* Sky Blue from logo */
  --primary-dark: #5AB9E8;   /* Darker blue for hover */
  --accent: #FCFBA5;         /* Warm Yellow from logo */
  --accent-dark: #E8E080;    /* Darker yellow for contrast */
  --dark: #231F20;           /* Dark from logo */

  /* UI Colors */
  --light: #f9f9f9;
  --text: #333;
  --text-light: #666;
  --border: #e0e0e0;
  --white: #ffffff;

  /* Legacy Support (for backwards compatibility) */
  --primary-color: var(--primary);
  --secondary-color: var(--primary-dark);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  color: var(--text);
  background: var(--light);
  line-height: 1.6;
}

/* Header styles - matching current jerusalemhills.com */
.header {
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  position: fixed;
  width: 100%;
  max-width: 100vw;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 96px;
  overflow-x: hidden;
}

.header-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0.5rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 6rem;
  padding: 0.5rem 0;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 0.5rem;
}

.logo img {
  height: 90px;
  width: auto;
  transition: transform 0.2s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

.middle-section {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  margin: 0 0.75rem;
  gap: 0.5rem;
}

.search-container {
  flex: 0 0 auto;
  width: 280px;
  max-width: 280px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 9999px;
  border: 1px solid rgb(229, 231, 235);
  outline: none;
  font-size: 0.9rem;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.header-nav {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.75rem;
  flex: 0 1 auto;
  align-items: center;
}

.header-nav-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: rgb(75, 85, 99);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.header-nav-link:hover {
  color: rgb(17, 24, 39);
  background-color: rgb(243, 244, 246);
}

.header-nav-link i {
  width: 18px;
  height: 18px;
}

.header-nav-link.icon-only {
  padding: 0.5rem;
}

.header-nav-link.icon-only span {
  display: none;
}

.nav-divider {
  width: 1px;
  height: 24px;
  background-color: rgb(229, 231, 235);
  margin: 0 0.5rem;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-button {
  padding: 0.5rem;
  border-radius: 9999px;
  border: none;
  background: none;
  cursor: pointer;
  color: rgb(75, 85, 99);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover {
  background-color: rgb(243, 244, 246);
  color: rgb(17, 24, 39);
}

/* Hide hamburger menu button on desktop */
.menu-button {
  display: none;
}

/* Right section with date/time/weather */
.right-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Date display */
.top-date-display {
  text-align: right;
  font-size: 0.75rem;
  color: rgb(75, 85, 99);
  line-height: 1.3;
}

.hebrew-date {
  font-weight: 600;
  color: var(--primary);
}

.gregorian-date {
  font-size: 0.75rem;
  color: rgb(107, 114, 128);
  margin-bottom: 0.35rem;
}

.world-clocks-container {
  font-family: 'Courier New', monospace;
  margin-top: 0.25rem;
}

.world-cities,
.world-times {
  display: flex;
  justify-content: flex-end;
  gap: 0;
}

.world-cities {
  font-size: 0.7rem;
  color: rgb(107, 114, 128);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.world-times {
  font-size: 0.7rem;
  color: rgb(75, 85, 99);
  font-weight: 500;
}

.world-weather {
  display: flex;
  justify-content: flex-end;
  gap: 0;
  font-size: 0.65rem;
  color: rgb(107, 114, 128);
  margin-top: 0.15rem;
}

.city-label,
.time-value,
.weather-value {
  display: inline-block;
  width: 2.8em;
  text-align: center;
}

.clock-sep {
  display: inline-block;
  width: 1.5em;
  text-align: center;
  color: rgb(156, 163, 175);
}

.day-indicator {
  font-size: 0.6rem;
  color: rgb(239, 68, 68);
  font-weight: 700;
  vertical-align: super;
  margin-left: 1px;
}

/* Mobile menu - hidden by default */
.mobile-menu {
  display: none;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: rgb(55, 65, 81);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 0.375rem;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.mobile-link:hover {
  background-color: rgb(243, 244, 246);
  color: rgb(17, 24, 39);
}

.mobile-link i {
  width: 20px;
  height: 20px;
  color: rgb(107, 114, 128);
}

.mobile-menu-divider {
  height: 1px;
  background-color: rgb(229, 231, 235);
  margin: 0.5rem 1rem;
}

.mobile-menu-header {
  padding: 1rem 1rem 0.75rem;
  background: linear-gradient(to bottom, #f9fafb, white);
  text-align: center;
}

.mobile-hebrew-date {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.mobile-gregorian-date {
  font-size: 0.75rem;
  color: rgb(107, 114, 128);
  margin-bottom: 0.5rem;
}

.mobile-world-clocks {
  font-family: 'Courier New', monospace;
  margin-top: 0.5rem;
}

.mobile-world-cities,
.mobile-world-times {
  display: flex;
  justify-content: center;
  gap: 0;
  font-size: 0.7rem;
}

.mobile-world-cities {
  color: rgb(107, 114, 128);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.mobile-world-times {
  color: rgb(75, 85, 99);
  font-weight: 500;
}

.mobile-world-weather {
  display: flex;
  justify-content: center;
  gap: 0;
  font-size: 0.65rem;
  color: rgb(107, 114, 128);
  margin-top: 0.25rem;
}

@media (max-width: 1024px) {
  .header-nav-link:not(.icon-only) span {
    display: none;
  }

  .header-nav {
    gap: 0.25rem;
  }

  .header-nav-link {
    padding: 0.5rem;
  }

  .nav-divider {
    margin: 0 0.25rem;
  }
}

@media (max-width: 768px) {
  .header {
    height: 80px;
  }

  .header-content {
    height: 80px;
  }

  .logo img {
    height: 72px;
  }

  .header-nav {
    display: none;
  }

  .middle-section {
    margin: 0;
    flex: 1;
  }

  .search-container {
    max-width: none;
    width: 100%;
  }

  /* Show hamburger menu on mobile */
  .menu-button {
    display: flex !important;
  }

  /* Hide other header icons on mobile to save space */
  .header-icons .icon-button:not(.menu-button) {
    display: none;
  }

  .header-icons {
    gap: 0.5rem;
  }

  .top-date-display {
    display: none;
  }

  /* Mobile menu positioned below header */
  .mobile-menu {
    display: block;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid rgb(229, 231, 235);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 49;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
  }

  .mobile-menu.active {
    max-height: 400px;
    padding: 0.5rem 0;
  }

  .mobile-menu .mobile-link {
    padding: 0.75rem 1rem;
    display: flex;
    margin: 0;
  }

  .mobile-menu-divider {
    margin: 0.5rem 0;
  }
}

/* Main content - adjust for fixed header */
main {
  margin-top: 96px;
}

@media (max-width: 768px) {
  main {
    margin-top: 80px;
  }
}

/* Dashboard Hero Section */
.dashboard-hero {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  background: linear-gradient(to bottom, #f9fafb 0%, white 100%);
}

.dashboard-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

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

.card-content {
  padding: 1.5rem;
  flex: 1;
}

/* Headlines Ticker - Live RSS Feed */
.headlines-ticker {
  overflow: hidden;
  height: 2.5rem;
  background: rgba(145, 217, 248, 0.15); /* Light blue from brand */
  border: 1px solid rgba(145, 217, 248, 0.3);
  border-radius: 8px;
  margin: 0;
  position: relative;
}

.ticker-tape {
  height: 100%;
  display: flex;
  align-items: center;
}

#ticker-content {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  padding: 0 1.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-item a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.ticker-item a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.ticker-item a:active {
  color: var(--primary-dark);
}

/* Markets Card with TradingView Widgets - Separate Section Below */
.markets-widgets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  margin: 0;
}

.tradingview-widget-container {
  min-height: 120px;
  border-radius: 6px;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .markets-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .headline-item {
    min-width: 100%;
  }
}

/* Jerusalem Card - Combined */
.jerusalem-combined {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.jerusalem-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.info-row i {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.info-label {
  font-size: 0.7rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.info-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  margin-top: 0.125rem;
}

.quick-market-stats {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 6px;
  text-align: center;
}

.stat-label {
  font-size: 0.7rem;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

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

/* Card Footer Links - Hidden for dashboard cards */
.dashboard-card .card-footer-link {
  display: none;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 768px) {
  .dashboard-hero {
    padding: 1rem 0.75rem;
  }

  .card-header {
    padding: 1rem 1.25rem;
  }

  .card-content {
    padding: 1.25rem;
  }
}

/* Grid Sections */
.grid-section {
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-section h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.featured-grid {
  grid-template-columns: repeat(3, 1fr);
}

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

.section-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.grid.news {
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.card p {
  color: #666;
  font-size: 0.9rem;
}

.card .price {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

/* News Section */
.featured {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.featured img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.featured h4 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-item {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
  cursor: pointer;
}

.news-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.news-item h5 {
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.news-item p {
  color: #666;
  font-size: 0.9rem;
}

/* Forum & Marketplace */
.forum-market {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.forum h3, #marketplace h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.post {
  background: white;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
  cursor: pointer;
}

.post:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateX(4px);
}

.post-author {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.post-content {
  color: var(--text);
  margin-bottom: 0.5rem;
}

.post-meta {
  font-size: 0.85rem;
  color: #999;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--primary);
  color: white;
  margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 900px) {
  .forum-market {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .grid.news {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 600px) {
  nav {
    display: none;
  }

  header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  input[type="search"] {
    width: 100%;
    min-width: unset;
  }

  .logo h1 {
    font-size: 1rem;
  }

  .logo img {
    height: 30px;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  .grid-section {
    padding: 2rem 1rem;
  }

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


/* Hebrew Virtual Keyboard */
#hebrew-keyboard-container {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
  width: 700px;
  z-index: 9999;
}

#hebrew-keyboard-container.active {
  display: block;
}

.keyboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.keyboard-header span {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.keyboard-close {
  background: rgb(239, 68, 68);
  color: white;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.keyboard-close:hover {
  background: rgb(220, 38, 38);
}

.keyboard-keys {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.keyboard-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.key {
  background: white;
  border: 2px solid rgb(229, 231, 235);
  border-radius: 0.375rem;
  padding: 0.75rem;
  min-width: 50px;
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  user-select: none;
}

.key:hover {
  background: rgb(243, 244, 246);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.key:active {
  transform: translateY(0);
  background: var(--primary);
  color: white;
}

.key.space {
  flex: 1;
  min-width: 200px;
}

.key.special {
  background: rgb(243, 244, 246);
  font-size: 0.875rem;
  color: rgb(75, 85, 99);
}

.key.special:hover {
  background: rgb(229, 231, 235);
}

@media (max-width: 768px) {
  #hebrew-keyboard-container {
    width: 95vw;
    padding: 0.75rem;
    bottom: 10px;
  }

  .key {
    min-width: 35px;
    padding: 0.5rem;
    font-size: 1rem;
  }
}

/* YouTube Video Slider */
.video-slider-section {
  background-color: white;
  text-align: center;
}

.video-slider-section .section-title {
  margin-bottom: 2rem;
}

.slider-container {
  position: relative;
  overflow: hidden;
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 0;
}

.slider {
  display: flex;
  transition: transform 0.5s ease-in-out;
  gap: 1.5rem;
}

.slider iframe {
  flex: 0 0 auto;
  width: 400px;
  height: 225px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.slider-container::before,
.slider-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5%;
  z-index: 1;
  pointer-events: none;
}

.slider-container::before {
  left: 0;
  background: linear-gradient(to right, white, transparent);
}

.slider-container::after {
  right: 0;
  background: linear-gradient(to left, white, transparent);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--primary-dark);
  color: white;
  border: none;
  padding: 1rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.slider-btn:hover {
  background-color: rgba(67, 56, 202, 1);
  transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
  left: 1rem;
}

.slider-btn.next {
  right: 1rem;
}

@media (max-width: 768px) {
  .slider iframe {
    width: 300px;
    height: 169px;
  }

  .slider-btn {
    width: 36px;
    height: 36px;
    padding: 0.5rem;
  }

  .slider-container {
    width: 95%;
  }
}
