/*
Theme Name: RMC Comunidad
Theme URI: https://vivermc.cl/
Author: RMC
Description: A lightweight, responsive community landing page for RMC.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: rmc-theme
*/

:root { --hero-height: clamp(470px, 46vw, 570px); --rmc-ink: #064c5b; --rmc-deep: #043b49; --rmc-muted: #58757a; --rmc-turquoise: #08b9b0; --rmc-paper: #fff; --rmc-warm: #fbfbf7; --rmc-line: #dbe6e3; --rmc-radius: 12px; --rmc-script: 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive; --rmc-sans: Arial, Helvetica, sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--rmc-warm); color: var(--rmc-ink); font-family: var(--rmc-sans); line-height: 1.45; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--rmc-turquoise); outline-offset: 3px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.container { width: min(1160px, calc(100% - 34px)); margin-inline: auto; }
.eyebrow { color: var(--rmc-turquoise); font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.display { font-family: var(--rmc-script); font-weight: 400; }
.button { align-items: center; background: var(--rmc-turquoise); border-radius: 999px; color: #fff; display: inline-flex; font-size: .76rem; font-weight: 700; gap: 12px; padding: 11px 20px; transition: background .2s ease, transform .2s ease; }
.whatsapp-icon { flex: 0 0 auto; height: 1.15em; width: 1.15em; }
.button:hover { background: #078e8c; transform: translateY(-1px); }
.button--outline { background: transparent; border: 1px solid var(--rmc-ink); color: var(--rmc-ink); }

.site-header { color: #fff; height: var(--hero-height); position: absolute; top: 0; width: 100%; z-index: 5; }
.site-header__inner, .site-header__hero-row { height: 100%; position: relative; }
.site-header__hero-row { padding-top: 34px; }
.brand { display: inline-flex; flex-direction: column; }
.brand__logo { display: block; flex: 0 0 auto; height: auto; max-height: 96px; max-width: 100%; object-fit: contain; width: clamp(150px, 18vw, 180px); }
.brand__mark { font-family: var(--rmc-script); font-size: 2.75rem; font-weight: 700; letter-spacing: -.12em; line-height: .8; }
.brand__mark span { font-family: Arial, sans-serif; font-size: .88em; font-weight: 400; letter-spacing: -.2em; }
.brand__tagline { font-size: .57rem; font-weight: 700; letter-spacing: .22em; margin-top: 13px; text-transform: uppercase; }
.site-header__nav-row { background: rgba(255, 255, 255, .98); color: var(--rmc-ink); left: 0; position: absolute; top: var(--hero-height); width: 100%; }
.site-header__nav-inner { align-items: center; display: flex; min-height: 58px; justify-content: flex-end; }
.site-header nav { margin-right: 26px; }
.primary-menu { align-items: center; display: flex; gap: 27px; list-style: none; margin: 0; padding: 0; }
.primary-menu a { font-size: .63rem; font-weight: 700; }
.primary-menu a:hover { color: var(--rmc-turquoise); }
.header-cta { background: var(--rmc-deep); font-size: .62rem; padding: 9px 17px; }
.menu-toggle { display: none; }

.hero { background: var(--rmc-deep); color: #fff; height: var(--hero-height); overflow: hidden; position: relative; }
.hero__image { height: 100%; inset: 0; max-width: none; object-fit: cover; object-position: center; position: absolute; width: 100%; }
.hero::after { background: linear-gradient(90deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .42) 32%, transparent 62%), linear-gradient(0deg, rgba(0, 0, 0, .16), transparent 38%); content: ''; inset: 0; position: absolute; }
.hero__content { align-items: center; display: flex; height: 100%; position: relative; z-index: 1; }
.hero__content-inner { max-width: 360px; padding-top: 26px; }
.hero h1 { font-size: clamp(2.7rem, 5vw, 4.9rem); letter-spacing: -.075em; line-height: .91; margin: 0 0 24px; }
.hero__title-accent { display: inline-block; font-family: var(--rmc-script); font-size: .83em; font-weight: 400; letter-spacing: -.1em; transform: rotate(-4deg); }
.hero__copy { color: rgba(255, 255, 255, .95); font-size: .88rem; line-height: 1.35; margin: 0 0 21px; max-width: 330px; }

.dashboard { display: grid; gap: 22px; grid-template-columns: 1.571fr 1fr 1fr; padding-bottom: 27px; padding-top: 76px; }
.panel { background: var(--rmc-paper); border: 1px solid var(--rmc-line); border-radius: var(--rmc-radius); overflow: hidden; }
.encounter-panel { display: block; min-height: 0; }
.panel__image-wrap { aspect-ratio: 16 / 9; min-height: 0; overflow: hidden; }
.panel__image-wrap img { height: 100%; object-fit: cover; object-position: 48% center; width: 100%; }
.panel__copy { align-self: center; padding: 28px 25px; }
.panel h2 { font-size: clamp(1.45rem, 2.3vw, 2.2rem); letter-spacing: -.07em; line-height: .98; margin: 10px 0 17px; }
.panel__copy h2 .display { display: inline; font-size: 1.15em; }
.panel p { color: var(--rmc-muted); font-size: .74rem; line-height: 1.45; }
.panel__copy p { margin: 0 0 23px; }
.panel__copy .button { font-size: .67rem; padding: 8px 15px; }
.social-panel { padding: 13px 13px 16px; }
.instagram-embed { min-width: 0; overflow: hidden; width: 100%; }
.instagram-media { background: var(--rmc-warm); border: 0 !important; margin: 0 auto !important; max-width: 540px !important; min-width: 0 !important; padding: 0 !important; width: 100% !important; }
.instagram-media iframe { max-width: 100%; width: 100% !important; }
.social-actions { color: var(--rmc-ink); font-size: 1.05rem; letter-spacing: .06em; }
.social-panel__copy p { color: var(--rmc-ink); font-size: .72rem; margin: 5px 0 4px; }
.social-panel__copy small { color: var(--rmc-muted); font-size: .62rem; }
.stories-panel { padding: 13px; }
.stories-panel h2 { border-bottom: 1px solid var(--rmc-line); font-size: .8rem; letter-spacing: -.02em; margin: 0 0 11px; padding-bottom: 10px; }
.stories-panel__stories { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.stories-panel__stories > div, .stories-panel__stories > a { aspect-ratio: .63 / 1; border-radius: 8px; overflow: hidden; position: relative; }
.stories-panel__stories img { height: 100%; object-fit: cover; object-position: 50% center; width: 100%; }
.stories-panel__stories > div::after, .stories-panel__stories > a::after { background: linear-gradient(transparent 45%, rgba(0, 35, 43, .75)); content: ''; inset: 0; position: absolute; }
.stories-panel__stories span { bottom: 10px; color: #fff; font-family: var(--rmc-script); font-size: .7rem; left: 7px; line-height: 1.1; position: absolute; z-index: 1; }
.reel { align-items: center; border-top: 1px solid var(--rmc-line); display: grid; gap: 12px; grid-template-columns: 105px 1fr; margin-top: 14px; padding-top: 14px; }
.reel img { aspect-ratio: 1.12 / 1; height: 82px; object-fit: cover; object-position: center; width: 105px; }
.reel small { color: var(--rmc-muted); font-size: .58rem; }
.reel h3 { font-size: .87rem; font-weight: 400; letter-spacing: -.04em; line-height: 1; margin: 5px 0 8px; }
.reel p { color: var(--rmc-ink); font-size: .68rem; font-weight: 700; margin: 0; }

.values { padding: 0 0 84px; }
.values__grid { border-bottom: 1px solid var(--rmc-line); border-top: 1px solid var(--rmc-line); display: grid; grid-template-columns: repeat(4, 1fr); }
.value { padding: 25px 15px 23px; text-align: center; }
.value + .value { border-left: 1px solid var(--rmc-line); }
.value__icon { color: var(--rmc-ink); font-size: 2rem; line-height: 1; }
.value h3 { font-size: .88rem; margin: 12px 0 3px; }
.value p { color: var(--rmc-muted); font-size: .68rem; margin: 0; }
.testimonial { padding: 0 0 84px; }
.testimonial__grid { align-items: center; display: grid; gap: 62px; grid-template-columns: .78fr 1.22fr; }
.testimonial h2 { font-size: clamp(2.15rem, 4vw, 3.7rem); letter-spacing: -.075em; line-height: .94; margin: 12px 0 0; }
.testimonial__content { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.testimonial-card { background: #fff; border: 1px solid var(--rmc-line); border-radius: var(--rmc-radius); overflow: hidden; }
.testimonial-card > img { aspect-ratio: 1.35 / 1; object-fit: cover; width: 100%; }
.testimonial-card blockquote { margin: 0; padding: 18px 19px 20px; }
.testimonial-card blockquote p { color: var(--rmc-ink); font-family: Georgia, serif; font-size: clamp(1.05rem, 1.5vw, 1.35rem); font-style: italic; line-height: 1.18; margin: 0 0 17px; }
.testimonial-card cite { color: var(--rmc-muted); display: flex; flex-wrap: wrap; font-size: .66rem; font-style: normal; font-weight: 700; gap: 5px 10px; justify-content: space-between; }
.testimonial-card time { font-weight: 400; }
.contact { background: var(--rmc-turquoise); color: #fff; padding: 65px 0; }
.contact__inner { align-items: center; display: flex; justify-content: space-between; gap: 30px; }
.contact .eyebrow { color: #d8fffb; }
.contact h2 { font-size: clamp(2.25rem, 4.7vw, 4.6rem); letter-spacing: -.08em; line-height: .9; margin: 10px 0 0; }
.button--light { background: #fff; color: var(--rmc-ink); }
.site-footer { background: var(--rmc-deep); color: #fff; padding: 38px 0 20px; }
.site-footer__top { align-items: start; display: flex; justify-content: space-between; }
.site-footer .brand__mark { color: #fff; }
.site-footer .brand__tagline { color: #b6d5d2; }
.site-footer__links { display: flex; gap: 21px; list-style: none; margin: 0; padding: 0; }
.site-footer__links a { color: #c5dcda; font-size: .68rem; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .16); color: #9ebdbb; font-size: .62rem; margin-top: 30px; padding-top: 14px; }
.site-footer__bottom p { margin: 0; }
.entry-content { margin: 70px auto; max-width: 800px; }
.entry-content img { border-radius: var(--rmc-radius); }
@media (max-width: 950px) {
    .dashboard { grid-template-columns: 1.15fr .85fr; }
    .encounter-panel { grid-row: span 2; }
    .stories-panel { grid-column: 2; }
}
@media (max-width: 700px) {
    :root { --hero-height: 620px; }
    .site-header { height: var(--hero-height); }
    .site-header__hero-row { padding-top: 24px; }
    .site-header__nav-row { top: var(--hero-height); }
    .site-header__nav-inner { justify-content: space-between; min-height: 54px; }
    .menu-toggle { background: transparent; border: 0; color: var(--rmc-ink); display: block; font-size: 1.25rem; padding: 4px; }
    .site-header nav { margin: 0; }
    .primary-menu { background: #fff; display: none; flex-direction: column; gap: 17px; left: 0; padding: 20px; position: absolute; right: 0; top: 54px; }
    .primary-menu.is-open { display: flex; }
    .header-cta { font-size: .59rem; padding: 8px 13px; }
    .hero__image { object-position: 59% center; }
    .hero::after { background: linear-gradient(90deg, rgba(0, 0, 0, .76), rgba(0, 0, 0, .22) 62%, transparent), linear-gradient(0deg, rgba(0, 0, 0, .3), transparent 55%); }
    .hero__content { align-items: end; padding-bottom: 52px; }
    .hero__content-inner { max-width: 335px; }
    .dashboard { display: block; padding-top: 69px; }
    .panel { margin-bottom: 18px; }
    .encounter-panel { display: block; }
    .panel__image-wrap { aspect-ratio: auto; min-height: 290px; }
    .encounter-panel .panel__image-wrap { aspect-ratio: 1 / 1; min-height: 0; }
    .encounter-panel .panel__image-wrap img { height: 100%; object-fit: cover; width: 100%; }
    .encounter-panel .panel__copy { padding: 18px 20px 20px; }
    .instagram-media { max-width: 100% !important; }
    .stories-panel { display: block; }
    .reel img { height: 94px; width: 120px; }
    .reel { grid-template-columns: 120px 1fr; }
    .values { padding-bottom: 66px; }
    .testimonial__grid { display: block; }
    .testimonial__grid > div:first-child { margin-bottom: 28px; }
    .testimonial__content { display: block; }
    .testimonial-card + .testimonial-card { margin-top: 18px; }
    .contact__inner, .site-footer__top { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 440px) {
    .container { width: calc(100% - 28px); }
    .brand__mark { font-size: 2.35rem; }
    .hero h1 { font-size: 3.1rem; }
    .values__grid { grid-template-columns: repeat(2, 1fr); }
    .value:nth-child(3) { border-left: 0; border-top: 1px solid var(--rmc-line); }
    .value:nth-child(4) { border-top: 1px solid var(--rmc-line); }
    .site-footer__links { flex-wrap: wrap; }
}
