/* =========================================================
   MEHERUN.IN — PREMIUM FOOTER STYLING
   Desktop + Tablet + Mobile Accordion
   Safe version for current Blocksy footer structure
   ========================================================= */

/* =========================
   Main footer
   ========================= */
.ct-footer,
.ct-footer [data-row="middle"] {
  background-color: #2f2f31 !important;
  color: #f3f3f3 !important;
}

/* Middle row spacing */
.ct-footer [data-row="middle"] .ct-container,
.ct-footer [data-row="middle"] .ct-container-fluid {
  padding-top: 38px !important;
  padding-bottom: 22px !important;
}

/* Footer columns alignment */
.ct-footer [data-row="middle"] [data-column^="widget-area-"] {
  min-width: 0;
  align-self: flex-start !important;
}

/* =========================
   Footer headings
   Covers:
   - widget titles
   - heading blocks
   - accidental inline tags inside headings
   ========================= */
.ct-footer .widget-title,
.ct-footer .wp-block-heading,
.ct-footer .widget-title *,
.ct-footer .wp-block-heading * {
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  font-style: normal !important;
  font-family: inherit !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Heading spacing */
.ct-footer .widget-title,
.ct-footer .wp-block-heading {
  margin: 0 0 16px !important;
}

/* Kill accidental code / italic styles inside headings */
.ct-footer .wp-block-heading code,
.ct-footer .widget-title code,
.ct-footer .wp-block-heading em,
.ct-footer .widget-title em {
  all: unset;
  color: #ffffff !important;
  font: inherit !important;
}

/* =========================
   Footer text
   ========================= */
.ct-footer p,
.ct-footer li,
.ct-footer span,
.ct-footer div,
.ct-footer .wp-block-paragraph {
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 15px !important;
  line-height: 1.8 !important;
}

/* About Us width control */
.ct-footer [data-column="widget-area-1"] .wp-block-paragraph,
.ct-footer [data-column="widget-area-1"] p {
  max-width: 320px;
}

/* =========================
   Footer links
   ========================= */
.ct-footer a {
  color: rgba(255, 255, 255, 0.88) !important;
  text-decoration: none !important;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.ct-footer a:hover {
  color: #ffffff !important;
  opacity: 1 !important;
}

/* =========================
   Footer list / menu styling
   ========================= */
.ct-footer ul,
.ct-footer ol,
.ct-footer .menu,
.ct-footer .wp-block-page-list,
.ct-footer .wp-block-navigation__container {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ct-footer li,
.ct-footer .wp-block-navigation-item {
  margin-bottom: 8px !important;
}

/* Widget block spacing */
.ct-footer .ct-widget {
  margin-bottom: 0 !important;
}

/* Contact column spacing */
.ct-footer [data-column="widget-area-4"] p {
  margin-bottom: 8px !important;
}

/* =========================
   Social icons
   ========================= */
.ct-footer .wp-block-social-links {
  margin-top: 14px !important;
  gap: 10px !important;
  padding: 0 !important;
}

.ct-footer .wp-block-social-links .wp-social-link {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.ct-footer .wp-block-social-links .wp-social-link:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.ct-footer .wp-block-social-links.has-normal-icon-size {
  font-size: 17px !important;
}

/* =========================
   Bottom copyright row
   ========================= */
.ct-footer [data-row="bottom"] {
  background-color: #2a2a2c !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.ct-footer [data-row="bottom"] .ct-container,
.ct-footer [data-row="bottom"] .ct-container-fluid {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

.ct-footer [data-row="bottom"] .ct-footer-copyright,
.ct-footer [data-row="bottom"] .copyright {
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 14px !important;
  text-align: center !important;
}

/* Optional subtle divider */
.ct-footer [data-row="middle"] {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================================
   TABLET
   ========================================================= */
@media (max-width: 1024px) {
  .ct-footer .widget-title,
  .ct-footer .wp-block-heading,
  .ct-footer .widget-title *,
  .ct-footer .wp-block-heading * {
    font-size: 18px !important;
  }

  .ct-footer p,
  .ct-footer li,
  .ct-footer span,
  .ct-footer div,
  .ct-footer .wp-block-paragraph {
    font-size: 14px !important;
    line-height: 1.75 !important;
  }

  .ct-footer [data-column="widget-area-1"] .wp-block-paragraph,
  .ct-footer [data-column="widget-area-1"] p {
    max-width: 100%;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 768px) {
  .ct-footer [data-row="middle"] .ct-container,
  .ct-footer [data-row="middle"] .ct-container-fluid {
    padding-top: 20px !important;
    padding-bottom: 10px !important;
  }

  .ct-footer .widget-title,
  .ct-footer .wp-block-heading,
  .ct-footer .widget-title *,
  .ct-footer .wp-block-heading * {
    font-size: 17px !important;
  }

  .ct-footer p,
  .ct-footer li,
  .ct-footer span,
  .ct-footer div,
  .ct-footer .wp-block-paragraph {
    font-size: 14px !important;
    line-height: 1.65 !important;
  }

  .ct-footer li,
  .ct-footer .wp-block-navigation-item {
    margin-bottom: 4px !important;
  }

  /* =========================
     Mobile accordion rows
     Columns 1,2,3 collapsible
     Column 4 always open
     ========================= */
  .ct-footer [data-column="widget-area-1"],
  .ct-footer [data-column="widget-area-2"],
  .ct-footer [data-column="widget-area-3"],
  .ct-footer [data-column="widget-area-4"] {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  /* Force footer widgets to occupy full width */
  .ct-footer [data-column="widget-area-1"] > .ct-widget,
  .ct-footer [data-column="widget-area-2"] > .ct-widget,
  .ct-footer [data-column="widget-area-3"] > .ct-widget,
  .ct-footer [data-column="widget-area-4"] > .ct-widget {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin-bottom: 0 !important;
  }

  .ct-footer .ct-widget {
    margin-bottom: 0 !important;
  }

  /* Accordion title full-width row */
  .ct-footer [data-column="widget-area-1"] .footer-accordion-title,
  .ct-footer [data-column="widget-area-2"] .footer-accordion-title,
  .ct-footer [data-column="widget-area-3"] .footer-accordion-title {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    cursor: pointer;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 22px 0 0 !important;
    line-height: 1.35 !important;
    user-select: none;
    box-sizing: border-box !important;
  }

  /* Chevron arrow built with borders, pinned to far right */
  .ct-footer [data-column="widget-area-1"] .footer-accordion-title::after,
  .ct-footer [data-column="widget-area-2"] .footer-accordion-title::after,
  .ct-footer [data-column="widget-area-3"] .footer-accordion-title::after {
    content: "";
    position: absolute;
    right: 0 !important;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: translateY(-65%) rotate(45deg);
    transform-origin: center;
    transition: transform 0.2s ease;
    box-sizing: border-box;
  }

  /* Up arrow when expanded */
  .ct-footer [data-column="widget-area-1"].is-open .footer-accordion-title::after,
  .ct-footer [data-column="widget-area-2"].is-open .footer-accordion-title::after,
  .ct-footer [data-column="widget-area-3"].is-open .footer-accordion-title::after {
    transform: translateY(-35%) rotate(-135deg);
  }

  /* Hidden by default */
  .ct-footer .footer-accordion-content {
    display: none;
    padding-top: 8px !important;
  }

  /* Show when open */
  .ct-footer [data-column="widget-area-1"].is-open .footer-accordion-content,
  .ct-footer [data-column="widget-area-2"].is-open .footer-accordion-content,
  .ct-footer [data-column="widget-area-3"].is-open .footer-accordion-content {
    display: block;
  }

  /* Tighten spacing inside accordion content */
  .ct-footer .footer-accordion-content p,
  .ct-footer .footer-accordion-content ul,
  .ct-footer .footer-accordion-content ol,
  .ct-footer .footer-accordion-content .menu {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* Contact column always visible */
  .ct-footer [data-column="widget-area-4"] {
    display: block !important;
  }

  /* Contact content centered on mobile */
  .ct-footer [data-column="widget-area-4"] .wp-block-paragraph,
  .ct-footer [data-column="widget-area-4"] p {
    text-align: center !important;
    margin-bottom: 6px !important;
  }

  .ct-footer [data-column="widget-area-4"] a {
    text-align: center !important;
  }

  .ct-footer [data-column="widget-area-4"] .wp-block-social-links {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100%;
    gap: 8px !important;
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
  }

  .ct-footer [data-column="widget-area-4"] .widget-title,
  .ct-footer [data-column="widget-area-4"] .wp-block-heading {
    text-align: center !important;
    margin-bottom: 12px !important;
  }
}

/* =========================================
   MOBILE FOOTER — REDUCE COLUMN SPACING
   ========================================= */

@media (max-width:768px){

/* Reduce top/bottom padding of each footer column */
.ct-footer [data-column="widget-area-1"],
.ct-footer [data-column="widget-area-2"],
.ct-footer [data-column="widget-area-3"],
.ct-footer [data-column="widget-area-4"]{
  padding-top:6px !important;
  padding-bottom:6px !important;
}

/* Remove extra widget spacing */
.ct-footer .ct-widget{
  margin-bottom:0 !important;
}

/* Tighten accordion title spacing */
.ct-footer .footer-accordion-title{
  padding-top:6px !important;
  padding-bottom:6px !important;
}

/* Reduce gap above accordion content */
.ct-footer .footer-accordion-content{
  padding-top:4px !important;
}

/* Slightly tighten menu items */
.ct-footer li{
  margin-bottom:2px !important;
}

}