/* ========== HEADER – MODERN, CONSISTENT WITH FOOTER ========== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #f9fafc 0%, #ffffff 100%);
  border-radius: 0 0 32px 32px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
  z-index: 1000;
}

.header-container {
  gap: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  max-width: 1400px;
  margin: 0 auto;
  height: 80px;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#language-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

#language-form select {
  appearance: none;
  background-color: #eff6ff;
  border: none;
  border-radius: 40px;
  padding: 0.4rem 2rem 0.4rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e4a8f;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  /* Custom arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%231e4a8f'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 16px;
}

/* Hover & focus states – consistent with phone-link */
#language-form select:hover {
  background-color: #1e4a8f;
  color: white;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
}

#language-form select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(30, 74, 143, 0.3);
  background-color: #e2e8f0;
}

/* Dropdown options styling (works across modern browsers) */
#language-form select option {
  background: white;
  color: #1e2f3c;
  padding: 8px;
}

.logo_header {
  height: 55px;
  width: auto;
  object-fit: contain;
}

/* Desktop navigation */
.desktop-nav {
  display: flex;
  gap: 2rem;
  margin-left: 2rem;
}

.desktop-nav a {
  text-decoration: none;
  font-size: 1rem;
  color: #1e2f3c;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
}

/* Underline hover effect (like modern sites) */
.desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: #2c6280;
  transition: width 0.2s;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  width: 100%;
}

.desktop-nav a:hover {
  color: #2c6280;
}

/* Active link (add class 'active' in template) */
.desktop-nav a.active {
  color: #2c6280;
}

/* Right side actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* Phone link – make it a subtle button like footer CTA but smaller */
.phone-link {
  white-space: nowrap;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  padding: 0.4rem 1.3rem;
  border-radius: 40px;
  text-decoration: none;
  transition: all 0.2s;
}

.phone-link svg {
  fill: #1e4a8f;
  width: 18px;
  height: 18px;
}

.phone-number {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e4a8f;
}

.phone-link:hover {
  background: #1e4a8f;
}

.phone-link:hover svg {
  fill: white;
}

.phone-link:hover .phone-number {
  color: white;
}

/* Icon buttons (search, menu) */
/* Icon buttons (search, menu) */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

/* Menu button - always visible */
.menu-btn {
  display: inline-flex;   /* was 'display: none' – fixed */
}

.icon-btn svg {
  fill: #6c757d;
  transition: fill 0.2s;
}

.icon-btn:hover {
  background: #eef2f6;
}

.icon-btn:hover svg {
  fill: #1e4a8f;
}


/* ========== SIDEBAR (OFF-CANVAS) – UPGRADED ========== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: #ffffff;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  display: flex;
  flex-direction: column;
  border-radius: 32px 0 0 32px;
}

.side-panel.open {
  transform: translateX(0);
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

.side-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid #eef2f6;
}

.side-panel-header img {
  height: 40px;
  width: auto;
}

.close-btn {
  background: none;
  font-size: 28px;
  cursor: pointer;
  color: #6c757d;
  transition: all 0.2s;
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-btn:hover {
  background: #eef2f6;
  color: #1e4a8f;
  transform: rotate(90deg);
}

.side-panel-content {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.side-panel-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #0e2a3a;
  margin: 0 0 1rem 0;
}

.side-panel-div {
  border-bottom: 1px solid #eef2f6;
  padding: 0.5rem 0 1rem;
  margin-bottom: 1rem;
}

.side-panel-div-element {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.side-panel-div-element p {
  color: #334155;
  margin: 0;
}

.side-panel-div-element svg {
  fill: #6c757d;
}

.side-panel ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.side-panel li {
  margin-bottom: 0.5rem;
}

.side-panel a {
  text-decoration: none;
  color: #1e4a6e;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.side-panel a:hover {
  color: #2c6280;
  text-decoration: underline;
}

.instagram_container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0.5rem;
}

.instagram_container a {
  color: #334155;
}

.side_social_media {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.side_social_media a svg {
  fill: #9CA3AF;
  transition: all 0.2s;
}

.side_social_media a:hover svg {
  fill: #1e4a8f;
  transform: translateY(-2px);
}

/* ========== SEARCH POPUP – UPGRADED ========== */
.search-popup {
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s ease, opacity 0.2s ease;
}

.search-popup.active {
  visibility: visible;
  opacity: 1;
}

.search-popup-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 32px 32px;
  transform: translateY(-100%);
  transition: transform 0.3s ease-out;
}

.search-popup.active .search-popup-content {
  transform: translateY(0);
}

