
/* ========================================
   VARIABLES Y RESET
======================================== */
:root {
  --paper: #fde6ce;
  --paper-deep: #EAE2D2;
  --ink: #1A1714;
  --ink-soft: #3A352F;
  --copper: #A8472E;
  --copper-deep: #7E3320;
  --bottle: #13503D;
  --stone: #6B6358;
  --hairline: rgba(26, 23, 20, 0.16);
  --hairline-strong: rgba(26, 23, 20, 0.32);

  --display: "Fraunces", serif;
  --body: "Inter", sans-serif;
  --mono: "JetBrains Mono", monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ========================================
   UTILITY
======================================== */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-deep);
  font-weight: 500;
}

.hairline {
  border: none;
  border-top: 1px solid var(--hairline);
}

.visually-hidden {
  position: absolute;
  left: -9999px;
}

/* ========================================
   TOP BAR
======================================== */
.topbar {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11.5px;
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
}

.topbar-date {
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.topbar-links {
  display: flex;
  gap: 24px;
}

.topbar-links a {
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.topbar-links a:hover {
  opacity: 1;
}

/* ========================================
   MASTHEAD
======================================== */
.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--hairline-strong);
}

.masthead .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px 32px 22px;
  gap: 16px;
}

.masthead-meta {
  justify-content: center;
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  position: relative;
}

.logo .the {
  font-size: 0.32em;
  font-weight: 500;
  font-style: italic;
  display: block;
  letter-spacing: 0.08em;
  color: var(--copper-deep);
  margin-bottom: -6px;
}

.masthead-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  background: none;
}

.icon-btn:hover {
  background: var(--paper-deep);
  border-color: var(--ink);
}

.subscribe-btn {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s ease;
}

.subscribe-btn:hover {
  background: var(--copper-deep);
}

/* ========================================
   MAIN NAV
======================================== */
.mainnav {
  background: var(--paper);
  border-bottom: 1px solid var(--hairline-strong);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.mainnav .wrap {
  display: flex;
  align-items: center;
  gap: 30px;
  height: 50px;
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: space-around;
}

.mainnav .wrap::-webkit-scrollbar {
  display: none;
}

.mainnav a {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.mainnav a.active {
  color: var(--copper-deep);
}

.mainnav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--copper);
  transform: scaleX(0);
  transition: transform 0.2s ease;
  transform-origin: left;
}

.mainnav a:hover::after,
.mainnav a.active::after {
  transform: scaleX(1);
}

/* ========================================
   TICKER
======================================== */
.ticker {
  background: var(--ink);
  border-bottom: 1px solid rgba(242, 236, 226, 0.12);
  overflow: hidden;
  position: relative;
}

.ticker::before,
.ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--ink), transparent);
}

.ticker::after {
  right: 0;
  background: linear-gradient(270deg, var(--ink), transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: scroll-ticker 30s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes scroll-ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.ticker-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--paper);
  border-right: 1px solid rgba(242, 236, 226, 0.1);
  white-space: nowrap;
}

.ticker-sym {
  font-weight: 500;
  color: rgba(242, 236, 226, 0.6);
}

.ticker-val {
  font-weight: 500;
}

.ticker-up {
  color: #5FBF9A;
}

.ticker-down {
  color: #E08070;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}

/* ========================================
   LEAD STORY
======================================== */
.lead-section {
  padding: 48px 0 56px;
  border-bottom: 1px solid var(--hairline-strong);
}

.lead-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
}

.lead-main a.headline-link {
  display: block;
}

.lead-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--copper-deep);
  padding: 4px 10px;
  margin-bottom: 18px;
}

.lead-headline {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
}

.lead-dek {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 20px;
}

.byline {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--stone);
  letter-spacing: 0.02em;
}

.lead-image {
  margin-top: 28px;
  aspect-ratio: 16/9.5;
  background: linear-gradient(135deg, #3A352F, #1A1714);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.lead-image svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.side-story {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}

.side-story:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.side-kicker {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase; /* Esto convierte automáticamente cualquier texto (venga como venga) a MAYÚSCULAS */
  color: var(--bottle);
  display: block;
  margin-bottom: 8px;
}

.side-headline {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.28;
  margin-bottom: 6px;
  transition: color 0.15s ease;
}

.side-story a:hover .side-headline {
  color: var(--copper-deep);
}

.side-meta {
  font-size: 12.5px;
  color: var(--stone);
}

/* ========================================
   SECTION HEADER
======================================== */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.01em;
}

.section-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--copper-deep);
  font-weight: 500;
}

