/*!
 * CONFRIO S.A.S. — cuartosfrios.info
 * Hoja de estilos principal. Mobile-first, sin dependencias externas
 * (sin Bootstrap / jQuery) para minimizar peso y maximizar rendimiento.
 */

/* ---------- 1. Tokens de diseño ---------- */
:root{
	--color-primary: #0090c9;
	--color-primary-dark: #036389;
	--color-primary-light: #e6f5fb;
	--color-accent: #ff6a00;
	--color-accent-dark: #cc5500;
	--color-ink: #0f2430;
	--color-ink-soft: #44606d;
	--color-bg: #f4f8fa;
	--color-surface: #ffffff;
	--color-border: #e0e8ec;
	--color-whatsapp: #25d366;
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--shadow-sm: 0 1px 3px rgba(15, 36, 48, .08);
	--shadow-md: 0 8px 24px rgba(15, 36, 48, .12);
	--shadow-lg: 0 16px 40px rgba(15, 36, 48, .18);
	--container-w: 1180px;
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--space-1: .5rem;
	--space-2: 1rem;
	--space-3: 1.5rem;
	--space-4: 2.5rem;
	--space-5: 4rem;
}

/* ---------- 2. Reset base ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
	margin: 0;
	font-family: var(--font-sans);
	color: var(--color-ink);
	background: var(--color-bg);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: var(--color-primary-dark); text-decoration: none; }
a:hover{ text-decoration: underline; }
ul{ margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4{ line-height: 1.25; margin: 0 0 .6em; color: var(--color-ink); }
h1{ font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
h2{ font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); color: var(--color-accent-dark); }
h3{ font-size: 1.2rem; color: var(--color-primary-dark); }
p{ margin: 0 0 1em; }
.container{ max-width: var(--container-w); margin-inline: auto; padding-inline: var(--space-2); }

/* Foco visible accesible */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
	outline: 3px solid var(--color-accent);
	outline-offset: 2px;
}

