/* =========================================================
   LC Home Preview v2
   Brand tokens = Foxiz dynamic.css (Lomas Conectado)
   UX = mobile-first app shell + desktop adaptive layout
   ========================================================= */

:root {
  /* From site dynamic.css */
  --g-color: #0078bf;
  --g-color-90: #0078bfe6;
  --dark-accent: #000000;
  --body-family: "Roboto Slab", Georgia, serif;
  --heading-family: Exo, system-ui, sans-serif;
  --menu-family: Rajdhani, system-ui, sans-serif;
  --meta-family: "Titillium Web", system-ui, sans-serif;
  --btn-family: Rajdhani, system-ui, sans-serif;
  --cat-family: "Titillium Web", system-ui, sans-serif;

  --ink: #000;
  --muted: #555;
  --line: #e6e8eb;
  --bg: #f3f5f7;
  --card: #fff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --nav-h: 60px;
  --top-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shell: 1120px;
  --touch: 44px;
}

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

html { scroll-behavior: smooth; }

body.lc-app {
  margin: 0;
  font-family: var(--body-family);
  font-size: 17px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px);
}

@media (min-width: 900px) {
  body.lc-app { padding-bottom: 0; }
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.lc-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  z-index: 1000;
}
.lc-skip:focus { left: 8px; top: 8px; }

.lc-shell {
  width: min(100% - 28px, var(--shell));
  margin-inline: auto;
}

/* Preview bar */
.lc-preview-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: center;
  background: var(--dark-accent);
  color: #fff;
  font-family: var(--menu-family);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  text-align: center;
}
.lc-preview-bar a {
  color: #7ec8f0;
  text-decoration: underline;
}

/* Top app bar */
.lc-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--dark-accent);
  color: #fff;
  border-bottom: 3px solid var(--g-color);
  min-height: var(--top-h);
}
.lc-top-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--top-h);
  padding-block: 8px;
}
.lc-brand img {
  height: 36px;
  width: auto;
}
.lc-top-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-family: var(--menu-family);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.03em;
}
.lc-top-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  opacity: 0.92;
}
.lc-top-nav a:hover { background: rgba(255,255,255,.1); opacity: 1; }
.lc-top-cta {
  background: var(--g-color) !important;
  opacity: 1 !important;
}
.lc-top-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.lc-top-nav + .lc-top-actions { margin-left: 0; }

.lc-icon-btn {
  width: var(--touch);
  height: var(--touch);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.lc-icon-btn:hover { background: rgba(255,255,255,.14); }

@media (min-width: 900px) {
  .lc-top-nav { display: flex; }
  .lc-menu-btn { display: none; }
  .lc-top-actions { margin-left: 8px; }
}

/* Drawer mobile */
.lc-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0,0,0,.45);
}
.lc-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(86vw, 320px);
  height: 100%;
  background: #111;
  color: #fff;
  padding: 56px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--menu-family);
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: -8px 0 30px rgba(0,0,0,.3);
}
.lc-drawer-panel a {
  padding: 14px 10px;
  border-radius: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.lc-drawer-panel a:hover { background: rgba(0,120,191,.25); }
.lc-drawer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* Main */
.lc-main { padding-top: 16px; padding-bottom: 28px; }

.lc-hero-band {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.lc-kicker {
  margin: 0 0 6px;
  font-family: var(--meta-family);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--g-color);
}
.lc-claim h1 {
  margin: 0;
  font-family: var(--heading-family);
  font-weight: 900;
  font-size: clamp(1.45rem, 4.5vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.lc-lead {
  margin: 8px 0 0;
  font-family: var(--menu-family);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--muted);
}

.lc-weather {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
  max-width: 280px;
}
.lc-weather strong {
  display: block;
  font-family: var(--menu-family);
  font-size: 14px;
  text-transform: uppercase;
}
.lc-weather small {
  color: var(--g-color);
  font-family: var(--meta-family);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}
.lc-weather-ico { font-size: 1.25rem; }

@media (min-width: 700px) {
  .lc-hero-band {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

/* Desktop 2-col layout */
.lc-layout {
  display: grid;
  gap: 22px;
}
@media (min-width: 960px) {
  .lc-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    align-items: start;
    gap: 28px;
  }
  .lc-col-side {
    position: sticky;
    top: calc(var(--top-h) + 16px);
  }
}

/* Hero card */
.lc-hero-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--line);
}
@media (min-width: 960px) {
  .lc-hero-card {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 320px;
  }
}
.lc-hero-media {
  position: relative;
  display: block;
  background: #d9dde3;
  aspect-ratio: 16/10;
}
@media (min-width: 960px) {
  .lc-hero-media { aspect-ratio: auto; height: 100%; min-height: 320px; }
}
.lc-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lc-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: var(--g-color);
  color: #fff;
  font-family: var(--cat-family);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 4px;
}
.lc-hero-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lc-hero-body h2 {
  margin: 0 0 10px;
  font-family: var(--heading-family);
  font-weight: 900;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  line-height: 1.2;
}
.lc-hero-body h2 a:hover { color: var(--g-color); }
.lc-hero-body p {
  margin: 0 0 12px;
  color: #333;
  line-height: 1.45;
  font-size: 0.98rem;
}
.lc-text-link {
  font-family: var(--btn-family);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--g-color);
  align-self: flex-start;
}

