
/* ===============================
   TERACHEM FOOTER – EXACT MATCH
================================ */

.tera-footer {
    background: #ffffff;
    font-family: var(--font-main);
    color: #111;
    padding: 60px 0 0;
}
.newsletter {
    flex: 1;
    max-width: 500px;
}
.newsletter .newsletter-form {
    display: flex;
    border: 1px solid var(--primary-dark);
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s;
    margin-bottom: 0;
    box-shadow: 0px 4px 30px 0px #00000040;
    justify-content: flex-end;
}

.newsletter-input-group {
    width: 100%;
    display: flex;
}
.newsletter .newsletter-form input {
    flex: 1;
    border: none;
    padding: 8px 16px;
    font-size: 0.95rem;
    background: var(--white);
    color: var(--text-primary);
    width: 66% !important;
}
.newsletter .newsletter-form button {
    background: var(--primary-dark);
    color: var(--text-inverse);
    border: none;
    padding: 10px 10.1px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 0 !important;
    margin: 2px;
    border-radius: 50px !IMPORTANT;
    width: 140px;
}
/* ---------- TOP ROW ---------- */
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 40px;
}
.footer-brand {
    flex: 0 0 42%;
}
.footer-brand h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 14px;
  color: #444;
  /*max-width: 360px;*/
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.footer-social a {
  color: #111;
  font-size: 15px;
}

.footer-social a:hover {
  opacity: 0.6;
}

/* ---------- MIDDLE GRID ---------- */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px;
  margin-bottom: 20px;
}

.footer-col h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 18px;
  font-family: var(--font-main);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 5px;
  font-size: 16px;
  color: #333;
}

.footer-col ul li a {
  color: #333;
  text-decoration: none;
  font-family: var(--font-main);
  justify-content: flex-start;
  transition: all 0.3s ease;
}

.footer-col ul li a:hover {
  text-decoration: underline;
  transform: translateX(3px);
}

/* CONTACT */
.footer-col ul li i {
  margin-right: 10px;
  font-size: 14px;
}

/* ---------- BOTTOM ---------- */

.footer-bottom {
  border-top: 1px solid var(--border-gray);
}

.footer-bottom-inner {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #666;
  width: 100%;
  gap: 5px;

}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links ul {
  display: flex;
  justify-content: flex-end;
  gap: 11px;
  list-style: none;
  margin: 0;
}

.footer-links a {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  font-family: var(--font-main);
}

.footer-bottom span {
  font-size: 16px;
}

.footer-links a:hover {
  text-decoration: underline;
}



button[type="submit"] {
    transition: all 0.3s ease;
    cursor: pointer;
}

button[type="submit"]:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

button[type="submit"].subscribed {
    background-color: #28a745 !important;
    color: white !important;
}

button[type="submit"].already-subscribed {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.newsletter-button.subscribed {
    background-color: #28a745 !important;
    color: white !important;
}

.newsletter-button.already-subscribed {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.tera-footer {
    position: relative; 
}
.footer-grid {
    position: relative;
    z-index: 2;
}

.tera-footer::after {
    content: "";
    position: absolute;
    background-image: url("https://terachem.devexhub.com/wp-content/uploads/2026/01/Frame_mesh.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 1;
    pointer-events: none;
    z-index: 1;
    width: 100%;
    bottom: 65px;
    height: 217px;
}

/* Updated Newsletter Popup Design - Top Right Position */
.newsletter-popup {
    display: none ;
    position: ABSOLUTE;
    top: -50px;
    max-width: 100%;
    width: 498PX;
    z-index: 9;
    animation: slideIn 0.3s ease-out;
    RIGHT: 0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.newsletter-popup-content {
    background: #fff;
    padding: 0 5px 7px;
    text-align: center;
    position: relative;
    DISPLAY: FLEX;
    border-bottom: 1px solid #000;
    gap: 10px;
    overflow: hidden;
    max-width: 500px;
    align-items: center;
}

.newsletter-popup.success .newsletter-popup-content {
    border-left-color: #4CAF50;
}

.newsletter-popup.info .newsletter-popup-content {
    border-left-color: #2196F3;
}

.popup-icon {
    font-size: 24px;
    line-height: 1;
}

.popup-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.popup-close {
    font-size: 18px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
}

.popup-close:hover {
    color: #333;
}

/* Progress Bar */
.popup-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #4CAF50;
    width: 100%;
    animation: progress 20s linear forwards;
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}



/* Mobile Responsive */
@media (max-width: 480px) {

    
    .popup-text {
        white-space: normal;
    }
}


@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }

}
@media (max-width: 750px) {
.footer-bottom-inner {
    padding: 10px 0 !important;
    justify-content: center !important;
    flex-direction: column-reverse;
}
.newsletter .newsletter-form button {
    font-size: 13px;
    width: 120px;
    padding: 7px;
}
.newsletter .newsletter-form input {
    padding: 8px 0px 8px 8px;
    font-size: 12px;
}
.newsletter .newsletter-form input::placeholder {
    font-size: 12px;
    color: #999;
    opacity: 1;
}


}

@media (max-width: 873px) {
  .footer-bottom { flex-wrap: wrap; text-align: center; justify-content: center; flex-direction: column-reverse; gap: 5px; }

}

@media (max-width: 873px) {
.footer-bottom span , .footer-links a{font-size: 12px;}

}

@media (max-width: 576px) {
  .footer-top { flex-direction: column; gap: 25px; margin-bottom:40px }
  .footer-grid { grid-template-columns: 1fr !important; gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .newsletter { max-width: 100% !important; width: 100% !important;}
  .newsletter .search-box{ max-width: 100% !important; }
}

/* Small devices: phones (≤480px) */
@media (max-width: 480px) {
    .footer-links { gap: 5px 10px !important; flex-wrap: wrap; text-align: center; justify-content: center; }
  .footer-social {width: 100%;padding-bottom: 20px; margin-left: 0; justify-content: flex-start;}
  .footer-links ul { justify-content: center !important; gap: 0 11px !important; flex-wrap: wrap; }
  .tera-footer::after { bottom: 111px !important; }


}
@media (max-width: 768px) {
     .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .footer-links ul{gap: 8px;}
}
