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

/* Newsletter CTA Section */
.footer-newsletter-cta {
  position: relative;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  padding: 64px 0 56px;
  overflow: hidden;
}

.footer-newsletter-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.8), transparent);
}

.footer-newsletter-card {
  position: relative;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.96));
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 24px;
  padding: 34px;
  box-shadow:
    0 24px 44px rgba(15, 23, 42, 0.11),
    0 10px 20px rgba(59, 130, 246, 0.08);
  overflow: hidden;
}

.footer-newsletter-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 70%);
  pointer-events: none;
  animation: float 20s ease-in-out infinite;
}

.footer-newsletter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr);
  gap: 28px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.footer-newsletter-main {
  display: flex;
  flex-direction: column;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -20px) scale(1.05);
  }
  50% {
    transform: translate(-10px, 10px) scale(0.95);
  }
  75% {
    transform: translate(-20px, -10px) scale(1.02);
  }
}

.footer-newsletter-content {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.footer-newsletter-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-radius: 20px;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

.footer-newsletter-icon svg {
  width: 28px;
  height: 28px;
}

.footer-newsletter-text {
  flex: 1;
}

.footer-newsletter-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.footer-newsletter-subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

.footer-newsletter-form {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.footer-newsletter-input {
  flex: 1;
  padding: 18px 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  font-size: 15px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.footer-newsletter-input:focus {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 8px 20px rgba(37, 99, 235, 0.08);
}

.footer-newsletter-input::placeholder {
  color: #94a3b8;
}

.footer-newsletter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 32px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.footer-newsletter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.4);
}

.footer-newsletter-button svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.footer-newsletter-button:hover svg {
  transform: translateX(4px);
}

.footer-newsletter-privacy {
  margin-top: 10px;
  font-size: 13px;
  color: #94a3b8;
  position: relative;
  z-index: 1;
}

.footer-newsletter-feedback {
  margin: 8px 0 0;
  min-height: 20px;
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
}

.footer-newsletter-feedback.is-success {
  color: #059669;
}

.footer-newsletter-feedback.is-error {
  color: #dc2626;
}

.footer-newsletter-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.footer-newsletter-benefits {
  background: linear-gradient(165deg, rgba(37, 99, 235, 0.1), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 18px;
  padding: 20px 20px 18px;
  backdrop-filter: blur(4px);
}

.footer-newsletter-benefits-title {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1e3a8a;
  font-weight: 800;
}

.footer-newsletter-benefits-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-newsletter-benefits-list li {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
}

.footer-newsletter-benefits-list strong {
  color: #0f172a;
}

/* Main Footer */
.footer-main {
  background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
  padding: 80px 0 40px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

/* Brand Column */
.footer-column-brand {
  max-width: 380px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-logo-image {
  display: block;
  height: 96px;
  width: auto;
  max-width: 480px;
}

.footer-logo-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-radius: 14px;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25);
}

.footer-logo-icon svg {
  width: 24px;
  height: 24px;
}

.footer-logo-text {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.footer-logo-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #e2e8f0;
  line-height: 1;
}

.footer-brand-tagline {
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* Trust Badges */
.footer-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.footer-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  box-shadow: 0 4px 10px rgba(2, 6, 23, 0.24);
}

.footer-trust-badge svg {
  width: 18px;
  height: 18px;
  color: #10b981;
}

/* Social Media */
.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  color: #cbd5e1;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(2, 6, 23, 0.24);
}

.footer-social-link:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25);
}

.footer-social-link svg {
  width: 20px;
  height: 20px;
}

/* Footer Columns */
.footer-heading {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.2s ease;
  position: relative;
}

.footer-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.footer-link:hover {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
  transform: translateX(4px);
}

