/**
 * @file styles/custom-footer.css
 *
 * Custom footer styles for OJS based on saved page design
 * Maintains responsive design and dynamic behavior
 */

/* Force override default OJS footer styles */
.pkp_structure_footer_wrapper,
footer.pkp_structure_footer_wrapper,
.pkp_structure_footer_wrapper.footer {
  background: linear-gradient(135deg, var(--accent) 0%, #1a1a1a 100%) !important;
  color: var(--text-primary) !important;
  margin-top: 4rem !important;
  border-top: 1px solid var(--border) !important;
  position: relative;
  overflow: hidden;
}

/* Add subtle pattern overlay */
.pkp_structure_footer_wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 25% 25%, rgba(249, 115, 22, 0.03) 0%, transparent 50%),
                    radial-gradient(circle at 75% 75%, rgba(249, 115, 22, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.pkp_structure_footer,
.footer-content.pkp_structure_footer {
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 4rem 1rem 3rem !important;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .pkp_structure_footer,
  .footer-content.pkp_structure_footer {
    padding: 4rem 1.5rem 3rem !important;
  }
}

@media (min-width: 1024px) {
  .pkp_structure_footer,
  .footer-content.pkp_structure_footer {
    padding: 4rem 2rem 3rem !important;
  }
}

/* Footer grid styling for dynamic content sections */
.footer .footer-grid,
.pkp_structure_footer_wrapper .footer-grid {
  display: grid;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer .footer-grid,
  .pkp_structure_footer_wrapper .footer-grid {
    grid-template-columns: 2fr 2fr;
    gap: 4rem;
  }
}

/* Footer brand section - using dynamic journal data */
.footer .footer-brand,
.pkp_structure_footer_wrapper .footer-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.footer .footer-logo,
.pkp_structure_footer_wrapper .footer-logo {
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, var(--accent-lighter) 0%, rgba(249, 115, 22, 0.1) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
  transition: all 0.3s ease;
}

.footer .footer-logo:hover,
.pkp_structure_footer_wrapper .footer-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.footer .footer-logo-text,
.pkp_structure_footer_wrapper .footer-logo-text {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-primary) !important;
  letter-spacing: -0.5px;
}

.footer .footer-logo-star,
.pkp_structure_footer_wrapper .footer-logo-star {
  color: var(--primary) !important;
  font-size: 1.25rem;
  font-weight: 900;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.footer .footer-description,
.pkp_structure_footer_wrapper .footer-description {
  color: var(--text-secondary) !important;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 500px;
}

.footer .footer-actions,
.pkp_structure_footer_wrapper .footer-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Dynamic content section styling */
.footer .footer-dynamic-section,
.pkp_structure_footer_wrapper .footer-dynamic-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer .footer-dynamic-grid,
.pkp_structure_footer_wrapper .footer-dynamic-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer .footer-dynamic-grid,
  .pkp_structure_footer_wrapper .footer-dynamic-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.footer .footer-dynamic-column,
.pkp_structure_footer_wrapper .footer-dynamic-column {
  display: flex;
  flex-direction: column;
}

/* Footer sections for OJS dynamic navigation and links */
.footer .footer-section h4,
.pkp_structure_footer_wrapper .footer-section h4,
.footer .footer-dynamic-column h4,
.pkp_structure_footer_wrapper .footer-dynamic-column h4 {
  font-weight: 700 !important;
  color: var(--primary) !important;
  margin-bottom: 1.5rem !important;
  font-size: 1.1rem !important;
  letter-spacing: -0.25px;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer .footer-section h4::after,
.pkp_structure_footer_wrapper .footer-section h4::after,
.footer .footer-dynamic-column h4::after,
.pkp_structure_footer_wrapper .footer-dynamic-column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2rem;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.footer .footer-links,
.pkp_structure_footer_wrapper .footer-links {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.footer .footer-links li,
.pkp_structure_footer_wrapper .footer-links li {
  margin-bottom: 0.75rem;
}

.footer .footer-links a,
.pkp_structure_footer_wrapper .footer-links a {
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  padding: 0.25rem 0;
  position: relative;
  display: inline-block;
}

.footer .footer-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.footer .footer-links a:hover,
.pkp_structure_footer_wrapper .footer-links a:hover {
  color: var(--primary) !important;
  text-decoration: none !important;
  transform: translateX(4px);
}

.footer .footer-links a:hover::before,
.pkp_structure_footer_wrapper .footer-links a:hover::before {
  width: 100%;
}

/* Footer bottom section with dynamic copyright and links */
.footer .footer-bottom,
.pkp_structure_footer_wrapper .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
  position: relative;
}

.footer .footer-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

@media (min-width: 768px) {
  .footer .footer-bottom,
  .pkp_structure_footer_wrapper .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer .footer-info,
.pkp_structure_footer_wrapper .footer-info {
  color: var(--text-muted) !important;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer .footer-links-bottom,
.pkp_structure_footer_wrapper .footer-links-bottom {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer .footer-links-bottom a,
.pkp_structure_footer_wrapper .footer-links-bottom a {
  color: var(--primary) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.footer .footer-links-bottom a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.1), transparent);
  transition: left 0.5s ease;
}

.footer .footer-links-bottom a:hover::before {
  left: 100%;
}

.footer .footer-links-bottom a:hover,
.pkp_structure_footer_wrapper .footer-links-bottom a:hover {
  color: var(--primary-light) !important;
  text-decoration: none !important;
  background: rgba(249, 115, 22, 0.05);
}

.footer .footer-links-bottom a:last-child,
.pkp_structure_footer_wrapper .footer-links-bottom a:last-child {
  color: var(--text-muted) !important;
}

.footer .footer-links-bottom a:last-child:hover,
.pkp_structure_footer_wrapper .footer-links-bottom a:last-child:hover {
  color: var(--text-secondary) !important;
}

/* OJS specific footer content styling */
.footer .pkp_footer_content,
.pkp_structure_footer_wrapper .pkp_footer_content {
  margin-bottom: 2rem;
  color: var(--text-secondary) !important;
  font-size: 0.9rem;
  line-height: 1.7;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Ensure OJS page footer content is styled properly */
.footer .pkp_footer_content p,
.pkp_structure_footer_wrapper .pkp_footer_content p {
  color: var(--text-secondary) !important;
  margin-bottom: 1rem;
}

.footer .pkp_footer_content a,
.pkp_structure_footer_wrapper .pkp_footer_content a {
  color: var(--primary) !important;
  text-decoration: none !important;
  transition: var(--transition);
}

.footer .pkp_footer_content a:hover,
.pkp_structure_footer_wrapper .pkp_footer_content a:hover {
  color: var(--primary-light) !important;
  text-decoration: underline !important;
}

/* Maintain OJS brand footer */
.footer .pkp_brand_footer,
.pkp_structure_footer_wrapper .pkp_brand_footer {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .pkp_brand_footer img,
.pkp_structure_footer_wrapper .pkp_brand_footer img {
  max-height: 50px;
  opacity: 0.6;
  transition: all 0.3s ease;
  filter: grayscale(100%);
}

.footer .pkp_brand_footer img:hover,
.pkp_structure_footer_wrapper .pkp_brand_footer img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.05);
}

.footer .pkp_brand_footer a,
.pkp_structure_footer_wrapper .pkp_brand_footer a {
  color: var(--text-muted) !important;
  text-decoration: none !important;
}

.footer .pkp_brand_footer a:hover,
.pkp_structure_footer_wrapper .pkp_brand_footer a:hover {
  color: var(--text-secondary) !important;
}

/* Enhanced button styles in footer for OJS forms and actions */
.footer .btn,
.pkp_structure_footer_wrapper .btn,
.footer .pkp_button,
.pkp_structure_footer_wrapper .pkp_button,
.footer .submitFormButton,
.pkp_structure_footer_wrapper .submitFormButton {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem !important;
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.footer .btn::before,
.pkp_structure_footer_wrapper .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.footer .btn:hover::before,
.pkp_structure_footer_wrapper .btn:hover::before {
  left: 100%;
}

.footer .btn-primary,
.pkp_structure_footer_wrapper .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #ea580c 100%) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3) !important;
}

.footer .btn-primary:hover,
.pkp_structure_footer_wrapper .btn-primary:hover {
  background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4) !important;
  text-decoration: none !important;
}

.footer .btn-secondary,
.pkp_structure_footer_wrapper .btn-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-secondary) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
}

.footer .btn-secondary:hover,
.pkp_structure_footer_wrapper .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-primary) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

