/*
Theme Name: Pinnacle Rentals
Theme URI: https://pinnaclerentalsaz.com
Author: Pinnacle Equipment Rentals
Description: Custom block theme for Pinnacle Equipment Rentals. No page builder or paid plugins required.
Version: 1.2.0
Requires at least: 6.5
Requires PHP: 8.0
License: GPLv2 or later
Text Domain: pinnacle
Update URI: false
*/

/* ---------- Global polish ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
img { height: auto; }
:where(a) { text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 2px; }

/* ---------- Header ---------- */
.pn-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(28,43,103,.08); }
.pn-logo a { display: block; line-height: 0; }
.pn-logo img { width: auto; display: block; }
.pn-header .pn-logo img { height: 50px; }
.pn-header .wp-block-navigation .wp-block-navigation-item__content { padding: .35em 0; border-bottom: 2px solid transparent; }
.pn-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.pn-header .wp-block-navigation-item__content:hover { border-bottom-color: var(--wp--preset--color--navy); text-decoration: none; }
.pn-header .wp-block-navigation__submenu-container { border-radius: 10px; padding: .4rem 0; box-shadow: 0 10px 30px rgba(15,24,56,.15); border: 0 !important; }
.pn-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .45rem 1.1rem; border-bottom: 0; }
/* Keep the header on one line at every width */
.pn-header .wp-block-navigation__container { flex-wrap: nowrap; white-space: nowrap; }
.pn-header .pn-phone-button { flex-wrap: nowrap; }
@media (max-width: 1100px) {
	.pn-header .wp-block-navigation { --wp--style--block-gap: 1.15rem; gap: 1.15rem; }
	.pn-header .wp-block-navigation__container { gap: 1.15rem; }
	.pn-header .pn-phone-button.is-compact .pn-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.pn-header .pn-phone-button.is-compact .wp-block-button__link { padding: .7rem; border-radius: 50%; line-height: 1; }
	.pn-header .pn-phone-button.is-compact .pn-btn-ico { margin: 0; }
}
@media (max-width: 900px) { .pn-header .pn-logo img { height: 42px; } }
@media (max-width: 781px) {
	.pn-header .pn-logo img { height: 38px; }
	/* Switch to the menu icon earlier than WordPress's default 600px so nothing gets squeezed */
	.pn-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.pn-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}
@media (max-width: 420px) { .pn-header .pn-logo img { height: 32px; } }

/* ---------- Page hero (rounded bottom, like the original design) ---------- */
.pn-hero { border-radius: 0 0 28px 28px; overflow: hidden; }
.pn-hero-home { border-radius: 0 0 28px 28px; overflow: hidden; }
.pn-eyebrow { letter-spacing: .14em; text-transform: uppercase; }
.pn-eyebrow a { text-decoration: none; }

/* ---------- Cards ---------- */
.pn-card { background: var(--wp--preset--color--white); border-radius: 14px; box-shadow: 0 2px 4px rgba(15,24,56,.04), 0 10px 30px rgba(15,24,56,.07); overflow: hidden; }
.wp-block-column > .pn-card:only-child, .is-layout-grid > .pn-card { height: 100%; box-sizing: border-box; }
.pn-category-card { position: relative; border-radius: 14px; overflow: hidden; }
.pn-category-card:hover { transform: translateY(-3px); }
.pn-category-card { transition: transform .2s ease; }
.pn-category-card a { text-decoration: none; }
.pn-category-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }

