/*
Theme Name: 5G Routers
Theme URI: https://5grouters.co.uk/
Description: Lightweight information theme for 5grouters.co.uk – 5G and 4G router guides, product overviews and news. Pairs with the "5G Routers – Content Installer" plugin.
Version: 1.0.0
Author: 5G Routers
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: fivegrouters
*/

:root {
	--fg-green: #0d7c5c;
	--fg-green-dark: #0a3d2f;
	--fg-green-deep: #072a20;
	--fg-amber: #fbaa19;
	--fg-amber-soft: #fff4dc;
	--fg-ink: #17211d;
	--fg-muted: #5a6762;
	--fg-line: #e2e8e5;
	--fg-bg: #f6f8f7;
	--fg-white: #fff;
	--fg-radius: 10px;
	--fg-max: 1200px;
	--fg-shadow: 0 1px 2px rgba(7, 42, 32, .06), 0 6px 20px rgba(7, 42, 32, .06);
	--fg-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--fg-font); font-size: 17px; line-height: 1.65; color: var(--fg-ink); background: var(--fg-white); }
img, svg, video, iframe { max-width: 100%; height: auto; }
a { color: var(--fg-green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--fg-green-dark); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--fg-green-deep); margin: 1.6em 0 .5em; }
h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-top: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p, ul, ol, table, figure { margin: 0 0 1.1em; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--fg-line); padding: .55em .75em; text-align: left; vertical-align: top; }
th { background: var(--fg-bg); }
figure { margin-left: 0; margin-right: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link:focus { position: fixed; left: 8px; top: 8px; z-index: 1000; background: #fff; padding: 8px 12px; clip: auto; width: auto; height: auto; }

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

/* Header */
.fg-topbar { background: var(--fg-green-deep); color: #cfe3dc; font-size: .85rem; }
.fg-topbar .fg-wrap { display: flex; justify-content: space-between; gap: 1rem; padding-top: 6px; padding-bottom: 6px; }
.fg-topbar a { color: #fff; text-decoration: none; }
.fg-header { background: var(--fg-white); border-bottom: 1px solid var(--fg-line); position: sticky; top: 0; z-index: 50; }
.fg-header .fg-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.fg-logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--fg-green-deep); font-weight: 800; font-size: 1.2rem; }
.fg-logo img { height: 46px; width: auto; }
.fg-nav-toggle { display: none; }
.fg-nav-btn { display: none; cursor: pointer; padding: 10px; border: 1px solid var(--fg-line); border-radius: 8px; }
.fg-nav-btn span { display: block; width: 22px; height: 2px; background: var(--fg-green-deep); margin: 4px 0; }
.fg-nav ul { list-style: none; margin: 0; padding: 0; }
.fg-nav > ul { display: flex; gap: .25rem; }
.fg-nav li { position: relative; }
.fg-nav a { display: block; padding: .55rem .8rem; text-decoration: none; color: var(--fg-ink); font-weight: 600; font-size: .95rem; border-radius: 8px; }
.fg-nav a:hover, .fg-nav .current-menu-item > a, .fg-nav .current-menu-ancestor > a { background: var(--fg-bg); color: var(--fg-green); }
.fg-nav .sub-menu { position: absolute; left: 0; top: 100%; min-width: 250px; background: #fff; border: 1px solid var(--fg-line); border-radius: var(--fg-radius); box-shadow: var(--fg-shadow); padding: .4rem; display: none; }
.fg-nav li:hover > .sub-menu, .fg-nav li:focus-within > .sub-menu { display: block; }
.fg-nav .sub-menu a { font-weight: 500; }
.fg-nav .menu-item-has-children > a::after { content: ""; display: inline-block; margin-left: .35em; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }

@media (max-width: 960px) {
	.fg-nav-btn { display: block; }
	.fg-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--fg-line); box-shadow: var(--fg-shadow); max-height: 75vh; overflow-y: auto; }
	.fg-nav-toggle:checked ~ .fg-nav { display: block; }
	.fg-nav > ul { display: block; padding: .5rem 20px 1rem; }
	.fg-nav .sub-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 1rem; min-width: 0; }
	.fg-nav .menu-item-has-children > a::after { display: none; }
	.fg-topbar .fg-hide-sm { display: none; }
}