.section-link:hover {
  text-decoration: underline;
}

/* ========================================
   MARKETS GRID
======================================== */
.markets-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--hairline-strong);
}

.markets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline-strong);
  border: 1px solid var(--hairline-strong);
}

.market-card {
  background: var(--paper);
  padding: 24px;
}

.market-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.market-value {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.market-change {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.market-change.up {
  color: var(--bottle);
}

.market-change.down {
  color: var(--copper-deep);
}

.spark {
  display: block;
  margin-top: 14px;
  width: 100%;
  height: 36px;
}

/* ========================================
   NEWS GRID
======================================== */
.news-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--hairline-strong);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.news-grid.with-dividers>* {
  position: relative;
}

.news-grid.with-dividers>*:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--hairline);
}

.article-card {
  display: flex;
  flex-direction: column;
}

.article-thumb {
  width: 100%;
  aspect-ratio: 4/2.7;
  margin-bottom: 16px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--paper-deep);
}

.article-thumb svg {
  width: 100%;
  height: 100%;
}

.article-section-tag {
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: 8px;
  display: block;
}

.article-headline {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.28;
  margin-bottom: 10px;
}

.article-card:hover .article-headline {
  color: var(--copper-deep);
}

.article-dek {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 12px;
  flex-grow: 1;
}

.article-meta {
  font-size: 12px;
  color: var(--stone);
  font-family: var(--mono);
}

/* ========================================
   OPINION
======================================== */
.opinion-section {
  padding: 56px 0;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--hairline-strong);
}

.opinion-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr 1fr;
  gap: 0;
  border: 1px solid var(--hairline-strong);
}

.opinion-feature {
  padding: 36px;
  border-right: 1px solid var(--hairline-strong);
}

.quote-mark {
  font-family: var(--display);
  font-size: 34px;
  line-height: 0.6;
  color: var(--copper);
  font-style: italic;
  margin-bottom: 4px;
}

.quote-mark-close {
  font-family: var(--display);
  font-size: 34px;
  font-style: italic;
  color: var(--copper);
  line-height: 0;
  vertical-align: -9px;
  margin-left: 2px;
  display: inline-block;
}

.opinion-feature .article-headline {
  font-size: 25px;
}

.opinion-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
  background-position: center 20%;
}

.author-name {
  font-size: 13px;
  font-weight: 600;
}

.author-role {
  font-size: 11.5px;
  color: var(--stone);
}

.opinion-list {
  display: flex;
  flex-direction: column;
}

.opinion-list-item {
  padding: 22px 32px;
}

.opinion-list-item:last-child {
  border-bottom: none;
}

.opinion-list .article-headline {
  font-size: 17px;
  margin-bottom: 4px;
}

/* ========================================
   AGENDA ECONÓMICA
======================================== */
.agenda-economica {
  border-left: 1px solid var(--hairline-strong);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
}

.agenda-title {
  font-size: 20px;
  margin-bottom: 14px;
}

.agenda-subhead {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--stone);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 4px;
}

.agenda-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}

.agenda-item:last-of-type {
  border-bottom: none;
}

.agenda-fecha {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  min-width: 34px;
  flex-shrink: 0;
}

.agenda-dia {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  color: var(--copper);
}

.agenda-mes {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--copper);
  margin-top: 2px;
}

.agenda-evento {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.agenda-evento a {
  color: var(--ink);
  text-decoration: none;
}

.agenda-evento a:hover {
  text-decoration: underline;
}

.agenda-empty {
  font-size: 13px;
  color: var(--stone);
  padding: 14px 0;
}

.agenda-link {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--copper);
  text-decoration: underline;
}

/* ========================================
   AGENDA ECONÓMICA — PÁGINA COMPLETA
======================================== */
.agenda-full-grid {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline-strong);
}

.agenda-full-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--hairline);
}

.agenda-full-item:last-child {
  border-bottom: none;
}

.agenda-fecha-lg {
  min-width: 64px;
}

.agenda-fecha-lg .agenda-dia {
  font-size: 30px;
}

.agenda-fecha-lg .agenda-mes {
  font-size: 11px;
}

.agenda-full-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agenda-full-categoria {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--copper);
}

.agenda-full-titulo {
  font-size: 17px;
  font-weight: 600;
}

