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

.footer {
  background-color: var(--bg-dark);
  color: var(--text-color-light);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
}

/* Footer Top Section */
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.footer-logo .logo-flip-animation {
  font-size: 1.8rem;
  color: #fff;

  --start-color: #fff;
  --end-color: #fff;
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgb(255 255 255 / 10%);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  padding-bottom: 150%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 20%) 0%, rgb(255 255 255 / 0%) 70%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.4s ease-in-out;
  z-index: 0;
}

.social-link:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.social-link i {
  font-size: 1.1rem;
  color: var(--text-color-light);
  transition:
    color 0.3s ease,
    transform 0.3s ease;
  z-index: 1;
  position: relative;
}

.social-link:hover i {
  transform: scale(1.1);
}

/* Remove generic hover effect */
.social-link:hover {
  transform: translateY(-2px);
  background-color: rgb(255 255 255 / 10%); /* Keep background subtle */
  box-shadow: none; /* Remove generic shadow */
}

/* Custom Aura/Light Spread Effects */
.social-link.social-facebook:hover {
  box-shadow: 0 0 20px 5px rgb(24 119 242 / 70%); /* Facebook Blue */
}

.social-link.social-x:hover {
  box-shadow: 0 0 20px 5px rgb(128 128 128 / 70%); /* X Gray */
}

.social-link.social-instagram:hover {
  box-shadow: 0 0 20px 5px rgb(225 48 108 / 70%); /* Instagram Pink */
}

.social-link.social-linkedin:hover {
  box-shadow: 0 0 20px 5px rgb(10 102 194 / 70%); /* LinkedIn Blue */
}

.social-link.social-youtube:hover {
  box-shadow: 0 0 20px 5px rgb(255 0 0 / 70%); /* YouTube Red */
}

