/*
Theme Name: Osmosis Global
Theme URI: https://osmosis.global
Description: Child theme de Twenty Twenty-Three para osmosis.global — referencia en ósmosis inversa y purificación de agua.
Author: Osmosis Global
Author URI: https://osmosis.global
Template: twentytwentythree
Version: 1.1.0
Text Domain: osmosis-global
*/

/* ========================================
   RESET & VARIABLES
   ======================================== */

:root {
  --os-deep:     #082a44;
  --os-navy:     #0d3f6b;
  --os-ocean:    #1565a8;
  --os-water:    #1a8fc4;
  --os-sky:      #4fc3f7;
  --os-ice:      #b3e5fc;
  --os-mist:     #e0f4fd;
  --os-frost:    #f2fafd;
  --os-white:    #ffffff;
  --os-gray-900: #1a2332;
  --os-gray-700: #334155;
  --os-gray-500: #64748b;
  --os-gray-300: #cbd5e1;
  --os-gray-200: #e2e8f0;
  --os-gray-100: #f1f5f9;
  --os-accent:   #f59e0b;
  --os-accent-h: #d97706;
  --os-radius:   8px;
  --os-max:      1160px;
  --os-gap:      24px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--os-frost);
  color: var(--os-gray-900);
  line-height: 1.65;
  margin: 0;
}

img { max-width: 100%; height: auto; }

/* ========================================
   TOPBAR
   ======================================== */

.os-topbar {
  background: var(--os-deep);
  padding: 6px 20px;
  font-size: 0.75rem;
  color: var(--os-ice);
  overflow: hidden;
  white-space: nowrap;
}

.os-topbar-inner {
  max-width: var(--os-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.os-topbar-label {
  background: var(--os-water);
  color: var(--os-white);
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.os-topbar a { color: var(--os-ice); text-decoration: none; }
.os-topbar a:hover { color: var(--os-white); }

/* ========================================
   HEADER — desktop first
   ======================================== */

.os-header {
  background: var(--os-white);
  border-bottom: 3px solid var(--os-water);
  position: sticky;
  top: 0;
  z-index: 100;
}

.os-header-inner {
  max-width: var(--os-max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo */
.os-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.os-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--os-water), var(--os-sky));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--os-white);
  font-size: 1rem;
  font-weight: 800;
}

.os-logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--os-deep);
  letter-spacing: -0.02em;
}

.os-logo-text span { color: var(--os-water); font-weight: 500; }

/* Desktop nav — sits in header-inner */
.os-nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.os-nav-desktop li a {
  color: var(--os-gray-700);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--os-radius);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.os-nav-desktop li a:hover,
.os-nav-desktop li.current-menu-item a {
  background: var(--os-mist);
  color: var(--os-ocean);
}

/* Search button */
.os-search-btn {
  flex-shrink: 0;
  background: var(--os-gray-100);
  border: 1px solid var(--os-gray-200);
  border-radius: var(--os-radius);
  padding: 7px 14px;
  color: var(--os-gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
}

.os-search-btn:hover {
  border-color: var(--os-water);
  color: var(--os-ocean);
}

/* Hamburger — HIDDEN on desktop */
.os-burger {
  display: none;
  background: none;
  border: none;
  padding: 8px 4px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
}

.os-burger span {
  display: block;
  height: 2.5px;
  background: var(--os-gray-700);
  border-radius: 2px;
  width: 100%;
  transition: transform 0.3s, opacity 0.2s;
}

.os-burger.is-active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.os-burger.is-active span:nth-child(2) { opacity: 0; }
.os-burger.is-active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile menu — HIDDEN by default */
.os-mobile-menu {
  display: none;
  background: var(--os-white);
  border-top: 1px solid var(--os-gray-200);
  padding: 8px 20px 20px;
}

.os-mobile-menu.is-open { display: block; }

.os-mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.os-mobile-menu ul li a {
  display: block;
  padding: 14px 0;
  color: var(--os-gray-700);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--os-gray-100);
}

