/* ============================================================
   AppLuxe Blog Widget v2 – Main Stylesheet
   Global Font System: Syne (headings) + DM Sans (body)
   Fully Responsive · Mobile First
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

/* ── GLOBAL FONT + CSS VARIABLES ─────────────────────────── */
:root {
  /* FONTS — single source of truth */
  --font-head: 'Syne', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, system-ui, sans-serif;

  /* COLORS */
  --al2-primary:    #ff3b3b;
  --al2-dark:       #0d0d0d;
  --al2-text:       #1a1a1a;
  --al2-gray:       #6b7280;
  --al2-light:      #f8f9fb;
  --al2-border:     #e5e7eb;
  --al2-white:      #ffffff;

  /* LEGACY ALIASES — keep backward compat with older widgets */
  --al2-font-head:  var(--font-head);
  --al2-font-body:  var(--font-body);

  /* SPACING / SHAPE */
  --al2-radius:     10px;
  --al2-radius-sm:  8px;
  --al2-shadow:     0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.08);
  --al2-shadow-lg:  0 8px 32px rgba(0,0,0,.12);
  --al2-transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* Apply font globally to all widget wrappers */
.al2-section, .al2-sidebar, .al2-hero, .al2-footer-wrap,
.al-hero, .alhp, .alhp-sec, .alhp-hero, .alhp-cta,
.al2-faq-section, .al2-cards-section {
  font-family: var(--font-body);
}

*, *::before, *::after { box-sizing: border-box; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── SHARED SECTION HEAD ─────────────────────────────────── */
.al2-section-head { text-align: center; margin-bottom: 48px; }

.al2-section-title {
  font-family: var(--font-head);
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--al2-text);
  line-height: 1.2;
  margin: 0 0 14px;
  position: relative;
  display: inline-block;
}

.al2-section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent, var(--al2-primary));
  border-radius: 2px;
  margin: 12px auto 0;
}

.al2-section-sub {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--al2-gray);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.al-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--al2-transition), box-shadow var(--al2-transition);
  white-space: nowrap;
  border: 2px solid transparent;
}

.al-btn-primary {
  background: var(--accent, var(--al2-primary));
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,59,59,.35);
}
.al-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,59,59,.45); filter: brightness(1.05); color: #fff; text-decoration: none; }

.al-btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.6);
  backdrop-filter: blur(6px);
}
.al-btn-outline:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.9); transform: translateY(-2px); color: #fff; text-decoration: none; }

/* ── HERO (al-hero) ──────────────────────────────────────── */
.al-hero {
  position: relative;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.al-hero-overlay { position: absolute; inset: 0; z-index: 1; }
.al-hero-fade { position: absolute; inset: auto 0 0 0; height: 200px; background: linear-gradient(to bottom, transparent, rgba(0,0,0,.5)); z-index: 1; }
.al-hero-inner { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; padding: 80px 48px 48px; text-align: center; }

.al-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.95);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.al-hero-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 62px);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 20px;
  text-shadow: 0 2px 32px rgba(0,0,0,.3);
  letter-spacing: -0.02em;
}
.al-hero-sub { font-family: var(--font-body); font-size: clamp(15px, 2vw, 19px); color: rgba(255,255,255,.82); line-height: 1.7; margin: 0 0 36px; max-width: 580px; margin-left: auto; margin-right: auto; }
.al-hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.al-hero-stats { position: relative; z-index: 2; margin-top: auto; }
.al-hero-stats-inner { display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); backdrop-filter: blur(16px); border-top: 1px solid rgba(255,255,255,.12); padding: 20px 48px; flex-wrap: wrap; gap: 0; }
.al-stat { display: flex; flex-direction: column; align-items: center; padding: 8px 40px; }
.al-stat-num { font-family: var(--font-head); font-size: 28px; font-weight: 800; color: #fff; line-height: 1; }
.al-stat-lbl { font-family: var(--font-body); font-size: 12px; color: rgba(255,255,255,.65); font-weight: 500; margin-top: 4px; }
.al-stat-div { width: 1px; height: 36px; background: rgba(255,255,255,.2); }

/* ── BLOG CARDS (al2-*) ──────────────────────────────────── */
.al2-cards-section { padding: 60px 0; }

.al2-grid { display: grid; gap: 24px; }
.al2-cols-1 { grid-template-columns: 1fr; }
.al2-cols-2 { grid-template-columns: repeat(2, 1fr); }
.al2-cols-3 { grid-template-columns: repeat(3, 1fr); }
.al2-cols-4 { grid-template-columns: repeat(4, 1fr); }

.al2-card {
  background: var(--al2-white);
  border: 1px solid var(--al2-border);
  border-radius: var(--al2-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--al2-transition), box-shadow var(--al2-transition);
  box-shadow: var(--al2-shadow);
}
.al2-card:hover { transform: translateY(-6px); box-shadow: var(--al2-shadow-lg); }

.al2-card-img-wrap { position: relative; overflow: hidden; display: block; }
.al2-card-img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform 0.4s ease; }
.al2-card:hover .al2-card-img { transform: scale(1.06); }