/* Responsive Design for Footer */
@media (max-width: 768px) {
  .footer .footer-grid,
  .pkp_structure_footer_wrapper .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .footer .footer-brand,
  .pkp_structure_footer_wrapper .footer-brand {
    justify-content: center;
    flex-direction: column;
    text-align: center;
  }
  
  .footer .footer-actions,
  .pkp_structure_footer_wrapper .footer-actions {
    justify-content: center;
  }
  
  .footer .footer-section h4::after,
  .pkp_structure_footer_wrapper .footer-section h4::after,
  .footer .footer-dynamic-column h4::after,
  .pkp_structure_footer_wrapper .footer-dynamic-column h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer .footer-dynamic-grid,
  .pkp_structure_footer_wrapper .footer-dynamic-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .pkp_structure_footer,
  .footer-content.pkp_structure_footer {
    padding: 3rem 1rem 2rem !important;
  }
  
  .footer .footer-actions,
  .pkp_structure_footer_wrapper .footer-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .footer .footer-actions .btn,
  .pkp_structure_footer_wrapper .footer-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .footer .footer-links-bottom,
  .pkp_structure_footer_wrapper .footer-links-bottom {
    flex-direction: column;
    gap: 1rem;
  }
  
  .footer .footer-links-bottom a,
  .pkp_structure_footer_wrapper .footer-links-bottom a {
    width: 100%;
    text-align: center;
  }
}