.agenda-full-titulo a {
  color: var(--ink);
  text-decoration: none;
}

.agenda-full-titulo a:hover {
  text-decoration: underline;
}

/* ========================================
   BANNER
======================================== */
.banner-section {
  padding: 56px 0;
  background: linear-gradient(90deg, #0B0B0A 0%, #0A0D0B 45%, #08100C 100%);
}

.banner-frame {
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 1881 / 790;
}

.banner-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}


/* ========================================
   FOOTER
======================================== */
footer {
  background: var(--paper);
  padding: 80px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 52px;
}

.footer-logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 32px;
  margin-bottom: 16px;
  margin-right: 40px;
}

.footer-tagline {
  font-size: 15px;
  color: var(--stone);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col-title {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  font-size: 16px;
  color: var(--ink-soft);
  margin-bottom: 14px;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--copper-deep);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 14px;
  color: var(--stone);
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--bottle);
  transition: background 0.2s ease, transform 0.2s ease;
}

.footer-socials a svg {
  width: 22px;
  height: 22px;
}

.footer-socials a:hover {
  background: var(--copper);
  transform: translateY(-2px);
}
/* ========================================
   FOOTER SIMPLE (páginas secundarias sin columnas)
======================================== */
footer.footer-simple {
  padding: 64px 0;
}

footer.footer-simple .footer-bottom {
  justify-content: center;
  text-align: center;
  font-size: 17px;
  font-weight: 500;
  padding-top: 0;
}

@media (max-width: 640px) {
  footer.footer-simple {
    padding: 48px 0;
  }

  footer.footer-simple .footer-bottom {
    font-size: 15px;
  }
}

/* ========================================
   FOCUS STATES
======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 980px) {
  .lead-grid {
    grid-template-columns: 1fr;
  }

  .markets-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-grid.with-dividers>*:nth-child(2)::before {
    display: none;
  }

  .opinion-grid {
    grid-template-columns: 1fr;
  }

  .opinion-feature {
    border-right: none;
    border-bottom: 1px solid var(--hairline-strong);
  }


}

@media (max-width: 640px) {
  .wrap {
    padding: 0 18px;
  }

  .masthead .wrap {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 14px;
  }

  .masthead-meta {
    order: 2;
    display: flex;
    flex-direction: column; /* Alinea el contenido en vertical si hubiera más de un elemento */
    align-items: center;    /* Centra el widget horizontalmente en el eje de flexbox */
    justify-content: center;
    width: 100%;
  }

  .masthead-right {
    justify-content: center;
  }

  .markets-grid {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-grid.with-dividers>*::before {
    display: none;
  }



  .topbar .wrap {
    font-size: 10px;
  }

  .topbar-links {
    gap: 14px;
  }

  .reloj-cabecera {
    margin-right: 30px;
    scale: 0.9;
  }

  .widget {
    display: none;
  }
}

/* ========================================
   COMPANIES SECTION
======================================== */
.companies-section {
  padding: 1px 0;
}

/* --- FILAS (3 columnas: texto | imagen | texto) --- */
.companies-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 32px;
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--hairline);
}

.companies-row-second {
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--hairline);
}

/* --- Columnas izquierda y derecha --- */
.companies-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.companies-article {
  padding: 12px 0;
}

.companies-article a {
  display: block;
}

.companies-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: 6px;
}

.companies-headline-small {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 6px;
  transition: color 0.15s ease;
}

.companies-article:hover .companies-headline-small {
  color: var(--copper-deep);
}

.companies-dek-small {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.companies-meta-small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--stone);
}

/* --- Columna central: IMAGEN --- */
.companies-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.companies-feature-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 2px;
  overflow: hidden;
  background: var(--paper-deep);
  margin-bottom: 16px;
}

.companies-feature-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.companies-feature-caption {
  text-align: center;
  padding: 0 12px;
}

.companies-tag-center {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: 4px;
}

.companies-headline-center {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.2;
  margin-bottom: 8px;
  transition: color 0.15s ease;
}

.companies-feature-caption:hover .companies-headline-center {
  color: var(--copper-deep);
}

.companies-dek-center {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.companies-meta-center {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--stone);
}

/* --- CARDS GRID (4 columnas) --- */
.companies-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--hairline);
}

.company-mini-card a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.company-mini-thumb {
  flex-shrink: 0;
  width: 90px;
  height: 60px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--paper-deep);
}

.company-mini-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.company-mini-content {
  flex: 1;
  min-width: 0;
}

