/*
 * Krona Mag - Footer Stylesheet
 * Version: 0.1.0
 * Description: Footer layout, widget titles, bottom bar.
 *
 * Sections:
 *   1. Footer Wrapper
 *   2. Widget Grid
 *   3. Widget Titles - Magazine Lume style
 *   4. Widget Content
 *   5. Footer Bottom Bar
 *   6. Responsive
 */

/* =============================================
   1. FOOTER WRAPPER
   Dark background with accent top border
   ============================================= */

.km-footer {
  background: var(--km-footer-bg);
  color: rgba(255,255,255,0.7);
  margin-top: 60px;
  border-top: 3px solid var(--km-accent);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =============================================
   2. WIDGET GRID
   4-column grid for footer widgets
   ============================================= */

.km-footer-widgets {
  padding: 56px 0 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.km-footer-grid {
  display: grid;
  grid-template-columns: repeat( 4, 1fr );
  gap: 40px;
}

.km-footer-cols-2 { grid-template-columns: repeat( 2, 1fr ); max-width: 600px; margin: 0 auto; }
.km-footer-cols-3 { grid-template-columns: repeat( 3, 1fr ); max-width: 900px; margin: 0 auto; }
.km-footer-cols-4 { grid-template-columns: repeat( 4, 1fr ); }

/* Footer column */
.km-footer-col {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* =============================================
   3. WIDGET TITLES - Magazine Lume style
   Colored background + continuous horizontal line
   ============================================= */

.km-footer .wp-block-heading {
  position: relative;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #fff;
  background: var(--km-accent);
  padding: 4px 12px;
  border-radius: 3px 3px 0 0;
  margin-bottom: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  border-bottom: none;
  width: auto;
}

/* Continuous line extending from title to end of column */
.km-footer .wp-block-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: -2000px;
  height: 2px;
  background-color: var(--km-accent);
}

/* Clip the line inside the column */
.km-footer .wp-block-column,
.km-footer-col .widget {
  position: relative !important;
  overflow-x: clip !important;
  overflow-y: visible !important;
  padding-right: 40px !important;
  box-sizing: border-box !important;
}

/* =============================================
   4. WIDGET CONTENT
   Text, links and lists inside footer widgets
   ============================================= */

/* All text in footer - sans-serif, small */
.km-footer p,
.km-footer li,
.km-footer span:not(.km-footer-credits *) {
  font-size: 13px;
  line-height: 1.7;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Widget text color */
.km-footer .widget p {
  color: rgba(255,255,255,0.6);
}

/* Widget links */
.km-footer .widget a {
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}

.km-footer .widget a:hover {
  color: #fff;
}

/* Widget list */
.km-footer .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.km-footer .widget ul li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.km-footer .widget ul li:last-child {
  border-bottom: none;
}

/* Social icons - restore size overridden by font-size on li */
.km-footer .wp-block-social-links .wp-block-social-link svg {
  height: 24px !important;
  width: 24px !important;
}

/* =============================================
   5. FOOTER BOTTOM BAR
   Copyright + footer menu + credits
   ============================================= */

.km-footer-bottom {
  padding: 20px 0;
}

.km-footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.km-footer-copyright {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
}

.km-footer-copyright a {
  color: rgba(255,255,255,0.7);
}

.km-footer-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.km-footer-menu li a {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transition: color 0.2s;
}

.km-footer-menu li a:hover {
  color: #fff;
}

.km-footer-credits {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
}

.km-footer-credits a {
  color: var(--km-accent);
}

/* =============================================
   5b. KRONA MAG LATEST POSTS WIDGET
   Round images + title + date
   ============================================= */
.km-lp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.km-lp-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.km-lp-img-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  border: 2px solid rgba(255,255,255,0.15);
}

.km-lp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.km-lp-img-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.1);
}

.km-lp-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.km-lp-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.km-lp-title:hover {
  color: #fff;
}

.km-lp-date {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.km-widget-about-text {
  margin-top: 16px !important;
}

.km-widget-about-text,
.km-widget-about-text p {
  color: rgba(255,255,255,0.8) !important;
}

.km-widget-team-member {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.km-widget-team-name {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.km-widget-team-role {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}

.km-widget-team-email {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  text-decoration: none;
}

.km-widget-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.km-widget-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 24px !important;
  transition: opacity 0.2s;
}

.km-widget-social-link:hover {
  opacity: 0.8;
}

.km-social-instagram { background: #E1306C; color: #fff !important; }
.km-social-facebook  { background: #1877F2; color: #fff !important; }
.km-social-twitter   { background: #000000; color: #fff !important; }
.km-social-youtube   { background: #FF0000; color: #fff !important; }
.km-social-telegram  { background: #229ED9; color: #fff !important; }
.km-social-linkedin  { background: #0A66C2; color: #fff !important; }
.km-social-tiktok    { background: #000000; color: #fff !important; }

/* =============================================
   6. RESPONSIVE
   ============================================= */

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

@media ( max-width: 640px ) {
  .km-footer-grid {
    grid-template-columns: 1fr;
  }
  .km-footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
  .km-footer-menu {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
}