/* ==========================================================================
   PlaySultan-Style 3-Column Footer Component for AroraShop
   Full Dark & Light Theme Support
   ========================================================================== */

/* --- DARK THEME DEFAULTS --- */
:root {
  --ps-ft-bg: #0b0c10;
  --ps-ft-card-bg: #16171d;
  --ps-ft-card-hover: #22232c;
  --ps-ft-border: rgba(255, 255, 255, 0.08);
  --ps-ft-border-hover: rgba(255, 255, 255, 0.18);
  --ps-ft-text-title: #ffffff;
  --ps-ft-text-main: #d3d5df;
  --ps-ft-text-muted: #8d909d;
  --ps-ft-text-dim: #656877;
  --ps-ft-green: #00b67a;
  --ps-ft-green-hover: #00a36d;
  --ps-ft-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Footer Section (Dark Mode) */
.playsultan-footer {
  position: relative;
  background-color: var(--ps-ft-bg) !important;
  color: var(--ps-ft-text-main) !important;
  font-family: var(--ps-ft-font);
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  z-index: 1;
}

/* Background Atmosphere Overlay (Dark Gaming Glow) */
.ps-footer-bg-overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -15%, rgba(21, 180, 139, 0.06), transparent 70%),
    radial-gradient(circle at 10% 25%, rgba(25, 28, 42, 0.45), transparent 45%),
    radial-gradient(circle at 90% 45%, rgba(18, 22, 34, 0.45), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.playsultan-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* Main Container */
.ps-footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 18px 24px;
  position: relative;
  z-index: 1;
  width: 100%;
}

/* 4-Column Balanced Grid (Brand + Legal + Apps & Reviews + Latest Blogs) */
.ps-footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 1fr 1.25fr;
  gap: 36px;
  margin-bottom: 22px;
  align-items: start;
}

/* Column 1: Brand & Contact Info */
.ps-footer-col {
  display: flex;
  flex-direction: column;
}

.ps-footer-logo-wrap {
  display: inline-block;
  text-decoration: none;
}

.ps-footer-logo {
  max-height: 36px;
  width: auto;
  object-fit: contain;
}

.ps-footer-tagline {
  color: var(--ps-ft-text-muted);
  font-size: 13.5px;
  line-height: 1.45;
  margin-top: 10px;
  margin-bottom: 14px;
  font-weight: 400;
  max-width: 290px;
}

/* Contact Pills Stack */
.ps-contact-pills-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 290px;
}

/* Email / Partnership Pill Buttons */
.ps-pill-link {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--ps-ft-card-bg);
  border: 1px solid var(--ps-ft-border);
  border-radius: 9999px;
  height: 38px;
  padding: 0 16px;
  color: var(--ps-ft-text-main);
  font-size: 13px;
  font-weight: 450;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
}

