/* ========================================
   REDESIGNED FOOTER COMPONENTS
   Three-row footer structure with newsletter, main content, and bottom
   ======================================== */

/* African Spots Footer Base */
.afri-footer {
  background-color: #1A1A1A; /* Maintain dark background color */
  color: #FFFFFF;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
  padding-left: 1.55rem !important; /* 20px mobile padding */
  padding-right: 1.55rem !important; /* 20px mobile padding */
}

/* Desktop padding */
@media (min-width:768px) {
  .afri-footer {
    padding-left: 4.625rem !important; /* 96px desktop padding */
    padding-right: 4.625rem !important; /* 96px desktop padding */
  }
}

@media (max-width: 767px) {
  .footer-logo-section {
    align-self: center !important;
  }
}


/* Newsletter Row - First Row */
.newsletter-wrapper {
  border-bottom: 1px solid #404040;
}

.newsletter-wrapper h4 {
  font-family: 'Krona One', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: #FFFFFF !important; /* Ensure white color is applied */
}

.newsletter-wrapper p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  line-height: 1.5;
}

.newsletter-wrapper input {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  border: 1px solid #e5e5e5;
  transition: all 0.2s ease;
}

.newsletter-wrapper input:focus {
  outline: none;
  border-color: #FF6600;
  box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.2);
}

/* Main Footer Row - Second Row */
.main-footer-row {
  border-bottom: 1px solid #404040;
  width: 100% !important;
  max-width: 100% !important;
}

/* Ensure gap spacing works properly */
.main-footer-row.gap-4 {
  gap: 2rem; /* 32px spacing between logo and sections */
}

/* Responsive gap adjustments */
@media (max-width: 991px) {
  .main-footer-row.gap-4 {
    gap: 1.5rem; /* Slightly smaller gap on mobile */
  }
}

/* Footer Main Layout - Custom Class */
.footer-main-layout {
  display: flex;
  align-items: flex-start;
  gap: 3rem; /* Default gap for mobile/tablet */
}

.footer-spacer {
  flex: 1; /* Takes remaining space between logo and sections */
}

.footer-logo-column {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0; /* Allow shrinking if needed */
}

.footer-sections-column {
  display: flex;
  flex-direction: column;
  min-width: 0; /* Allow shrinking if needed */
}

