/*
Theme Name: PetHealthTips
Theme URI: https://pethealthtips.site
Author: PetHealthTips
Description: Pet health & care blog theme with an Elementor-editable homepage. Header, footer, colors and contact details are controlled from Appearance > Customize; the whole homepage is built with Elementor widgets.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: pethealthtips
*/

:root {
  --pht-primary: #1e6a4a;
  --pht-primary-dark: #17543b;
  --pht-dark: #173a2f;
  --pht-mint: #eaf4ec;
  --pht-heading: #15402f;
  --pht-text: #4b5a53;
  --pht-muted: #6b7a73;
  --pht-border: #e1ebe4;
  --pht-white: #ffffff;
  --pht-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pht-font-head: 'Poppins', 'Inter', system-ui, sans-serif;
  --pht-font-script: 'Caveat', cursive;
  --pht-radius: 12px;
  --pht-container: 1200px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: #fff; color: var(--pht-text);
  font-family: var(--pht-font-body); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pht-primary); text-decoration: none; }
a:hover { color: var(--pht-primary-dark); }
h1, h2, h3, h4, h5, h6 { font-family: var(--pht-font-head); color: var(--pht-heading); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: 2.6rem; font-weight: 700; }
h2 { font-size: 1.7rem; font-weight: 700; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--pht-primary); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.pht-container { max-width: var(--pht-container); margin: 0 auto; padding: 0 24px; }
.pht-icon { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.125em; }
.pht-social svg { width: 100%; height: 100%; fill: currentColor; }

/* Keep Elementor's global fonts/colors aligned with the theme (editable later in Site Settings) */
.elementor-widget-heading .elementor-heading-title { line-height: 1.2; }
.elementor-widget-text-editor { color: var(--pht-text); }
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* ---------- Top bar ---------- */
.pht-topbar { background: var(--pht-primary); color: #fff; font-size: 13px; }
.pht-topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 36px; gap: 16px; }
.pht-topbar__msg { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.pht-topbar__msg .pht-heart { width: 13px; height: 13px; fill: #fff; margin-right: 5px; vertical-align: -2px; }
.pht-topbar__social { display: flex; gap: 14px; }
.pht-topbar__social a { color: #fff; width: 15px; height: 15px; display: block; opacity: .95; }
.pht-topbar__social a:hover { opacity: .7; color: #fff; }

/* ---------- Header ---------- */
.pht-header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--pht-border); }
.admin-bar .pht-header { top: 32px; }
.pht-header__inner { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.pht-logo { display: flex; align-items: center; gap: 10px; color: var(--pht-heading); flex-shrink: 0; }
.pht-logo:hover { color: var(--pht-heading); }
.pht-logo__mark { width: 40px; height: 40px; color: var(--pht-primary); }
.pht-logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.pht-logo__name { font: 700 1.55rem var(--pht-font-head); color: var(--pht-heading); letter-spacing: -.01em; }
.pht-logo__tag { font-size: 11px; color: var(--pht-muted); margin-top: 3px; }
.custom-logo-link img { max-height: 52px; width: auto; }
.pht-nav { flex: 1; display: flex; justify-content: center; }
.pht-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.pht-nav a { display: block; padding: 8px 12px; font: 500 13.5px var(--pht-font-head); color: var(--pht-heading); position: relative; }
.pht-nav a:hover { color: var(--pht-primary); }
.pht-nav .current-menu-item > a, .pht-nav .current_page_item > a { color: var(--pht-primary); }
.pht-nav .current-menu-item > a::after, .pht-nav .current_page_item > a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--pht-primary); border-radius: 2px; }
.pht-nav .sub-menu { display: none; position: absolute; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.1); border-radius: 10px; padding: 8px; min-width: 190px; flex-direction: column; gap: 0; }
.pht-nav li { position: relative; }
.pht-nav li:hover > .sub-menu, .pht-nav li:focus-within > .sub-menu { display: flex; }
.pht-header__actions { display: flex; align-items: center; gap: 10px; }
.pht-search { display: flex; align-items: center; gap: 8px; }
.pht-search__input { width: 0; padding: 0; border: 0; opacity: 0; transition: width .25s, opacity .2s, padding .25s; font: inherit; font-size: 14px; background: var(--pht-mint); border-radius: 999px; height: 40px; color: var(--pht-heading); }
.pht-search.is-open .pht-search__input { width: 210px; padding: 0 16px; opacity: 1; }
.pht-search__toggle { background: none; border: 0; color: var(--pht-heading); font-size: 20px; cursor: pointer; padding: 6px; line-height: 1; }
.pht-menu-toggle { display: none; background: none; border: 1px solid var(--pht-border); border-radius: 8px; color: var(--pht-heading); font-size: 22px; padding: 6px 9px; cursor: pointer; }

