/**
 * Deferred Base CSS - Shared across all fast pages
 * Contains: Mega dropdown, Footer styles, common utilities
 * Loaded asynchronously after first paint
 */

/* =====================
   GENERAL (deferred)
   ===================== */
.blur-element {
  height: 100%;
  width: auto;
  aspect-ratio: 3/4;
  background-color: var(--el-color);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 20% 60%;
  filter: blur(35px);
  opacity: 0.3;
}

/* =====================
   MEGA DROPDOWN (deferred - only visible on hover)
   ===================== */
.mega-dropdown {
  display: block;
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 85vw;
  max-width: 1440px;
  background: var(--color-bg);
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.12);
  border: 1px solid #e5e5e5;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 40px 50px;
  margin-top: 15px;
  z-index: 1000;
}

.mega-dropdown::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
  background: transparent;
}

.menu-item.has-dropdown:hover .mega-dropdown {
  opacity: 1;
  visibility: visible;
  margin-top: 10px;
}

.mega-dropdown__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.mega-dropdown__expertise {
  border-right: 1px solid #eee;
  padding-right: 40px;
}

.mega-dropdown__label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text-dark);
  margin-bottom: 20px;
}

.mega-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  background: #0a0e1a;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.mega-btn:hover {
  background: var(--color-primary);
  color: #fff !important;
}

.mega-btn svg,
.mega-btn img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.mega-dropdown__services {
  padding: 0 20px;
}

.mega-dropdown__services .mega-dropdown__label {
  margin-bottom: 16px;
}

.services-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 30px;
}

.services-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-radius: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-dark);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.services-list li a:hover {
  background: transparent;
  color: var(--color-primary);
}

.services-list li a img,
.services-list li a svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}

.services-list li a:hover img,
.services-list li a:hover svg {
  opacity: 1;
}

.mega-dropdown__info {
  background: transparent;
  border-radius: 0;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.mega-dropdown__info img {
  margin-bottom: 15px;
}

.mega-dropdown__info h4 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 12px;
}

.mega-dropdown__info p {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 20px;
}

.mega-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

.menu-item.has-dropdown > a svg {
  transition: transform 0.3s ease;
}

.menu-item.has-dropdown:hover .badge svg {
  transform: rotate(180deg);
}

@media (max-width: 1023px) {
  .mega-dropdown {
    display: none;
  }
}

/* =====================
   MOBILE DRAWER (deferred - only needed on interaction)
   ===================== */
.mobile-drawer {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  visibility: hidden;
  pointer-events: none;
}

.mobile-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer.is-open .mobile-drawer__overlay {
  opacity: 1;
}

.mobile-drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 95%;
  max-width: 400px;
  height: 100%;
  background: #000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
}

.mobile-drawer.is-open .mobile-drawer__panel {
  transform: translateX(0);
}

.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.mobile-drawer__logo img {
  height: 28px;
  width: auto;
}

.mobile-drawer__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.mobile-drawer__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-drawer__content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.mobile-drawer__levels {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
}

.mobile-drawer__level {
  min-width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.mobile-drawer__level.is-active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer__back {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  text-align: left;
}

.mobile-drawer__back svg {
  width: 6px;
  height: 12px;
}

.mobile-drawer__level-title {
  display: block;
  padding: 12px 20px 6px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.mobile-drawer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-drawer__menu > li > a,
.mobile-drawer__item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    background 0.2s ease,
    color 0.2s ease;
  text-align: left;
}

.mobile-drawer__menu > li > a:hover,
.mobile-drawer__item-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-primary);
}

.mobile-drawer__item-btn span {
  flex: 1;
}

.mobile-drawer__item-btn svg {
  width: 6px;
  height: 12px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}

.mobile-drawer__item-btn:hover svg {
  color: var(--color-primary);
}

.mobile-drawer__section-label {
  padding: 14px 20px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.4);
  border-bottom: none;
}

.mobile-drawer__view-all {
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-drawer__view-all a {
  color: var(--color-primary);
  font-weight: 600;
}

.mobile-drawer__footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  flex-shrink: 0;
}

.mobile-drawer__cta {
  width: 100%;
  justify-content: center;
}

/* =====================
   FOOTER
   ===================== */
