/**
 * Modern Footer Styles - Mobile-First Accordion Design
 * Performance optimized, professional modern design
 * 
 * @package HelpbixTheme
 * @since 2.0.0
 */

/* === MOBILE-FIRST BASE STYLES === */

.modern-footer {
  background: #ffffff;
  color: #222;
  border-top: 1px solid #e3e8ef;
  margin-top: 0px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 -2px 24px rgba(26,115,232,0.08);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 16px 16px;
  padding-bottom: 0px;
}

/* === FOOTER SECTIONS === */

.footer-sections {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-section {
  border-bottom: 1px solid #f3f4f6;
  position: relative;
}

.footer-section:last-child {
  border-bottom: none;
}

/* === SECTION HEADERS === */

.footer-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.footer-section-header:hover {
  background-color: #f8fafc;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 8px;
}

.footer-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a73e8;
  margin: 0;
  letter-spacing: -0.01em;
}

/* === ACCORDION TOGGLE === */

.footer-accordion-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #1a73e8;
}

.footer-accordion-toggle:hover {
  background-color: #f3f7fb;
  color: #1558b0;
}

.footer-accordion-toggle:focus {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

.accordion-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-section[data-expanded="true"] .accordion-icon {
  transform: rotate(0deg);
}

.footer-section[data-expanded="false"] .accordion-icon {
  transform: rotate(0deg);
}

/* === SECTION CONTENT === */

.footer-section-content {
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: 20px;
}

/* Hidden state */
.footer-section[data-expanded="false"] .footer-section-content {
  max-height: 0;
  opacity: 0;
  padding-bottom: 0;
  visibility: hidden;
}

/* Expanded state */
.footer-section[data-expanded="true"] .footer-section-content {
  max-height: 500px; /* Generous max-height for content */
  opacity: 1;
  visibility: visible;
}

/* === SOCIAL MEDIA SECTION === */

.footer-social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.footer-social-icon:hover,
.footer-social-icon:focus {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.footer-social-icon svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.footer-social-icon:hover svg {
  transform: scale(1.1);
}

/* === LINKS SECTION === */

.footer-nav {
  margin: 0;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link-item {
  margin: 0;
}

.footer-link {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  padding: 8px 0;
  display: block;
  transition: all 0.2s ease;
  border-radius: 4px;
  position: relative;
}

.footer-link:hover,
.footer-link:focus {
  color: #1a73e8;
  padding-left: 8px;
  background-color: #f3f7fb;
  margin-left: -8px;
  margin-right: -8px;
}

.footer-link:hover::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: #1a73e8;
  border-radius: 2px;
}

/* === FOOTER BOTTOM === */

.footer-bottom {
  margin-top: 0px;
  padding-top: 24px;
  border-top: 1px solid #e3e8ef;
  background: #f3f7fb;
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 16px;
}

.footer-bottom-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-copyright {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
  font-weight: 400;
}

.footer-tagline {
  color: #1a237e;
  font-size: 0.875rem;
  margin: 0;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

/* Removed ::before as we're adding flag directly in PHP */

.footer-bottom-links {
  display: none;
}

.footer-bottom-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.footer-bottom-link:hover,
.footer-bottom-link:focus {
  color: #1a73e8;
  background-color: #ffffff;
}

/* === DESKTOP STYLES - COOL & MODERN === */

@media (min-width: 768px) {
  .modern-footer {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: visible;
  }
  
  .modern-footer::before {
    display: none;
  }
  
  @keyframes gradient-shine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }
  
  .footer-container {
    padding: 56px 24px 24px;
    position: relative;
  }
  
  .footer-sections {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    position: relative;
  }
  
  .footer-section {
    border-bottom: none;
    position: relative;
    padding: 24px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(26, 115, 232, 0.06);
    border: 1px solid rgba(26, 115, 232, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
  }
  
  .footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a73e8 0%, #38bdf8 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
  }
  
  .footer-section:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(26, 115, 232, 0.15);
    border-color: rgba(26, 115, 232, 0.2);
  }
  
  .footer-section:hover::before {
    transform: scaleX(1);
  }
  
  /* Disable accordion on desktop */
  .footer-section-header {
    cursor: default;
    padding: 0 0 20px 0;
    position: relative;
  }
  
  .footer-section-header:hover {
    background: none;
    margin: 0;
    padding: 0 0 20px 0;
  }
  
  .footer-accordion-toggle {
    display: none;
  }
  
  .footer-section-content {
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding-bottom: 0;
  }
  
  .footer-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a73e8;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
  }
  
  .footer-section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #1a73e8 0%, #38bdf8 100%);
    border-radius: 2px;
  }
  
  .footer-social-links {
    gap: 20px;
    justify-content: flex-start;
  }
  
  .footer-social-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid rgba(26, 115, 232, 0.1);
    position: relative;
    overflow: hidden;
  }
  
  .footer-social-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, #1a73e8 0%, #38bdf8 100%);
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    border-radius: 50%;
    z-index: 0;
  }
  
  .footer-social-icon:hover::before {
    width: 100%;
    height: 100%;
  }
  
  .footer-social-icon svg {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
  }
  
  .footer-social-icon:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 30px rgba(26, 115, 232, 0.25);
  }
  
  .footer-links {
    gap: 16px;
  }
  
  .footer-link {
    font-size: 0.95rem;
    padding: 10px 0;
    font-weight: 500;
    position: relative;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .footer-link:hover {
    padding-left: 16px;
    background: linear-gradient(135deg, #f3f7fb 0%, #ffffff 100%);
    margin-left: -16px;
    margin-right: -16px;
    color: #1a73e8;
    font-weight: 600;
  }
  
  .footer-link:hover::before {
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #1a73e8 0%, #38bdf8 100%);
    left: 16px;
    border-radius: 3px;
  }
  
  .footer-bottom {
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
    margin-top: 64px;
    padding-top: 40px;
    background: linear-gradient(135deg, #f3f7fb 0%, #ffffff 100%);
    border-top: 1px solid rgba(26, 115, 232, 0.1);
    position: relative;
  }
  
  .footer-bottom::before {
    display: none;
  }
  
  .footer-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
  }
  
  .footer-tagline {
    margin: 0;
    font-size: 1rem;
    animation: tagline-glow 2s ease-in-out infinite alternate;
  }
  
  @keyframes tagline-glow {
    from { filter: brightness(1); }
    to { filter: brightness(1.1); }
  }
  
  .footer-bottom-links {
    display: none;
  }
}

@media (min-width: 992px) {
  .footer-sections {
    gap: 40px;
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-container {
    padding: 64px 32px 32px;
  }
  
  .footer-sections {
    gap: 48px;
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-bottom {
    margin-left: -32px;
    margin-right: -32px;
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (min-width: 1200px) {
  .footer-sections {
    gap: 56px;
  }
}

/* === ACCESSIBILITY & ANIMATIONS === */

@media (prefers-reduced-motion: reduce) {
  .footer-section-content,
  .accordion-icon,
  .footer-social-icon,
  .footer-link {
    transition: none;
  }
}

/* Focus styles for keyboard navigation */
.footer-section-header:focus {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
  border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .footer-social-icon {
    border-width: 2px;
  }
  
  .footer-link:hover::before {
    width: 4px;
  }
} 