/* Regiones cafeteras: cuadrícula (services.html) y página de región (service-details.html?region=…) */

/* Variables que usan las tarjetas de historias (origen.css) */
.rg { --cf-line: rgba(55, 72, 54, 0.12); --cf-muted: rgba(55, 72, 54, 0.62); display: block; background: var(--white-color); color: var(--heading-color); }
.rg [hidden] { display: none !important; }

/* ---------- Tarjeta de región ---------- */
.rg_grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.rg_others { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.rg_cup.rg_cup_single { grid-template-columns: 1fr; }
.rg_card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 420px; padding: 22px; border-radius: 22px; overflow: hidden; color: #fff; text-decoration: none; isolation: isolate;
}
.rg_others .rg_card { min-height: 300px; padding: 18px; }
.rg_card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.rg_card_shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 28, 19, .15) 0%, rgba(20, 28, 19, .25) 40%, rgba(20, 28, 19, .9) 100%); }
.rg_card:hover img { transform: scale(1.06); }
.rg_card:hover { color: #fff; }
.rg_card_top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rg_tag { padding: 5px 12px; border-radius: 30px; background: rgba(249, 251, 243, .92); color: var(--heading-color); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.rg_card_arrow { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--heading-color); transition: transform .3s; }
.rg_card:hover .rg_card_arrow { transform: rotate(45deg); background: var(--copper-color); color: #fff; }
.rg_card_body { display: flex; flex-direction: column; gap: 6px; }
.rg_card_alt { font-size: 12px; font-weight: 600; letter-spacing: .5px; color: #e0a877; }
.rg_card_alt i { margin-right: 4px; }
.rg_card strong { font-family: var(--heading-font); font-size: 34px; line-height: 1.05; font-weight: 700; text-transform: uppercase; }
.rg_others .rg_card strong { font-size: 24px; }
.rg_card_tag { font-size: 15px; line-height: 1.4; color: rgba(255, 255, 255, .88); }
.rg_card_notes { font-size: 13px; color: rgba(255, 255, 255, .7); }
.rg_card_count { align-self: flex-start; margin-top: 6px; padding: 4px 10px; border-radius: 20px; background: var(--copper-color); font-size: 12px; font-weight: 700; }
.rg_others .rg_card_tag, .rg_others .rg_card_notes { display: none; }

/* ---------- Portada de región ---------- */
.rg_hero { position: relative; min-height: 640px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; isolation: isolate; }
.rg_hero_short { min-height: 460px; }
.rg_hero_bg { position: absolute; inset: 0; z-index: -2; background: #2a3829 center / cover no-repeat; transform: scale(1.05); animation: rgZoom 16s ease-out forwards; }
.rg_hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 28, 19, .55) 0%, rgba(20, 28, 19, .25) 40%, rgba(20, 28, 19, .9) 100%); }
.rg_hero_in { padding-top: 180px; padding-bottom: 56px; }
.rg_crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, .75); }
.rg_crumbs a { color: rgba(255, 255, 255, .8); }
.rg_crumbs a:hover { color: #fff; }
.rg_crumbs [aria-current] { color: #fff; font-weight: 600; }
.rg_kicker { display: inline-block; margin: 22px 0 10px; padding: 6px 14px; border-radius: 30px; background: rgba(176, 112, 60, .92); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.rg_hero h1 { color: #fff; font-size: clamp(44px, 7.5vw, 110px); line-height: .95; font-weight: 700; text-transform: uppercase; margin: 0 0 12px; letter-spacing: -.01em; }
.rg_hero_short h1 { font-size: clamp(40px, 6vw, 76px); }
.rg_lead { font-size: clamp(18px, 2vw, 24px); color: rgba(255, 255, 255, .9); max-width: 720px; margin: 0 0 30px; }
.rg_stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .25); }
.rg_stats li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 20px 18px 0 0; }
.rg_stats i { grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #e0a877; }
.rg_stats span { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255, 255, 255, .65); }
.rg_stats strong { font-size: 15px; line-height: 1.3; font-weight: 600; }

/* ---------- Secciones ---------- */
.rg_section { padding: 96px 0; }
.rg_section_alt { background: #eef2ea; }
.rg_eyebrow { display: inline-block; margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--copper-color); }
.rg_eyebrow_light { color: #e0a877; }
.rg_title { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.05; font-weight: 700; text-transform: uppercase; color: var(--heading-color); margin: 0; }
.rg_title_sm { font-size: clamp(28px, 3vw, 40px); margin-bottom: 20px; }
.rg_head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 40px; margin-bottom: 40px; }
.rg_small { font-size: 13px; color: var(--body-color); margin: 14px 0 0; }

.rg_intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 60px; align-items: start; margin-bottom: 56px; }
.rg_intro_text p { font-size: 19px; line-height: 1.8; color: var(--heading-color); margin: 0 0 20px; }
.rg_first::first-letter { float: left; font-family: var(--heading-font); font-size: 76px; line-height: .8; font-weight: 700; margin: 8px 12px 0 0; color: var(--copper-color); }
.rg_highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rg_highlight { padding: 28px; border-radius: 20px; background: #fff; border: 1px solid rgba(55, 72, 54, .1); transition: transform .3s, box-shadow .3s; }
.rg_highlight:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(34, 45, 33, .35); }
.rg_hl_icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--heading-color); color: #fff; font-size: 20px; margin-bottom: 18px; }
.rg_highlight h3 { font-size: 20px; margin: 0 0 8px; color: var(--heading-color); }
.rg_highlight p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--body-color); }