/* Sections */
.lc-section { margin-bottom: 22px; }
.lc-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--g-color);
}
.lc-section-head h2 {
  margin: 0;
  font-family: var(--heading-family);
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.lc-section-head a {
  font-family: var(--meta-family);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--g-color);
  white-space: nowrap;
}

/* News grid — balanced, not a wall of links */
.lc-news-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
.lc-news-featured {
  gap: 12px;
}
.lc-news-compact {
  gap: 12px;
}
@media (min-width: 640px) {
  .lc-news-compact {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .lc-news-featured {
    grid-template-columns: 1fr 1fr;
  }
  .lc-news-featured .is-lead {
    grid-column: 1 / -1;
    grid-template-columns: 200px 1fr;
    min-height: 120px;
  }
  .lc-news-compact {
    grid-template-columns: repeat(4, 1fr);
  }
  .lc-news-compact .lc-news-card {
    grid-template-columns: 1fr;
  }
  .lc-news-compact .lc-thumb {
    min-height: 110px;
    aspect-ratio: 16/10;
  }
  .lc-news-compact .lc-thumb img {
    min-height: 110px;
  }
  .lc-news-compact .lc-news-meta {
    padding: 10px 12px 12px;
  }
}

.lc-card-excerpt {
  margin: 6px 0 0;
  font-family: var(--menu-family);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lc-section-more {
  margin-top: 8px;
}

.lc-news-featured .is-lead h3 {
  font-size: 1.05rem;
}

.lc-news-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 88px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.lc-news-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.lc-thumb {
  background: #e4e7ec;
  min-height: 92px;
}
.lc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 92px;
}
.lc-news-meta {
  padding: 10px 10px 10px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.lc-cat {
  font-family: var(--cat-family);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--g-color);
  margin-bottom: 4px;
}
.lc-news-meta h3 {
  margin: 0;
  font-family: var(--heading-family);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar ads — same AMB slots as home real */
.lc-ads-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.lc-ads-label {
  margin: 0;
  font-family: var(--meta-family);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  text-align: center;
}
.lc-ad-slot {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.lc-ad-slot .ad-script {
  width: 100%;
  text-align: center;
  line-height: 0;
}
.lc-ad-slot img,
.lc-ad-slot iframe {
  max-width: 100% !important;
  height: auto !important;
  margin: 0 auto;
}

/* On mobile, keep sponsors visible early: order after hero via flex on layout */
@media (max-width: 959px) {
  .lc-layout {
    display: flex;
    flex-direction: column;
  }
  .lc-col-main {
    display: contents;
  }
  .lc-hero-card {
    order: 1;
  }
  .lc-col-side {
    order: 2;
  }
  .lc-col-main .lc-section {
    order: 3;
  }
}

/* Side panel */
.lc-side-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.lc-side-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.lc-side-list li {
  border-bottom: 1px solid var(--line);
}
.lc-side-list a {
  display: block;
  padding: 12px 0;
}
.lc-side-title {
  display: block;
  font-family: var(--heading-family);
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.3;
  margin-top: 2px;
}
.lc-side-list a:hover .lc-side-title { color: var(--g-color); }

/* CTA */
.lc-cta {
  background: linear-gradient(135deg, var(--g-color) 0%, #005a91 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.lc-cta h2 {
  margin: 0 0 6px;
  font-family: var(--heading-family);
  font-weight: 900;
  font-size: 1.25rem;
}
.lc-cta p {
  margin: 0 0 14px;
  font-family: var(--menu-family);
  font-weight: 600;
  opacity: 0.95;
}
.lc-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 16px;
  border-radius: 4px;
  font-family: var(--btn-family);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}
.lc-btn-light {
  background: #fff;
  color: var(--g-color);
}
.lc-btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.65);
}
.lc-btn-ghost {
  background: transparent;
  color: var(--g-color);
  border-color: var(--g-color);
}
.lc-btn-block { width: 100%; }

/* Comercios */
.lc-com-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .lc-com-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .lc-com-grid { grid-template-columns: repeat(3, 1fr); }
}
.lc-com-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.lc-com-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.lc-com-media {
  aspect-ratio: 16/9;
  background: #e4e7ec;
}
.lc-com-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lc-com-body { padding: 12px 14px 14px; }
.lc-com-body h3 {
  margin: 0 0 6px;
  font-family: var(--heading-family);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.25;
}
.lc-com-body p {
  margin: 0;
  font-family: var(--menu-family);
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.35;
}

/* PWA install banner */
.lc-install {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--dark-accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px;
  margin: 8px 0 20px;
}
.lc-install p {
  margin: 4px 0 0;
  font-family: var(--menu-family);
  font-size: 0.9rem;
  opacity: 0.9;
}
.lc-install .lc-icon-btn {
  margin-left: auto;
}

/* Footer */
.lc-foot {
  text-align: center;
  color: var(--muted);
  font-family: var(--meta-family);
  font-size: 12px;
  padding: 18px 0 8px;
}
.lc-foot a { color: var(--g-color); font-weight: 700; }

/* Bottom nav — mobile only */
.lc-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.lc-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--menu-family);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
  min-height: var(--nav-h);
}
.lc-bottom-nav a.is-active { color: var(--g-color); }

@media (min-width: 900px) {
  .lc-bottom-nav { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lc-news-card,
  .lc-com-card { transition: none; }
}

/* Wide desktop polish */
@media (min-width: 1200px) {
  .lc-shell { width: min(100% - 48px, var(--shell)); }
  .lc-hero-body { padding: 24px 28px; }
}
