/*
Theme Name: NOHAS Health
Theme URI: https://nohas.es
Author: nohas.es
Description: Clean medical-blue and green theme for nohas.es health, wellness and pharmacy information.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: nohas-health
WPVibe: yes
*/

:root {
	--navy: #0a3d7c;
	--navy-dark: #072c5a;
	--blue: #1565d8;
	--blue-dark: #0f4fb0;
	--green: #35a937;
	--green-dark: #2a8a2c;
	--ink: #10233f;
	--muted: #5b6b82;
	--bg: #f3f7fc;
	--line: #e1e9f3;
	--white: #fff;
	--radius: 14px;
	--shadow: 0 6px 22px rgba(10, 61, 124, .09);
	--font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--script: 'Caveat', cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 999; }
.skip-link:focus { left: 8px; color: #fff; }
.ico { display: inline-block; vertical-align: -0.2em; flex: none; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

/* Top bar */
.topbar { background: var(--navy); color: #fff; font-size: 13px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 44px; }
.topbar-tagline { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.topbar-links { display: flex; flex-wrap: wrap; gap: 0; margin-left: auto; }
.topbar-links a { color: #fff; font-weight: 500; padding: 0 14px; border-left: 1px solid rgba(255, 255, 255, .35); line-height: 1; }
.topbar-links a:first-child { border-left: 0; }
.topbar-links a:hover { text-decoration: underline; color: #fff; }
.topbar-social { display: flex; gap: 10px; list-style: none; margin: 0 0 0 16px; padding: 0 0 0 20px; border-left: 1px solid rgba(255, 255, 255, .35); }
.topbar-social a { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--navy); font-weight: 700; font-size: 13px; }

/* Header */
.site-header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 14px rgba(10, 61, 124, .08); }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 88px; }
.brand { display: flex; align-items: center; flex: none; }
.brand .nohas-logo { height: 62px; width: auto; max-width: 260px; object-fit: contain; }
.nohas-wordmark { font-weight: 800; font-size: 32px; color: var(--navy); letter-spacing: .02em; }
.nav-wrap { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.primary-nav .menu { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.primary-nav .menu > li { position: relative; }
.primary-nav .menu > li > a { display: flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 17px; line-height: 1.2; }
.primary-nav .menu > li > a:hover { color: var(--blue); }
.primary-nav .menu > li.current-menu-item > a,
.primary-nav .menu > li.current_page_item > a,
.primary-nav .menu > li.current-menu-ancestor > a { background: var(--blue); color: #fff; }
.primary-nav .menu > li.menu-item-has-children.current-menu-item:not(.current-menu-ancestor) > a { background: transparent; color: var(--ink); }
.primary-nav .menu-item-has-children > a::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 4px; }
.primary-nav .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; border-radius: 12px; box-shadow: 0 14px 34px rgba(10, 61, 124, .18); opacity: 0; visibility: hidden; transform: translateY(8px); transition: .18s; z-index: 60; }
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--ink); font-weight: 500; font-size: 15px; }
.primary-nav .sub-menu a:hover { background: var(--bg); color: var(--blue); }
.header-search { display: flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 20px; width: 290px; box-shadow: inset 0 1px 3px rgba(10, 61, 124, .05); }
.header-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); padding: 8px 0; }
.header-search button { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.header-search button:hover { background: var(--blue-dark); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--navy); padding: 8px; cursor: pointer; }
.nav-toggle .nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 16px; line-height: 1.2; border: 2px solid transparent; transition: .2s; cursor: pointer; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(21, 101, 216, .3); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--bg); color: var(--navy); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); margin-left: 10px; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(100deg, #fff 0%, #eef5fc 55%, #dcebf8 100%); }
.hero-media { position: absolute; top: 0; right: 0; bottom: 0; width: 62%; background: var(--hero-img) center 25% / cover no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%); mask-image: linear-gradient(90deg, transparent 0%, #000 42%); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, .0) 55%, rgba(10, 61, 124, .12) 100%); pointer-events: none; }
.hero-inner { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 360px; padding-top: 40px; padding-bottom: 40px; }
.hero-copy { max-width: 560px; }
.hero-title { margin: 0 0 18px; font-size: clamp(40px, 6vw, 70px); line-height: 1.05; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.hero-title span { color: var(--green); }
.hero-lead { margin: 0 0 26px; font-size: 20px; line-height: 1.5; color: var(--ink); max-width: 470px; }
.hero-script { margin: 0; font-family: var(--script); font-size: clamp(48px, 5.5vw, 76px); line-height: .95; font-weight: 600; color: var(--navy); transform: rotate(-6deg); text-shadow: 0 2px 12px rgba(255, 255, 255, .85); }
.hero-script svg { display: block; margin-top: 6px; max-width: 100%; }

/* Trust bar */
.trust { background: var(--bg); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-left: 1px solid var(--line); }
.trust-item:first-child { border-left: 0; }
.trust-item h2 { margin: 0; font-size: 17px; line-height: 1.25; font-weight: 600; color: var(--ink); }
.trust-item p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.t-green { color: var(--green); }
.t-blue { color: var(--blue); }

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: var(--bg); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-title { margin: 0; padding-left: 16px; border-left: 5px solid var(--blue); font-size: clamp(24px, 3vw, 32px); line-height: 1.2; font-weight: 700; color: var(--ink); }
.section-sub { color: var(--muted); max-width: 760px; margin: 0 0 24px; }
.more-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--blue); }
.fine { margin: 20px 0 0; font-size: 13px; color: var(--muted); }
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Cards */
.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(10, 61, 124, .16); }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-ph { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--blue); }
.chip { position: absolute; top: 14px; left: 14px; z-index: 2; background: var(--blue); color: #fff; font-size: 13px; font-weight: 600; line-height: 1; padding: 8px 14px; border-radius: 999px; }
.chip:hover { color: #fff; background: var(--blue-dark); }
.chip-green .chip { background: var(--green); }
.chip-green .chip:hover { background: var(--green-dark); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; }
.card-title a { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a:hover { color: var(--blue); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: auto 0 0; font-size: 13px; color: var(--muted); }
.card-meta span { display: inline-flex; align-items: center; gap: 6px; }

.topic { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); color: var(--ink); transition: .2s; }
.topic:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(10, 61, 124, .16); color: var(--ink); }
.topic-ico { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: #e8f1fd; color: var(--blue); margin-bottom: 16px; }
.topic:nth-child(even) .topic-ico { background: #e7f5e7; color: var(--green-dark); }
.topic h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.topic p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* Standards band */
.standards { background: linear-gradient(110deg, var(--navy-dark), var(--navy)); color: #fff; padding: 64px 0; }
.standards-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: center; }
.standards h2 { margin: 0 0 14px; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; font-weight: 700; color: #fff; }
.standards p { margin: 0 0 24px; color: #cfe0f5; max-width: 540px; }
.standards-list { list-style: none; margin: 0; padding: 26px 28px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius); }
.standards-list li { position: relative; padding: 8px 0 8px 32px; font-weight: 500; }
.standards-list li::before { content: ''; position: absolute; left: 0; top: 14px; width: 18px; height: 18px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.500l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.disc { margin: 0; padding: 22px 24px; text-align: center; font-size: 13px; color: var(--muted); background: #fff; }

/* Article */
.article-head { background: linear-gradient(100deg, #fff 0%, #eef5fc 100%); border-bottom: 1px solid var(--line); padding: 40px 0 34px; }
.crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.crumbs .chip { position: static; }
.article-title { margin: 0 0 14px; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.15; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; font-size: 14px; color: var(--muted); }
.article-meta span { display: inline-flex; align-items: center; gap: 7px; }
.archive-head .section-sub { margin: 0; }

.entry-content { padding: 34px 0 56px; font-size: 17.5px; line-height: 1.75; overflow-wrap: break-word; }
.entry-content > :first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content h2 { margin: 1.9em 0 .6em; font-size: 28px; line-height: 1.25; font-weight: 700; color: var(--navy); scroll-margin-top: 110px; }
.entry-content h3 { margin: 1.6em 0 .5em; font-size: 21px; line-height: 1.3; font-weight: 700; color: var(--ink); }
.entry-content h4 { margin: 1.4em 0 .4em; font-size: 18px; font-weight: 700; }
.entry-content ul { list-style: disc; margin: 0 0 1.3em; padding-left: 1.4em; }
.entry-content ol { list-style: decimal; margin: 0 0 1.3em; padding-left: 1.5em; }
.entry-content li { margin: .35em 0; }
.entry-content li::marker { color: var(--blue); }
.entry-content img { border-radius: 12px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; }
.entry-content blockquote { margin: 1.6em 0; padding: 14px 22px; border-left: 4px solid var(--green); background: var(--bg); border-radius: 0 12px 12px 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 16px; }
.entry-content th, .entry-content td { text-align: left; padding: 10px 12px; vertical-align: top; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content strong { font-weight: 700; }
.entry-content nav ul { list-style: none; padding-left: 0; }
.entry-content nav li::marker { content: ''; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* Search + pagination */
.search-big { display: flex; gap: 12px; max-width: 560px; margin: 0 0 22px; }
.search-big input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 13px 22px; font: inherit; }
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Footer */
.site-footer { position: relative; background: var(--navy); color: #fff; padding: 44px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 1.3fr; gap: 0; align-items: start; }
.footer-grid > * { padding: 0 28px; border-left: 1px solid rgba(255, 255, 255, .22); }
.footer-grid > *:first-child { padding-left: 0; border-left: 0; }
.footer-logo { display: inline-flex; background: #fff; border-radius: 14px; padding: 10px 16px; }
.footer-logo .nohas-logo { height: 54px; width: auto; max-width: 220px; object-fit: contain; }
.footer-col h2 { margin: 0 0 12px; font-size: 17px; font-weight: 600; color: #fff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 8px; }
.footer-col a { color: #e3edf9; font-size: 15px; font-weight: 500; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-note p { margin: 0 0 10px; font-size: 15px; font-weight: 500; }
.footer-note em { font-size: 14px; color: #cfe0f5; }
.to-top { position: absolute; right: 24px; bottom: 24px; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.to-top:hover { background: #fff; color: var(--blue); }

/* Responsive */
@media (max-width: 1180px) {
	.header-search { width: 220px; }
	.primary-nav .menu > li > a { padding: 10px 14px; font-size: 16px; }
	.grid-4 { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr 1fr; row-gap: 30px; }
	.footer-grid > * { border-left: 0; padding: 0; }
}
@media (max-width: 960px) {
	.topbar-links { display: none; }
	.topbar-inner { justify-content: center; }
	.nav-toggle { display: inline-flex; }
	.header-inner { min-height: 76px; flex-wrap: wrap; gap: 12px; }
	.brand .nohas-logo { height: 52px; }
	.nav-wrap { display: none; flex-direction: column; align-items: stretch; width: 100%; margin: 0; padding: 8px 0 20px; border-top: 1px solid var(--line); }
	.nav-wrap.is-open { display: flex; }
	.primary-nav .menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.primary-nav .menu > li > a { border-radius: 12px; justify-content: space-between; }
	.primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; padding: 0 0 6px 14px; min-width: 0; }
	.primary-nav li.is-open > .sub-menu { display: block; }
	.header-search { width: 100%; }
	.hero-media { width: 100%; opacity: .35; -webkit-mask-image: none; mask-image: none; }
	.hero-inner { min-height: 0; padding-top: 48px; padding-bottom: 48px; }
	.hero-script { display: none; }
	.trust-grid { grid-template-columns: 1fr 1fr; }
	.trust-item:nth-child(3) { border-left: 0; }
	.trust-item { border-top: 1px solid var(--line); }
	.trust-item:nth-child(-n+2) { border-top: 0; }
	.grid-3 { grid-template-columns: 1fr 1fr; }
	.standards-inner { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 640px) {
	.container { padding: 0 18px; }
	.section { padding: 40px 0; }
	.section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
	.grid-4, .grid-3 { grid-template-columns: 1fr; }
	.trust-grid { grid-template-columns: 1fr; }
	.trust-item, .trust-item:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); padding: 16px 4px; }
	.trust-item:first-child { border-top: 0; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-brand, .footer-note { grid-column: 1 / -1; }
	.btn-ghost { margin: 10px 0 0; }
	.entry-content { font-size: 17px; }
	.entry-content table { display: block; overflow-x: auto; }
	.to-top { right: 14px; bottom: 14px; }
}
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