.al2-badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--accent, var(--al2-primary));
  color: #fff;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
}

.al2-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.al2-card-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--al2-text); line-height: 1.4; margin: 0 0 10px; }
.al2-card-title a { color: inherit; text-decoration: none; transition: color var(--al2-transition); }
.al2-card-title a:hover { color: var(--accent, var(--al2-primary)); }

.al2-card-excerpt { font-family: var(--font-body); font-size: 14px; color: var(--al2-gray); line-height: 1.7; margin: 0 0 14px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.al2-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--al2-border); padding-top: 12px; margin-top: auto; }
.al2-card-meta { font-family: var(--font-body); font-size: 12px; color: #9ca3af; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.al2-card-meta svg { opacity: .6; flex-shrink: 0; }
.al2-dot { opacity: .4; }
.al2-read-more { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--accent, var(--al2-primary)); text-decoration: none; white-space: nowrap; }
.al2-read-more:hover { opacity: .8; text-decoration: none; }
.al2-no-posts { font-family: var(--font-body); color: var(--al2-gray); padding: 20px; grid-column: 1/-1; }

/* ── SIDEBAR (al2-sb-*) ──────────────────────────────────── */
.al2-sidebar { display: flex; flex-direction: column; gap: 36px; font-family: var(--font-body); }
.al2-sb-block {}
.al2-sb-title { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--al2-text); margin-bottom: 18px; padding-bottom: 10px; position: relative; }
.al2-sb-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 32px; height: 2px; background: var(--accent, var(--al2-primary)); border-radius: 2px; }

.al2-popular-post { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; }
.al2-popular-post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.al2-popular-img { width: 68px; height: 58px; object-fit: cover; border-radius: 8px; flex-shrink: 0; display: block; }

