/*
Theme Name: Aapo
Theme URI: https://www.pekebyte.com
Description: Aapo Theme with custom header and footer integrated with Polylang.
Author: Pedro Molina
Template: hello-elementor
Version: 1.0.0
Text Domain: aapo-theme
*/

/* ==========================================================================
   Global / Utils
   ========================================================================== */

body.aapo-theme-active {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure box-sizing matches Tailwind reset */
.aapo-header-wrapper, .aapo-header-wrapper *, .aapo-header-wrapper *::before, .aapo-header-wrapper *::after,
.aapo-mobile-menu, .aapo-mobile-menu *, .aapo-mobile-menu *::before, .aapo-mobile-menu *::after,
.aapo-footer, .aapo-footer *, .aapo-footer *::before, .aapo-footer *::after {
  box-sizing: border-box;
}

/* Glassmorphism helpers */
.aapo-glass {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.aapo-glass-white {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.aapo-glass-dark {
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Dots and Noise */
.aapo-bg-dots {
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 24px 24px;
}

.aapo-bg-noise {
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
  mix-blend-mode: overlay;
}

/* Animations */
@keyframes aapo-pulse {
  50% {
    opacity: .5;
  }
}

.aapo-animate-pulse {
  animation: aapo-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.aapo-header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 1rem 1rem 0;
  transition: all 0.5s ease;
  pointer-events: none;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  /* Let clicks pass through empty space */
}

/* Adjust for WordPress Admin Bar */
body.admin-bar .aapo-header-wrapper {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar .aapo-header-wrapper {
    top: 46px;
  }
}

.aapo-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 64rem;
  /* max-w-5xl (1024px) */
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  transition: all 0.5s ease;
  pointer-events: auto;
  /* Re-enable clicks */
}

/* Header States */
.aapo-header-inner.is-default {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.aapo-header-inner.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.aapo-header-inner.is-dark {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Logo */
.aapo-header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none !important;
}

.aapo-header-logo img {
  height: 2rem;
  width: auto;
  transition: all 0.3s ease;
}

.aapo-header-inner.is-scrolled .aapo-header-logo img {
  height: 1.75rem;
}

.aapo-header-inner.is-dark .aapo-header-logo img {
  filter: brightness(0) invert(1);
}

/* Desktop Nav WP Menu */
.aapo-nav-desktop {
  display: none;
}
@media (min-width: 768px) {
  .aapo-nav-desktop {
    display: block;
  }
}

.aapo-nav-desktop-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
}

.aapo-nav-desktop-list li {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1;
}

.aapo-nav-desktop-list a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 1rem !important;
  border-radius: 9999px !important;
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
  border: none !important;
}

/* Link Colors - Default */
.is-default .aapo-nav-desktop-list a {
  color: #1f2937;
}
.is-default .aapo-nav-desktop-list a:hover {
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.2);
}
.is-default .aapo-nav-desktop-list li.current-menu-item a {
  color: #2563eb;
  background: #eff6ff;
}

/* Link Colors - Scrolled */
.is-scrolled .aapo-nav-desktop-list a {
  color: #374151;
}
.is-scrolled .aapo-nav-desktop-list a:hover {
  color: #2563eb;
  background: #eff6ff;
}
.is-scrolled .aapo-nav-desktop-list li.current-menu-item a {
  color: #2563eb;
  background: #eff6ff;
}

/* Link Colors - Dark */
.is-dark .aapo-nav-desktop-list a {
  color: rgba(255, 255, 255, 0.8);
}
.is-dark .aapo-nav-desktop-list a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.is-dark .aapo-nav-desktop-list li.current-menu-item a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

/* CTA Button (Add "is-cta" class in WP Menu) */
.aapo-nav-desktop-list li.is-cta {
  margin-left: 0.5rem !important;
}
.aapo-nav-desktop-list li.is-cta a {
  padding: 0.5rem 1.25rem !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}
.aapo-nav-desktop-list li.is-cta a:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  transform: translateY(-2px) !important;
}

.is-default .aapo-nav-desktop-list li.is-cta a,
.is-scrolled .aapo-nav-desktop-list li.is-cta a {
  background: #2563eb;
  color: #ffffff !important;
}
.is-default .aapo-nav-desktop-list li.is-cta a:hover,
.is-scrolled .aapo-nav-desktop-list li.is-cta a:hover {
  background: #1d4ed8;
}

.is-dark .aapo-nav-desktop-list li.is-cta a {
  background: #ffffff;
  color: #1e3a8a !important;
}
.is-dark .aapo-nav-desktop-list li.is-cta a:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Right Section (Lang + Toggle) */
.aapo-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Language Switcher */
.aapo-lang-switcher {
  display: flex !important;
  align-items: center !important;
  gap: 0.125rem !important;
  border-radius: 9999px !important;
  padding: 0.125rem !important;
}

.is-default .aapo-lang-switcher,
.is-scrolled .aapo-lang-switcher {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(0, 0, 0, 0.05) !important;
}

.is-dark .aapo-lang-switcher {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(0, 0, 0, 0.05) !important;
}

.aapo-lang-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
  font-weight: 700 !important;
  padding: 0.25rem 0.625rem !important;
  border-radius: 9999px !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  border: none !important;
  background: transparent;
  cursor: pointer;
  margin: 0 !important;
}

