/* ========================================
   Layout CSS - Header & Footer Styles
   Extracted from _header.asp and _footer.asp
   ======================================== */

/* ========================================
   Header User Menu Styles
   ======================================== */
.header-user-menu {
  position: relative;
  display: flex;
  align-items: center;
}
.header-user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.header-user-trigger:hover {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.25);
}
.header-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.header-user-name {
  color: #374151;
  font-size: 14px;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-user-arrow {
  width: 16px;
  height: 16px;
  fill: #9ca3af;
  transition: transform 0.2s;
}
.header-user-menu:hover .header-user-arrow {
  transform: rotate(180deg);
}
.header-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s;
  z-index: 1000;
}
.header-user-menu:hover .header-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.header-user-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
}
.header-user-dropdown-name {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}
.header-user-dropdown-id {
  color: #9ca3af;
  font-size: 12px;
}
.header-user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s;
}
.header-user-dropdown a:hover {
  color: #6366f1;
  background: #f9fafb;
}
.header-user-dropdown a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.7;
}
.header-user-dropdown-divider {
  height: 1px;
  margin: 6px 0;
  background: #f3f4f6;
}
.header-user-dropdown .logout-link {
  color: #ef4444;
  border-radius: 0 0 12px 12px;
}
.header-user-dropdown .logout-link:hover {
  background: #fef2f2;
}

/* ========================================
   Mega Footer Styles
   ======================================== */
.mega-footer {
  position: relative;
  background: linear-gradient(180deg, #0a0612 0%, #120a1e 50%, #0d0618 100%);
  overflow: hidden;
}

/* Decorative Glows */
.footer-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  pointer-events: none;
}
.footer-glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,0.3) 0%, transparent 70%);
  top: -200px;
  left: -200px;
}
.footer-glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.25) 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
}

/* Grid Background */
.footer-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(139,92,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Stats Bar */
.footer-stats {
  position: relative;
  background: linear-gradient(90deg, rgba(139,92,246,0.1) 0%, rgba(59,130,246,0.1) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-stats-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
}
.stat-item {
  text-align: center;
}
.stat-number {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.stat-number span {
  font-size: 20px;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #fff;
  background-clip: unset;
  color: #fff;
}
.stat-label {
  font-size: 13px;
  color: #e2e8f0;
  margin-top: 6px;
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg, transparent, rgba(139,92,246,0.3), transparent);
}

/* Main Content */
.footer-main {
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-main-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 280px 1fr 1fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand-col {
  grid-column: 1;
}
.footer-col {
  min-width: 0;
}

/* Brand Column Extra */
.footer-brand-logo {
  display: inline-block;
  margin-bottom: 20px;
}
.footer-brand-logo img {
  height: 42px;
  opacity: 0.9;
  transition: opacity 0.3s;
}
.footer-brand-logo:hover img {
  opacity: 1;
}
.footer-brand-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.8;
  margin-bottom: 24px;
}

/* Social Row - TG, Email, Runtime inline */
.footer-social-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.social-btn svg {
  width: 20px;
  height: 20px;
}
.social-btn.telegram {
  background: rgba(41,182,246,0.1);
  color: #29B6F6;
}
.social-btn.telegram:hover {
  background: #29B6F6;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(41,182,246,0.3);
}
.social-btn.email {
  background: rgba(139,92,246,0.1);
  color: #a78bfa;
}
.social-btn.email:hover {
  background: #8b5cf6;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139,92,246,0.3);
}

/* Runtime Inline */
.footer-runtime-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 10px;
  font-size: 13px;
  color: #94a3b8;
}
.footer-runtime-inline svg {
  width: 16px;
  height: 16px;
  stroke: #10b981;
  flex-shrink: 0;
}
.footer-runtime-inline strong {
  color: #10b981;
  font-weight: 600;
}

/* Footer Columns - Force vertical layout */
.mega-footer .footer-col {
  display: block !important;
}
.mega-footer .footer-col-title {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mega-footer .title-icon {
  font-size: 16px;
}
.mega-footer .footer-col ul,
.mega-footer .footer-col ul.footer-links,
.mega-footer ul.footer-links,
footer.mega-footer ul.footer-links {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  flex-direction: column !important;
}
.mega-footer .footer-col ul li,
.mega-footer .footer-col ul.footer-links li,
.mega-footer ul.footer-links li,
footer.mega-footer ul.footer-links li {
  display: block !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
  flex: none !important;
}
.mega-footer .footer-col ul li a,
.mega-footer .footer-col ul.footer-links li a,
.mega-footer ul.footer-links li a,
footer.mega-footer ul.footer-links li a {
  display: block !important;
  font-size: 13px;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mega-footer ul.footer-links li a:hover {
  color: #a78bfa;
  padding-left: 6px;
}
.mega-footer .link-dot {
  display: none !important;
}

/* CTA Section */
.footer-cta {
  position: relative;
  background: linear-gradient(90deg, rgba(139,92,246,0.15) 0%, rgba(59,130,246,0.15) 100%);
  border-top: 1px solid rgba(139,92,246,0.2);
  border-bottom: 1px solid rgba(139,92,246,0.2);
}
.footer-cta-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.cta-content h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.cta-content p {
  font-size: 14px;
  color: #94a3b8;
}
.cta-buttons {
  display: flex;
  gap: 16px;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s;
}
.cta-btn svg {
  width: 18px;
  height: 18px;
}
.cta-btn.primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139,92,246,0.4);
}
.cta-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(139,92,246,0.5);
}
.cta-btn.secondary {
  background: rgba(255,255,255,0.05);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.15);
}
.cta-btn.secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
}

/* Bottom Bar */
.footer-bottom {
  position: relative;
}
.footer-bottom-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copyright {
  font-size: 13px;
  color: #475569;
}
.copyright-divider {
  margin: 0 12px;
  opacity: 0.3;
}
.footer-bottom-links {
  display: flex;
  gap: 24px;
}
.footer-bottom-links a {
  font-size: 13px;
  color: #475569;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom-links a:hover {
  color: #a78bfa;
}

/* Footer Responsive */
@media (max-width: 1200px) {
  .footer-main-inner {
    grid-template-columns: 280px repeat(3, 1fr);
    gap: 30px;
  }
  .footer-brand-col {
    grid-column: 1;
    grid-row: span 2;
  }
}
@media (max-width: 900px) {
  .footer-main-inner {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
  }
  .footer-brand-col {
    grid-column: span 3;
    grid-row: auto;
  }
  .footer-stats-inner {
    flex-wrap: wrap;
    gap: 20px;
  }
  .stat-divider {
    display: none;
  }
  .stat-item {
    flex: 1;
    min-width: 100px;
  }
  .stat-number {
    font-size: 28px;
  }
  .footer-cta-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
@media (max-width: 600px) {
  .footer-main-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand-col {
    grid-column: span 2;
  }
  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  .cta-btn {
    justify-content: center;
  }
}
@media (max-width: 400px) {
  .footer-main-inner {
    grid-template-columns: 1fr;
  }
  .footer-brand-col {
    grid-column: span 1;
  }
}