@media screen {
  .footer-main-layout{
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Bottom Footer Row - Third Row */
.bottom-footer-row {
  background-color: #1A1A1A;
}

/* Logo and Copyright Spacing */
.bottom-footer-row .d-flex.gap-3 {
  gap: 1rem; /* 16px spacing between logo and copyright */
}

/* Responsive spacing adjustments */
@media (min-width: 768px) {
  .bottom-footer-row .d-flex.gap-3 {
    gap: 1.5rem; /* 24px spacing on tablet and desktop */
  }
}

/* Footer Sections */
.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-heading {
  color: #FFFFFF; /* White headers as specified */
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  font-family: 'Krona One', sans-serif;
}

/* Footer Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-link {
  color: #FFFFFF;
  text-decoration: none;
  opacity: 0.8; /* 80% white as specified */
  transition: opacity 0.2s ease;
  font-size: 0.875rem;
  line-height: 1.5;
  font-family: 'Montserrat', sans-serif;
}

.footer-link:hover {
  opacity: 0.9; /* 90% white on hover as specified */
  text-decoration: none;
}

/* Footer Newsletter */
.footer-newsletter-description {
  color: #FFFFFF;
  opacity: 0.6;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.footer-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-newsletter-input {
  padding: 0.75rem 1rem;
  background-color: #2D2D2D;
  border: 1px solid #404040;
  border-radius: 0.375rem;
  color: #FFFFFF;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.footer-newsletter-input:focus {
  outline: none;
  border-color: #FF6600;
  box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.2);
}

.footer-newsletter-input::placeholder {
  color: #A3A3A3;
}

.footer-newsletter-btn {
  padding: 0.75rem 1.5rem;
  background-color: #FF6600;
  color: #FFFFFF;
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.footer-newsletter-btn:hover {
  background-color: #E55A00;
}

.footer-newsletter-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Newsletter Section - Full Width */
.footer-newsletter-section {
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.footer-newsletter-section h4 {
  color: #FFFFFF;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-newsletter-section p {
  color: #FFFFFF;
  opacity: 0.6;
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.footer-newsletter-section .footer-newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 28rem;
  margin: 0 auto;
}

.footer-newsletter-section .footer-newsletter-input {
  flex: 1;
  padding: 1rem 1.5rem;
  background-color: #2A2A2A;
  border: 1px solid #404040;
  border-radius: 0.375rem;
  color: #FFFFFF;
  font-size: 1.125rem;
}

.footer-newsletter-section .footer-newsletter-input::placeholder {
  color: #9CA3AF;
}

.footer-newsletter-section .footer-newsletter-input:focus {
  outline: none;
  border-color: #FF6600;
  box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.2);
}

/* Responsive Newsletter */
@media (max-width: 640px) {
  .footer-newsletter-section h4 {
    font-size: 1.25rem;
  }
  
  .footer-newsletter-section p {
    font-size: 1rem;
  }
  
  .footer-newsletter-section .footer-newsletter-form {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .footer-newsletter-section .footer-newsletter-input {
    font-size: 1rem;
    padding: 0.875rem 1.25rem;
  }
}


/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid #404040;
  padding-top: 2rem;
}

.footer-brand img {
  height: 100px !important;
  width: auto !important;
  transition: all 0.2s ease;
}

.footer-brand:hover img {
  opacity: 0.8;
  transform: scale(1.05);
}

.footer-copyright {
  color: #FFFFFF;
  opacity: 0.6;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

/* Social Links */
.footer-social-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-link {
  color: #FFFFFF;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.social-link:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.social-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Responsive Design for New Footer Structure */

/* Large Desktop (1280px+) */
@media (min-width: 1280px) {
  .footer-main-layout {
    gap: 6rem; /* More space between logo and sections */
  }
  
  .footer-sections-grid {
    grid-template-columns: max-content max-content max-content max-content !important; /* Each column takes only needed space */
    justify-content: start; /* Align columns to the left */
    gap: 4rem !important; /* Increased horizontal spacing between sections */
  }
}

/* Desktop (1024px - 1279px) */
@media (max-width: 1279px) and (min-width: 1024px) {
  .footer-main-layout {
    gap: 4rem; /* Space between logo and sections */
  }
  
  .footer-sections-grid {
    grid-template-columns: max-content max-content max-content max-content !important; /* Each column takes only needed space */
    justify-content: start; /* Align columns to the left */
    gap: 3rem !important; /* Increased horizontal spacing between sections */
  }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  .afri-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .footer-main-layout {
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
  }
  
  .footer-spacer {
    display: none; /* Hide spacer on tablet/mobile */
  }
  
  .footer-sections-column .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .footer-logo-column {
    justify-content: center;
    text-align: center;
    width: 100%;
  }
  
  .newsletter-wrapper {
    text-align: center;
  }
  
  .newsletter-wrapper h4,
  .newsletter-wrapper p {
    text-align: center;
  }
}

/* Mobile (640px - 767px) */
@media (max-width: 767px) and (min-width: 640px) {
  .afri-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .footer-main-layout {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }
  
  .footer-spacer {
    display: none; /* Hide spacer on mobile */
  }
  
  .footer-sections-column .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .footer-logo-column {
    justify-content: center;
    text-align: center;
    width: 100%;
  }
  
  .newsletter-wrapper {
    text-align: center;
  }
  
  .newsletter-wrapper h4 {
    font-size: 1.8rem; /* Reduced by 10% from 2rem (90% of original) */
  }
  
  .newsletter-wrapper p {
    font-size: 1rem;
  }
  
  .newsletter-wrapper form {
    flex-direction: column;
    gap: 1rem;
  }
  
  .newsletter-wrapper button {
    width: 100%;
  }
  
  .bottom-footer-row .flex {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* Small Mobile (below 640px) */
@media (max-width: 639px) {
  .afri-footer {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .footer-main-layout {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }
  
  .footer-spacer {
    display: none; /* Hide spacer on small mobile */
  }
  
  .footer-sections-column .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-logo-column {
    justify-content: center;
    text-align: center;
    width: 100%;
  }
  
  .newsletter-wrapper {
    text-align: center;
    padding-top: 3rem;
    padding-bottom: 2rem;
  }
  
  .newsletter-wrapper h4 {
    font-size: 1.575rem; /* Reduced by 10% from 1.75rem (90% of original) */
    margin-bottom: 0.75rem;
  }
  
  .newsletter-wrapper p {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
  }
  
  .newsletter-wrapper form {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .newsletter-wrapper input {
    padding: 0.875rem 1rem;
    font-size: 1rem;
  }
  
  .newsletter-wrapper button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .bottom-footer-row .flex {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .footer-brand img {
    height: 2.5rem;
  }
  
  .footer-copyright {
    font-size: 0.75rem;
  }
}

/* Bootstrap Footer Enhancements */
.footer-link:hover {
  opacity: 0.9 !important;
  text-decoration: none !important;
}

.footer-section h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

.footer-links li a {
  transition: opacity 0.2s ease;
}

.footer-links li a:hover {
  opacity: 0.9 !important;
}

/* Main Footer Layout */

.footer-sections-wrapper {
  flex-grow: 0; /* Don't grow to fill space */
  flex-shrink: 0; /* Don't shrink */
  width: auto; /* Take only necessary width */
  max-width: none; /* Remove max-width constraint */
}

/* Footer sections container - flexbox layout */
.footer-sections-container {
  display: flex;
  flex-direction: column; /* Stack vertically on mobile */
  gap: 1.5rem; /* Space between sections */
}

/* Individual footer section items */
.footer-section-item {
  flex: 0 0 auto; /* Don't grow or shrink, take only needed space */
  width: auto; /* Take only necessary width */
  min-width: 0; /* Allow content to determine width */
}

/* Desktop layout - horizontal row */
@media (min-width: 768px) {
  .footer-sections-container {
    flex-direction: row; /* Horizontal layout on tablet+ */
    gap: 2rem; /* More space between sections on desktop */
  }
}

/* Responsive spacing - gap is handled by Bootstrap gap-4 class */

/* Responsive Footer Logo Sizing - Now handled by inline styles in HTML */
/* Main logo: style="height: 80px; width: auto;" */
/* Bottom logo: style="height: 48px; width: auto;" */

/* Legacy Support - Keep old classes working */
.footer {
  background-color: #1A1A1A;
  color: #FFFFFF;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-section-title {
  color: #FFFFFF;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: #FFFFFF;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.9; /* Match the intended hover effect from footer-link class */
  color: rgba(255, 255, 255, 0.9); /* 90% white color on hover */
}

.footer-divider {
  border: none;
  height: 1px;
  background-color: #404040;
  margin: 2rem 0;
}

.footer-top-spots-title {
  color: #FFFFFF;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-top-spots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.footer-top-spots-item {
  color: #FFFFFF;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.6;
  transition: all 0.2s ease;
  padding: 0.5rem;
  border-radius: 0.375rem;
}

.footer-top-spots-item:hover {
  opacity: 1;
  color: #FF6600;
  background-color: rgba(255, 102, 0, 0.1);
}

.footer-brand {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
}

.footer-brand:hover {
  color: #FF6600;
}

/* Additional Afri-specific styles */
.footer-social-title {
  color: #FFFFFF;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-social-links a {
  color: #FFFFFF;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.footer-social-links a:hover {
  opacity: 1;
  color: #FF6600;
}

.footer-newsletter-title {
  color: #FFFFFF;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