/* Equipment grid (rendered by the pinnacle/equipment-grid block) */
.pn-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.pn-eq { display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 4px rgba(15,24,56,.04), 0 10px 30px rgba(15,24,56,.08); transition: transform .2s ease, box-shadow .2s ease; }
.pn-eq:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(15,24,56,.06), 0 16px 40px rgba(15,24,56,.12); }
.pn-eq__media { display: block; position: relative; aspect-ratio: 4 / 3; background: #fff; border-bottom: 1px solid var(--wp--preset--color--surface); }
.pn-eq__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 1.25rem; box-sizing: border-box; }
.pn-eq__media.is-photo img { object-fit: cover; padding: 0; }
.pn-eq__body { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.4rem 1.5rem; flex: 1; }
.pn-eq__type { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--muted); font-weight: 500; }
.pn-eq__title { margin: 0; font-family: var(--wp--preset--font-family--heading); font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.pn-eq__title a { color: var(--wp--preset--color--navy); text-decoration: none; }
.pn-eq__title a::after { content: ""; position: absolute; inset: 0; }
.pn-eq { position: relative; }
.pn-eq__summary { margin: 0; color: var(--wp--preset--color--muted); font-size: .95rem; line-height: 1.55; }
.pn-eq__keyspecs { display: flex; flex-wrap: wrap; gap: .4rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.pn-eq__keyspecs li { background: var(--wp--preset--color--surface); border-radius: 999px; padding: .2rem .7rem; font-size: .8rem; color: var(--wp--preset--color--ink); }
.pn-eq__foot { margin-top: auto; padding-top: .85rem; display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.pn-eq__price { font-size: .9rem; color: var(--wp--preset--color--muted); }
.pn-eq__price strong { font-family: var(--wp--preset--font-family--heading); font-size: 1.15rem; color: var(--wp--preset--color--navy); }
.pn-eq__more { font-weight: 600; font-size: .9rem; color: var(--wp--preset--color--navy); }
.pn-eq__more::after { content: " →"; }

/* ---------- Single equipment ---------- */
.pn-specs { width: 100%; border-collapse: collapse; font-size: .95rem; }
.pn-specs th, .pn-specs td { text-align: left; padding: .6rem 0; border-bottom: 1px solid var(--wp--preset--color--mist); vertical-align: top; }
.pn-specs th { font-weight: 500; color: var(--wp--preset--color--muted); width: 50%; padding-right: 1rem; }
.pn-specs td { font-weight: 600; color: var(--wp--preset--color--ink); }
.pn-rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 0; }
.pn-rates div { background: var(--wp--preset--color--surface); border-radius: 12px; padding: .9rem .75rem; text-align: center; }
.pn-rates dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--wp--preset--color--muted); }
.pn-rates dd { margin: .2rem 0 0; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.35rem; color: var(--wp--preset--color--navy); }
.pn-rates-note { font-size: .85rem; color: var(--wp--preset--color--muted); margin: .6rem 0 0; }
.pn-rates-call { background: var(--wp--preset--color--surface); border-radius: 12px; padding: 1rem 1.2rem; margin: 0; }
.pn-feature-img { border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--wp--preset--color--mist); }
.pn-feature-img img { width: 100%; aspect-ratio: 4/3; object-fit: contain; padding: 1.5rem; box-sizing: border-box; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 12px; }

/* ---------- Steps ---------- */
.pn-step-num { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--navy); font-family: var(--wp--preset--font-family--heading); font-weight: 800; }