.rg_cup { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: stretch; }
.rg_cup_card { padding: 36px; border-radius: 22px; background: var(--heading-color); color: #fff; }
.rg_cup_card .rg_title { color: #fff; }
.rg_cup_card .rg_small { color: rgba(255, 255, 255, .6); }
.rg_notes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.rg_notes li { padding: 7px 14px; border-radius: 30px; background: rgba(255, 255, 255, .12); font-size: 14px; font-weight: 600; }
.rg_bar { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 14px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.rg_bar_track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.rg_bar_track i { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .15); }
.rg_bar_track i.is_on { background: #e0a877; }
.rg_facts { margin: 0; padding: 12px 32px; border-radius: 22px; background: #fff; border: 1px solid rgba(55, 72, 54, .1); }
.rg_facts div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px dashed rgba(55, 72, 54, .16); }
.rg_facts div:last-child { border-bottom: 0; }
.rg_facts dt { font-size: 14px; font-weight: 600; color: var(--body-color); }
.rg_facts dt i { width: 20px; color: var(--copper-color); }
.rg_facts dd { margin: 0; font-size: 16px; font-weight: 600; color: var(--heading-color); }
.rg_towns { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rg_towns li { padding: 4px 12px; border-radius: 20px; background: #eef2ea; font-size: 14px; }

.rg_products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 24px; }
.rg_empty { grid-column: 1 / -1; display: flex; gap: 20px; align-items: flex-start; padding: 32px; border-radius: 20px; border: 1px dashed rgba(55, 72, 54, .25); }
.rg_empty > i { font-size: 34px; color: var(--copper-color); }
.rg_empty strong { display: block; font-size: 18px; color: var(--heading-color); margin-bottom: 4px; }
.rg_empty p { margin: 0 0 16px; color: var(--body-color); }

.rg_cta { padding: 80px 0; background: var(--heading-color) url('../img/cta_bg_2.png') center / cover; position: relative; isolation: isolate; color: #fff; }
.rg_cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(28, 37, 27, .82); }
.rg_cta_in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.rg_cta h2 { color: #fff; font-size: clamp(28px, 3.6vw, 46px); margin: 0 0 8px; text-transform: uppercase; }
.rg_cta p { color: rgba(255, 255, 255, .8); margin: 0; max-width: 560px; }
.rg_cta_btns { display: flex; flex-wrap: wrap; gap: 12px; }

@keyframes rgZoom { to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .rg_hero_bg { animation: none; transform: none; } .rg_card img { transition: none; } }
@media (max-width: 1199px) {
  .rg_products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rg_others { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .rg_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rg_intro, .rg_cup { grid-template-columns: 1fr; gap: 28px; }
  .rg_highlights { grid-template-columns: 1fr; }
  .rg_stats { grid-template-columns: 1fr 1fr; row-gap: 6px; }
  .rg_facts div { grid-template-columns: 1fr; gap: 6px; }
  .rg_section { padding: 70px 0; }
}
@media (max-width: 575px) {
  .rg_grid, .rg_others { grid-template-columns: 1fr; }
  .rg_products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .rg_hero { min-height: 560px; }
  .rg_hero_in { padding-top: 140px; padding-bottom: 36px; }
  .rg_stats { grid-template-columns: 1fr; }
  .rg_cup_card, .rg_facts { padding: 24px 20px; }
  .rg_intro_text p { font-size: 17px; }
}

/* Región sin café (insular): guía de café en clima cálido */
.rg_guide_lead { max-width: 640px; margin: -8px 0 28px; font-size: 17px; line-height: 1.6; }
.rg_highlight { position: relative; }
.rg_guide_num { position: absolute; top: 30px; right: 28px; font-size: 13px; font-weight: 700; letter-spacing: 2px; color: rgba(55, 72, 54, .35); }
.rg_guide_tip { display: flex; gap: 12px; align-items: flex-start; margin: 28px 0 0; padding: 18px 22px; border-radius: 16px; background: #f4ece0; color: var(--heading-color); font-size: 15px; }
.rg_guide_tip i { margin-top: 3px; color: var(--copper-color); }
.rg_guide_tip a { font-weight: 700; color: var(--copper-color); white-space: nowrap; }