/* Gradient Auras */
.social-link.social-instagram:hover::before {
  background: radial-gradient(circle, #f77737 0%, #e1306c 70%); /* Orange to Pink */
  opacity: 0.6;
}

.social-link.social-facebook:hover::before {
  background: radial-gradient(circle, #589bff 0%, #1877f2 70%); /* Light to Dark Blue */
  opacity: 0.6;
}

.social-link.social-x:hover::before {
  background: radial-gradient(circle, #ccc 0%, #555 70%); /* Light to Mid Gray */
  opacity: 0.6;
}

.social-link.social-linkedin:hover::before {
  background: radial-gradient(circle, #4c8dc9 0%, #0a66c2 70%); /* Light to Dark Blue */
  opacity: 0.6;
}

.social-link.social-youtube:hover::before {
  background: radial-gradient(circle, #f55 0%, #f00 70%); /* Light to Dark Red */
  opacity: 0.6;
}

.social-link:hover i {
  color: #fff;
}

.footer a {
  color: var(--text-color-light);
  opacity: 0.8;
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer a:hover {
  color: var(--accent-color);
  opacity: 1;
}

/* Footer Widgets */
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.footer-widget {
  margin-bottom: var(--spacing-md);
}

.footer-widget-title {
  font-size: 1.2rem;
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-md);
  color: var(--white);
  position: relative;
  padding-bottom: var(--spacing-xs);
  display: inline-block;
}

.footer-widget-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease-in-out;
}

.footer-widget-title:hover::after {
  width: 100%;
}

/* Footer Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.footer-links li {
  margin-bottom: var(--spacing-xs);
  text-align: left;
}

/* Footer Contact Info */
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
}

/* Use .footer-contact-item for the li elements as per index.html changes */
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--spacing-sm);
  width: 100%;
  text-align: left;
}

.footer-contact-item .fas {
  margin-right: var(--spacing-sm);
  margin-top: 3px;
  color: var(--warning-color);
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.footer-contact-item span {
  flex-grow: 1;
  text-align: left;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

/* Footer Subscribe Form */
.footer-subscribe-container {
  display: flex;
  flex-direction: column;
  margin-top: var(--spacing-sm);
}

.email-input-container {
  width: 100%;
}

.email-input-container input {
  width: 100%;
  padding: var(--spacing-sm);
  border: none;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  background-color: var(--white);
}

.subscribe-button-container {
  width: 100%;
}

.subscribe-button-container button {
  width: 100%;
  background-color: var(--accent-color);
  color: var(--white);
  border: none;
  padding: var(--spacing-sm);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  text-transform: uppercase;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 1px;
  transform: none;
}

.subscribe-button-container button:hover {
  background-color: #000;
  transform: none;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgb(255 255 255 / 10%);
  padding-top: var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright {
  opacity: 0.7;
}

.footer-bottom-links {
  display: flex;
  gap: var(--spacing-md);
}

.footer-bottom-links a {
  font-size: 0.9rem;
}

/* Global styles for footer content layout */
.footer-content {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
}

.footer-content > .footer-widget {
  flex-grow: 0;
  flex-basis: auto;
  margin-right: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.footer-content > .footer-widget:first-child {
  order: 1;
  margin-right: 0;
}

.footer-widget.newsletter-widget {
  flex-basis: 100%;
  order: 2;
  min-width: 0;
  margin-right: 0;
}

/* Responsive Design */
@media (width <= 992px) {
  .footer-widgets {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (width <= 768px) {
  /* === Mobile Footer Reset === */
  .footer {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .footer .container {
    width: 100%;
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
  }

  .footer-widget {
    text-align: center;
  }

  .footer-social {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
  }

  .footer-widget-title {
    font-size: 1.1rem;
  }

  .footer-widget-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-contact,
  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Center all widget content */
  .footer-widget {
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: 0;
    padding: 0;
  }

  .footer-links li {
    margin-bottom: var(--spacing-sm);
    text-align: center;
  }

  /* Center contact info */
  .footer-contact {
    align-items: center;
  }

  .footer-contact-item {
    display: block;
    text-align: center;
    margin-bottom: var(--spacing-md);
  }

  .footer-contact-item .fas {
    display: block;
    margin: 0 auto var(--spacing-sm);
    font-size: 1.3rem;
  }

  .footer-contact-item span {
    text-align: center;
  }

  /* Center newsletter form */
  .footer-subscribe-container {
    align-items: center;
    max-width: 350px;
    margin: 0 auto;
  }

  .email-input-container input {
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    text-align: center;
  }

  .subscribe-button-container button {
    border-radius: var(--border-radius);
  }

  /* Reset desktop flex properties that interfere */
  .footer-content > .footer-widget,
  .footer-content > .footer-widget:first-child,
  .footer-widget.newsletter-widget {
    flex-basis: auto;
    flex-grow: 0;
    order: 0;
    margin: 0;
    min-width: unset;
  }
}

@media (width <= 480px) {
  .footer {
    padding: var(--spacing-lg) 0;
  }

  .footer-widget {
    padding: var(--spacing-sm) 0;
    font-size: 0.9rem;
  }

  .footer-widget-title {
    font-size: 1.1rem;
  }

  .footer-social a {
    width: 36px;
    height: 36px;
  }

  .footer-bottom {
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
  }
}

/* Improve tap targets on small mobile devices */
@media (width <= 360px) {
  .footer {
    padding: 0;
  }

  .footer-widget-title {
    font-size: 1.1rem;
  }

  .footer-links li,
  .footer-contact-item,
  .footer-bottom-links a {
    padding: 10px 0;
  }
}

/* Make "All rights reserved" text white on all pages */
.footer-bottom .copyright p {
  color: #fff;
}

/* Make Newsletter text white */
.footer-content .footer-widget:last-of-type > p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* === Mobile Logo Shortening === */
@media (width <= 576px) {
  .footer-logo .logo-flip-animation {
    font-size: 1.5rem;
    justify-content: center; /* Center the words */
  }

  /* Disable animation on mobile to save performance and avoid weirdness */
  .logo-flip-animation.play-animation span {
    animation: none;
  }
}
