/* Custom Footer Styles - 5 Column Responsive Layout */

.footer__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Mobile 480px - First column full width, then 2x2 (50% each) */
@media (min-width: 480px) and (max-width: 767px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  
  /* First column full width */
  .footer__menu:first-child {
    grid-column: 1 / -1;
  }
  
  .footer__feedback {
    grid-column: 1 / -1;
  }
}

/* Tablet - First column full width, remaining 4 in 2x2 (50% each) */
@media (min-width: 768px) and (max-width: 991px) {
  .footer {
    padding: 45px 25px;
  }
  
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px 20px;
  }
  
  /* First column full width */
  .footer__menu:first-child {
    grid-column: 1 / -1;
    padding-bottom: 25px;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(18, 40, 55, 0.1);
  }
  
  .footer__menu {
    padding: 15px 0;
    min-height: 130px;
  }
  
  .footer__title {
    font-size: 16px;
    margin-bottom: 14px;
  }
  
  .footer__menu-link {
    font-size: 14px;
  }
  
  /* Feedback side by side with Newsletters */
  .footer__feedback {
    grid-column: auto;
    padding: 15px 0;
    min-height: 130px;
  }
}

/* Desktop - 5 columns */
@media (min-width: 992px) {
  .footer__grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 50px;
  }
  
  /* Add thin line before copyright in desktop view */
  .footer__bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }
}

/* Large Desktop - 5 columns with more space */
@media (min-width: 1400px) {
  .footer__grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 60px;
  }
}

/* Footer feedback section spans full width on mobile */
.footer__feedback {
  grid-column: auto;
}

/* Mobile - First column full width, then 2x2 grid (50% each) */
@media (max-width: 767px) {
  .footer {
    padding: 40px 20px;
  }
  
  .footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px 20px;
  }
  
  /* First column (logo) - full width */
  .footer__menu:first-child {
    grid-column: 1 / -1;
    padding-bottom: 25px;
    margin-bottom: 5px;
  }
  
  /* All menu columns - consistent padding with divider */
  .footer__menu {
    padding: 18px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  /* Full width divider after first column */
  .footer__menu:first-child {
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
  }
  
  .footer__title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #122837;
  }
  
  .footer__menu-list {
    margin-top: 0;
  }
  
  .footer__menu-link {
    font-size: 13px;
    line-height: 1.7;
    color: #555;
  }
  
  .footer__menu-link:hover {
    color: #122837;
  }
  
  .footer__menu-item {
    margin-top: 6px;
  }
  
  /* Feedback section - consistent with menu columns */
  .footer__feedback {
    grid-column: auto;
    padding: 18px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .footer__bottom {
    grid-column: 1 / -1;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 10px;
    padding-top: 10px;
    text-align: center !important;
  }
  
  .footer__copyright,
  .footer__privacy {
    text-align: center !important;
    display: block !important;
    width: 100%;
    font-size: 10px;
  }
}

/* Footer copyright - slick compact centered design */
.footer__copyright {
  display: block !important;
  text-align: center;
  font-size: 11px;
  color: #666;
  letter-spacing: 1px;
  font-weight: 500;
  padding: 4px 0;
  width: 100%;
  margin: 0 auto;
  text-transform: uppercase;
}

/* Footer bottom container - compact */
.footer__bottom {
  display: block !important;
  text-align: center;
  width: 100%;
  margin-top: 0;
  padding-top: 15px;
  padding-bottom: 15px;
}

/* Center copyright on all devices */
@media (max-width: 991px) {
  .footer__copyright {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
    float: none !important;
    font-size: 10px !important;
    color: #666 !important;
    padding: 6px 0 !important;
    letter-spacing: 0.5px !important;
  }
  
  .footer__bottom {
    display: block !important;
    text-align: center !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
  }
}

/* Force center alignment for copyright on ALL mobile screens */
@media (max-width: 991px) {
  .footer__bottom {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }
  
  .footer__copyright {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
    float: none !important;
    margin-right: 0 !important;
  }
}

/* On desktop, feedback takes normal column space */
@media (min-width: 992px) {
  .footer__feedback {
    grid-column: auto;
  }
}

/* Footer bottom spans full width */
.footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
}

/* Remove vertical phone styling */
.footer__phone a {
  transform: none;
  writing-mode: initial;
  font-size: 15px;
  font-weight: normal;
  line-height: 1.5;
  display: inline-block;
}

/* Newsletter form styling */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 5px;
}

.newsletter-form p {
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #555;
  margin-bottom: 10px !important;
}

.newsletter-form input[type="email"] {
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
  background: #fff;
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: #122837;
  box-shadow: 0 0 0 3px rgba(18, 40, 55, 0.1);
}

.newsletter-form button {
  padding: 12px 18px;
  background: #122837;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.3s, transform 0.2s;
}

.newsletter-form button:hover {
  background: #2a4a5e;
}

.newsletter-form button:active {
  transform: scale(0.98);
}

/* Desktop newsletter form - side by side */
@media (min-width: 992px) {
  .newsletter-form {
    flex-direction: row !important;
    gap: 10px;
  }
  
  .newsletter-form input[type="email"] {
    flex: 1;
  }
}

/* Ensure all menu columns have consistent styling */
.footer__menu {
  display: flex;
  flex-direction: column;
}

.footer__title {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  color: #122837;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer__menu-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer__menu-item {
  margin-top: 10px;
}

.footer__menu-item:first-child {
  margin-top: 0;
}

/* Small mobile - First column full width, then 2x2 (50% each) */
@media (max-width: 479px) {
  .footer {
    padding: 35px 15px;
  }
  
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px 15px;
  }
  
  /* First column full width */
  .footer__menu:first-child {
    grid-column: 1 / -1;
    padding-bottom: 20px;
    margin-bottom: 5px;
  }
  
  .footer__menu {
    padding: 12px 0;
    min-height: 110px;
  }
  
  .footer__title {
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  .footer__menu-link {
    font-size: 12px;
  }
  
  .footer__menu-item {
    margin-top: 5px;
  }
  
  .footer__menu p {
    font-size: 11px;
  }
  
  .newsletter-form p {
    font-size: 12px !important;
  }
  
  .newsletter-form input[type="email"] {
    padding: 10px 12px;
    font-size: 12px;
  }
  
  .newsletter-form button {
    padding: 10px 14px;
    font-size: 12px;
  }
  
  .footer__feedback {
    min-height: 110px;
    padding: 12px 0;
  }
  
  /* Copyright section - centered - compact */
  .footer__bottom {
    display: block !important;
    text-align: center !important;
    margin-top: 8px;
    padding-top: 8px;
  }
  
  .footer__copyright,
  .footer__privacy {
    text-align: center !important;
    display: block !important;
    width: 100%;
    font-size: 9px !important;
    color: #666 !important;
    padding: 4px 0 !important;
  }
}

/* Ensure proper spacing on all devices */
@media (min-width: 992px) {
  .footer {
    padding: 40px 0 0 20px;
  }
  
  .footer__bottom {
    margin-top: 0;
    padding-top: 15px;
    padding-bottom: 15px;
  }
}

@media (min-width: 1200px) {
  .footer {
    padding: 40px 0 0 20px;
  }
}