.search-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-field {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 0.5rem;
  background: #f8fafc;
  border-radius: 60px;
  padding: 0.2rem 0.2rem 0.2rem 1rem;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.form-field:focus-within {
  border-color: #2c6280;
  box-shadow: 0 0 0 3px rgba(44, 98, 128, 0.1);
}

.search-get {
  flex: 1;
  padding: 0.8rem 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  color: #0e2a3a;
  width: 100px;
}

.search-get::placeholder {
  color: #9ca3af;
  font-size: 0.9rem;
}

.button_lupa {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
}

.button_lupa svg {
  width: 24px;
  height: 24px;
  fill: #6c757d;
  transition: fill 0.2s;
}

.button_lupa:hover svg {
  fill: #1e4a8f;
}

.close_search {
  text-decoration: none;
  color: #1e4a8f;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 40px;
  transition: all 0.2s;
  white-space: nowrap;
}

.close_search:hover {
  background: #eef2f6;
  color: #0f3b6f;
}

.results-container {
  height: auto;
  max-height: 300px;           /* fallback for older browsers */
  max-height: 40vh;            /* 40% of viewport height – comfortable on any screen */
  overflow-y: auto;            /* only vertical scroll when needed */
  overflow-x: hidden;
  margin-top: 1.5rem;
  border-top: 1px solid #eef2f6;
  padding-top: 1rem;
  scrollbar-width: thin;       /* nice thin scrollbar on Firefox */
}

/* WebKit smooth scrollbar */
.results-container::-webkit-scrollbar {
  width: 6px;
}
.results-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.results-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}
.results-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.results-container ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.results-container li {
  margin-bottom: 0.75rem;
}

.results-container a {
  text-decoration: none;
  color: #1e2f3c;
  transition: color 0.2s;
}

.results-container a:hover {
  color: #2c6280;
}

/*!* ========== RESPONSIVE ========== *!*/
/* ========== RESPONSIVE HEADER ========== */

/* Tablet & Small Desktop (max-width: 1024px) */
/* ========== RESPONSIVE HEADER ========== */

/* Tablet & Small Desktop (max-width: 1024px) */
@media (max-width: 1024px) {
  .desktop-nav {
    gap: 1rem;
    margin-left: 1rem;
  }
  .desktop-nav a {
    font-size: 0.9rem;
  }
  .phone-link {
    padding: 0.3rem 1rem;
  }
  .phone-number {
    font-size: 0.8rem;
  }
  .header-container {
    padding: 0 1.5rem;
  }
}

/* Tablet Portrait & Large Phone – hide desktop nav, show hamburger */
@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }
  .header-container {
    height: 70px;
    padding: 0 1rem;
  }
  .logo_header {
    height: 45px;
  }
  .phone-number {
    display: inline-block;
    font-size: 0.75rem;
  }
  .phone-link {
    padding: 0.3rem 0.8rem;
  }
  .header-actions {
    gap: 0.8rem;
  }
  .icon-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* Small Phone – hide phone number text, keep only icon */
@media (max-width: 550px) {
  .header-container {
    height: 60px;
  }
  .logo_header {
    height: 35px;
  }
  .phone-number {
    display: none;
  }
  .phone-link {
    padding: 0.4rem;
  }
  .phone-link svg {
    width: 20px;
    height: 20px;
    margin: 0;
  }
  .header-actions {
    gap: 0.5rem;
  }
  .icon-btn {
    padding: 6px;
  }
  .icon-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* Extra small devices (max-width: 380px) */
@media (max-width: 380px) {
  .logo_header {
    height: 30px;
  }
  .header-actions {
    gap: 0.3rem;
  }
  .phone-link {
    padding: 0.3rem;
  }
}

/* Tablet & small desktop – slightly smaller font/padding */
@media (max-width: 1024px) {
  #language-form select {
    padding: 0.3rem 1.8rem 0.3rem 1rem;
    font-size: 0.8rem;
    background-size: 14px;
    background-position: right 0.7rem center;
  }
}

/* 900px and below – keep as is, but avoid overlap */
@media (max-width: 900px) {
  #language-form select {
    padding: 0.3rem 1.8rem 0.3rem 1rem;
    font-size: 0.8rem;
  }
}

/* Small phones (≤550px) – reduce padding, hide full language name if needed? */
@media (max-width: 550px) {
  #language-form select {
    padding: 0.3rem 1.6rem 0.3rem 0.8rem;
    font-size: 0.75rem;
    background-position: right 0.5rem center;
  }
  /* Optional: shorten the displayed text by using a smaller option text or rely on browser */
}

/* Extra small (≤380px) – compact */
@media (max-width: 380px) {
  #language-form select {
    padding: 0.2rem 1.4rem 0.2rem 0.6rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 768px) {
  .results-container {
    max-height: 35vh;          /* slightly smaller on tablets */
  }
}

@media (max-width: 550px) {
  .results-container {
    max-height: 45vh;          /* taller on phones to show more results */
  }
}

@media (max-width: 380px) {
  .results-container {
    max-height: 50vh;
  }
}