/**
 * NUGUI Footer Component
 * Clean, compact footer with proper alignment
 */

/* ========================================
   FOOTER BASE STYLES
   ======================================== */
.footer {
  background: var(--color-background-secondary);
  border-top: 1px solid var(--color-separator);
  padding: 3rem 0 1.5rem 0; /* Reduced from 5xl to more compact */
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ========================================
   FOOTER GRID LAYOUT
   ======================================== */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr; /* Company takes 2x space, others 1x */
  gap: 2rem;
  margin-bottom: 2rem;
}

/* ========================================
   FOOTER SECTIONS
   ======================================== */
.footer-section h3 {
  color: var(--color-text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-section h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.footer-section p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

/* ========================================
   FOOTER LINKS
   ======================================== */
.footer-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.9rem;
}

.footer-link:hover {
  color: var(--color-primary);
}

.footer-contact-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  font-size: 0.9rem;
}

.footer-contact-link:hover {
  color: var(--color-primary);
}

/* ========================================
   COMPANY SECTION (Logo + Description)
   ======================================== */
.footer-company {
  max-width: 400px;
}

.footer-logo-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-logo {
  height: 28px;
  width: 28px;
  margin-right: 0.75rem;
}

.footer-brand {
  font-family: var(--font-family-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.footer-description {
  max-width: 100%;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* ========================================
   SOCIAL LINKS
   ======================================== */
.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(128, 128, 128, 0.1);
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: var(--color-text-primary);
  transition: fill 0.3s ease;
}

.social-link:hover {
  transform: translateY(-2px);
}

.social-link:hover svg {
  fill: white;
}

/* Social platform specific hover colors */
.social-link[href*="linkedin"]:hover {
  background: #0077B5;
  border-color: #0077B5;
}

.social-link[href*="wa.me"]:hover {
  background: #25D366;
  border-color: #25D366;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.footer-contact-group {
  margin-bottom: 1rem;
}

.footer-contact-group:last-child {
  margin-bottom: 0;
}

/* ========================================
   FOOTER BOTTOM (Copyright + Legal)
   ======================================== */
.footer-bottom {
  border-top: 1px solid var(--color-separator);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-legal-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-legal-link:hover {
  color: var(--color-text-primary);
}

.footer-copyright {
  color: var(--color-text-tertiary);
  font-size: 0.875rem;
  margin: 0;
}

/* ========================================
   THEME SWITCHING
   ======================================== */
.footer-logo-light {
  display: block;
}

.footer-logo-dark {
  display: none;
}

[data-theme="dark"] .footer-logo-light {
  display: none;
}

[data-theme="dark"] .footer-logo-dark {
  display: block;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .footer-company {
    grid-column: span 2;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 2rem 0 1rem 0;
  }
  
  .footer-container {
    padding: 0 1rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .footer-company {
    grid-column: span 1;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .footer-legal {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 1.5rem 0 0.75rem 0;
  }
  
  .footer-social {
    gap: 0.5rem;
  }
  
  .social-link {
    width: 32px;
    height: 32px;
  }
  
  .social-link svg {
    width: 16px;
    height: 16px;
  }
}

/* ========================================
   MODAL STYLES (moved from inline)
   ======================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-background);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-separator);
  padding-bottom: 1rem;
}

.modal-title {
  font-family: var(--font-family-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1;
}

.modal-close:hover {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
}

.modal-content {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.modal-content h3 {
  color: var(--color-text-primary);
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
  font-size: 1.125rem;
}

.modal-content p {
  margin-bottom: 1rem;
}

.modal-content ul {
  margin: 0.75rem 0 1rem 1.5rem;
}

.modal-content li {
  margin-bottom: 0.5rem;
}

.modal-content a {
  color: var(--color-primary);
  text-decoration: none;
}

.modal-content a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .modal {
    max-width: calc(100vw - 2rem);
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .modal-title {
    font-size: 1.25rem;
  }
}