.footer-link:hover svg {
  opacity: 1;
  color: #bfdbfe;
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 40px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.footer-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-copyright {
  font-size: 14px;
  color: #e2e8f0;
  margin: 0;
  font-weight: 500;
}

.footer-tagline {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-legal-link {
  font-size: 13px;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-legal-link:hover {
  color: #bfdbfe;
}

.footer-legal-separator {
  color: #64748b;
  font-size: 13px;
}

/* ============================================
   Live Chat Widget Styles
   ============================================ */

.aakaari-live-chat-widget {
  position: relative;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.aakaari-live-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 41;
  width: min(380px, calc(100vw - 24px));
  background: #f9fbff;
  border: 1px solid #d9e5fb;
  border-radius: 18px;
  box-shadow: 0 20px 48px rgba(2, 8, 23, 0.2);
  overflow: hidden;
}

@media (max-width: 640px) {
  .aakaari-live-chat-panel {
    right: 10px;
    left: 10px;
    bottom: 82px;
    width: auto;
    border-radius: 16px;
  }
}

.aakaari-live-chat-hidden {
  display: none !important;
}

.aakaari-live-chat-head {
  background: linear-gradient(120deg, #1e40af 0%, #2563eb 55%, #3b82f6 100%);
  color: #ffffff;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.aakaari-live-chat-head-copy {
  display: grid;
  gap: 2px;
}

.aakaari-live-chat-head-copy strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.aakaari-live-chat-head-copy span {
  font-size: 12px;
  opacity: 0.92;
  color: rgba(239, 246, 255, 0.95);
}

.aakaari-live-chat-head button {
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 19px;
  line-height: 1;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .16s ease, transform .16s ease;
}

.aakaari-live-chat-head button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.aakaari-live-chat-body {
  padding: 12px;
}

.aakaari-live-chat-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #effbf4;
  border: 1px solid #b9f1ce;
  font-size: 12px;
  font-weight: 500;
  color: #166534;
  margin-bottom: 10px;
}

.aakaari-live-chat-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
}

.aakaari-live-chat-start {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.aakaari-live-chat-start input,
.aakaari-live-chat-start textarea,
.aakaari-live-chat-compose textarea {
  width: 100%;
  border: 1px solid #d7e1f3;
  background: #ffffff;
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.aakaari-live-chat-start input:focus,
.aakaari-live-chat-start textarea:focus,
.aakaari-live-chat-compose textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.aakaari-live-chat-consent {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #475569;
  margin-top: 2px;
  line-height: 1.3;
}

.aakaari-live-chat-consent input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.aakaari-live-chat-consent a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.aakaari-live-chat-consent a:hover {
  text-decoration: underline;
}

.aakaari-live-chat-start button,
.aakaari-live-chat-compose button {
  border: 0;
  border-radius: 11px;
  padding: 11px 12px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6 68%, #4f8ff7);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease;
}

.aakaari-live-chat-start button:hover,
.aakaari-live-chat-compose button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.aakaari-live-chat-thread {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.aakaari-live-chat-messages {
  max-height: 336px;
  overflow: auto;
  display: grid;
  gap: 10px;
  border: 1px solid #d7e1f3;
  border-radius: 12px;
  padding: 11px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
}

.aakaari-live-chat-msg {
  max-width: 84%;
  padding: 10px 11px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.aakaari-live-chat-msg.visitor {
  margin-left: auto;
  background: linear-gradient(138deg, #1d4ed8, #3b82f6);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.aakaari-live-chat-msg.agent {
  margin-right: auto;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #d7e1f3;
  border-bottom-left-radius: 4px;
}

.aakaari-live-chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.aakaari-live-chat-compose textarea {
  min-height: 72px;
  max-height: 130px;
  resize: vertical;
}

.aakaari-live-chat-compose button {
  min-width: 92px;
  height: 44px;
}

@media (max-width: 480px) {
  .aakaari-live-chat-compose {
    grid-template-columns: 1fr;
  }

  .aakaari-live-chat-compose button {
    width: 100%;
    min-width: 0;
  }
}

button[data-chat-fab="1"] {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  color: #ffffff !important;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34) !important;
  transition: transform .16s ease, box-shadow .16s ease !important;
  animation: aakaari-chat-fab-float 2.4s ease-in-out infinite !important;
}

button[data-chat-fab="1"] svg {
  display: block;
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.2;
  opacity: 1;
}

@keyframes aakaari-chat-fab-float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

button[data-chat-fab="1"]:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 38px rgba(37, 99, 235, 0.38) !important;
}

.aakaari-live-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.aakaari-live-chat-messages::-webkit-scrollbar-thumb {
  background: #bfdbfe;
  border-radius: 999px;
}

/* ============================================
   Tablet Responsiveness (640px - 1023px)
   ============================================ */

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

  .footer-column-brand {
    grid-column: 1 / -1;
    max-width: 100%;
  }
}

/* ============================================
   Mobile Responsiveness (< 640px)
   ============================================ */

@media (max-width: 639px) {
  .footer-newsletter-cta {
    padding: 60px 0;
  }

  .footer-newsletter-card {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .footer-newsletter-content {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
  }

  .footer-newsletter-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .footer-newsletter-benefits {
    padding: 16px;
  }

  .footer-newsletter-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .footer-newsletter-icon svg {
    width: 24px;
    height: 24px;
  }

  .footer-newsletter-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .footer-newsletter-subtitle {
    font-size: 15px;
  }

  .footer-newsletter-form {
    flex-direction: column;
    gap: 10px;
  }

  .footer-newsletter-input,
  .footer-newsletter-button {
    width: 100%;
    padding: 16px 20px;
  }

  .footer-main {
    padding: 60px 0 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 48px;
  }

  .footer-column-brand {
    grid-column: 1;
  }

  .footer-logo {
    margin-bottom: 16px;
  }

  .footer-logo-image {
    height: 80px;
    max-width: 400px;
  }

  .footer-logo-icon {
    width: 44px;
    height: 44px;
  }

  .footer-logo-icon svg {
    width: 22px;
    height: 22px;
  }

  .footer-logo-text {
    font-size: 22px;
  }

  .footer-logo-name {
    font-size: 26px;
  }

  .footer-brand-tagline {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .footer-trust-badges {
    margin-bottom: 20px;
  }

  .footer-trust-badge {
    padding: 8px 14px;
    font-size: 12px;
  }

  .footer-social-link {
    width: 40px;
    height: 40px;
  }

  .footer-heading {
    font-size: 15px;
    margin-bottom: 16px;
  }

  .footer-links {
    gap: 4px;
  }

  .footer-link {
    padding: 9px 10px;
    font-size: 13px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    padding-top: 32px;
    text-align: center;
  }

  .footer-bottom-left,
  .footer-bottom-right {
    width: 100%;
  }

  .footer-copyright,
  .footer-tagline {
    text-align: center;
  }

  .footer-legal-links {
    justify-content: center;
  }

  .footer-legal-link {
    font-size: 12px;
  }

  button[data-chat-fab="1"] {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
}

/* ============================================
   Extra Small Screens (< 360px)
   ============================================ */

@media (max-width: 359px) {
  .footer-newsletter-card {
    padding: 24px 20px;
  }

  .footer-newsletter-icon {
    width: 52px;
    height: 52px;
  }

  .footer-trust-badges {
    gap: 8px;
  }

  .footer-logo-image {
    height: 64px;
    max-width: 320px;
  }

  .footer-trust-badge {
    padding: 7px 12px;
    font-size: 11px;
  }

  .footer-social {
    gap: 8px;
  }

  .footer-social-link {
    width: 38px;
    height: 38px;
  }

  .footer-social-link svg {
    width: 18px;
    height: 18px;
  }

  .footer-legal-links {
    flex-direction: column;
    gap: 12px;
  }

  .footer-legal-separator {
    display: none;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  .footer-newsletter-cta,
  .footer-social,
  .footer-trust-badges,
  .aakaari-live-chat-widget {
    display: none !important;
  }

  .footer-main {
    background: #ffffff;
    padding: 40px 0 20px;
  }

  .footer-newsletter-card::before {
    display: none;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .footer-newsletter-card::before,
  .footer-newsletter-button,
  .footer-link,
  .footer-social-link,
  button[data-chat-fab="1"] {
    animation: none;
    transition: none;
  }
}