.companies-tag-micro {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: 4px;
}

.company-mini-headline {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 4px;
  transition: color 0.15s ease;
}

.company-mini-card:hover .company-mini-headline {
  color: var(--copper-deep);
}

.companies-meta-micro {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--stone);
}

/* --- BOTTOM LINKS --- */
.companies-bottom-links {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.companies-bottom-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.companies-bottom-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.company-tag-link {
  font-family: var(--body);
  font-size: 13px;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.company-tag-link:hover {
  color: var(--copper-deep);
}

/* ========================================
   RESPONSIVE - COMPANIES
======================================== */
@media (max-width: 980px) {
  .companies-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .companies-col-center {
    order: -1;
  }

  .companies-feature-thumb {
    max-width: 80%;
  }

  .companies-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .companies-row {
    gap: 16px;
    padding-bottom: 32px;
    margin-bottom: 32px;
  }

  .companies-headline-small {
    font-size: 16px;
  }

  .companies-headline-center {
    font-size: 20px;
  }

  .companies-feature-thumb {
    max-width: 100%;
  }

  .companies-cards-grid {
    grid-template-columns: 1fr;
  }

  .company-mini-card a {
    flex-direction: column;
  }

  .company-mini-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .companies-bottom-links {
    flex-direction: column;
    gap: 12px;
  }

  .companies-bottom-tags {
    gap: 6px 12px;
  }

  .company-tag-link {
    font-size: 12px;
  }
}

/* ========================================
   PÁGINA DE CONTACTO
======================================== */
.contact-wrap {
  max-width: 900px;
}

.contact-intro {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 40px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 32px;
}

.contact-card {
  border: 1px solid var(--hairline-strong);
  background: var(--paper-deep);
  padding: 32px;
}

.contact-card-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  color: var(--ink);
  margin: 4px 0 14px;
}

.contact-card-text {
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.contact-email {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--copper-deep);
  border-bottom: 1px solid var(--copper-deep);
  padding-bottom: 2px;
  transition: opacity 0.15s ease;
}

.contact-email:hover {
  opacity: 0.7;
}

.contact-footnote {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--stone);
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
}

@media (max-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 24px;
  }
}

/* ========================================
   WIDGET DEL CLIMA (PERMANENTE, ENCIMA DEL RELOJ)
======================================== */
.widget#weather-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--stone);
  letter-spacing: 0.02em;
  margin-left: 30px;
}

.weather-icon {
  font-size: 16px;
  line-height: 1;
}

.weather-temp {
  color: var(--copper-deep);
  font-weight: 600;
}

.weather-city {
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--stone);
}

@media (max-width: 640px) {
  .widget#weather-widget {
    margin-left: 0;
    justify-content: center;
  }
}

/* ========================================
   ESTILOS DEL RELOJ DIGITAL
======================================== */
.reloj-cabecera {
  font-family: var(--mono); /* Usa 'JetBrains Mono' que combina perfecto */
  font-size: 20px;
  font-weight: 500;
  color: rgb(53, 72, 133);
  margin-top: 10px;         /* Crea una separación con el widget del clima */
  margin-left: 30px;
  letter-spacing: 0.05em;
  text-align: left;       /* Se alinea al centro en desktop y móvil */
}

/* Separador de espacio de seccion empresa de la seccion de Canal de noticias */
#empresas {
    padding-top: 4rem !important;
}

/* ========================================================
   DISEÑO RESPONSIVE PARA MÓVILES (PANTALLAS PEQUEÑAS)
   ======================================================== */
@media (max-width: 768px) {
  
  /* 1. Ocultamos por completo la fila dinámica completa de las tarjetas miniatura estáticas */
  .companies-cards-grid {
    display: none !important;
  }

  /* 2. De la fila dinámica principal, ocultamos todos los artículos */
  [id$="-columns-container"] > * {
    display: none !important;
  }

  /* 3. Forzamos a que se muestre ÚNICA Y EXCLUSIVAMENTE el del medio (el segundo) */
  [id$="-columns-container"] > *:nth-child(2) {
    display: block !important; /* O 'flex' o 'grid' dependiendo de cómo esté armada tu tarjeta */
  }

}

/* Controla el tamaño del contenedor del logo */
.logo {
    display: flex;
    justify-content: center; /* Centra el logo horizontalmente si tu cabecera es centrada */
    align-items: center;
    padding: 10px 0;         /* Espaciado opcional arriba y abajo */
}