.al2-sb-tag { font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--al2-text); background: var(--al2-light); border: 1px solid var(--al2-border); padding: 6px 14px; border-radius: 50px; text-decoration: none; transition: background var(--al2-transition), color var(--al2-transition); white-space: nowrap; display: inline-block; }
.al2-sb-tag:hover { background: var(--accent, var(--al2-primary)); color: #fff; border-color: var(--accent, var(--al2-primary)); text-decoration: none; }

/* Newsletter inside sidebar */
.al2-sb-newsletter { border-radius: var(--al2-radius); padding: 28px 24px; position: relative; overflow: hidden; text-align: center; }
.al2-sb-nl-title { font-family: var(--font-head); font-size: 19px; font-weight: 800; color: #fff; margin: 0 0 10px; }
.al2-sb-nl-sub { font-family: var(--font-body); font-size: 13px; color: rgba(255,255,255,.65); line-height: 1.65; margin: 0 0 18px; }
.al2-sb-nl-form { display: flex; flex-direction: column; gap: 10px; }
.al2-sb-nl-form input[type="email"] { width: 100%; padding: 12px 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--al2-radius-sm); font-family: var(--font-body); font-size: 14px; color: #fff; outline: none; }
.al2-sb-nl-form input[type="email"]::placeholder { color: rgba(255,255,255,.4); }
.al2-sb-nl-form button { width: 100%; padding: 12px; border: none; border-radius: var(--al2-radius-sm); font-family: var(--font-body); font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; transition: filter var(--al2-transition); }
.al2-sb-nl-form button:hover { filter: brightness(1.1); }
.al2-sb-nl-privacy { font-family: var(--font-body); font-size: 11px; color: rgba(255,255,255,.35); margin: 8px 0 0; }

/* ── FAQ STANDALONE (al2-faq-*) ──────────────────────────── */
.al2-faq-section { padding: 60px 0; }
.al2-faq-list { max-width: 760px; margin: 0 auto; }
.al2-faq-item { border: 1px solid var(--al2-border); border-radius: var(--al2-radius); overflow: hidden; margin-bottom: 10px; transition: box-shadow var(--al2-transition); }
.al2-faq-item.is-open { box-shadow: 0 4px 20px rgba(0,0,0,.08); border-color: var(--accent, var(--al2-primary)); }
.al2-faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; background: #fff; border: none; cursor: pointer; text-align: left; font-family: var(--font-body); font-size: 16px; font-weight: 600; color: var(--al2-text); line-height: 1.5; transition: background var(--al2-transition), color var(--al2-transition); }
.al2-faq-q:hover, .al2-faq-item.is-open .al2-faq-q { background: #fafafa; color: var(--accent, var(--al2-primary)); }
.al2-faq-icon { flex-shrink: 0; display: flex; color: #9ca3af; transition: transform .3s, color var(--al2-transition); }
.al2-faq-item.is-open .al2-faq-icon { transform: rotate(180deg); color: var(--accent, var(--al2-primary)); }
.al2-faq-a { max-height: 0; overflow: hidden; transition: max-height .38s cubic-bezier(.4,0,.2,1); }
.al2-faq-item.is-open .al2-faq-a { max-height: 600px; }
.al2-faq-a-inner { padding: 18px 24px 22px; border-top: 1px solid #f0f0f0; font-family: var(--font-body); font-size: 15px; color: var(--al2-gray); line-height: 1.75; }

/* ── FOOTER (al2-footer-*) ───────────────────────────────── */
.al2-footer { font-family: var(--font-body); background: var(--al2-dark); color: #fff; }
.al2-footer-inner { max-width: 1200px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.al2-footer-top { background: var(--accent, var(--al2-primary)); padding: 14px 0; }
.al2-footer-tagline { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: rgba(255,255,255,.9); margin: 0; text-align: center; }
.al2-footer-tagline strong { font-weight: 800; color: #fff; }
.al2-footer-main { padding: 56px 0; }
.al2-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 48px; align-items: start; }
.al2-footer-logo { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 14px; }
.al2-footer-about-text { font-family: var(--font-body); font-size: 14px; color: #888; line-height: 1.75; margin: 0 0 22px; }
.al2-footer-soc { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #1c1c1c; border: 1px solid #2a2a2a; color: #888; font-size: 14px; text-decoration: none; transition: background var(--al2-transition), color var(--al2-transition), transform var(--al2-transition); }
.al2-footer-soc:hover { background: var(--accent, var(--al2-primary)); color: #fff; transform: translateY(-3px); text-decoration: none; }
.al2-footer-socials { display: flex; gap: 10px; flex-wrap: wrap; }
.al2-footer-col-title { font-family: var(--font-body); font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #fff; margin: 0 0 20px; padding-bottom: 10px; position: relative; }
.al2-footer-col-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 28px; height: 2px; background: var(--accent, var(--al2-primary)); border-radius: 2px; }
.al2-footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.al2-footer-links a { font-family: var(--font-body); font-size: 14px; color: #888; text-decoration: none; transition: color var(--al2-transition), padding-left var(--al2-transition); display: flex; align-items: center; gap: 6px; }
.al2-footer-links a:hover { color: #fff; padding-left: 6px; text-decoration: none; }
.al2-footer-nl-sub { font-family: var(--font-body); font-size: 13px; color: #888; line-height: 1.7; margin: 0 0 16px; }
.al2-footer-nl-form { display: flex; flex-direction: column; gap: 10px; }
.al2-footer-nl-form input[type="email"] { width: 100%; padding: 12px 16px; background: #1a1a1a; border: 1px solid #2c2c2c; border-radius: var(--al2-radius-sm); font-family: var(--font-body); font-size: 14px; color: #ccc; outline: none; transition: border-color var(--al2-transition); }
.al2-footer-nl-form input:focus { border-color: var(--accent, var(--al2-primary)); }
.al2-footer-nl-form input::placeholder { color: #555; }
.al2-footer-nl-form button { width: 100%; padding: 12px; border: none; border-radius: var(--al2-radius-sm); font-family: var(--font-body); font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; transition: filter var(--al2-transition), transform var(--al2-transition); }
.al2-footer-nl-form button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.al2-footer-bottom { border-top: 1px solid #1c1c1c; padding: 22px 0; }
.al2-footer-bottom .al2-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.al2-footer-copy { font-family: var(--font-body); font-size: 13px; color: #555; margin: 0; }
.al2-footer-bottom-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.al2-footer-bottom-nav a { font-family: var(--font-body); font-size: 12px; color: #555; text-decoration: none; transition: color var(--al2-transition); }
.al2-footer-bottom-nav a:hover { color: #fff; text-decoration: none; }

/* ── STICKY CTA ──────────────────────────────────────────── */
.al2-sticky-cta { position: fixed; z-index: 9999; opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
.al2-sticky-cta.al2-visible { opacity: 1; pointer-events: all; }
.al2-sticky-bottom-right  { bottom: 28px; right: 28px; }
.al2-sticky-bottom-left   { bottom: 28px; left: 28px; }
.al2-sticky-bottom-center { bottom: 28px; left: 50%; transform: translateX(-50%); }
.al2-sticky-bottom-center.al2-visible { transform: translateX(-50%); }
.al2-sticky-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; background: var(--btn-bg, #ff3b3b); color: var(--btn-color, #fff); font-family: var(--font-body); font-size: 15px; font-weight: 700; border-radius: 50px; text-decoration: none; box-shadow: 0 8px 32px rgba(0,0,0,.3); transition: transform var(--al2-transition), box-shadow var(--al2-transition), filter var(--al2-transition); white-space: nowrap; animation: al2-pulse 2.5s ease-in-out infinite; }
.al2-sticky-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,.35); filter: brightness(1.05); color: var(--btn-color, #fff); text-decoration: none; animation: none; }
.al2-sticky-icon { font-size: 17px; }
@keyframes al2-pulse { 0%,100%{box-shadow:0 8px 32px rgba(0,0,0,.3),0 0 0 0 rgba(255,59,59,.5)} 50%{box-shadow:0 8px 32px rgba(0,0,0,.3),0 0 0 10px rgba(255,59,59,0)} }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — ALL WIDGET CLASSES
══════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  .al2-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .al2-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .al2-footer-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 40px; }
  .al2-footer-about { grid-column: 1 / -1; }
  .al-hero-inner { padding: 60px 32px 40px; }
}

/* Mobile landscape */
@media (max-width: 768px) {
  .al-hero-inner { padding: 48px 24px 32px; }
  .al-hero-title { font-size: clamp(24px, 7vw, 36px); }
  .al-hero-stats-inner { padding: 16px 24px; }
  .al-stat { padding: 8px 16px; }
  .al-stat-num { font-size: 22px; }
  .al-stat-div { display: none; }

  .al2-cols-4,
  .al2-cols-3,
  .al2-cols-2 { grid-template-columns: 1fr; }

  .al2-cards-section { padding: 44px 0; }
  .al2-faq-section   { padding: 44px 0; }

  .al2-footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .al2-footer-inner { padding-left: 20px; padding-right: 20px; }
  .al2-footer-main  { padding: 40px 0; }
  .al2-footer-bottom .al2-footer-inner { flex-direction: column; text-align: center; }
  .al2-footer-bottom-nav { justify-content: center; }

  .al2-sticky-bottom-right,
  .al2-sticky-bottom-left { bottom: 14px; right: 14px; left: 14px; }
  .al2-sticky-btn { width: 100%; justify-content: center; }
}

/* Mobile portrait */
@media (max-width: 480px) {
  .al-hero-title { font-size: 24px; }
  .al-hero-ctas { flex-direction: column; align-items: stretch; }
  .al-btn { width: 100%; justify-content: center; }
  .al-stat-div { display: none; }
}