.os-mobile-menu ul li:last-child a { border-bottom: none; }
.os-mobile-menu ul li a:hover { color: var(--os-ocean); }

.os-msearch {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--os-gray-200);
}

.os-msearch input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--os-gray-200);
  border-radius: var(--os-radius);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.os-msearch input:focus { border-color: var(--os-water); }

.os-msearch button {
  background: var(--os-ocean);
  color: var(--os-white);
  border: none;
  padding: 11px 20px;
  border-radius: var(--os-radius);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}

/* ========================================
   MOBILE HEADER (≤ 768px)
   ======================================== */

@media (max-width: 768px) {
  .os-topbar { display: none; }
  .os-nav-desktop { display: none !important; }
  .os-burger { display: flex; }
  .os-search-btn span.os-search-label { display: none; }
  .os-search-btn { padding: 7px 8px; gap: 0; }
  .os-header-inner { gap: 10px; }
  .os-logo-icon { width: 30px; height: 30px; font-size: 0.85rem; }
  .os-logo-text { font-size: 1.15rem; }
}

/* ========================================
   SEARCH OVERLAY (desktop)
   ======================================== */

.os-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,42,68,0.85);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}

.os-search-overlay.active { display: flex; }

.os-search-box {
  background: var(--os-white);
  border-radius: 12px;
  padding: 8px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  display: flex;
}

.os-search-box input {
  flex: 1;
  border: none;
  font-size: 1.1rem;
  padding: 14px 18px;
  outline: none;
  border-radius: 8px;
  font-family: inherit;
}

.os-search-box button {
  background: var(--os-ocean);
  color: var(--os-white);
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

/* ========================================
   LAYOUT — HOME
   ======================================== */

.os-home {
  max-width: var(--os-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* — Hero — */
.os-hero {
  margin: 28px 0 0;
  border-radius: var(--os-radius);
  overflow: hidden;
  background: var(--os-white);
  border: 1px solid var(--os-gray-200);
  display: grid;
  grid-template-columns: 55% 45%;
}

.os-hero-img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  display: block;
}

.os-hero-img-placeholder {
  background: linear-gradient(135deg, var(--os-navy), var(--os-water), var(--os-sky));
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.os-hero-img-placeholder::after { content: '💧'; font-size: 4rem; opacity: 0.3; }

.os-hero-body {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.os-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 4px;
  text-decoration: none;
  width: fit-content;
}

.os-badge-blue { background: var(--os-mist); color: var(--os-ocean); }

.os-hero-body .os-badge { margin-bottom: 14px; }

.os-hero h2 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--os-gray-900);
}

.os-hero h2 a { color: inherit; text-decoration: none; }
.os-hero h2 a:hover { color: var(--os-ocean); }

.os-hero .os-excerpt {
  color: var(--os-gray-500);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.os-meta {
  font-size: 0.78rem;
  color: var(--os-gray-500);
  display: flex;
  align-items: center;
  gap: 8px;
}

.os-meta-dot::before { content: '·'; }

/* — AdSense — */
.os-ad { margin: 28px 0; text-align: center; }

.os-ad-placeholder {
  background: var(--os-gray-100);
  border: 1px dashed var(--os-gray-300);
  border-radius: var(--os-radius);
  padding: 20px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--os-gray-500);
  font-size: 0.78rem;
}

.os-ad-large .os-ad-placeholder { min-height: 250px; }

.os-ad-full {
  max-width: var(--os-max);
  margin: 28px auto;
  padding: 0 20px;
}

/* — Section heading — */
.os-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}

.os-section-heading h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--os-deep);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
  white-space: nowrap;
}

.os-section-heading::after {
  content: '';
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--os-water), transparent);
  border-radius: 2px;
}

/* — Grid 3 col — */
.os-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--os-gap);
  margin-bottom: 12px;
}