/* Controla las dimensiones de la imagen del logo */
.logo-img {
    max-height: 150px;        /* Limita la altura para que no deforme la cabecera */
    width: auto;             /* Mantiene la proporción original de la imagen */
    display: block;
    object-fit: contain;
}

/* Opcional: Pequeño ajuste para móviles si necesitas que el logo sea más chico */
@media (max-width: 640px) {
    .logo-img {
        max-height: 100px;    /* Altura un poco menor en celulares */
        justify-content: center; /* Asegura que el logo siga centrado */
        width: 100%;
    }
}

/* ========================================================
   MEDIAS QUERIES (CONTROL RESPONSIVO ADAPTABLE)
   ======================================================== */

/* 1. Para Tablets (Pantallas medianas) */
@media (max-width: 992px) {
    .footer-grid {
        /* Pasamos a 2 columnas principales: El logo arriba o al costado, y los enlaces al otro */
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

/* 2. Para Celulares (Pantallas pequeñas) - ¡Aquí se solucionará el descuadre! */
@media (max-width: 640px) {
    .footer-grid {
        /* Todo pasa a ser una sola columna vertical */
        grid-template-columns: 1fr;
        gap: 35px;
        text-align: center; /* Centramos los textos para estética móvil */
    }

    .footer-logo {
        justify-content: center; /* Centra el logo en móviles */
        margin-bottom: 10px;
    }

    .footer-col {
        /* En móviles quitamos la idea de "Fila 1 y Fila 2" y hacemos que fluyan uno abajo del otro */
        row-gap: 16px;
    }

    .footer-bottom {
        flex-direction: column; /* Apila los derechos reservados y las redes sociales en vertical */
        row-gap: 15px;
    }
    
    .footer-socials a {
        margin: 0 10px; /* Espaciado balanceado para tocar con los dedos */
    }
}

/* ========================================
   AUTENTICACIÓN — MODAL DE LOGIN / REGISTRO
======================================== */
.auth-topbar-btn {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  padding: 0;
}

.auth-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 20, 0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.auth-modal-overlay.open {
  display: flex;
}

.auth-modal {
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
  width: 90%;
  max-width: 400px;
  padding: 2rem;
  position: relative;
  font-family: 'Inter', sans-serif;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--stone);
  line-height: 1;
}

.auth-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 1.5rem;
}

.auth-tab {
  background: none;
  border: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 0 0.75rem 0;
  cursor: pointer;
  color: var(--stone);
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: var(--ink);
  border-bottom-color: var(--copper);
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-form.active {
  display: flex;
}

.auth-form input {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--hairline-strong);
  background: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}

.auth-form button[type="submit"] {
  background: var(--copper);
  color: #fff;
  border: none;
  padding: 0.7rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.25rem;
}

.auth-form button[type="submit"]:hover {
  background: var(--copper-deep);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--stone);
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem;
  border: 1px solid var(--hairline-strong);
  background: #fff;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-google-btn:hover {
  background: var(--paper-deep);
}

.auth-error {
  color: #A8472E;
  font-size: 0.85rem;
  min-height: 1.1em;
}

.auth-success {
  color: var(--bottle);
  font-size: 0.85rem;
  min-height: 1.1em;
}

.auth-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-user-chip button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

/* ========================================
   AJUSTES MÓVIL ADICIONALES
======================================== */

/* Icono de WhatsApp alineado con "Ayuda" en el topbar */
.topbar-whatsapp {
  display: flex;
  align-items: center;
}

@media (max-width: 640px) {

  /* Arregla el topbar para que no se rompa cuando el texto es largo */
  .topbar .wrap {
    height: auto;
    min-height: 36px;
    flex-wrap: wrap;
    row-gap: 6px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  /* Comprime un poco el header para que no ocupe media pantalla */
  .masthead .wrap {
    padding: 18px 20px 16px;
  }

  .ticker-track {
    padding: 6px 0;
  }

  /* Indicador visual de que el menú se puede deslizar */
  .mainnav {
    position: sticky;
  }

  .mainnav::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 28px;
    background: linear-gradient(to right, transparent, var(--paper));
    pointer-events: none;
  }

  /* Apila los títulos de sección con su texto/link en vez de apretarlos */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* Footer: 2 columnas en vez de 1 sola, para que no sea tan largo */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-logo {
    grid-column: 1 / -1;
  }
}