/**
 * Footer Style
 * Sticky Footer - Keep footer at bottom even with little content
 */

/* ===============================================
   Sticky Footer - Flexbox Method
   =============================================== */

/* Set HTML height to 100% */
html {
  height: 100%;
}

/* Make body a flex container */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* Make main content area flexible */
#content,
.site-content {
  flex: 1 0 auto;
  width: 100%;
}

/* Fix footer to bottom */
#footer,
.site-footer,
footer.footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
}

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

/* Footer widget area */
.footer-widget-area {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-widget {
  flex: 1;
  min-width: 250px;
}

.footer-widget h3,
.footer-widget .widget-title {
  color: var(--btn-color, #FFCC99);
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 204, 153, 0.3);
}

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

.footer-widget li {
  margin-bottom: 10px;
}

.footer-widget a {
  color: #d0d0d0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-widget a:hover {
  color: var(--btn-color, #FFCC99);
}

/* Footer navigation */
.footer-nav {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-nav li {
  position: relative;
}

.footer-nav li:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: -12px;
  color: rgba(255, 255, 255, 0.3);
}

.footer-nav a {
  color: #d0d0d0;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--btn-color, #FFCC99);
}

/* Copyright */
.footer-copy {
  text-align: center;
  padding-top: 20px;
  color: #999;
  font-size: 13px;
}

.footer-copy a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-copy a:hover {
  color: var(--btn-color, #FFCC99);
}

/* Footer sub area */
.footer-sub {
  background-color: #1a1a1a;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-sub-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

/* ===============================================
   Specific Page Adjustments
   =============================================== */

/* 404 and no-results pages */
.error404 #content,
.no-results #content,
.search-no-results #content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60vh;
}

/* ===============================================
   Responsive Design
   =============================================== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .site-footer {
    padding: 10px 0 10px;
  }
  
  .footer-widget-area {
    flex-direction: column;
    gap: 20px;
  }
  
  .footer-widget {
    min-width: 100%;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .footer-widget:last-child {
    border-bottom: none;
  }
  
  .footer-nav ul {
    flex-direction: column;
    gap: 10px;
  }
  
  .footer-nav li::after {
    display: none;
  }
  
  .footer-copy {
    font-size: 12px;
    padding-top: 15px;
  }
}

/* Smartphone (480px and below) */
@media (max-width: 480px) {
  .site-footer {
    padding: 10px 0 10px;
  }
  
  .footer-main {
    padding: 0 15px;
  }
  
  .footer-widget h3,
  .footer-widget .widget-title {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .footer-widget {
    margin-bottom: 15px;
    padding-bottom: 15px;
  }
  
  .footer-nav {
    padding: 15px 0;
    margin: 15px 0;
  }
  
  .footer-nav a {
    font-size: 13px;
  }
  
  .footer-copy {
    font-size: 11px;
    padding-top: 10px;
  }
}

/* Small screen (320px and below) */
@media (max-width: 320px) {
  .footer-main {
    padding: 0 10px;
  }
  
  .footer-widget h3,
  .footer-widget .widget-title {
    font-size: 15px;
  }
  
  .footer-widget a,
  .footer-nav a {
    font-size: 12px;
  }
  
  .footer-copy {
    font-size: 10px;
  }
}

/* ===============================================
   Accessibility
   =============================================== */

/* Focus outline */
.site-footer a:focus {
  outline: 2px solid var(--btn-color, #FFCC99);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .site-footer a,
  .footer-widget a,
  .footer-nav a,
  .footer-copy a {
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .site-footer {
    border-top-width: 5px;
  }
  
  .footer-widget a,
  .footer-nav a {
    color: #ffffff;
  }
  
  .footer-widget a:hover,
  .footer-nav a:hover {
    color: #FFD700;
    text-decoration: underline;
  }
}