/**
 * Islamtics custom footer — matches Next.js Footer.jsx aesthetic
 */

.itx-footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(167, 243, 208, 0.6);
  background: linear-gradient(to bottom, #E6F0EE 0%, #d8e7e2 100%);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #334155;
}

.itx-footer * { box-sizing: border-box; }

.itx-footer__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(16, 185, 129, 0.5), transparent);
  pointer-events: none;
}

.itx-footer__glow {
  position: absolute;
  top: -6rem;
  left: 50%;
  transform: translateX(-50%);
  height: 12rem;
  width: 40rem;
  max-width: 100%;
  border-radius: 9999px;
  background: rgba(74, 222, 128, 0.1);
  filter: blur(48px);
  pointer-events: none;
}

.itx-footer__inner {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

@media (min-width: 768px) {
  .itx-footer__inner { padding: 4rem 1.5rem; }
}

.itx-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.itx-footer__stars {
  font-size: 1.5rem;
  letter-spacing: 0.4em;
  color: rgba(5, 150, 105, 0.7);
  user-select: none;
  line-height: 1;
}

.itx-footer__name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #064e3b;
  margin: 0;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .itx-footer__name { font-size: 1.5rem; }
}

.itx-footer__tagline {
  max-width: 28rem;
  font-size: 0.875rem;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

.itx-footer__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.5rem 0;
}

.itx-footer__divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(74, 222, 128, 0.4), transparent);
}

.itx-footer__divider-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #047857;
}

.itx-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.itx-footer__nav a {
  position: relative;
  color: #334155;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
  padding: 0.25rem 0;
}

.itx-footer__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #10b981;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

.itx-footer__nav a:hover { color: #047857; }
.itx-footer__nav a:hover::after { transform: scaleX(1); }

.itx-footer__apps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.itx-footer__apps a {
  display: inline-block;
  transition: transform 0.3s ease, filter 0.3s ease;
  text-decoration: none;
}

.itx-footer__apps a:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 20px rgba(16, 185, 129, 0.25));
}

.itx-footer__apps img {
  height: 56px;
  width: auto;
  display: block;
}

.itx-footer__apps a + a img { height: 54px; }

.itx-footer__socials {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.itx-footer__social {
  display: grid;
  place-items: center;
  height: 2.75rem;
  width: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(167, 243, 208, 0.6);
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
  text-decoration: none;
}

.itx-footer__social:hover {
  transform: translateY(-2px);
  border-color: rgba(74, 222, 128, 0.7);
  box-shadow: 0 6px 18px -4px rgba(16, 185, 129, 0.35);
}

.itx-footer__social svg {
  width: 18px;
  height: 18px;
  color: #334155;
  transition: color 0.2s ease;
}

.itx-footer__social:hover svg { color: #047857; }

.itx-footer__bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(167, 243, 208, 0.4);
}

.itx-footer__copyright {
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.025em;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.itx-footer__copyright a {
  font-weight: 600;
  color: #047857;
  text-decoration: none;
  transition: color 0.2s ease;
}

.itx-footer__copyright a:hover { color: #064e3b; }

/* Dark mode — Blocksy class + system preference */
body.ct-default-dark-mode .itx-footer,
[data-theme="dark"] .itx-footer {
  background: linear-gradient(to bottom, #0c1a12 0%, #091410 100%);
  border-top-color: rgba(6, 78, 59, 0.3);
  color: #cbd5e1;
}
body.ct-default-dark-mode .itx-footer__name,
[data-theme="dark"] .itx-footer__name { color: #d1fae5; }
body.ct-default-dark-mode .itx-footer__tagline,
[data-theme="dark"] .itx-footer__tagline { color: #94a3b8; }
body.ct-default-dark-mode .itx-footer__divider-label,
[data-theme="dark"] .itx-footer__divider-label { color: #6ee7b7; }
body.ct-default-dark-mode .itx-footer__nav a,
[data-theme="dark"] .itx-footer__nav a { color: #cbd5e1; }
body.ct-default-dark-mode .itx-footer__nav a:hover,
[data-theme="dark"] .itx-footer__nav a:hover { color: #6ee7b7; }
body.ct-default-dark-mode .itx-footer__social,
[data-theme="dark"] .itx-footer__social {
  border-color: rgba(6, 78, 59, 0.5);
  background: rgba(23, 23, 23, 0.5);
}
body.ct-default-dark-mode .itx-footer__social svg,
[data-theme="dark"] .itx-footer__social svg { color: #e2e8f0; }
body.ct-default-dark-mode .itx-footer__social:hover svg,
[data-theme="dark"] .itx-footer__social:hover svg { color: #6ee7b7; }
body.ct-default-dark-mode .itx-footer__bottom,
[data-theme="dark"] .itx-footer__bottom { border-top-color: rgba(6, 78, 59, 0.4); }
body.ct-default-dark-mode .itx-footer__copyright,
[data-theme="dark"] .itx-footer__copyright { color: #64748b; }
body.ct-default-dark-mode .itx-footer__copyright a,
[data-theme="dark"] .itx-footer__copyright a { color: #6ee7b7; }
body.ct-default-dark-mode .itx-footer__copyright a:hover,
[data-theme="dark"] .itx-footer__copyright a:hover { color: #d1fae5; }

@media (prefers-color-scheme: dark) {
  body:not(.ct-default-light-mode) .itx-footer {
    background: linear-gradient(to bottom, #0c1a12 0%, #091410 100%);
    border-top-color: rgba(6, 78, 59, 0.3);
    color: #cbd5e1;
  }
  body:not(.ct-default-light-mode) .itx-footer__name { color: #d1fae5; }
  body:not(.ct-default-light-mode) .itx-footer__tagline { color: #94a3b8; }
  body:not(.ct-default-light-mode) .itx-footer__divider-label { color: #6ee7b7; }
  body:not(.ct-default-light-mode) .itx-footer__nav a { color: #cbd5e1; }
  body:not(.ct-default-light-mode) .itx-footer__nav a:hover { color: #6ee7b7; }
  body:not(.ct-default-light-mode) .itx-footer__social {
    border-color: rgba(6, 78, 59, 0.5);
    background: rgba(23, 23, 23, 0.5);
  }
  body:not(.ct-default-light-mode) .itx-footer__social svg { color: #e2e8f0; }
  body:not(.ct-default-light-mode) .itx-footer__bottom { border-top-color: rgba(6, 78, 59, 0.4); }
  body:not(.ct-default-light-mode) .itx-footer__copyright a { color: #6ee7b7; }
}

/* Hide Blocksy default footer container if present */
.site-footer[data-id="type-1"] { display: none !important; }