/* Lang btn states - Default/Scrolled */
.is-default .aapo-lang-btn,
.is-scrolled .aapo-lang-btn {
  color: #9ca3af;
}

.is-default .aapo-lang-btn:hover,
.is-scrolled .aapo-lang-btn:hover {
  color: #374151;
}

.is-default .aapo-lang-btn.active {
  background: #dbeafe;
  color: #1d4ed8;
}

.is-scrolled .aapo-lang-btn.active {
  background: #2563eb;
  color: #ffffff;
}

/* Lang btn states - Dark */
.is-dark .aapo-lang-btn {
  color: rgba(255, 255, 255, 0.5);
}

.is-dark .aapo-lang-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.is-dark .aapo-lang-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Mobile Toggle */
.aapo-mobile-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem !important;
  border-radius: 9999px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
}

.aapo-mobile-toggle svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
}

@media (min-width: 768px) {
  .aapo-mobile-toggle {
    display: none !important;
  }
}

.is-default .aapo-mobile-toggle {
  color: #1f2937;
}

.is-default .aapo-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.is-scrolled .aapo-mobile-toggle {
  color: #374151;
}

.is-scrolled .aapo-mobile-toggle:hover {
  background: #f3f4f6;
}

.is-dark .aapo-mobile-toggle {
  color: #ffffff;
}

.is-dark .aapo-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu Overlay */
.aapo-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.aapo-mobile-menu.is-open {
  display: flex;
}

@media (min-width: 768px) {
  .aapo-mobile-menu {
    display: none !important;
  }
}

.aapo-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(243, 244, 246, 0.5);
}

.aapo-mobile-logo img {
  height: 2rem;
  width: auto;
}

.aapo-mobile-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.aapo-mobile-lang {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  padding: 0.125rem;
  background: #f9fafb;
}

.aapo-mobile-lang-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  text-decoration: none !important;
  color: #9ca3af;
}

.aapo-mobile-lang-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.aapo-mobile-close {
  padding: 0.5rem;
  border-radius: 9999px;
  background: transparent;
  border: none;
  color: #374151;
  cursor: pointer;
  line-height: 0;
}

.aapo-mobile-close:hover {
  background: #f3f4f6;
}

.aapo-mobile-nav-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 0.5rem;
  padding: 0 1.5rem;
  list-style: none;
  margin: 0;
  width: 100%;
}

.aapo-mobile-nav-list li {
  width: 100%;
  margin: 0;
  padding: 0;
}

.aapo-mobile-nav-list a {
  display: block;
  width: 100%;
  padding: 1rem 0;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  border-radius: 1rem;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.aapo-mobile-nav-list a:hover {
  color: #2563eb;
  background: #eff6ff;
}

/* Mobile CTA */
.aapo-mobile-nav-list li.is-cta a {
  margin-top: 1.5rem;
  background: #2563eb;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 9999px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.aapo-mobile-nav-list li.is-cta a:hover {
  background: #1d4ed8;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.aapo-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0f1e 0%, #0d1a3a 100%);
  color: #ffffff;
}

.aapo-footer__top-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(37, 99, 235, 0.5), rgba(8, 145, 178, 0.5), transparent);
}

.aapo-footer__inner {
  position: relative;
  z-index: 10;
  max-width: 80rem;
  /* max-w-7xl */
  margin: 0 auto;
  padding: 4rem 1rem 2.5rem;
}

@media (min-width: 640px) {
  .aapo-footer__inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .aapo-footer__inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.aapo-footer__grid {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .aapo-footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Brand Col */
.aapo-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .aapo-footer__brand {
    grid-column: span 1 / span 1;
  }
}

.aapo-footer__logo img {
  height: 2.25rem;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.aapo-footer__tagline {
  color: #9ca3af;
  font-size: 0.875rem;
  line-height: 1.625;
  margin: 0;
}

.aapo-footer__socials {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.aapo-social-link {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: all 0.3s ease;
  text-decoration: none !important;
}

.aapo-social-link:hover {
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.1);
}

.aapo-social-link svg {
  width: 1rem;
  height: 1rem;
}

/* Links Cols */
.aapo-footer__heading {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}

.aapo-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.aapo-footer__link,
.aapo-footer__list a {
  color: #9ca3af;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.aapo-footer__link:hover,
.aapo-footer__list a:hover {
  color: #60a5fa;
}

/* Contact Specific */
.aapo-footer__contact-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: #9ca3af;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.aapo-footer__contact-item:hover {
  color: #60a5fa;
}

.aapo-footer__contact-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: rgba(31, 41, 55, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.aapo-footer__contact-item:hover .aapo-footer__contact-icon {
  background: rgba(37, 99, 235, 0.2);
}

.aapo-footer__contact-icon svg {
  width: 0.875rem;
  height: 0.875rem;
}

.aapo-footer__address {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  color: #9ca3af;
}

.aapo-footer__address .aapo-footer__contact-icon {
  margin-top: 0.125rem;
}

/* Bottom Bar */
.aapo-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  .aapo-footer__bottom {
    flex-direction: row;
  }
}

.aapo-footer__copy {
  color: #6b7280;
  font-size: 0.75rem;
  margin: 0;
}

.aapo-footer__status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.aapo-footer__status-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: #34d399;
}

.aapo-footer__status-text {
  color: #6b7280;
  font-size: 0.75rem;
  margin: 0;
}