.os-card {
  background: var(--os-white);
  border-radius: var(--os-radius);
  overflow: hidden;
  border: 1px solid var(--os-gray-200);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.os-card:hover {
  border-color: var(--os-sky);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(10,46,77,0.08);
}

.os-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.os-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--os-mist), var(--os-ice));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--os-water);
  font-size: 1.6rem;
}

.os-card-body {
  padding: 16px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.os-card .os-badge { margin-bottom: 8px; }

.os-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10px;
}

.os-card h3 a { color: var(--os-gray-900); text-decoration: none; }
.os-card h3 a:hover { color: var(--os-ocean); }
.os-card .os-meta { margin-top: auto; }

/* — Product strip — */
.os-products-strip {
  background: linear-gradient(135deg, var(--os-deep), var(--os-navy));
  border-radius: var(--os-radius);
  padding: 28px 28px 24px;
  margin: 32px 0;
}

.os-products-strip h2 {
  color: var(--os-white);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 18px;
}

.os-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.os-product-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--os-radius);
  padding: 16px;
  text-align: center;
  transition: background 0.2s;
}

.os-product-card:hover { background: rgba(255,255,255,0.14); }
.os-product-card a { text-decoration: none; }

.os-product-card .os-pc-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 10px;
  display: block;
}

.os-product-card .os-pc-icon { font-size: 2rem; margin-bottom: 8px; display: block; }
.os-product-card .os-pc-name { color: var(--os-white); font-size: 0.85rem; font-weight: 600; display: block; margin-bottom: 4px; }
.os-product-card .os-pc-price { color: var(--os-sky); font-size: 0.78rem; font-weight: 700; }

/* — Footer articles — */
.os-footer-articles {
  background: var(--os-deep);
  padding: 48px 20px 28px;
  margin-top: 48px;
}

.os-footer-articles-inner {
  max-width: var(--os-max);
  margin: 0 auto;
}

.os-footer-articles .os-section-heading h2 { color: var(--os-white); }
.os-footer-articles .os-section-heading::after { background: linear-gradient(90deg, var(--os-sky), transparent); }

.os-footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.os-footer-list li {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.os-footer-list li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  text-decoration: none;
  color: var(--os-ice);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.os-footer-list li a:hover { color: var(--os-white); }

.os-footer-list .os-fl-num {
  font-size: 1rem;
  font-weight: 800;
  color: var(--os-sky);
  min-width: 26px;
}

/* ========================================
   SITE FOOTER
   ======================================== */

.os-site-footer {
  background: var(--os-deep);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 32px 20px 20px;
}

.os-site-footer-inner {
  max-width: var(--os-max);
  margin: 0 auto;
}

.os-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.os-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.os-footer-brand .os-logo-icon {
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
}

.os-footer-brand .os-logo-text {
  font-size: 1.05rem;
}

.os-footer-brand .os-logo-text {
  font-size: 1.05rem;
  color: var(--os-white);
}

.os-footer-brand .os-logo-text span {
  color: var(--os-sky);
}

.os-footer-tagline {
  color: var(--os-gray-500);
  font-size: 0.8rem;
  margin: 0;
}

.os-footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.os-footer-links li a {
  color: var(--os-ice);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s;
}

.os-footer-links li a:hover { color: var(--os-white); }

.os-footer-copy {
  text-align: center;
  color: var(--os-gray-500);
  font-size: 0.75rem;
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ========================================
   SINGLE POST
   ======================================== */

.os-single-wrap {
  max-width: var(--os-max);
  margin: 36px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.os-single { min-width: 0; }

.os-single-header { margin-bottom: 24px; }
.os-single-header .os-badge { margin-bottom: 12px; }

.os-single-header h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--os-gray-900);
  margin: 0 0 12px;
}

.os-single-featured-img {
  width: 100%;
  border-radius: var(--os-radius);
  margin-bottom: 28px;
}

.os-single-content {
  font-size: 1.05rem;
  line-height: 1.78;
  color: var(--os-gray-700);
}

.os-single-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--os-gray-900);
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--os-mist);
}