/* ---------- Buttons ---------- */
.pht-button, .pht-btn .elementor-button, .wp-block-button__link, button.pht-button, input[type=submit] {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--pht-primary); color: #fff; border: 1.5px solid var(--pht-primary);
  font: 600 13px var(--pht-font-head); padding: 0 22px; height: 42px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s;
  line-height: 1; text-transform: none; letter-spacing: 0; }
.pht-button:hover, .pht-btn .elementor-button:hover, input[type=submit]:hover { background: var(--pht-primary-dark); border-color: var(--pht-primary-dark); color: #fff; }
.pht-btn .elementor-button { fill: #fff; }
.pht-btn .elementor-button .elementor-button-content-wrapper { gap: 8px; }
.pht-btn .elementor-button-icon svg, .pht-btn .elementor-button-icon i { width: 12px; height: 12px; font-size: 12px; }
.pht-btn--outline .elementor-button { background: transparent; color: var(--pht-heading); border-color: var(--pht-heading); }
.pht-btn--outline .elementor-button:hover { background: var(--pht-heading); color: #fff; border-color: var(--pht-heading); }
.pht-btn--text .elementor-button { background: none; border: 0; color: var(--pht-primary); height: auto; padding: 0; font-size: 12.5px; border-radius: 0; }
.pht-btn--text .elementor-button:hover { background: none; color: var(--pht-primary-dark); }

/* ---------- Elementor homepage sections ---------- */
.pht-label { display: inline-block; background: var(--pht-mint); color: var(--pht-primary); font: 500 12px var(--pht-font-head); padding: 5px 12px; border-radius: 999px; }
.pht-label .elementor-heading-title { font: 500 12px var(--pht-font-head); color: var(--pht-primary); }
.pht-kicker .elementor-heading-title { font: 500 12px var(--pht-font-head); color: var(--pht-primary); }

/* Hero */
.pht-hero { position: relative; overflow: hidden; background-image: linear-gradient(100deg, #eef6f0 0%, #f4faf5 55%, #ffffff 100%); }
.pht-hero::before { content: ""; position: absolute; left: -10px; bottom: -8px; width: 90px; height: 110px; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 110'%3E%3Cg fill='%2388c79f'%3E%3Cpath d='M20 110C8 80 12 40 34 6c6 34 6 66-14 104z'/%3E%3Cpath d='M44 110c-4-30 6-56 30-74-2 30-10 56-30 74z' opacity='.8'/%3E%3C/g%3E%3C/svg%3E") no-repeat; }
.pht-hero__text { padding-left: max(24px, calc((100vw - var(--pht-container)) / 2 + 24px)) !important; position: relative; z-index: 2; }
.pht-hero__title .elementor-heading-title { font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.12; font-weight: 700; color: var(--pht-heading); }
.pht-hero__lead { max-width: 440px; font-size: 1.02rem; color: #34453d; }
.pht-hero__media { position: relative; align-self: stretch; }
.pht-hero__img, .pht-hero__img .elementor-widget-container { height: 100%; }
.pht-hero__img img { width: 100%; height: 100%; min-height: 380px; object-fit: cover; object-position: 40% center;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28%); mask-image: linear-gradient(to right, transparent 0, #000 28%); }
.pht-hero__script { position: absolute; top: 14%; right: 6%; z-index: 3; transform: rotate(-6deg); pointer-events: none; }
.pht-hero__script .elementor-heading-title { font-family: var(--pht-font-script); font-weight: 700; font-size: 2rem; line-height: 1.05; color: var(--pht-primary); }
.pht-hero__script::after { content: "♥"; position: absolute; right: -26px; top: 18px; color: var(--pht-primary); font-size: 20px; }

/* Section header row */
.pht-sechead h2 .elementor-heading-title, .pht-sechead .elementor-widget-heading h2 { margin-bottom: 0; }
.pht-sechead .elementor-widget-text-editor { font-size: 13px; color: var(--pht-muted); }

/* Category cards */
.pht-catcard { background: #fff; border: 1px solid var(--pht-border); border-radius: 10px; overflow: hidden; text-align: center; transition: box-shadow .2s, transform .2s; }
.pht-catcard:hover { box-shadow: 0 10px 26px rgba(23, 58, 47, .09); transform: translateY(-2px); }
.pht-catcard__img img { width: 100%; height: 120px; object-fit: cover; }
.pht-catcard__body h3 .elementor-heading-title, .pht-catcard__body .elementor-heading-title { font-size: 1rem; font-weight: 600; color: var(--pht-heading); }
.pht-catcard__body .elementor-widget-text-editor { font-size: 12px; line-height: 1.55; color: var(--pht-muted); min-height: 56px; }

/* Guides band */
.pht-guides__band { border-radius: 16px; }
.pht-guides__intro .elementor-widget-text-editor { font-size: 14px; }
.pht-guidecard { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(23,58,47,.05); }
.pht-guidecard__img img { width: 100%; height: 120px; object-fit: cover; }
.pht-guidecard__body .elementor-heading-title { font-size: .92rem; font-weight: 600; }
.pht-guidecard__body .elementor-widget-text-editor { font-size: 12px; color: var(--pht-muted); line-height: 1.5; }

/* About + newsletter */
.pht-about__img img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; border-radius: 10px; }
.pht-about__text .elementor-widget-text-editor { font-size: 14px; }
.pht-newsletter-card { border: 1px solid #d6e8da; border-radius: 12px; position: relative; }
.pht-newsletter-card .elementor-widget-text-editor { font-size: 13px; color: var(--pht-muted); }

/* ---------- Post cards (shortcodes + archives) ---------- */
.pht-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.pht-filter { background: var(--pht-mint); color: var(--pht-heading); border: 0; border-radius: 999px; font: 500 12px var(--pht-font-head); padding: 7px 16px; cursor: pointer; transition: background .2s, color .2s; }
.pht-filter:hover { background: #d9ebdd; }
.pht-filter.is-active { background: var(--pht-primary); color: #fff; }
.pht-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; transition: opacity .2s; }
.pht-grid.is-loading { opacity: .45; }
.pht-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pht-card { background: #fff; border: 1px solid var(--pht-border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.pht-card__img { display: block; aspect-ratio: 5 / 2.55; overflow: hidden; background: var(--pht-mint); }
.pht-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.pht-card:hover .pht-card__img img { transform: scale(1.04); }
.pht-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.pht-pill { align-self: flex-start; font: 500 10.5px var(--pht-font-head); color: #fff; background: var(--pht-primary); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.pht-pill--dog-health { background: #2e7d5b; }
.pht-pill--cat-health { background: #6f56c9; }
.pht-pill--pet-nutrition { background: #ee8a2a; }
.pht-pill--grooming { background: #3a9d8a; }
.pht-pill--preventive-care { background: #4b78c9; }
.pht-card__title { font-size: .98rem; line-height: 1.35; margin-bottom: 8px; }
.pht-card__title a { color: var(--pht-heading); }
.pht-card__title a:hover { color: var(--pht-primary); }
.pht-card__excerpt { font-size: 12.5px; color: var(--pht-muted); line-height: 1.6; margin-bottom: 14px; }
.pht-card__meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--pht-muted); align-items: center; }
.pht-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.pht-empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: var(--pht-muted); }

/* ---------- Newsletter form ---------- */
.pht-nl { display: flex; flex-direction: column; gap: 10px; }
.pht-nl__row { display: flex; background: #fff; border: 1px solid #d6e8da; border-radius: 999px; padding: 4px; }
.pht-nl__row input[type=email] { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; font: inherit; font-size: 13px; outline: 0; }
.pht-nl__note { font-size: 11.5px; color: var(--pht-muted); display: flex; align-items: center; gap: 6px; }
.pht-nl__msg { font-size: 13px; font-weight: 500; padding: 8px 14px; border-radius: 8px; }
.pht-nl__msg--ok { background: #d9f0e1; color: #14573a; }
.pht-nl__msg--err { background: #fde4e1; color: #9b2c20; }
.pht-nl .pht-hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.pht-footer { background: var(--pht-dark); color: #c4d4cb; font-size: 13px; }
.pht-footer a { color: #c4d4cb; }
.pht-footer a:hover { color: #fff; }
.pht-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding: 44px 0 36px; }
.pht-footer .pht-logo__name { color: #fff; }
.pht-footer .pht-logo__tag { color: #a9bdb2; }
.pht-footer .pht-logo__mark { color: #fff; }
.pht-footer__about { margin: 14px 0 16px; max-width: 290px; line-height: 1.7; color: #a9bdb2; }
.pht-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.pht-footer ul { list-style: none; margin: 0; padding: 0; }
.pht-footer li { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.pht-footer .menu li::before { content: ""; width: 4px; height: 4px; background: #c4d4cb; border-radius: 50%; flex-shrink: 0; }
.pht-footer__social { display: flex; gap: 14px; }
.pht-footer__social a { width: 16px; height: 16px; display: block; color: #fff; }
.pht-footer .pht-contact li { align-items: flex-start; }
.pht-footer .pht-contact .pht-icon { font-size: 16px; margin-top: 3px; color: #fff; flex-shrink: 0; }
.pht-footer .pht-button { background: var(--pht-primary); border-color: var(--pht-primary); color: #fff; margin-top: 10px; }
.pht-footer__bar { border-top: 1px solid rgba(255,255,255,.12); }
.pht-footer__bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; font-size: 11.5px; flex-wrap: wrap; }
.pht-footer__bar ul { display: flex; gap: 0; flex-wrap: wrap; }
.pht-footer__bar li { margin: 0; }
.pht-footer__bar li + li::before { content: "|"; margin: 0 12px; opacity: .5; }

/* ---------- Blog / single / page ---------- */
.pht-pagehead { background: var(--pht-mint); padding: 44px 0; text-align: center; }
.pht-pagehead h1 { margin: 0; font-size: 2.1rem; }
.pht-pagehead p { margin: 8px auto 0; max-width: 620px; color: var(--pht-muted); }
.pht-main { padding: 44px 0 64px; }
.pht-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pht-pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--pht-border); border-radius: 999px; font-size: 13px; color: var(--pht-heading); }
.pht-pagination .current { background: var(--pht-primary); color: #fff; border-color: var(--pht-primary); }
.pht-article { max-width: 780px; margin: 0 auto; }
.pht-article__head { text-align: center; margin-bottom: 28px; }
.pht-article__head h1 { font-size: 2.2rem; margin: 10px 0 14px; }
.pht-article__head .pht-card__meta { justify-content: center; font-size: 13px; }
.pht-article__thumb img { width: 100%; border-radius: 14px; margin-bottom: 28px; }
.pht-article__content { font-size: 1.05rem; line-height: 1.8; }
.pht-article__content h2, .pht-article__content h3 { margin-top: 1.6em; }
.pht-article__content img { border-radius: 10px; }
.pht-article__content blockquote { border-left: 4px solid var(--pht-primary); background: var(--pht-mint); margin: 1.5em 0; padding: 14px 20px; border-radius: 0 10px 10px 0; }
.pht-authorbox { display: flex; gap: 16px; align-items: center; background: var(--pht-mint); border-radius: 12px; padding: 20px; margin-top: 40px; }
.pht-authorbox img { border-radius: 50%; }
.pht-authorbox p { margin: 0; font-size: 14px; }
.pht-related { margin-top: 56px; }
.pht-related h2 { text-align: center; margin-bottom: 24px; }
.pht-search-form { display: flex; gap: 8px; max-width: 460px; margin: 20px auto 0; }
.pht-search-form input[type=search] { flex: 1; border: 1px solid var(--pht-border); border-radius: 999px; padding: 0 18px; height: 42px; font: inherit; }
.comments-area { max-width: 780px; margin: 48px auto 0; }
.comment-list { list-style: none; padding: 0; }
.comment-body { border-bottom: 1px solid var(--pht-border); padding: 16px 0; }
.comment-respond input[type=text], .comment-respond input[type=email], .comment-respond input[type=url], .comment-respond textarea { width: 100%; border: 1px solid var(--pht-border); border-radius: 10px; padding: 10px 14px; font: inherit; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .pht-grid { grid-template-columns: repeat(2, 1fr); }
  .pht-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .pht-menu-toggle { display: inline-block; margin-left: auto; order: 3; }
  .pht-header__inner { flex-wrap: wrap; min-height: 64px; }
  .pht-nav { display: none; order: 5; width: 100%; flex-basis: 100%; padding-bottom: 12px; }
  .pht-nav.is-open { display: block; }
  .pht-nav ul { flex-direction: column; }
  .pht-nav .sub-menu { position: static; display: flex; box-shadow: none; padding-left: 14px; }
  .pht-header__actions .pht-button { display: none; }
  .pht-hero__text { padding: 36px 24px 8px !important; }
  .pht-hero__img img { min-height: 260px; -webkit-mask-image: none; mask-image: none; }
  .pht-hero__script { top: 10%; right: 8%; }
  .pht-hero__script .elementor-heading-title { font-size: 1.5rem; }
}
@media (max-width: 767px) {
  .pht-topbar__social { display: none; }
  .pht-grid, .pht-grid--3 { grid-template-columns: 1fr; }
  .pht-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .pht-footer__bar-inner { flex-direction: column; text-align: center; }
  .pht-article__head h1 { font-size: 1.7rem; }
  .pht-sechead .pht-filters { order: 3; }
}
@media (max-width: 782px) { .admin-bar .pht-header { top: 46px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Social icons */
.pht-social-icon { width: 100%; height: 100%; fill: currentColor; display: block; }
.pht-heart { fill: #fff; }
.pht-footer .pht-icon { width: 16px; height: 16px; }
.pht-button .pht-icon { width: 13px; height: 13px; }
.pht-nl__row .pht-button { height: 38px; }