/* Hero */
.fg-hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(251, 170, 25, .22), transparent 60%), linear-gradient(135deg, var(--fg-green-deep), var(--fg-green) 120%); color: #e7f3ef; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.fg-hero h1 { color: #fff; max-width: 820px; }
.fg-hero p { font-size: 1.15rem; max-width: 760px; color: #d6ebe4; }
.fg-hero .fg-btn { margin-right: .6rem; margin-top: .4rem; }
.fg-pagehead { background: var(--fg-bg); border-bottom: 1px solid var(--fg-line); padding: 1.6rem 0 1.4rem; }
.fg-pagehead h1 { margin: .3rem 0 0; }
.fg-pagehead .fg-lede { color: var(--fg-muted); margin: .5rem 0 0; max-width: 820px; }

/* Buttons */
.fg-btn { display: inline-block; background: var(--fg-amber); color: var(--fg-green-deep); font-weight: 700; padding: .75rem 1.3rem; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; font-size: 1rem; }
.fg-btn:hover { background: #ffbe45; color: var(--fg-green-deep); }
.fg-btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.fg-btn--ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* Breadcrumbs */
.fg-crumbs { font-size: .85rem; color: var(--fg-muted); }
.fg-crumbs a { color: var(--fg-muted); text-decoration: none; }
.fg-crumbs a:hover { color: var(--fg-green); text-decoration: underline; }
.fg-crumbs .sep { margin: 0 .4em; opacity: .6; }

/* Layout */
.fg-main { padding: 2.2rem 0 3rem; }
.fg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; }
.fg-layout--full { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 960px) { .fg-layout { grid-template-columns: minmax(0, 1fr); } }
.fg-content { min-width: 0; }
.fg-content > *:first-child { margin-top: 0; }
.fg-content img { border-radius: 6px; }
.fg-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.fg-aside > * + * { margin-top: 1.5rem; }
.fg-box { background: var(--fg-bg); border: 1px solid var(--fg-line); border-radius: var(--fg-radius); padding: 1.3rem; }
.fg-box h3 { margin-top: 0; }
.fg-box ul { padding-left: 1.1rem; margin: 0; }
.fg-box--amber { background: var(--fg-amber-soft); border-color: #f6dca6; }
.fg-sticky { position: sticky; top: 92px; }

/* Product pages */
.fg-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.5rem; }
.fg-gallery figure { margin: 0; background: #fff; border: 1px solid var(--fg-line); border-radius: var(--fg-radius); padding: .6rem; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; }
.fg-gallery figure:first-child { grid-column: 1 / -1; aspect-ratio: auto; max-height: 460px; }
.fg-gallery figure:first-child img { max-height: 430px; width: auto; }
.fg-gallery img { object-fit: contain; max-height: 100%; }
.product-facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.product-facts li { background: var(--fg-bg); border: 1px solid var(--fg-line); border-radius: 999px; padding: .25rem .8rem; font-size: .9rem; }

/* Cards */
.fg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.fg-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--fg-line); border-radius: var(--fg-radius); overflow: hidden; text-decoration: none; color: var(--fg-ink); transition: box-shadow .15s, transform .15s, border-color .15s; }
.fg-card:hover { box-shadow: var(--fg-shadow); transform: translateY(-2px); border-color: #cddbd5; color: var(--fg-ink); }
.fg-card__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: #fff; border-bottom: 1px solid var(--fg-line); padding: .8rem; }
.fg-card__img img { max-height: 100%; width: auto; object-fit: contain; border-radius: 0; }
.fg-card__img--empty { background: linear-gradient(135deg, var(--fg-bg), #e9f1ed); }
.fg-card__img--empty::after { content: "5G"; font-weight: 800; font-size: 2rem; color: var(--fg-green); opacity: .35; }
.fg-card__title { display: block; font-weight: 700; padding: .8rem .9rem .2rem; line-height: 1.35; color: var(--fg-green-deep); }
.fg-card__meta { display: block; padding: 0 .9rem .9rem; color: var(--fg-muted); font-size: .85rem; }
.fg-cards--posts .fg-card__img { aspect-ratio: 16 / 9; padding: 0; }
.fg-cards--posts .fg-card__img img { width: 100%; height: 100%; object-fit: cover; }

/* Sections */
.fg-section { padding: 2.8rem 0; }
.fg-section--alt { background: var(--fg-bg); border-top: 1px solid var(--fg-line); border-bottom: 1px solid var(--fg-line); }
.fg-section h2 { margin-top: 0; }
.fg-section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.fg-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.fg-point { background: #fff; border: 1px solid var(--fg-line); border-radius: var(--fg-radius); padding: 1.2rem; }
.fg-point h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.fg-point p { margin: 0; color: var(--fg-muted); font-size: .95rem; }

/* Enquiry */
.fg-enquiry { background: linear-gradient(135deg, var(--fg-green-deep), var(--fg-green-dark)); color: #dcefe8; padding: 2.8rem 0; }
.fg-enquiry h2 { color: #fff; margin-top: 0; }
.fg-enquiry .fg-wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .fg-enquiry .fg-wrap { grid-template-columns: 1fr; } }
.fg-enquiry a { color: var(--fg-amber); }
.fg-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .8rem; }
.fg-form label span { font-weight: 400; opacity: .75; }
.fg-form input, .fg-form textarea { display: block; width: 100%; margin-top: .3rem; padding: .7rem .8rem; border-radius: 8px; border: 1px solid #c9d6d1; font: inherit; font-size: 1rem; background: #fff; color: var(--fg-ink); }
.fg-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 560px) { .fg-form__row { grid-template-columns: 1fr; } }
.fg-form__hp { position: absolute; left: -9999px; }
.fg-form__ok { background: #e6f6ef; color: #0a5a42; padding: .8rem 1rem; border-radius: 8px; }
.fg-form__err { background: #fdecea; color: #8a1f11; padding: .8rem 1rem; border-radius: 8px; }
.fg-aside .fg-form label { color: var(--fg-ink); }

/* Posts */
.fg-postmeta { color: var(--fg-muted); font-size: .9rem; margin-top: .5rem; }
.fg-featured { margin: 0 0 1.5rem; }
.fg-featured img { width: 100%; border-radius: var(--fg-radius); }
.fg-pagination { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 2rem; }
.fg-pagination .page-numbers { padding: .45rem .8rem; border: 1px solid var(--fg-line); border-radius: 8px; text-decoration: none; }
.fg-pagination .current { background: var(--fg-green); color: #fff; border-color: var(--fg-green); }

/* Footer */
.fg-footer { background: var(--fg-green-deep); color: #b8d0c7; font-size: .93rem; padding: 2.6rem 0 1.4rem; }
.fg-footer h4 { color: #fff; margin: 0 0 .6rem; font-size: 1rem; }
.fg-footer a { color: #e3f1ec; text-decoration: none; }
.fg-footer a:hover { color: var(--fg-amber); }
.fg-footer ul { list-style: none; margin: 0; padding: 0; }
.fg-footer li { margin: .25rem 0; }
.fg-footer__cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 860px) { .fg-footer__cols { grid-template-columns: 1fr 1fr; } }
.fg-footer__base { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2rem; padding-top: 1rem; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* Search */
.fg-search { display: flex; gap: .5rem; max-width: 520px; }
.fg-search input { flex: 1; padding: .7rem .9rem; border: 1px solid var(--fg-line); border-radius: 999px; font: inherit; }
.fg-search button { border-radius: 999px; }

/* Misc imported Shopify markup */
.fg-content [style*="float: left"], .fg-content [style*="float:left"] { max-width: 50%; margin-right: 1rem; }
.fg-content .wp-block-image { margin-bottom: 1rem; }
.alignleft { float: left; margin: 0 1rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* Two-up cards on phones */
@media (max-width: 560px) {
	.fg-cards { grid-template-columns: 1fr 1fr; gap: .7rem; }
	.fg-card__title { font-size: .9rem; padding: .6rem .65rem .15rem; }
	.fg-card__meta { padding: 0 .65rem .65rem; font-size: .8rem; }
	.fg-card__img { padding: .5rem; }
	.fg-cards--posts { grid-template-columns: 1fr; }
	body { font-size: 16px; }
}
