/**
 * Header Component - Kunco Style
 * Sticky header with logo, navigation (desktop), and actions
 */

/* ==========================================
   SITE HEADER
   ========================================== */

.site-header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  transition: all 0.3s ease;
}

.site-header * {
  transition: all 0.3s ease;
}

.site-header.scrolled {
  position: sticky !important;
  top: 0 !important;
}

/* Make header a positioning context for dropdown menus */
.site-header {
  position: relative;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
}

.site-header.scrolled .header-inner {
  padding: 12px 0 !important;
}

.site-header.scrolled .site-logo-image,
.site-header.scrolled .site-branding__logo img {
  height: 40px !important;
}

.site-header.scrolled .site-logo-name,
.site-header.scrolled .site-branding__name {
  font-size: 20px !important;
}

.site-header.scrolled .site-logo-tagline,
.site-header.scrolled .site-branding__slogan {
  font-size: 11px !important;
}

.site-header.scrolled .header-donate-btn,
.site-header.scrolled .header-actions .btn,
.site-header.scrolled .header-actions .button {
  padding: 10px 22px !important;
  font-size: 14px !important;
}

/* ==========================================
   HEADER INNER LAYOUT
   Logo Left | Nav Center | Actions Right
   ========================================== */

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  gap: 30px;
}

/* ==========================================
   LOGO SECTION
   ========================================== */

.site-logo,
.site-branding,
.block-system-branding-block a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.site-logo:hover,
.site-branding:hover,
.block-system-branding-block a:hover {
  opacity: 0.85;
}

.site-logo-image,
.site-branding__logo img {
  height: 55px;
  width: auto;
  display: block;
}

.site-logo-text,
.site-branding__text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.site-logo-name,
.site-branding__name {
  font-family: var(--font-family-heading, 'Poppins', sans-serif);
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  transition: color 0.3s ease;
}

.site-logo:hover .site-logo-name,
.site-branding:hover .site-branding__name {
  color: var(--color-primary);
}

.site-logo-tagline,
.site-branding__slogan {
  font-size: 12px;
  color: #6c757d;
  margin: 0;
  font-weight: 400;
}

/* ==========================================
   HEADER RIGHT ACTIONS
   ========================================== */

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Donate Button Styling */
.header-donate-btn,
.header-actions .btn,
.header-actions .button {
  padding: 12px 28px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.header-donate-btn:hover,
.header-actions .btn:hover,
.header-actions .button:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 93, 146, 0.4);
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

/* Large Tablets and Below */
@media (max-width: 1199px) {
  .header-inner {
    gap: 20px;
  }
  
  .site-logo-name,
  .site-branding__name {
    font-size: 22px;
  }
}

/* Tablets */
@media (max-width: 991px) {
  .header-inner {
    padding: 15px 0;
    gap: 15px;
  }
  
  .site-logo-image,
  .site-branding__logo img {
    height: 45px;
  }
  
  .site-logo-name,
  .site-branding__name {
    font-size: 20px;
  }
  
  .header-donate-btn,
  .header-actions .btn,
  .header-actions .button {
    padding: 10px 22px;
    font-size: 14px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .header-inner {
    padding: 12px 0;
  }
  
  .site-logo-tagline,
  .site-branding__slogan {
    display: none;
  }
  
  .header-donate-btn,
  .header-actions .btn,
  .header-actions .button {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* Small Mobile */
@media (max-width: 576px) {
  .site-logo-text,
  .site-branding__text {
    display: none;
  }
  
  .site-logo-image,
  .site-branding__logo img {
    height: 40px;
  }
  
  .header-right {
    gap: 10px;
  }
  
  .header-donate-btn,
  .header-actions .btn,
  .header-actions .button {
    padding: 8px 16px;
    font-size: 12px;
  }
}

/* ==========================================
   INTERN AREA STYLING
   ========================================== */

/* Header background color for intern pages */
body.intern-area .site-header {
  background-color: #FFF3CD;
  border-bottom: 3px solid #FFE69C;
}

/* Subtle shadow adjustment for intern header */
body.intern-area .site-header {
  box-shadow: 0 2px 10px rgba(255, 193, 7, 0.2);
}

body.intern-area .site-header.scrolled {
  box-shadow: 0 4px 20px rgba(255, 193, 7, 0.3);
}

/* Very Small Mobile */
@media (max-width: 400px) {
  .site-logo-image,
  .site-branding__logo img {
    height: 35px;
  }
  
  .header-donate-btn,
  .header-actions .btn,
  .header-actions .button {
    padding: 8px 14px;
    font-size: 11px;
  }
}

/* ==========================================
   HEADER SEARCH FORM
   ========================================== */

/* Header Search Form - Hidden on mobile, shown on desktop */
.header-search {
  display: none;
  margin-right: 1rem;
}

.header-search-form {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 24px;
  padding: 0.25rem 0.75rem;
  transition: all 0.3s ease;
}

.header-search-form:focus-within {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-search-input {
  border: none;
  background: transparent;
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
  width: 180px;
  transition: width 0.3s ease;
}

.header-search-input:focus {
  outline: none;
  width: 220px;
}

.header-search-input::placeholder {
  color: #999;
}

.header-search-submit {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.header-search-submit:hover {
  color: var(--color-primary);
}

.header-search-submit svg {
  width: 18px;
  height: 18px;
}

/* Show search on desktop */
@media (min-width: 992px) {
  .header-search {
    display: flex;
  }
}

/* Responsive adjustments for search field */
@media (max-width: 1199px) {
  .header-search-input {
    width: 160px;
  }
  
  .header-search-input:focus {
    width: 200px;
  }
}