/* ================== */
/* Footer Styles      */
/* ================== */

.site-footer {
  background-color: var(--card-background);
  color: var(--text-light);
  padding: 2rem 1.5rem; /* Reduced padding for a more compact feel */
  margin-top: 3rem; /* Adjusted space above footer */
  border-top: 1px solid var(--border-color);
  /* box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05); /* Optional subtle top shadow */
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  /* Removed grid layout, will use flex on the inner row */
}

.footer-main-row {
  display: flex;
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
  justify-content: space-between; /* Distribute space between items */
  align-items: flex-start; /* Align items to the top */
  gap: 1.5rem; /* Gap between sections */
}

.footer-section {
  /* min-width: 200px; /* Minimum width for each section before wrapping - adjust if needed */
  /* flex: 1; /* Allow sections to grow if space is available, can be adjusted or removed for natural sizing */
}

.footer-section h4 {
  color: var(--text-color);
  font-size: 1rem; /* Slightly minified heading */
  margin-bottom: 1rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px; /* Shorter underline */
  height: 2px; /* Thinner underline */
  background: var(--primary-color);
  border-radius: 1px;
}
/* Optional: Animate underline width on h4 hover */
/*
.footer-section h4:hover::after {
  width: 50px;
}
*/

.footer-email {
  color: var(--text-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem; /* Reduced gap */
  margin-bottom: 1rem;
  transition: color 0.2s ease;
  font-size: 0.9rem; /* Minified email text */
}
.footer-email i {
    font-size: 1em; /* Icon size relative to text */
}

.footer-email:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1rem; /* Reduced gap for social icons */
  margin-top: 0.75rem;
}

.social-link {
  color: var(--text-light);
  font-size: 1.2rem; /* Slightly smaller social icons */
  transition: color 0.2s ease, transform 0.2s ease-out;
  display: inline-block;
}

.social-link:hover,
.social-link:focus { /* Added focus state */
  color: var(--primary-color);
  transform: translateY(-2px) scale(1.05); /* Adjusted hover effect */
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.6rem; /* Reduced spacing */
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease-out, padding-left 0.2s ease-out;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem; /* Reduced gap */
  font-size: 0.9rem; /* Minified link text */
  padding-left: 0; /* Base padding-left for hover effect */
}

.footer-links a:hover,
.footer-links a:focus { /* Added focus state */
  color: var(--primary-color);
  padding-left: 3px; /* Alternative to transform, pushes text gently */
}
.footer-links a i { /* If icons are used in quick links */
    transition: transform 0.2s ease-out;
}
/*
.footer-links a:hover i {
    transform: rotate(5deg);
}
*/

/* Copyright specific styling */
.footer-copyright {
  /* This section will align to the start (left) by default due to flex row. */
  align-self: center; /* Vertically center copyright if other items make row taller */
  /* flex-basis: 100%; /* Optional: make it take full width initially if it was the only item on a line */
  /* text-align: left; /* Default is left, explicitly set if needed */
  margin-right: auto; /* Pushes other items to the right, making copyright stick left */
}

.footer-copyright p {
  margin: 0; /* Remove default paragraph margins */
  font-size: 0.8rem; /* Minified copyright text */
  color: var(--text-light);
}

/* Removed .footer-bottom as its structure is integrated into .footer-main-row */

/* --- Responsive Footer Styles --- */
@media (max-width: 992px) { /* Adjusted breakpoint for better flow */
    .footer-main-row {
        /* On medium screens, you might want copyright to be first, 
           and then other items wrap below it or next to it if space. */
    }
    .footer-copyright {
        flex-basis: 100%; /* Copyright takes full width */
        text-align: center; /* Center it when it's full width */
        margin-bottom: 1.5rem; /* Space below it before other items stack/wrap */
        margin-right: 0; /* Reset margin-right */
    }
    .footer-main-row > .footer-section:not(.footer-copyright) {
        flex-basis: calc(50% - 0.75rem); /* Example: two columns for other sections */
        /* Adjust min-width on .footer-section if you prefer them to stack sooner */
    }

}


@media (max-width: 768px) {
  .site-footer {
     padding: 1.5rem 1rem; /* Adjust mobile padding */
     margin-top: 2rem; /* Adjust mobile margin */
  }

  .footer-main-row {
    flex-direction: column; /* Stack items vertically */
    text-align: center; /* Center text for stacked items */
    gap: 1.5rem;  /* Adjust gap for vertical stacking */
  }
  
  .footer-section { /* Includes the copyright section now */
    width: 100%; /* Make sections full width when stacked */
    text-align: center; /* Ensure all content within is centered */
    margin-bottom: 0.5rem; /* Small space between stacked sections */
  }
  .footer-section:last-child {
      margin-bottom: 0;
  }

  .footer-copyright {
    order: 5; /* Place copyright at the bottom in mobile view */
    margin-top: 1rem; /* Add some space above copyright when stacked */
    text-align: center; /* Ensure copyright is centered */
    margin-bottom: 0; /* No margin below the last item */
    flex-basis: auto; /* Reset flex-basis from tablet view */
  }

  .footer-section h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .social-links,
  .footer-email { /* .footer-links li is already display:flex, so child a centers */
    justify-content: center;
  }

  .footer-links {
    text-align: center; 
  }
  .footer-links li {
    display: flex; 
    justify-content: center;
  }
  .footer-links a {
      justify-content: center; 
      padding-left: 0 !important;
  }
  .footer-links a:hover,
  .footer-links a:focus {
    transform: none;
  }

  /* Resetting styles for other sections if they were based on grid before */
  .footer-main-row > .footer-section:not(.footer-copyright) {
        flex-basis: auto; /* Reset from tablet view */
  }

} /* End of @media (max-width: 768px) */


/* Minimal footer styles - adjust as needed for its specific use case */
.site-footer.minimal-footer {
    background-color: transparent; /* Or var(--background-color) to blend in */
    border-top: none; /* Remove top border for minimal look */
    box-shadow: none; /* Remove shadow */
    padding-top: 1.5rem; /* Adjust padding as needed */
    padding-bottom: 1.5rem;
    margin-top: 0; /* No extra margin if it's the only thing after main content */
}

/* If minimal-footer should ONLY show copyright: */
.site-footer.minimal-footer .footer-main-row > .footer-section:not(.footer-copyright) {
    display: none; 
}
.site-footer.minimal-footer .footer-main-row {
    justify-content: center; /* Center the copyright if it's the only item */
}
.site-footer.minimal-footer .footer-copyright {
    margin-right: 0; /* No need to push other items if they are hidden */
    text-align: center; /* Center the copyright in minimal mode */
}