/**
 * Modern Header & Footer - FIXED VERSION
 * Simplified and optimized to avoid conflicts
 */

/* ============================================
   TOPBAR - Simple & Clean
   ============================================ */
.modern-topbar {
  background: #2c3e50;
  color: #ecf0f1;
  font-size: 13px;
  line-height: 1.5;
}

.modern-topbar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  flex-wrap: wrap;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Social Links in Topbar */
.social-media-modern {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-label {
  color: #ecf0f1;
  margin-right: 5px;
}

.social-links {
  display: flex;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-links li {
  margin: 0;
}

.social-links li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.1);
  color: #ecf0f1;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links li a:hover {
  background: #1f87e6;
  color: #fff;
  transform: translateY(-2px);
}

/* Topbar Contact */
.topbar-contact {
  color: #ecf0f1;
}

.topbar-contact a {
  color: #ecf0f1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.topbar-contact a:hover {
  color: #1f87e6;
}

/* Top Menu */
.top-menu-modern .top-menu-list {
  display: flex;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-menu-modern .top-menu-list li {
  margin: 0;
}

.top-menu-modern .top-menu-list li a {
  display: block;
  padding: 5px 12px;
  color: #ecf0f1;
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.top-menu-modern .top-menu-list li a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ============================================
   MAIN HEADER - Clean & Professional
   ============================================ */
.modern-header-main {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 999;
  transition: all 0.3s ease;
}

.modern-header-main .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  gap: 20px;
}

/* Logo */
.modern-branding {
  flex-shrink: 0;
}

.modern-branding a {
  display: block;
  line-height: 0;
}

.modern-branding img {
  max-height: 50px;
  width: auto;
  transition: transform 0.3s ease;
}

.modern-branding a:hover img {
  transform: scale(1.05);
}

/* Main Navigation */
.modern-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
}

.primary-menu-list {
  display: flex;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: center;
}

.primary-menu-list > li {
  position: relative;
  margin: 0;
}

.primary-menu-list > li > a {
  display: block;
  padding: 10px 15px;
  color: #2c3e50;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.primary-menu-list > li > a:hover,
.primary-menu-list > li.current-menu-item > a {
  color: #1f87e6;
  background: rgba(31,135,230,0.1);
}

/* Dropdown */
.primary-menu-list .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  border-radius: 5px;
  padding: 10px 0;
  margin: 5px 0 0 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.primary-menu-list > li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu-list .sub-menu li {
  margin: 0;
}

.primary-menu-list .sub-menu li a {
  display: block;
  padding: 8px 20px;
  color: #2c3e50;
  text-decoration: none;
  transition: all 0.3s ease;
}

.primary-menu-list .sub-menu li a:hover {
  background: rgba(31,135,230,0.1);
  color: #1f87e6;
  padding-left: 25px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search-btn {
  width: 40px;
  height: 40px;
  background: rgba(31,135,230,0.1);
  color: #1f87e6;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search-btn:hover {
  background: #1f87e6;
  color: #fff;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid #1f87e6;
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
  display: none;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
  margin: 0 auto;
}

.hamburger .line {
  width: 100%;
  height: 2px;
  background: #1f87e6;
  transition: all 0.3s ease;
}

/* ============================================
   SEARCH DROPDOWN
   ============================================ */
.header-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  padding: 20px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 998;
}

.header-search-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-dropdown-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 15px;
  position: relative;
}

.search-close {
  position: absolute;
  top: -5px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: #1f87e6;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-close:hover {
  background: #1468b4;
  transform: rotate(90deg);
}

.header-search-dropdown .search-field {
  width: 100%;
  padding: 12px 50px 12px 20px;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 15px;
}

.header-search-dropdown .search-field:focus {
  border-color: #1f87e6;
  outline: none;
}

.header-search-dropdown .search-submit {
  position: absolute;
  right: 20px;
  top: 3px;
  width: 40px;
  height: 40px;
  background: #1f87e6;
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu-wrapper {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: #fff;
  box-shadow: 5px 0 20px rgba(0,0,0,0.3);
  z-index: 10000;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.mobile-menu-wrapper.active {
  left: 0;
}

.menu-responsive-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
}

.menu-responsive-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #1f87e6;
  color: #fff;
}

.mobile-menu-close {
  width: 35px;
  height: 35px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}

.mobile-menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-menu-list li {
  border-bottom: 1px solid #f0f0f0;
  margin: 0;
}

.mobile-menu-list li a {
  display: block;
  padding: 12px 20px;
  color: #2c3e50;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mobile-menu-list li a:hover {
  background: rgba(31,135,230,0.1);
  color: #1f87e6;
  padding-left: 25px;
}

.mobile-menu-social {
  padding: 20px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
}

.mobile-menu-social .social-title {
  font-weight: 600;
  margin-bottom: 15px;
}

.mobile-menu-social .social-links {
  justify-content: center;
}

/* ============================================
   FOOTER - Clean & Modern
   ============================================ */
.modern-footer {
  background: #2c3e50;
  color: #bdc3c7;
}

.modern-footer-top {
  padding: 50px 0 30px;
}

.modern-footer-top .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.footer-column {
  margin-bottom: 30px;
}

.footer-column .widget-title,
.footer-column h3,
.footer-column h4 {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1f87e6;
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 8px;
}

.footer-column ul li a {
  color: #bdc3c7;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-column ul li a:hover {
  color: #1f87e6;
  padding-left: 5px;
}

/* Footer Bottom */
.modern-footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.modern-footer-bottom .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.site-info {
  flex: 1;
  font-size: 14px;
}

.site-info a {
  color: #1f87e6;
  text-decoration: none;
}

.footer-social-links {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-social-links li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background: rgba(255,255,255,0.1);
  color: #bdc3c7;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-social-links li a:hover {
  background: #1f87e6;
  color: #fff;
  transform: translateY(-3px);
}

/* Back to Top */
.modern-back-to-top {
  position: fixed;
  right: 20px;
  bottom: -60px;
  width: 45px;
  height: 45px;
  background: #1f87e6;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 9998;
  box-shadow: 0 3px 15px rgba(31,135,230,0.4);
  font-size: 18px;
}

.modern-back-to-top.show {
  bottom: 20px;
}

.modern-back-to-top:hover {
  background: #1468b4;
  transform: translateY(-3px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
  .modern-navigation {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .topbar-inner {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 767px) {
  .topbar-left,
  .topbar-right {
    width: 100%;
    justify-content: center;
  }
  
  .top-menu-modern {
    display: none;
  }
  
  .header-main-inner {
    padding: 12px 0;
  }
  
  .modern-branding img {
    max-height: 40px;
  }
  
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}
