/* ==========================================================================
   IECC Unified Layout Design System (Header, Navigation, Mobile Drawer & Footer)
   ========================================================================== */

/* Top Scroll Progress Bar */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #059669, #10B981, #065f46);
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* Announcement Top Bar */
.announce {
  background: #0f2b22;
  color: rgba(255, 255, 255, 0.95);
  font-family: Lato, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  min-height: 48px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  text-align: center;
  position: relative;
  z-index: 60;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}
.announce b {
  color: #fff;
  font-weight: 700;
}
.announce a {
  color: #6EE7B7;
  background: rgba(110, 231, 183, 0.14);
  border: 1px solid rgba(110, 231, 183, 0.3);
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 700;
  margin-left: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.announce a:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

/* Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #E8ECF1;
  box-shadow: 0 4px 20px rgba(35, 35, 35, 0.04);
}
.site-header .bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: block;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}
.brand-title {
  font-family: Poppins, Lato, sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink, #0f2b22);
  font-size: 16px;
  line-height: 1.1;
}
.brand-subtitle {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.brand-name {
  font-family: Poppins, Lato, sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink, #232323);
  font-size: 14px;
  line-height: 1.2;
}
.brand-sub {
  font-size: 0;
  color: transparent;
  letter-spacing: 0;
  display: none;
}

/* Desktop Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14.5px;
  font-weight: 700;
}
.site-nav a {
  color: #374151;
  position: relative;
  padding: 6px 2px;
  transition: color 0.18s;
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--pink, #059669);
}
.site-nav a.active {
  color: var(--pink, #059669);
}
.site-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--pink, #059669);
  border-radius: 999px;
}

/* Header Auth Buttons (Desktop) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-actions .login-link {
  font-weight: 700;
  font-size: 14.5px;
  color: #374151;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.18s, background 0.18s;
}
.header-actions .login-link:hover {
  color: var(--pink, #059669);
  background: rgba(5, 150, 105, 0.06);
}

/* Mobile Hamburger Menu Toggle Button */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  transition: background 0.2s, border-color 0.2s;
  z-index: 105;
}
.menu-toggle:hover {
  background: #F3F4F6;
  border-color: #D1D5DB;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1F2937;
  border-radius: 2px;
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.24s;
}
.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer & Overlay Styles */
.drawer-overlay,
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  max-width: 86vw;
  height: 100vh;
  background: #ffffff;
  z-index: 1001;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  visibility: hidden;
  pointer-events: none;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #E5E7EB;
  background: #F9FAFB;
}
.drawer-close {
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #4B5563;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
}
.drawer-close:hover {
  background: #E5E7EB;
  color: #111827;
}

.drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  overflow-y: auto;
}

.drawer-nav,
.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.drawer-nav a,
.mobile-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: Poppins, Lato, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #1F2937;
  background: #F9FAFB;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
}
.drawer-nav a:hover,
.drawer-nav a.active,
.mobile-nav-list a:hover,
.mobile-nav-list a.active {
  background: #DFF5EA;
  color: #047857;
}
.drawer-nav a.active::after,
.mobile-nav-list a.active::after {
  content: "●";
  font-size: 11px;
  color: #059669;
}

.drawer-actions,
.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #E5E7EB;
}
.drawer-actions .btn,
.mobile-actions .btn {
  text-align: center;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
}
.btn-block {
  display: block;
  width: 100%;
}
.mobile-foot-hint {
  font-size: 12.5px;
  color: #6B7280;
  text-align: center;
  margin-top: 6px;
}
.mobile-foot-hint a {
  color: #059669;
  text-decoration: underline;
}

/* Open states on mobile */
@media (max-width: 960px) {
  .mobile-drawer {
    display: flex;
  }
  .drawer-overlay,
  .mobile-overlay {
    display: block;
  }
  .mobile-drawer.open,
  .mobile-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }
  .drawer-overlay.open,
  .drawer-overlay.is-active,
  .mobile-overlay.open,
  .mobile-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Explicitly remove from desktop flow */
@media (min-width: 961px) {
  .mobile-drawer,
  .drawer-overlay,
  .mobile-overlay,
  .menu-toggle {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Unified Footer */
.site-footer {
  background: #0f2b22;
  color: #E5E7EB;
  padding: 0;
  font-size: 14.5px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.foot-brand {
  display: inline-block;
  margin-bottom: 18px;
  text-decoration: none;
}
.foot-brand-logo {
  width: 76px;
  height: 76px;
  display: block;
  object-fit: contain;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.foot-brand:hover .foot-brand-logo {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}
.foot-grid h4 {
  font-family: Poppins, sans-serif;
  color: #fff;
  font-size: 13.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 800;
}
.foot-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.foot-grid ul a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.18s, padding-left 0.18s;
  display: inline-block;
}
.foot-grid ul a:hover {
  color: #6EE7B7;
  transform: translateX(3px);
}
.foot-brand-desc {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 12px 0 20px;
}

/* Newsletter Form */
.news-form {
  display: flex;
  position: relative;
  max-width: 320px;
}
.news-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px 0 0 999px;
  padding: 12px 18px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.news-form input:focus {
  border-color: #10B981;
  background: rgba(255, 255, 255, 0.14);
}
.news-form input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.news-form button {
  background: var(--pink, #059669);
  color: #fff;
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  border: none;
  padding: 0 22px;
  border-radius: 0 999px 999px 0;
  cursor: pointer;
  transition: background 0.2s;
}
.news-form button:hover {
  background: #047857;
}
.news-feedback {
  margin-top: 10px;
  font-size: 12.5px;
  display: none;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Bottom Copyright Bar */
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  background: #0b1f19;
}
.foot-bottom .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Back to Top Floating Button */
#toTop {
  position: fixed;
  bottom: 30px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: #059669;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 85;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
#toTop:hover {
  background: #047857;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.35);
}

/* Image Visual Enhancements */
.avatar-photo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #E5E7EB;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}
.audience-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  display: block;
}
.trust-badge-icon {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  display: block;
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
  .foot-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
  .foot-grid > div:last-child {
    grid-column: span 4;
    max-width: 480px;
  }
}

@media (max-width: 960px) {
  .site-nav {
    display: none !important;
  }
  .header-actions .login-link {
    display: none;
  }
  .header-actions .btn {
    padding: 9px 18px;
    font-size: 13.5px;
  }
  .menu-toggle {
    display: flex !important;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 36px;
  }
  .foot-grid > div:first-child {
    grid-column: span 2;
  }
  .foot-grid > div:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .site-header .bar {
    height: 64px;
    padding: 0 16px;
    gap: 12px;
  }
  .mobile-drawer {
    padding: 0;
  }
  .brand-sub {
    display: none;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    display: block !important;
    object-fit: contain;
    flex-shrink: 0;
  }
  .brand-subtitle {
    display: none;
  }
  .drawer-header .brand-subtitle {
    display: block;
  }
  .brand-name {
    font-size: 16px;
  }
  .header-actions .btn {
    display: none;
  }
  .foot-grid {
    grid-template-columns: 1fr !important;
  }
  .foot-grid > div:first-child,
  .foot-grid > div:last-child {
    grid-column: span 1;
  }
  .foot-bottom .wrap {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .announce {
    font-size: 12.5px;
    padding: 10px 14px;
    min-height: 44px;
    gap: 6px;
    line-height: 1.4;
  }
}

.hl-block {
  background: #059669 !important;
  color: #ffffff !important;
  padding: 2px 12px;
  border-radius: 6px;
  display: inline-block;
}