/* ---------- Contact form ---------- */
.pn-form { display: grid; gap: 1.1rem 1rem; grid-template-columns: 1fr 1fr; }
.pn-form > p { margin: 0; }
.pn-form .pn-full { grid-column: 1 / -1; }
.pn-form label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .35rem; color: var(--wp--preset--color--ink); }
.pn-form .pn-req { color: #b42318; }
.pn-form input, .pn-form select, .pn-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; padding: .75rem .9rem; border: 1px solid var(--wp--preset--color--mist); border-radius: 10px; background: #fff; color: var(--wp--preset--color--ink); }
.pn-form input:focus, .pn-form select:focus, .pn-form textarea:focus { outline: none; border-color: var(--wp--preset--color--navy); box-shadow: 0 0 0 3px rgba(28,43,103,.15); }
.pn-form textarea { min-height: 130px; resize: vertical; }
.pn-form button { justify-self: start; font: inherit; font-family: var(--wp--preset--font-family--heading); font-weight: 600; background: var(--wp--preset--color--navy); color: #fff; border: 0; border-radius: 999px; padding: .9rem 2rem; cursor: pointer; }
.pn-form button:hover { background: var(--wp--preset--color--navy-dark); }
.pn-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pn-notice { padding: 1rem 1.2rem; border-radius: 12px; margin-bottom: 1.25rem; }
.pn-notice.is-success { background: #ecfdf3; color: #05603a; border: 1px solid #abefc6; }
.pn-notice.is-error { background: #fef3f2; color: #912018; border: 1px solid #fecdca; }
.pn-form-small { font-size: .85rem; color: var(--wp--preset--color--muted); grid-column: 1 / -1; margin: 0; }
@media (max-width: 640px) { .pn-form { grid-template-columns: 1fr; } }

/* ---------- Business info ---------- */
.pn-info { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.pn-info li { display: grid; grid-template-columns: 2.5rem 1fr; gap: .75rem; align-items: start; }
.pn-info .pn-ico { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--navy); }
.pn-info .pn-ico svg { width: 1.1rem; height: 1.1rem; }
.pn-info strong { display: block; font-family: var(--wp--preset--font-family--heading); color: var(--wp--preset--color--navy); }
.pn-info a { color: inherit; }
.pn-footer .pn-info .pn-ico { width: 2rem; height: 2rem; }
.pn-footer .pn-info li { grid-template-columns: 2rem 1fr; }
.pn-footer .pn-info strong { color: #fff; }
.pn-map { border: 0; width: 100%; min-height: 360px; border-radius: 14px; display: block; }

/* ---------- Footer ---------- */
.pn-footer a { color: inherit; text-decoration: none; }
.pn-footer a:hover { color: var(--wp--preset--color--accent); }
.pn-footer .wp-block-list { list-style: none; padding: 0; }
.pn-footer .wp-block-list li { margin: .45rem 0; }
.pn-footer .pn-logo img { height: 46px; }

/* Page banner: navy tint over a real job-site photo */
.pn-hero { background: linear-gradient(100deg, rgba(14,22,54,.93) 0%, rgba(28,43,103,.84) 55%, rgba(28,43,103,.62) 100%), url(assets/images/hero-bg.jpg) center 45% / cover no-repeat; }
.pn-social { display: flex; gap: .6rem; }

/* ---------- Blog cards ---------- */
.pn-post-card .wp-block-post-featured-image img { aspect-ratio: 16/10; object-fit: cover; }

/* Outline buttons rendered by theme blocks */
.pn-phone-button .is-style-outline > .wp-block-button__link,
.wp-block-pinnacle-equipment-actions .is-style-outline > .wp-block-button__link { background: transparent; color: inherit; border: 2px solid currentColor; padding: calc(.85rem - 2px) calc(1.75rem - 2px); }
.wp-block-pinnacle-equipment-actions { color: var(--wp--preset--color--navy); gap: .75rem; }
.pn-phone-button .is-style-outline > .wp-block-button__link:hover,
.wp-block-pinnacle-equipment-actions .is-style-outline > .wp-block-button__link:hover { background: rgba(127,127,127,.12); }
.wp-block-pinnacle-copyright { text-align: center; margin: 0; }

/* Call / text buttons */
.pn-phone-button { display: flex; flex-wrap: wrap; gap: .5rem; }
.pn-btn-ico { display: inline-flex; width: 1em; height: 1em; margin-right: .45em; vertical-align: -0.12em; }
.pn-btn-ico svg { width: 100%; height: 100%; }
.pn-header .pn-phone-button .pn-text .wp-block-button__link { color: var(--wp--preset--color--navy); }
.pn-info .pn-or { color: var(--wp--preset--color--muted); font-size: .9em; }
.pn-footer .pn-info .pn-or { color: #aeb3c2; }

/* Service area */
.pn-cities ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pn-cities li { background: #fff; border: 1px solid var(--wp--preset--color--mist); border-radius: 999px; padding: .35rem .9rem; font-size: .92rem; color: var(--wp--preset--color--navy); font-weight: 500; }

/* Membership badges */
.pn-member-badge { display: inline-flex; align-items: center; gap: .65rem; padding: .55rem 1rem .55rem .7rem; border: 1px solid var(--wp--preset--color--mist); border-radius: 12px; background: #fff; text-decoration: none; color: var(--wp--preset--color--navy); }
.pn-member-ico { width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--navy); }
.pn-member-ico svg { width: 1.1rem; height: 1.1rem; }
.pn-member-text { display: flex; flex-direction: column; line-height: 1.15; }
.pn-member-text small { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--wp--preset--color--muted); }
.pn-member-text strong { font-family: var(--wp--preset--font-family--heading); font-size: .92rem; }
.pn-memberships.is-dark .pn-member-badge { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #fff; }
.pn-memberships.is-dark .pn-member-text small { color: #aeb3c2; }
.pn-member-logo img { height: 56px; width: auto; display: block; }
.pn-memberships.is-dark .pn-member-logo img { background: #fff; border-radius: 8px; padding: 6px; }

/* Phone/tablet menu (opened with the ☰ icon) */
.pn-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { align-items: flex-start !important; padding-top: 3.5rem; padding-left: .5rem; }
.pn-header .is-menu-open .wp-block-navigation__container,
.pn-header .is-menu-open .wp-block-navigation-item { align-items: flex-start !important; justify-content: flex-start !important; }
.pn-header .is-menu-open .wp-block-navigation__container { gap: 1.25rem !important; }
.pn-header .is-menu-open .wp-block-navigation-item__content { font-size: 1.4rem; font-weight: 600; border-bottom: 0 !important; }
.pn-header .is-menu-open .wp-block-navigation__submenu-container { box-shadow: none !important; background: transparent !important; border-radius: 0 !important; border-left: 3px solid var(--wp--preset--color--accent) !important; padding: .35rem 0 0 1rem !important; margin-top: .4rem; gap: .35rem !important; }
.pn-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-size: 1.1rem; font-weight: 500; padding: .2rem 0 !important; }
.pn-header .is-menu-open .wp-block-navigation__submenu-icon { display: none; }