.os-single-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--os-gray-900);
  margin: 32px 0 10px;
}

.os-single-content p { margin: 0 0 18px; }
.os-single-content a { color: var(--os-ocean); text-decoration: underline; text-underline-offset: 2px; }
.os-single-content img { border-radius: var(--os-radius); }

.os-single-content blockquote {
  border-left: 4px solid var(--os-water);
  margin: 28px 0;
  padding: 18px 24px;
  background: var(--os-mist);
  border-radius: 0 var(--os-radius) var(--os-radius) 0;
  font-style: italic;
  color: var(--os-gray-700);
}

.os-single-content ul,
.os-single-content ol { padding-left: 24px; margin: 0 0 18px; }
.os-single-content li { margin-bottom: 6px; }

.os-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--os-gray-200);
}

/* Sidebar */
.os-sidebar { position: sticky; top: 80px; }
.os-sidebar-block { margin-bottom: 24px; }
.os-sidebar-block .os-ad-placeholder { min-height: 250px; }

.os-sidebar-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--os-deep);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--os-water);
}

.os-sidebar-popular {
  list-style: none;
  padding: 0;
  margin: 0;
}

.os-sidebar-popular li { border-bottom: 1px solid var(--os-gray-200); }

.os-sidebar-popular li a {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--os-gray-700);
  line-height: 1.35;
}

.os-sidebar-popular li a:hover { color: var(--os-ocean); }

.os-sidebar-popular .os-sp-num {
  font-weight: 800;
  color: var(--os-water);
  font-size: 1rem;
  min-width: 20px;
}

/* ========================================
   ARCHIVE
   ======================================== */

.os-archive-header { margin: 32px 0 0; }

.os-archive-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--os-deep);
  margin: 0;
}

.os-archive-header p { color: var(--os-gray-500); font-size: 0.9rem; margin: 6px 0 0; }

.os-pagination { text-align: center; margin: 36px 0; }

.os-pagination .nav-links { display: flex; justify-content: center; gap: 6px; }

.os-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--os-radius);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--os-gray-700);
  border: 1px solid var(--os-gray-200);
}

.os-pagination .page-numbers:hover { border-color: var(--os-water); color: var(--os-ocean); }
.os-pagination .page-numbers.current { background: var(--os-ocean); color: var(--os-white); border-color: var(--os-ocean); }

/* ========================================
   PAGE
   ======================================== */

.os-page { max-width: 780px; margin: 40px auto; padding: 0 20px; }

.os-page h1 { font-size: 2rem; font-weight: 800; color: var(--os-gray-900); margin: 0 0 24px; }

.os-page-content { font-size: 1.05rem; line-height: 1.78; color: var(--os-gray-700); }

/* ========================================
   RESPONSIVE — layout only
   ======================================== */

@media (max-width: 960px) {
  .os-hero { grid-template-columns: 1fr; }
  .os-hero-img, .os-hero-img-placeholder { min-height: 220px; }
  .os-hero-body { padding: 24px 20px; }
  .os-grid { grid-template-columns: repeat(2, 1fr); }
  .os-products-grid { grid-template-columns: repeat(2, 1fr); }
  .os-single-wrap { grid-template-columns: 1fr; }
  .os-sidebar { position: static; }
}

@media (max-width: 768px) {
  .os-footer-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .os-footer-brand { flex-direction: column; align-items: flex-start; gap: 6px; }
  .os-footer-links { flex-wrap: wrap; gap: 12px 20px; }
  .os-footer-copy { text-align: left; }
}

@media (max-width: 600px) {
  .os-grid { grid-template-columns: 1fr; }
  .os-products-grid { grid-template-columns: 1fr 1fr; }
  .os-hero h2 { font-size: 1.25rem; }
  .os-single-header h1 { font-size: 1.5rem; }
}