.ps-pill-icon {
  width: 15px;
  height: 15px;
  color: var(--ps-ft-text-muted);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.ps-pill-link span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-pill-link:hover {
  background: var(--ps-ft-card-hover);
  border-color: var(--ps-ft-border-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.ps-pill-link:hover .ps-pill-icon {
  color: #ffffff;
}

/* Column Headings */
.ps-col-title {
  color: var(--ps-ft-text-title);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
  text-transform: none;
}

/* Links List (Column 2: Legal) */
.ps-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ps-links-list li {
  margin: 0;
  padding: 0;
}

.ps-links-list a {
  color: var(--ps-ft-text-muted);
  font-size: 13.5px;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
  display: inline-block;
  line-height: 1.4;
}

.ps-links-list a:hover {
  color: #ffffff;
  transform: translateX(2px);
}

/* Column 3: Apps & Reviews Stack */
.ps-badges-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.ps-badge-card {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(22, 23, 29, 0.7);
  padding: 3px 6px;
  transition: all 0.22s ease-in-out;
  text-decoration: none;
  box-sizing: border-box;
}

.ps-badge-card:hover {
  background: rgba(34, 35, 44, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.ps-badge-card img {
  height: 38px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* Column 4: Latest Blogs (3 no) */
.ps-footer-blogs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ps-footer-blog-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(22, 23, 29, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.22s ease-in-out;
}

.ps-footer-blog-item:hover {
  background: rgba(34, 35, 44, 0.9);
  border-color: rgba(21, 180, 139, 0.3);
  transform: translateY(-1px);
}

.ps-fb-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #11131a;
}

.ps-fb-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ps-fb-title {
  color: var(--ps-ft-text-main);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.18s ease;
}

.ps-footer-blog-item:hover .ps-fb-title {
  color: #15b48b;
}

.ps-fb-date {
  color: var(--ps-ft-text-dim);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Bottom Bar / Sub-footer */
.ps-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
  padding-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Social Media Circular Buttons */
.ps-social-circles {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ps-ft-card-bg);
  border: 1px solid var(--ps-ft-border);
  color: #b0b3c2 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.ps-social-btn svg {
  display: block;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.ps-social-btn:hover {
  background: var(--ps-ft-card-hover);
  border-color: var(--ps-ft-border-hover);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.ps-social-btn:hover svg {
  transform: scale(1.1);
}

/* Centered Copyright Notice */
.ps-copyright {
  color: var(--ps-ft-text-dim);
  font-size: 13px;
  font-weight: 400;
  text-align: center;
}

.ps-copyright a {
  color: var(--ps-ft-text-muted);
  text-decoration: none;
}

.ps-copyright a:hover {
  color: #ffffff;
}

.ps-bottom-spacer {
  min-width: 140px;
}

/* Floating Back To Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: -60px;
  right: 24px;
  width: 34px;
  height: 34px;
  background: rgba(24, 25, 32, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  font-size: 0.85rem;
  transition: all 0.25s ease-in-out;
  opacity: 0;
}

.back-to-top-btn.visible {
  bottom: 84px;
  opacity: 1;
}

.back-to-top-btn:hover {
  background: var(--ps-ft-green);
  border-color: var(--ps-ft-green);
  box-shadow: 0 0 10px rgba(0, 182, 122, 0.4);
  transform: translateY(-2px);
}

/* ==========================================================================
   LIGHT THEME OVERRIDES (Clean, Crisp & Readable)
   ========================================================================== */
[data-theme="light"] .playsultan-footer,
html[data-theme="light"] .playsultan-footer,
body[data-theme="light"] .playsultan-footer {
  background-color: #F8F9FA !important;
  color: #1F2937 !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Hide dark gradient smudges in light mode */
[data-theme="light"] .ps-footer-bg-overlay,
html[data-theme="light"] .ps-footer-bg-overlay {
  display: none !important;
}

[data-theme="light"] .playsultan-footer::before,
html[data-theme="light"] .playsultan-footer::before {
  opacity: 0.08;
  background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

/* Logo toggling */
[data-theme="light"] .ps-footer-logo.logo-dark,
html[data-theme="light"] .ps-footer-logo.logo-dark {
  display: none !important;
}
[data-theme="light"] .ps-footer-logo.logo-light,
html[data-theme="light"] .ps-footer-logo.logo-light {
  display: block !important;
}

/* Text Colors */
[data-theme="light"] .ps-col-title,
html[data-theme="light"] .ps-col-title {
  color: #111827 !important;
}

[data-theme="light"] .ps-footer-tagline,
html[data-theme="light"] .ps-footer-tagline {
  color: #4B5563 !important;
}

/* Links List */
[data-theme="light"] .ps-links-list a,
html[data-theme="light"] .ps-links-list a {
  color: #4B5563 !important;
}
[data-theme="light"] .ps-links-list a:hover,
html[data-theme="light"] .ps-links-list a:hover {
  color: #15b48b !important;
}

/* Contact Pills in Light Mode */
[data-theme="light"] .ps-pill-link,
html[data-theme="light"] .ps-pill-link {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #1F2937 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ps-pill-link .ps-pill-icon,
html[data-theme="light"] .ps-pill-link .ps-pill-icon {
  color: #15b48b !important;
}

[data-theme="light"] .ps-pill-link:hover,
html[data-theme="light"] .ps-pill-link:hover {
  background: #F3F4F6 !important;
  border-color: #15b48b !important;
  color: #000000 !important;
  box-shadow: 0 4px 12px rgba(21, 180, 139, 0.15);
}

/* Badges Stack in Light Mode */
[data-theme="light"] .ps-badge-card,
html[data-theme="light"] .ps-badge-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ps-badge-card:hover,
html[data-theme="light"] .ps-badge-card:hover {
  background: #F9FAFB !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Latest Blogs in Light Mode */
[data-theme="light"] .ps-footer-blog-item,
html[data-theme="light"] .ps-footer-blog-item {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .ps-footer-blog-item:hover,
html[data-theme="light"] .ps-footer-blog-item:hover {
  background: #F9FAFB !important;
  border-color: rgba(21, 180, 139, 0.35) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ps-fb-title,
html[data-theme="light"] .ps-fb-title {
  color: #1F2937 !important;
}

[data-theme="light"] .ps-footer-blog-item:hover .ps-fb-title,
html[data-theme="light"] .ps-footer-blog-item:hover .ps-fb-title {
  color: #15b48b !important;
}

[data-theme="light"] .ps-fb-date,
html[data-theme="light"] .ps-fb-date {
  color: #6B7280 !important;
}

/* Sub-footer in Light Mode */
[data-theme="light"] .ps-footer-bottom,
html[data-theme="light"] .ps-footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Social Buttons in Light Mode */
[data-theme="light"] .ps-social-btn,
html[data-theme="light"] .ps-social-btn {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #4B5563 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ps-social-btn:hover,
html[data-theme="light"] .ps-social-btn:hover {
  background: #15b48b !important;
  border-color: #15b48b !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 10px rgba(21, 180, 139, 0.3);
}

/* Copyright in Light Mode */
[data-theme="light"] .ps-copyright,
html[data-theme="light"] .ps-copyright {
  color: #6B7280 !important;
}
[data-theme="light"] .ps-copyright a,
html[data-theme="light"] .ps-copyright a {
  color: #374151 !important;
}
[data-theme="light"] .ps-copyright a:hover,
html[data-theme="light"] .ps-copyright a:hover {
  color: #15b48b !important;
}

/* Back to Top in Light Mode */
[data-theme="light"] .back-to-top-btn,
html[data-theme="light"] .back-to-top-btn {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #111827 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .back-to-top-btn:hover,
html[data-theme="light"] .back-to-top-btn:hover {
  background: #15b48b !important;
  border-color: #15b48b !important;
  color: #FFFFFF !important;
}

/* ==========================================================================
   Responsive Adjustments (Mobile Optimized, Beautiful & Balanced)
   ========================================================================== */
@media (max-width: 991px) {
  .ps-footer-grid {
    grid-template-columns: 1.2fr 0.9fr 1fr 1.2fr;
    gap: 28px 20px;
  }

  .ps-footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .ps-social-circles {
    justify-content: center;
  }

  .ps-bottom-spacer {
    display: none;
  }
}

@media (max-width: 767px) {
  .ps-footer-container {
    padding: 24px 16px 14px 16px;
  }

  .ps-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 14px;
    margin-bottom: 18px;
  }

  /* Brand spans full width on top */
  .ps-col-brand {
    grid-column: 1 / -1;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  html[data-theme="light"] .ps-col-brand,
  [data-theme="light"] .ps-col-brand {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .ps-footer-logo {
    max-height: 32px;
  }

  .ps-footer-tagline {
    font-size: 13px;
    line-height: 1.45;
    margin-top: 8px;
    margin-bottom: 12px;
    max-width: 100%;
  }

  .ps-contact-pills-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    max-width: 100%;
  }

  @media (min-width: 480px) {
    .ps-contact-pills-stack {
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
  }

  .ps-pill-link {
    width: 100%;
    height: 36px;
    padding: 0 14px;
    font-size: 12.5px;
  }

  .ps-pill-icon {
    width: 14px;
    height: 14px;
  }

  /* Column Headings on mobile */
  .ps-col-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
  }

  /* Column 1: Legal on mobile (Left half) */
  .ps-col-legal {
    min-width: 0;
  }

  .ps-links-list {
    gap: 7px;
  }

  .ps-links-list a {
    font-size: 12.5px;
    line-height: 1.35;
    padding: 1px 0;
  }

  /* Column 2: Badges on mobile (Right half) */
  .ps-col-badges {
    min-width: 0;
  }

  .ps-badges-stack {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 100%;
    align-items: stretch;
  }

  .ps-badge-card {
    width: 100%;
    justify-content: center;
    padding: 3px 6px;
    border-radius: 7px;
  }

  .ps-badge-card img {
    height: 32px;
    max-width: 100%;
    object-fit: contain;
  }

  /* Column 3: Latest Blogs on mobile (Full width below) */
  .ps-col-blogs {
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  html[data-theme="light"] .ps-col-blogs,
  [data-theme="light"] .ps-col-blogs {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  .ps-footer-blogs-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  @media (min-width: 500px) {
    .ps-footer-blogs-list {
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
  }

  .ps-footer-blog-item {
    padding: 6px 8px;
    gap: 9px;
    border-radius: 8px;
  }

  .ps-fb-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
  }

  .ps-fb-title {
    font-size: 12px;
    line-height: 1.3;
  }

  .ps-fb-date {
    font-size: 10.5px;
  }

  /* Sub-footer on mobile */
  .ps-footer-bottom {
    padding-top: 14px;
    padding-bottom: 6px;
    gap: 10px;
  }

  .ps-social-circles {
    gap: 8px;
  }

  .ps-social-btn {
    width: 35px;
    height: 35px;
  }

  .ps-copyright {
    font-size: 11.5px;
    line-height: 1.45;
  }
}

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

  .ps-col-brand,
  .ps-col-legal,
  .ps-col-badges,
  .ps-col-blogs {
    grid-column: 1 / -1;
  }
}
