/* HomePage Styles - Map Interface */

/* Body and Root */
body.nariozemelapis {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
}

#homepage-root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f3f4f6;
}

#homepage-layout {
  display: flex;
  flex: 1;
  margin-top: 92px;
  overflow: hidden;
}

/* Sidebar */
#homepage-sidebar {
  width: 340px;
  min-width: 340px;
  max-width: 340px;
  height: 100%;
  overflow-y: auto;
  background-color: #f9fafb;
  border-right: 1px solid #e5e7eb;
}

/* Filters Form */
.homepage-filters {
  padding: 12px;
  background-color: #ffffff;
  border-bottom: 4px solid #0C7490;
}

.homepage-filters select {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  margin-bottom: 8px;
}

.homepage-filters-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.homepage-filters-row select {
  flex: 1;
  padding: 8px;
  font-size: 14px;
}

/* Footer row with results count and reset link */
.homepage-filters-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #2f2f2f;
}

/* Wrapper: footer + submit button on one line (desktop) */
.homepage-filters-actions {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.homepage-filters-reset {
  font-size: 14px;
  color: #ef4444;
  text-decoration: none;
}

.homepage-filters-submit {
  margin-top: 0;
  text-align: right;
  flex-shrink: 0;
}

.homepage-filters-submit button {
  padding: 8px 18px;
  font-size: 14px;
  background-color: #0e7490;
  border-radius: 4px;
  border: 2px solid #0e7490;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.homepage-filters-submit button:hover {
  background-color: #ffffff;
  color: #0e7490;
  border-color: #0e7490;
}

/* Banner */
.homepage-banner {
  padding: 12px;
  background-color: transparent;
}

.homepage-banner-placeholder {
  width: 300px;
  margin-left: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  background-color: #e9f5fb;
  border-radius: 0px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  height: auto;
  min-height: 250px;
  background-image: url('/themes/aukcionai/images/300x200_placeholder.gif');
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto;
}

.homepage-banner-text {
position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0px;
  pointer-events: none;
  border: 1px dashed darkcyan;
}

.homepage-banner-text h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #0C7490;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.homepage-banner-text p {
  margin: 0;
  font-size: 14px;
  color: #26586a;
}

.homepage-banner-text p.sizes {
  margin-top: 4px;
  opacity: 0.85;
}

.homepage-banner-text p.cta {
  margin-top: 8px;
  font-weight: 600;
}

.homepage-banner-ad {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SEO Sidebar */
.homepage-seo-sidebar {
  padding: 16px 12px;
  background: #f9fafb;
  border-radius: 8px;
  margin: 12px 12px 16px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
}

.homepage-seo-sidebar h2 {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.homepage-seo-sidebar p {
  margin: 0 0 8px 0;
}

.homepage-seo-sidebar ul {
  margin: 0 0 8px 0;
  padding-left: 20px;
}

.homepage-seo-sidebar li {
  margin-bottom: 4px;
  font-size: 13px;
}

.homepage-seo-sidebar strong {
  color: #111827;
  font-weight: 600;
}

/* Divider under SEO sidebar */
.homepage-seo-divider {
  border-top: 1px solid #e5e7eb;
  margin: 4px 12px 16px 12px;
}

/* Links Section */
.homepage-links {
  padding: 0 12px 24px 12px;
}

.homepage-link {
  display: block;
  padding: 14px;
  margin-bottom: 12px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  color: #374151;
}

.homepage-link:last-child {
  margin-bottom: 0;
}

.homepage-link-title {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  color: #0C7490;
  margin-bottom: 4px;
}

.homepage-link-title.secondary {
  color: #6b7280;
}

.homepage-link-icon {
  margin-right: 8px;
  font-size: 16px;
}

.homepage-link-subtitle {
  font-size: 13px;
  color: #9ca3af;
  padding-left: 30px;
}

/* Compact Links */
.homepage-link-compact {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  color: #0C7490;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.homepage-link-compact:hover {
  background-color: #f3f4f6;
  border-color: #00d4aa;
}

.homepage-link-compact.secondary {
  color: #6b7280;
}

.homepage-link-compact:last-child {
  margin-bottom: 0;
}

.homepage-link-compact .homepage-link-icon {
  margin-right: 8px;
  font-size: 14px;
}

/* Map */
#homepage-map-wrapper {
  flex: 1;
  height: 100%;
  background-color: #e5e7eb;
}

/* HomePage touch behavior
 * - Disable pinch-zoom for UI areas (header, filters, etc.)
 * - Allow full pinch-zoom only on the map element
 */

/* UI areas: scroll only vertically, no zoom */
body.nariozemelapis .site-header,
body.nariozemelapis #homepage-sidebar,
body.nariozemelapis .homepage-filters,
body.nariozemelapis .homepage-banner,
body.nariozemelapis .homepage-seo-sidebar,
body.nariozemelapis .homepage-links {
  touch-action: pan-y;
}

/* Map: let browser + Google Maps handle pinch-zoom normally */
#map {
  width: 100%;
  height: 100%;
  touch-action: auto;
}


/* Footer */
.homepage-footer {
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 12px 24px;
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablet/Desktop <996px */
@media (max-width: 996px) {
  #homepage-layout {
    flex-direction: column;
    margin-top: 92px;
  }
  
  /* Hide sidebar by default, show when active */
  #homepage-sidebar {
    position: fixed;
    top: 92px;
    left: 0;
    width: 100%;
    min-width: auto;
    max-width: none;
    height: auto;
    max-height: 50vh; /* Sidebar takes max 50% of screen */
    z-index: 98;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  
  #homepage-sidebar.active {
    transform: translateY(0);
  }
  
  #homepage-map-wrapper {
    height: calc(100vh - 92px);
  }
  
  /* Hide banner, SEO block and links on smaller screens */
  .homepage-banner,
  .homepage-seo-sidebar,
  .homepage-links {
    display: none !important;
  }
}

/* Mobile <768px */
@media (max-width: 768px) {
  #homepage-layout {
    margin-top: 60px;
  }

  #homepage-sidebar {
    top: 60px;
  }

  #homepage-map-wrapper {
    height: calc(100vh - 60px);
  }

  .homepage-filters {
    padding: 10px;
  }
  
  .homepage-filters select {
    font-size: 14px;
    padding: 6px;
  }
  
  .homepage-filters-row select {
    font-size: 13px;
    padding: 6px;
  }
  
  .homepage-filters-footer {
    font-size: 14px;
  }
  
  .homepage-link {
    padding: 12px;
  }
  
  .homepage-link-title {
    font-size: 14px;
  }
  
  .homepage-link-icon {
    font-size: 14px;
  }
  
  .homepage-links {
    padding: 12px 8px 16px 8px;
  }
}

/* Mobile <640px */
@media (max-width: 640px) {
  #homepage-sidebar {
    max-height: 50vh;
  }
  
  #homepage-map-wrapper {
    height: 50vh;
  }
  
  .homepage-filters {
    padding: 8px;
  }
  
  .homepage-filters-row {
    flex-direction: column;
    gap: 6px;
  }
  
  .homepage-filters-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .homepage-filters-submit {
    width: 100%;
  }
  
  .homepage-filters-submit button {
    width: 100%;
  }
  
  .homepage-banner-placeholder {
    width: 100%;
  }
}

/* Extra small mobile <480px */
@media (max-width: 480px) {
  .homepage-link-title {
    font-size: 13px;
  }
  
  .homepage-link-subtitle {
    font-size: 10px;
    padding-left: 22px;
  }
  
  .homepage-footer {
    padding: 8px 12px;
    font-size: 13px;
  }
}
