/*
Theme Name:   HostingerReferral GP
Theme URI:    https://hostingerreferral.com/
Description:  Fast, SEO-ready GeneratePress child theme for a Hostinger referral / deals website. Central referral-link manager (/go/ links), plan price tables, SEO meta box, JSON-LD schema, breadcrumbs, FAQ schema, auto TOC, custom footer and one-click demo pages.
Author:       HostingerReferral
Template:     generatepress
Version:      1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  hrgp
*/

/* ---------- Design tokens ---------- */
:root {
	--hr-primary: #4338ca;
	--hr-primary-dark: #312e81;
	--hr-primary-soft: #eef2ff;
	--hr-accent: #f59e0b;
	--hr-accent-dark: #d97706;
	--hr-dark: #0f172a;
	--hr-ink: #1e293b;
	--hr-muted: #64748b;
	--hr-border: #e2e8f0;
	--hr-bg-soft: #f8fafc;
	--hr-green: #16a34a;
	--hr-red: #dc2626;
	--hr-radius: 14px;
	--hr-shadow: 0 6px 24px rgba(15, 23, 42, .08);
	--hr-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ---------- Base ---------- */
body { font-family: var(--hr-font); color: var(--hr-ink); background: #fff; line-height: 1.7; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--hr-dark); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin-top: 1.6em; }
h3 { font-size: 1.2rem; }
a { color: var(--hr-primary); text-underline-offset: 3px; }
a:hover { color: var(--hr-primary-dark); }
img { max-width: 100%; height: auto; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content ul li, .entry-content ol li { margin-bottom: .35em; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* GeneratePress tweaks */
.site-header { border-bottom: 1px solid var(--hr-border); }
.main-title a { font-weight: 800; color: var(--hr-dark); }
.main-navigation .main-nav ul li a { font-weight: 600; }
.main-navigation .main-nav ul li.hr-nav-cta > a { background: var(--hr-accent); color: #111 !important; border-radius: 999px; line-height: 40px; padding: 0 18px; margin: 10px 0 10px 8px; }
.main-navigation .main-nav ul li.hr-nav-cta > a:hover { background: var(--hr-accent-dark); }
.one-container .site-content { padding-top: 24px; }
.inside-article { padding-top: 10px; }

/* ---------- Icons ---------- */
.hr-ico { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: -.2em; flex: none; }

/* ---------- Buttons ---------- */
.hr-btn { box-sizing: border-box; display: inline-flex; align-items: center; gap: .5em; padding: .85em 1.4em; border-radius: 999px; font-weight: 700; text-decoration: none !important; line-height: 1.2; transition: transform .15s ease, background .15s ease; border: 2px solid transparent; cursor: pointer; }
.hr-btn:hover { transform: translateY(-1px); }
.hr-btn--primary { background: var(--hr-accent); color: #111 !important; }
.hr-btn--primary:hover { background: var(--hr-accent-dark); color: #111 !important; }
.hr-btn--dark { background: var(--hr-primary); color: #fff !important; }
.hr-btn--dark:hover { background: var(--hr-primary-dark); }
.hr-btn--ghost { border-color: currentColor; color: var(--hr-primary) !important; background: transparent; }
.hr-btn--block { width: 100%; justify-content: center; }

/* ---------- Hero ---------- */
.hr-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; background: linear-gradient(135deg, var(--hr-primary-soft), #fff 60%); border: 1px solid var(--hr-border); border-radius: 20px; padding: clamp(20px, 4vw, 44px); margin-bottom: 32px; }
.hr-hero h1 { margin: .3em 0 .4em; }
.hr-hero p.hr-hero__sub { font-size: 1.1rem; color: var(--hr-muted); margin-bottom: 1.2em; }
.hr-hero__media img { border-radius: 16px; box-shadow: var(--hr-shadow); display: block; width: 100%; }
.hr-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hr-pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--hr-border); color: var(--hr-primary); font-weight: 700; font-size: .82rem; padding: 5px 12px; border-radius: 999px; }
.hr-trust { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 18px 0 0; padding: 0; list-style: none; font-size: .92rem; color: var(--hr-muted); }
.hr-trust li { display: flex; align-items: center; gap: 6px; margin: 0; }
.hr-trust .hr-ico { color: var(--hr-green); }

/* ---------- Referral code box ---------- */
.hr-codebox { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: var(--hr-dark); color: #fff; border-radius: var(--hr-radius); padding: 16px 18px; margin: 18px 0; }
.hr-codebox__label { font-size: .85rem; opacity: .8; }
.hr-codebox__code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.2rem; font-weight: 700; letter-spacing: .06em; background: rgba(255,255,255,.08); border: 1px dashed rgba(255,255,255,.4); padding: 6px 14px; border-radius: 8px; }
.hr-copy { background: #fff; color: var(--hr-dark); border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 700; cursor: pointer; }

/* ---------- Plan cards ---------- */
.hr-plans, .hr-plans * { box-sizing: border-box; }
.hr-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 24px 0 8px; }
.hr-plan { position: relative; display: flex; flex-direction: column; border: 1px solid var(--hr-border); border-radius: var(--hr-radius); padding: 22px 20px; background: #fff; box-shadow: var(--hr-shadow); }
.hr-plan--featured { border: 2px solid var(--hr-primary); }
.hr-plan__badge { position: absolute; top: -12px; left: 18px; background: var(--hr-primary); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.hr-plan__name { margin: 0 0 4px; font-size: 1.25rem; }
.hr-plan__desc { color: var(--hr-muted); font-size: .9rem; margin: 0 0 12px; min-height: 2.8em; }
.hr-plan__old { color: var(--hr-muted); text-decoration: line-through; font-size: .95rem; }
.hr-plan__off { display: inline-block; margin-left: 6px; background: #dcfce7; color: #166534; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.hr-plan__price { font-size: 2.1rem; font-weight: 800; color: var(--hr-dark); line-height: 1.1; margin: 4px 0; }
.hr-plan__price small { font-size: .95rem; font-weight: 600; color: var(--hr-muted); }
.hr-plan__terms { font-size: .8rem; color: var(--hr-muted); margin: 0 0 14px; }
.hr-plan__feat { list-style: none; margin: 14px 0 0; padding: 0; font-size: .92rem; }
.hr-plan__feat li { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; }
.hr-plan__feat .hr-ico { color: var(--hr-green); margin-top: .2em; }
.hr-plan .hr-btn { margin-top: auto; }
.hr-plan__cta { margin-top: auto; padding-top: 6px; }
.hr-note { font-size: .82rem; color: var(--hr-muted); margin: 6px 0 24px; }

/* ---------- Tables ---------- */
.hr-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 18px 0 24px; border: 1px solid var(--hr-border); border-radius: var(--hr-radius); }
.hr-table { width: 100%; border-collapse: collapse; margin: 0; font-size: .93rem; min-width: 560px; }
.hr-table th, .hr-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--hr-border); border-left: 0; border-right: 0; }
.hr-table thead th { background: var(--hr-dark); color: #fff; font-weight: 700; }
.hr-table tbody tr:nth-child(even) { background: var(--hr-bg-soft); }
.hr-table td a { font-weight: 700; }

/* ---------- Feature grid ---------- */
.hr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 20px 0 28px; }
.hr-card { border: 1px solid var(--hr-border); border-radius: var(--hr-radius); padding: 18px; background: #fff; }
.hr-card h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.hr-card p { margin: 0; color: var(--hr-muted); font-size: .93rem; }
.hr-card__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--hr-primary-soft); color: var(--hr-primary); }
.hr-card__icon .hr-ico { width: 24px; height: 24px; }
a.hr-card { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.hr-card:hover { border-color: var(--hr-primary); transform: translateY(-2px); }

/* ---------- Steps ---------- */
.hr-steps { counter-reset: step; list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 14px; }
.hr-steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 62px; border: 1px solid var(--hr-border); border-radius: var(--hr-radius); background: #fff; margin: 0; }
.hr-steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--hr-primary); color: #fff; font-weight: 800; display: grid; place-items: center; }

/* ---------- Callouts ---------- */
.hr-callout { border-left: 4px solid var(--hr-primary); background: var(--hr-primary-soft); padding: 14px 18px; border-radius: 0 var(--hr-radius) var(--hr-radius) 0; margin: 20px 0; }
.hr-callout--warn { border-color: var(--hr-accent); background: #fffbeb; }
.hr-disclosure { font-size: .85rem; color: var(--hr-muted); background: var(--hr-bg-soft); border: 1px solid var(--hr-border); border-radius: 10px; padding: 10px 14px; margin: 0 0 20px; }
.hr-pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.hr-pros-cons > div { border: 1px solid var(--hr-border); border-radius: var(--hr-radius); padding: 16px 18px; }
.hr-pros-cons h3 { margin-top: 0; }
.hr-pros-cons ul { margin: 0 0 0 1.1em; }

/* ---------- CTA band ---------- */
.hr-cta { background: linear-gradient(135deg, var(--hr-primary-dark), var(--hr-primary)); color: #fff; border-radius: 20px; padding: clamp(22px, 4vw, 40px); margin: 32px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.hr-cta h2, .hr-cta h3 { color: #fff; margin: 0 0 6px; }
.hr-cta p { margin: 0; opacity: .9; }

/* ---------- FAQ ---------- */
.hr-faq { margin: 18px 0 28px; }
.hr-faq details { border: 1px solid var(--hr-border); border-radius: 12px; margin-bottom: 10px; background: #fff; }
.hr-faq summary { cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 700; color: var(--hr-dark); list-style: none; position: relative; }
.hr-faq summary::-webkit-details-marker { display: none; }
.hr-faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font-size: 1.4rem; color: var(--hr-primary); }
.hr-faq details[open] summary::after { content: "–"; }
.hr-faq .hr-faq__a { padding: 0 16px 14px; color: var(--hr-ink); }
.hr-faq .hr-faq__a p:last-child { margin-bottom: 0; }

/* ---------- Breadcrumbs & TOC ---------- */
.hr-breadcrumbs { font-size: .85rem; color: var(--hr-muted); margin: 0 0 14px; }
.hr-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.hr-breadcrumbs li { margin: 0; }
.hr-breadcrumbs li + li::before { content: "›"; margin: 0 6px 0 2px; color: #94a3b8; }
.hr-breadcrumbs a { color: var(--hr-muted); text-decoration: none; }
.hr-toc { border: 1px solid var(--hr-border); background: var(--hr-bg-soft); border-radius: var(--hr-radius); padding: 12px 18px; margin: 0 0 24px; }
.hr-toc summary { font-weight: 800; cursor: pointer; color: var(--hr-dark); }
.hr-toc ol { margin: 10px 0 4px 1.2em; }
.hr-toc li { margin-bottom: 4px; }

/* ---------- Related links ---------- */
.hr-related { margin: 28px 0; }
.hr-related h2 { font-size: 1.3rem; }

/* ---------- Footer ---------- */
.hr-footer { background: var(--hr-dark); color: #cbd5e1; padding: 48px 0 0; font-size: .93rem; }
.hr-footer .hr-footer__inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hr-footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.hr-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .06em; }
.hr-footer ul { list-style: none; margin: 0; padding: 0; }
.hr-footer li { margin: 0 0 8px; }
.hr-footer a { color: #e2e8f0; text-decoration: none; }
.hr-footer a:hover { color: var(--hr-accent); }
.hr-footer__brand { font-size: 1.25rem; font-weight: 800; color: #fff; margin-bottom: 8px; display: block; }
.hr-footer__social { display: flex; gap: 10px; margin-top: 14px; }
.hr-footer__social a { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.hr-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding: 18px 0 24px; font-size: .82rem; color: #94a3b8; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.site-footer .site-info { display: none; }

/* ---------- Mobile sticky CTA ---------- */
.hr-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; background: #fff; border-top: 1px solid var(--hr-border); box-shadow: 0 -6px 18px rgba(15,23,42,.08); padding: 10px 14px; display: none; align-items: center; gap: 10px; }
.hr-sticky__txt { font-size: .85rem; font-weight: 700; color: var(--hr-dark); line-height: 1.3; }
.hr-sticky .hr-btn { padding: .7em 1.1em; margin-left: auto; white-space: nowrap; }

/* ---------- Blog cards ---------- */
.hr-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 18px 0 28px; }
.hr-post { border: 1px solid var(--hr-border); border-radius: var(--hr-radius); overflow: hidden; background: #fff; }
.hr-post img { display: block; width: 100%; aspect-ratio: 1200/630; object-fit: cover; }
.hr-post__body { padding: 14px 16px 18px; }
.hr-post__body h3 { margin: 0 0 6px; font-size: 1.05rem; }
.hr-post__body h3 a { color: var(--hr-dark); text-decoration: none; }
.hr-post__body p { margin: 0; color: var(--hr-muted); font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.hr-hero { grid-template-columns: 1fr; }
	.hr-hero__media { order: -1; }
	.hr-footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
	.hr-sticky { display: flex; }
	body { padding-bottom: 68px; }
	.hr-pros-cons { grid-template-columns: 1fr; }
	.main-navigation .main-nav ul li.hr-nav-cta > a { margin: 6px 0; display: inline-block; }
}
@media (max-width: 520px) {
	.hr-footer__cols { grid-template-columns: 1fr; }
	.hr-cta { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .hr-btn, a.hr-card { transition: none; } }