/* Utility classes for footer text styling compatible with OJS */
.footer .text-xl,
.pkp_structure_footer_wrapper .text-xl {
  font-size: 1.25rem !important;
}

.footer .font-bold,
.pkp_structure_footer_wrapper .font-bold {
  font-weight: 700 !important;
}

.footer .text-white,
.pkp_structure_footer_wrapper .text-white {
  color: var(--text-primary) !important;
}

.footer .text-gray-300,
.pkp_structure_footer_wrapper .text-gray-300 {
  color: var(--text-secondary) !important;
}

.footer .text-sm,
.pkp_structure_footer_wrapper .text-sm {
  font-size: 0.875rem !important;
}

.footer .mt-1,
.pkp_structure_footer_wrapper .mt-1 {
  margin-top: 0.25rem !important;
}

/* Force all footer text to inherit colors for OJS compatibility */
.pkp_structure_footer_wrapper * {
  color: inherit;
}

.pkp_structure_footer_wrapper a {
  color: inherit;
  text-decoration: none;
}

.pkp_structure_footer_wrapper a:hover {
  text-decoration: none;
}

/* Ensure all OJS footer elements maintain dark theme */
.pkp_structure_footer_wrapper h1,
.pkp_structure_footer_wrapper h2,
.pkp_structure_footer_wrapper h3,
.pkp_structure_footer_wrapper h4,
.pkp_structure_footer_wrapper h5,
.pkp_structure_footer_wrapper h6 {
  color: var(--text-primary) !important;
}

.pkp_structure_footer_wrapper ul,
.pkp_structure_footer_wrapper ol,
.pkp_structure_footer_wrapper li {
  color: inherit !important;
}

/* Style any OJS forms that might appear in footer */
.pkp_structure_footer_wrapper form {
  margin-bottom: 1rem;
}

.pkp_structure_footer_wrapper input[type="text"],
.pkp_structure_footer_wrapper input[type="email"],
.pkp_structure_footer_wrapper textarea,
.pkp_structure_footer_wrapper select {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text-primary) !important;
  padding: 0.75rem !important;
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.pkp_structure_footer_wrapper input[type="text"]:focus,
.pkp_structure_footer_wrapper input[type="email"]:focus,
.pkp_structure_footer_wrapper textarea:focus,
.pkp_structure_footer_wrapper select:focus {
  border-color: var(--primary) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1) !important;
  background: rgba(255, 255, 255, 0.08) !important;
} 