/*
 * Footer – 4D King Results
 *
 * Styles for the multi‑container footer:
 * 1. Partner logo carousel (continuous, centred)
 * 2. Info sections (4 columns, compact links)
 * 3. Dynamic post blocks (3 columns with mini cards)
 * 4. Bottom legal bar
 */

/* =================================================================
   GLOBAL FOOTER WRAPPER
   ================================================================= */
.site-footer {
  background: #e9e7eb;
  border-top: 1px solid var(--light-grey, #e0e0e0);
  font-family: inherit;
  color: var(--dark, #222);
  overflow: hidden;
}

/* =================================================================
   CONTAINER 1 – PARTNER LOGO CAROUSEL
   ================================================================= */
.footer-partners {
  padding: 30px 0;
  border-bottom: 1px solid var(--light-grey, #e0e0e0);
}

.footer-swiper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;      /* space for potential navigation arrows */
}

.footer-swiper .swiper-wrapper {
  align-items: center;
  transition-timing-function: linear !important;  /* smooth continuous scroll */
}

.footer-swiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto !important;   /* let content size dictate */
  /* Swiper's spaceBetween handles the 15px gap */
}

.partner-logo {
  display: block;
  width: auto;
  max-width: 80px;          /* mobile‑app icon size */
  height: auto;
  max-height: 60px;
  border-radius: 12px;
  object-fit: contain;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Optional swiper navigation arrows – style if you add them */
.footer-swiper .swiper-button-next,
.footer-swiper .swiper-button-prev {
  color: var(--primary-red, #c00);
  background: rgba(255,255,255,0.9);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.footer-swiper .swiper-button-next::after,
.footer-swiper .swiper-button-prev::after {
  font-size: 14px;
  font-weight: bold;
}

/* =================================================================
   CONTAINER 2 – INFO SECTIONS (4 columns)
   ================================================================= */
.footer-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px 40px;
}

/* Column 1 – Logo / Site Title + Description + Social */
.footer-col-1 {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-logo {
  max-width: 160px;
  height: auto;
  display: block;
}

.footer-site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-red, #c00);
  margin: 0 0 5px;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--grey, #666);
}

/* Social Icons */
.footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f4f4f4;
  overflow: hidden;
  transition: background 0.2s, transform 0.2s;
}

.social-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.social-icon:hover {
  background: var(--primary-red, #c00);
  transform: translateY(-2px);
}

.social-icon:hover img {
  filter: brightness(0) invert(1);   /* make icon white on red */
}

/* Columns 2-4 – Link sections */
.footer-col-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark, #222);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col-content {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Reset paragraph margins inserted by wpautop() */
.footer-col-content p {
  margin: 0;
  line-height: 1.2;
}

.footer-col-content a {
  display: block;
  padding: 0;              /* no extra padding */
  margin: 0;               /* no bottom margin */
  line-height: 1.2;        /* very tight */
  color: var(--grey, #555);
  text-decoration: none;
  transition: color 0.15s, padding-left 0.15s;
}

.footer-col-content a:hover {
  color: var(--primary-red, #c00);
  padding-left: 5px;
}

/* =================================================================
   CONTAINER 3 – DYNAMIC POST BLOCKS
   ================================================================= */
.footer-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 50px;
  border-top: 1px solid var(--light-grey, #e0e0e0);
  padding-top: 40px;
}

.footer-posts-block {
  display: flex;
  flex-direction: column;
}

.block-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark, #222);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 20px;
  position: relative;
  padding-bottom: 8px;
}

.block-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background: var(--primary-red, #c00);
}

/* Mini Post Card */
.mini-post {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  margin-bottom: 15px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.mini-post:hover {
  border-color: var(--primary-red, #c00);
  box-shadow: 0 0 10px rgba(255,0,0,0.08);
  background: #fff;
  transform: translateY(-1px);
}

.mini-post:last-child {
  margin-bottom: 0;
}

/* Featured image */
.mini-thumb {
  flex-shrink: 0;
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 50%;      /* circular image */
  overflow: hidden;
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.2s;
}

.mini-post:hover .mini-thumb img {
  transform: scale(1.08);
}

/* Title & excerpt */
.mini-content {
  flex: 1;
  min-width: 0;   /* enable text truncation */
}

.mini-content h4 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--dark, #222);
}

.mini-content h4 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s;
}

.mini-content h4 a:hover {
  color: var(--primary-red, #c00);
}

.mini-content p {
  font-size: 10px;
  line-height: 1.4;
  color: var(--grey, #666);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =================================================================
   CONTAINER 4 – LEGAL BAR
   ================================================================= */
.footer-legal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid var(--light-grey, #e0e0e0);
  font-size: 0.85rem;
  color: var(--grey, #666);
}

.footer-legal-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.footer-legal-links a {
  color: var(--grey, #666);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.footer-legal-links a:hover {
  color: var(--primary-red, #c00);
  text-decoration: underline;
}

.footer-copyright {
  text-align: right;
}


/* Developer credit */
.footer-developer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--grey, #666);
  border-top: 1px solid var(--light-grey, #e0e0e0);
  flex-wrap: wrap;
}

.footer-developer__text {
  margin-right: 4px;
}

.footer-developer__icon {
  display: inline-flex;
  align-items: center;
  color: var(--grey, #666);
  transition: color 0.2s;
}

.footer-developer__icon:hover {
  color: var(--primary-red, #cc0000);
}
/* =================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================= */
@media (max-width: 1024px) {
  .footer-info {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  .footer-posts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .footer-info {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-posts {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 40px;
  }
  .footer-legal-bar {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .footer-legal-links {
    justify-content: center;
  }
  .footer-copyright {
    text-align: center;
  }
  .partner-logo {
    max-width: 60px;
    max-height: 45px;
    border-radius: 10px;
  }
}

@media (max-width: 480px) {
  .mini-post {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .mini-thumb {
    width: 50px;
    height: 50px;
  }
  .mini-content h4 {
    font-size: 11px;
  }
  .mini-content p {
    font-size: 10px;
    -webkit-line-clamp: 1;
  }
}