/* Footer Styles */
.site-footer {
  background-color: #FAFAFA;
  color: white;
  padding-top: 4rem;
  position: relative;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-logo {
  display: block;
  margin-bottom: 1.0rem;
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.footer-company-info p {
  color: black;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 400px;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  color: #333;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: var(--primary-color, #2D5BFF);
  color: black;
  transform: translateY(-3px);
}

.social-icon svg {
  width: 18px;
  height: 18px;
}

.footer-column h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: black !important;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: black;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary-color, #2D5BFF);
}

.newsletter-form {
  margin-top: 1.25rem;
}

.newsletter-form p {
  font-size: 0.85rem;
  color: black;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.form-group {
  display: flex;
  margin-bottom: 0.5rem;
}

.form-group input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px 0 0 4px;
  font-size: 0.9rem;
  background-color: #F8F9FA;
  color: #333;
}

.form-group input::placeholder {
  color: #909090;
}

.form-group input:focus {
  outline: none;
  border-color: rgba(45, 91, 255, 0.3);
  background-color: white;
}

.form-group button {
  padding: 0.8rem 1.2rem;
  border: none;
  background-color: var(--secondary-color, #2D5BFF);
  color: white;
  border-radius: 0 4px 4px 0;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-group button:hover {
  background-color: var(--primary-color, #1a4bcc);
}

.privacy-note {
  font-size: 0.75rem;
  color: gray;
  line-height: 1.5;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  font-size: 0.85rem;
  color: black;
}

.footer-legal {
  display: flex;
  gap: 2rem;
}

.footer-legal a {
  color: black;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--primary-color, #2D5BFF);
}

.back-to-top {
  position: absolute;
  right: 30px;
  bottom: 30px;
  width: 40px;
  height: 40px;
  background-color: var(--secondary-color, #2D5BFF);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

.footer-column-header {
  display: none; 
}

.footer-column > h3 {
  display: block;
}

.footer-column-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem 0;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  text-align: left;
}

.footer-column-toggle h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: black;
}

.footer-toggle-icon {
  transition: transform 0.3s ease;
  color: black;
}

.footer-toggle-icon.expanded {
  transform: rotate(180deg);
}

.footer-column-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Responsive styles */
@media (max-width: 1200px) {
  .footer-main {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
  
  .footer-column:last-child {
    grid-column: span 4;
    margin-top: 2rem;
  }
}

/* Mobile footer behavior starts at 1023px and below */
@media (max-width: 1023px) {
  .footer-container {
    padding: 0 1.5rem;
  }
  
  .site-footer {
    padding-top: 3rem;
  }
  
  .footer-main {
    display: block;
    text-align: center;
  }
  
  .footer-company-info {
    text-align: center;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .footer-company-info p {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .footer-column {
    text-align: left;
    margin-bottom: 0;
  }
  
  /* Hide regular h3 and show collapsible headers */
  .footer-column:not(.footer-company-info) > h3 {
    display: none;
  }
  
  .footer-column:not(.footer-company-info) .footer-column-header {
    display: block;
  }
  
  /* Make footer links collapsible */
  .footer-links {
    text-align: left;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }
  
  .footer-links.expanded {
    max-height: 300px;
    padding: 1rem 0;
  }
  
  .footer-links li {
    margin-bottom: 0.8rem;
  }
  
  /* Newsletter form remains always visible and not collapsible */
  .footer-column:last-child .footer-column-header {
    display: none;
  }
  
  .footer-column:last-child > h3 {
    display: block;
  }
  
  .newsletter-form {
    text-align: center;
    margin-top: 1.25rem;
    max-height: none;
    overflow: visible;
    padding: 1rem 0;
  }
  
  .newsletter-form p {
    text-align: center;
  }
  
  .back-to-top {
    right: 20px;
    bottom: 20px;
  }
}

@media (max-width: 768px) {
  .footer-container {
    padding: 0 1rem;
  }
  
  .form-group {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .form-group input {
    border-radius: 4px;
    text-align: center;
  }
  
  .form-group button {
    border-radius: 4px;
    padding: 0.8rem 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 1.5rem 0;
  }
  
  .footer-legal {
    flex-direction: column;
    gap: 1rem;
  }
  
  .back-to-top {
    right: 15px;
    bottom: 15px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 400px) {
  .footer-container {
    padding: 0 0.75rem;
  }
  
  .footer-main {
    gap: 2rem;
  }
  
  .footer-logo img {
    height: 50px;
  }
  
  .form-group button {
    padding: 0.8rem 1.5rem;
  }
}