.site-footer {
  background: linear-gradient(180deg, #0a0a14 0%, #0d0d1a 100%);
  padding: 80px 0 0;
  position: relative;
  z-index: 1;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.8fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  margin-bottom: 20px;
}

.footer-brand-desc {
  font-size: 1rem;
  color: #ffffff;
  line-height: 1.7;
  margin-bottom: 24px;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.footer-cta-btn svg {
  transition: transform 0.3s;
}

.footer-cta-btn:hover svg {
  transform: translateX(4px);
}

.footer-col__title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
}

.footer-col__title--mt {
  margin-top: 28px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 1rem;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover,
.footer-link--active {
  color: var(--color-primary);
}

.footer-tags {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-tag {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s;
  width: fit-content;
  background-color: #101f33;
}

.footer-tag:hover {
  background-color: #ffffff;
  color: var(--color-text, #1d1d1f) !important;
}

.footer-contact-list,
.footer-location-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-contact-list a {
  font-size: 1rem;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-contact-list a:hover {
  color: var(--color-primary);
}

.footer-location-list li {
  font-size: 1rem;
  color: #ffffff;
}

.footer-subscribe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-subscribe__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.footer-subscribe__desc {
  font-size: 1rem;
  letter-spacing: 0.04;
  color: #ffffff;
}

.footer-subscribe__form {
  display: flex;
  gap: 16px;
  flex: 1;
  max-width: 600px;
}

.footer-subscribe__input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.footer-subscribe__input-wrap svg {
  position: absolute;
  left: 16px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-subscribe__input-wrap input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px 16px 14px 48px;
  font-size: 0.9375rem;
  color: #fff;
  font-family: inherit;
  transition: border-color 0.3s;
}

.footer-subscribe__input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.footer-subscribe__input-wrap input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.footer-subscribe__btn {
  padding: var(--btn-md-padding);
  height: 50px;
  white-space: nowrap;
}

.footer-subscribe__btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* =====================
   TOAST NOTIFICATIONS
   ===================== */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  background: #1a1a2e;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  font-size: 0.9375rem;
  line-height: 1.4;
  color: #fff;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  max-width: 400px;
}

.toast--visible {
  transform: translateX(0);
  opacity: 1;
}

.toast--hiding {
  transform: translateX(120%);
  opacity: 0;
}

.toast__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast__message {
  flex: 1;
}

.toast__close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
}

.toast__close:hover {
  color: #fff;
}

.toast--success {
  border-left: 4px solid #22c55e;
}

.toast--success .toast__icon {
  color: #22c55e;
}

.toast--error {
  border-left: 4px solid #ef4444;
}

.toast--error .toast__icon {
  color: #ef4444;
}

@media (max-width: 480px) {
  #toast-container {
    top: auto;
    bottom: 24px;
    right: 16px;
    left: 16px;
  }
  .toast {
    max-width: 100%;
    transform: translateY(120%);
  }
  .toast--visible {
    transform: translateY(0);
  }
  .toast--hiding {
    transform: translateY(120%);
  }
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
  font-size: 0.75rem;
  color: #ffffff;
}

.footer-copyright a {
  color: #ffffff;
  /* text-decoration: underline; */
  transition: color 0.3s;
}

.footer-copyright a:hover {
  color: var(--color-primary);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s;
}

.footer-social a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.footer-social a:after {
  content: none !important;
}

/* Footer Responsive */
@media (max-width: 1200px) {
  .footer-main {
    grid-template-columns: 1.2fr 1fr 0.8fr 1fr;
    gap: 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
  }
  .footer-brand-desc {
    grid-column: 1 / 2;
  }
  .footer-cta-btn {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
  }
  .mega-dropdown__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .mega-dropdown__info {
    grid-column: span 2;
  }
}

@media (max-width: 1023px) {
  .site-footer {
    padding: 60px 0 0;
  }
  .footer-main {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    display: block;
    max-width: 100%;
  }
  .footer-subscribe {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .footer-subscribe__form {
    width: 100%;
    max-width: 100%;
  }
  .services-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-subscribe__form {
    flex-direction: column;
  }
  .footer-subscribe__btn {
    width: 100%;
    justify-content: center;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .footer-copyright {
    order: 2;
  }
  .footer-social {
    order: 1;
  }
}

/* =====================
   UTILITIES
   ===================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* =====================
   COMMON SECTION SPACING
   ===================== */
.section-padding {
  padding: 100px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 60px 0;
  }
}

@media (max-width: 480px) {
  .section-padding {
    padding: 50px 0;
  }
}