/* Salta al contenido (accesibilidad) */
.skip-link{
	position: absolute;
	left: -999px;
	top: 0;
	background: var(--color-ink);
	color: #fff;
	padding: .75em 1.25em;
	z-index: 1000;
	border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus{ left: 0; }

/* ---------- 3. Barra superior (contacto) ---------- */
.topbar{
	background: var(--color-ink);
	color: #cfe3ea;
	font-size: .85rem;
}
.topbar .container{
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.25rem;
	align-items: center;
	justify-content: center;
	padding-block: .5rem;
}
.topbar a{ color: #fff; }
.topbar__item{ display: inline-flex; align-items: center; gap: .4em; white-space: nowrap; }
.topbar__item svg{ width: 1em; height: 1em; flex: none; }

/* ---------- 4. Encabezado / logo ---------- */
.site-header{
	background: var(--color-surface);
	box-shadow: var(--shadow-sm);
	position: sticky;
	top: 0;
	z-index: 100;
}
.brand-row{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
	padding-block: .75rem;
}
.brand{ display: flex; align-items: center; gap: .75rem; }
.brand img{ width: auto; height: 46px; }
.brand__name{ font-weight: 700; font-size: 1.05rem; color: var(--color-ink); line-height: 1.15; }
.brand__tag{ display: block; font-size: .72rem; font-weight: 400; color: var(--color-ink-soft); }

.cta-group{ display: flex; gap: .6rem; flex-wrap: wrap; }
.btn{
	display: inline-flex;
	align-items: center;
	gap: .5em;
	border: none;
	border-radius: var(--radius-sm);
	padding: .7em 1.2em;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover{ text-decoration: none; }
.btn svg{ width: 1.1em; height: 1.1em; flex: none; }
.btn--primary{ background: var(--color-accent); color: #fff; }
.btn--primary:hover{ background: var(--color-accent-dark); }
.btn--outline{ background: transparent; color: var(--color-primary-dark); border: 2px solid var(--color-primary); }
.btn--outline:hover{ background: var(--color-primary-light); }
.btn--whatsapp{ background: var(--color-whatsapp); color: #fff; }
.btn--whatsapp:hover{ background: #1ebc59; }
.btn--block{ width: 100%; justify-content: center; }
.btn--lg{ padding: .9em 1.6em; font-size: 1.05rem; }

/* ---------- 5. Navegación ---------- */
.nav{ background: var(--color-primary); }
.nav .container{ display: flex; align-items: center; justify-content: space-between; }
.nav__toggle{
	display: inline-flex;
	background: none;
	border: none;
	color: #fff;
	padding: .9rem .2rem;
	cursor: pointer;
	align-items: center;
	gap: .5em;
	font: inherit;
	font-weight: 600;
}
.nav__toggle svg{ width: 1.4em; height: 1.4em; }
.nav__list{
	display: none;
	flex-direction: column;
	width: 100%;
	padding-bottom: .5rem;
}
.nav__list.is-open{ display: flex; }
.nav__list a{
	display: flex;
	align-items: center;
	gap: .6em;
	color: #fff;
	padding: .8rem .2rem;
	border-top: 1px solid rgba(255,255,255,.15);
	font-weight: 600;
}
.nav__list a:hover{ text-decoration: none; color: #fff; opacity: .85; }
.nav__list svg{ width: 1.1em; height: 1.1em; flex: none; }

@media (min-width: 800px){
	.nav__toggle{ display: none; }
	.nav__list{ display: flex; flex-direction: row; width: auto; padding-bottom: 0; }
	.nav__list a{ border-top: none; padding: 1rem .9rem; }
}

/* ---------- 6. Hero ---------- */
.hero{ position: relative; background: var(--color-ink); color: #fff; overflow: hidden; }
.hero__media{ position: relative; }
.hero__media img{ width: 100%; height: 100%; object-fit: cover; max-height: 480px; }
.hero__media::after{
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(15,36,48,.35) 0%, rgba(15,36,48,.85) 100%);
}
.hero__content{
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--space-3);
}
.hero__content .container{ width: 100%; }
.hero h1{ color: #fff; max-width: 40ch; }
.hero p{ max-width: 55ch; color: #dbe9ef; font-size: 1.05rem; }
.hero .cta-group{ margin-top: var(--space-2); }

/* ---------- 7. Secciones generales ---------- */
main{ display: block; }
.section{ padding-block: var(--space-4); }
.section--muted{ background: var(--color-surface); }
.section__head{ max-width: 65ch; margin-bottom: var(--space-3); }
.eyebrow{
	display: inline-block;
	color: var(--color-primary-dark);
	background: var(--color-primary-light);
	font-weight: 700;
	font-size: .78rem;
	letter-spacing: .05em;
	text-transform: uppercase;
	padding: .3em .8em;
	border-radius: 999px;
	margin-bottom: .8em;
}

/* ---------- 8. Grillas y tarjetas ---------- */
.grid{ display: grid; gap: var(--space-3); }
.grid--2{ grid-template-columns: 1fr; }
.grid--3{ grid-template-columns: 1fr; }
.grid--4{ grid-template-columns: 1fr; }
@media (min-width: 640px){
	.grid--2{ grid-template-columns: repeat(2, 1fr); }
	.grid--4{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px){
	.grid--3{ grid-template-columns: repeat(3, 1fr); }
	.grid--4{ grid-template-columns: repeat(4, 1fr); }
}

.card{
	background: var(--color-surface);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover{ box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card__media{ aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-primary-light); }
.card__media img{ width: 100%; height: 100%; object-fit: cover; }
.card__body{ padding: var(--space-2); flex: 1; display: flex; flex-direction: column; }
.card__body p{ color: var(--color-ink-soft); font-size: .95rem; flex: 1; }
.card__link{ font-weight: 700; }

.icon-card{
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--space-2);
}
.icon-card svg{ width: 2.4rem; height: 2.4rem; color: var(--color-accent); margin-bottom: .6rem; }
.icon-card h3{ margin-bottom: .4rem; }
.icon-card p{ color: var(--color-ink-soft); font-size: .93rem; margin: 0; }

/* ---------- 9. Franja "por qué elegirnos" ---------- */
.stats{ background: var(--color-primary); color: #fff; }
.stats .grid{ text-align: center; }
.stats strong{ display: block; font-size: 1.8rem; }
.stats span{ font-size: .85rem; color: #dbf1fb; }

/* ---------- 10. CTA final ---------- */
.cta-banner{
	background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
	color: #fff;
	border-radius: var(--radius-lg);
	padding: var(--space-4) var(--space-3);
	text-align: center;
}
.cta-banner h2{ color: #fff; }
.cta-banner p{ color: #dbf1fb; }
.cta-banner .cta-group{ justify-content: center; }

/* ---------- 11. Formularios ---------- */
.field{
	display: block;
	width: 100%;
	padding: .75em .9em;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font: inherit;
	margin-bottom: var(--space-2);
	background: #fff;
	color: var(--color-ink);
}
textarea.field{ min-height: 140px; resize: vertical; }
.field:focus{ border-color: var(--color-primary); }
.form-note{ font-size: .85rem; color: var(--color-ink-soft); }
.form-status{ padding: .9em 1em; border-radius: var(--radius-sm); margin-bottom: var(--space-2); font-weight: 600; }
.form-status--ok{ background: #e5f8ec; color: #1f9d55; }
.form-status--err{ background: #fdecea; color: #c0392b; }

/* ---------- 12. Footer ---------- */
.site-footer{ background: var(--color-ink); color: #b9cbd3; margin-top: var(--space-5); }
.site-footer .container{ padding-block: var(--space-4); }
.site-footer h3{ color: #fff; font-size: 1.05rem; }
.site-footer a{ color: #b9cbd3; }
.site-footer a:hover{ color: #fff; }
.footer-grid{ display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 700px){ .footer-grid{ grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-grid li{ margin-bottom: .4em; }
.footer-bottom{
	border-top: 1px solid rgba(255,255,255,.12);
	margin-top: var(--space-3);
	padding-top: var(--space-2);
	font-size: .85rem;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1rem;
	justify-content: space-between;
}

/* ---------- 13. Botón flotante de WhatsApp ---------- */
.whatsapp-float{
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 200;
	display: inline-flex;
	align-items: center;
	gap: .5em;
	background: var(--color-whatsapp);
	color: #fff;
	padding: .8em 1.1em;
	border-radius: 999px;
	box-shadow: var(--shadow-lg);
	font-weight: 700;
	font-size: .9rem;
}
.whatsapp-float:hover{ color: #fff; text-decoration: none; filter: brightness(1.05); }
.whatsapp-float svg{ width: 1.5em; height: 1.5em; flex: none; }
.whatsapp-float span{ display: none; }
@media (min-width: 560px){ .whatsapp-float span{ display: inline; } }

/* ---------- 14. Utilidades ---------- */
.text-center{ text-align: center; }
.mt-0{ margin-top: 0; }
.breadcrumbs{ font-size: .85rem; color: var(--color-ink-soft); margin-bottom: var(--space-2); }
.breadcrumbs a{ color: var(--color-ink-soft); }
.tag-list{ display: flex; flex-wrap: wrap; gap: .5rem; margin: var(--space-2) 0; }
.tag-list li{
	background: var(--color-primary-light);
	color: var(--color-primary-dark);
	font-size: .8rem;
	font-weight: 700;
	padding: .35em .8em;
	border-radius: 999px;
}
.post-meta{ color: var(--color-ink-soft); font-size: .85rem; margin-bottom: var(--space-2); }
.prose{ max-width: 75ch; }
.prose h2{ margin-top: 1.4em; }
.prose ul{ list-style: disc; padding-left: 1.4em; margin-bottom: 1em; }
.prose li{ margin-bottom: .4em; }

.map-frame{
	border: 0;
	width: 100%;
	height: 380px;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
}

@media (prefers-reduced-motion: reduce){
	html{ scroll-behavior: auto; }
	*{ transition: none !important; animation: none !important; }
}
