/*
Theme Name:        Hampson & Mealey
Theme URI:         https://hampsonmealey.co.uk
Author:            Hampson & Mealey Removals Ltd
Author URI:        https://hampsonmealey.co.uk
Description:       Custom WordPress theme for Hampson & Mealey — professional house removals and secure container self-storage in Kirkham, Preston and across Lancashire. Family-run, fully insured, 300+ five-star reviews.
Version:           1.0.9
Requires at least: 6.0
Tested up to:      6.7
Requires PHP:      8.0
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       hampson-mealey
Tags:              removal company, storage, local business, responsive, custom-theme
*/

/*
 * This file contains only the WordPress theme header comment.
 * All visual styles are in assets/css/main.css, enqueued via functions.php.
 */


/* hm related link patch */
.related-links {
  margin: 3rem 0;
  padding: 2rem;
  border-radius: 16px;
  background: #f7f7f4;
}
.related-links h2 {
  margin-top: 0;
}
.related-links ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1.25rem;
  padding-left: 1.2rem;
}
.related-links a {
  font-weight: 600;
}


/* hm menu/content expansion patch */
.primary-nav__list,
.primary-menu,
.menu {
  align-items: center;
}
.primary-nav__list > li > a,
.menu > li > a {
  white-space: nowrap;
}
.primary-nav__list li,
.menu li {
  position: relative;
}
.primary-nav__list .sub-menu,
.menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  padding: 0.75rem;
  margin: 0;
  list-style: none;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 9999;
}
.primary-nav__list li:hover > .sub-menu,
.primary-nav__list li:focus-within > .sub-menu,
.menu li:hover > .sub-menu,
.menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav__list .sub-menu a,
.menu .sub-menu a {
  display: block;
  padding: .55rem .75rem;
  color: #17211b;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
}
.primary-nav__list .sub-menu a:hover,
.menu .sub-menu a:hover {
  background: #f4f1ea;
}
.prose {
  max-width: 920px;
}
.prose .lead,
.hero .lead {
  font-size: 1.15rem;
  line-height: 1.65;
}
.prose h2 {
  margin-top: 2.4rem;
}
.cta-panel {
  margin-top: 3rem;
  padding: 2rem;
  background: #f7f4ec;
  border-radius: 18px;
}
@media (max-width: 900px) {
  .primary-nav__list .sub-menu,
  .menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding-left: 1rem;
  }
}

/* hm full authority content styles */
.hm-content-page .hm-content, .hm-post .hm-content { padding: 2rem 0 4rem; }
.hm-content-page h2, .hm-post h2 { margin-top: 2rem; }
.hm-content-page p, .hm-post p { max-width: 920px; }
.hm-content-page .button, .hm-post .button {
  display: inline-block; padding: .85rem 1.15rem; border-radius: 999px;
  text-decoration: none; font-weight: 700;
}


/* hm clean header dropdown fix */
.hm-site-header {
  background: #111;
  color: #fff;
  position: relative;
  z-index: 1000;
}
.hm-header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 86px;
}
.hm-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  flex: 0 0 auto;
}
.hm-logo img,
.hm-logo .custom-logo {
  max-height: 64px;
  width: auto;
  display: block;
}
.hm-logo-mark {
  width: 52px;
  height: 40px;
  display: inline-block;
  background: linear-gradient(90deg, #8d0505 0 45%, #ed1c24 45% 70%, transparent 70%);
}
.hm-logo-text {
  color: #ed1c24;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .04em;
}
.hm-main-nav {
  margin-left: auto;
}
.hm-menu,
.hm-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hm-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hm-menu > li {
  position: relative;
}
.hm-menu a {
  color: #fff;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  padding: 14px 12px;
}
.hm-menu > li > a:hover,
.hm-menu > li:focus-within > a {
  color: #ed1c24;
}
.hm-has-submenu > a::after {
  content: " ▾";
  font-size: 12px;
}
.hm-submenu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 280px;
  background: #171717;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  padding: 10px;
  border-radius: 0 0 12px 12px;
}
.hm-submenu li + li {
  border-top: 1px solid rgba(255,255,255,.06);
}
.hm-submenu a {
  padding: 11px 12px;
  font-size: 14px;
  white-space: normal;
}
.hm-has-submenu:hover > .hm-submenu,
.hm-has-submenu:focus-within > .hm-submenu {
  display: block;
}
.hm-header-cta {
  flex: 0 0 auto;
  color: #fff;
  background: #ed1c24;
  text-decoration: none;
  font-weight: 800;
  padding: 14px 22px;
  border-radius: 6px;
  white-space: nowrap;
}
.hm-header-cta:hover {
  filter: brightness(1.08);
}
.hm-menu-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 0;
  padding: 8px;
}
.hm-menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  margin: 5px 0;
}
@media (max-width: 1050px) {
  .hm-header-inner {
    flex-wrap: wrap;
    min-height: 74px;
  }
  .hm-menu-toggle {
    display: block;
  }
  .hm-main-nav {
    display: none;
    width: 100%;
    order: 10;
    margin-left: 0;
  }
  .hm-main-nav.is-open {
    display: block;
  }
  .hm-menu {
    display: block;
    padding: 12px 0 18px;
  }
  .hm-menu a {
    padding: 12px 0;
  }
  .hm-submenu {
    display: block;
    position: static;
    min-width: 0;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 0 18px;
  }
  .hm-submenu a {
    color: #ddd;
    padding: 9px 0;
  }
  .hm-header-cta {
    margin-left: 0;
    padding: 11px 16px;
  }
}


/* hm minor polish pass */
:root {
  --hm-red: #ed1c24;
  --hm-dark: #111111;
  --hm-soft: #f7f7f4;
  --hm-border: rgba(0,0,0,.08);
}
body {
  text-rendering: optimizeLegibility;
}
.hm-header-inner {
  max-width: 1220px;
}
.hm-main-nav {
  flex: 1 1 auto;
}
.hm-menu {
  justify-content: flex-end;
}
.hm-menu a {
  letter-spacing: .005em;
}
.hm-header-cta {
  box-shadow: 0 8px 20px rgba(237,28,36,.18);
}
.hm-header-cta:focus,
.hm-menu a:focus {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.hm-submenu {
  backdrop-filter: blur(3px);
}
.hm-content .container,
.hm-content-page .container,
.hm-post .container {
  max-width: 980px;
}
.hm-content h1,
.hm-content-page h1,
.hm-post h1 {
  line-height: 1.08;
}
.hm-content h2,
.hm-content-page h2,
.hm-post h2 {
  line-height: 1.18;
}
.hm-content p,
.hm-content-page p,
.hm-post p {
  font-size: clamp(1rem, .98rem + .12vw, 1.075rem);
}
.hm-page a.button,
.hm-post a.button,
.hm-content-page a.button {
  background: var(--hm-red);
  color: #fff !important;
  border-radius: 8px;
}
.related-links {
  border: 1px solid var(--hm-border);
}
img {
  max-width: 100%;
  height: auto;
}
@media (min-width: 1051px) {
  .hm-menu > li > a {
    padding-left: 9px;
    padding-right: 9px;
  }
}
@media (max-width: 760px) {
  .hm-header-inner {
    width: min(100% - 22px, 1180px);
  }
  .hm-logo img,
  .hm-logo .custom-logo {
    max-height: 52px;
  }
}


/* hm tinted gradient polish pass
   Converts non-white block colour areas into softer tinted fades.
   White backgrounds are intentionally left alone. */
:root {
  --hm-red-gradient: linear-gradient(135deg, #ed1c24 0%, #c9161d 52%, #8f0b10 100%);
  --hm-dark-gradient: linear-gradient(135deg, #0f0f0f 0%, #171717 55%, #250707 100%);
  --hm-soft-green-gradient: linear-gradient(135deg, #e7fff2 0%, #f4fff9 58%, #ffffff 100%);
  --hm-soft-grey-gradient: linear-gradient(135deg, #f6f6f3 0%, #fbfbf8 58%, #ffffff 100%);
  --hm-soft-red-gradient: linear-gradient(135deg, #fff1f1 0%, #fff8f8 58%, #ffffff 100%);
  --hm-soft-blue-gradient: linear-gradient(135deg, #eef6ff 0%, #f8fbff 58%, #ffffff 100%);
}

/* Header and footer-style dark blocks */
.hm-site-header,
.site-header,
.main-header,
.header,
.site-footer,
.footer,
footer {
  background: var(--hm-dark-gradient);
}

/* Primary CTA buttons and red panels */
.hm-header-cta,
.button.primary,
.btn-primary,
.cta-button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
  background: var(--hm-red-gradient);
}

/* Keep outline/secondary buttons clean */
.button.secondary,
.btn-secondary,
.hm-outline-button {
  background: transparent;
}

/* Soft content panels */
.related-links,
.storage-related-links,
.hm-card,
.card,
.service-card,
.feature-card,
.trust-card,
.info-card,
.wp-block-group.has-background:not(.has-white-background-color) {
  background: var(--hm-soft-grey-gradient);
}

/* WhatsApp/video/storage-tour style green sections */
.whatsapp,
.whatsapp-section,
.video-tour,
.storage-tour,
[class*="whatsapp"],
[class*="video-tour"],
[class*="storage-tour"] {
  background: var(--hm-soft-green-gradient);
}

/* Common green inline CTA area from the site */
section:has(a[href*="wa.me"]),
section:has(a[href*="whatsapp"]) {
  background: var(--hm-soft-green-gradient);
}

/* Red-tinted alert/highlight sections */
.alert,
.notice,
.highlight,
.important,
[class*="highlight"],
[class*="cta-panel"] {
  background: var(--hm-soft-red-gradient);
}

/* Avoid making nested links/buttons inherit pale backgrounds */
.related-links a,
.storage-related-links a,
.hm-card a,
.card a,
.service-card a,
.feature-card a {
  background: transparent;
}

/* Better gradient rendering on large blocks */
.related-links,
.storage-related-links,
.hm-card,
.card,
.service-card,
.feature-card,
.trust-card,
.info-card,
.whatsapp-section,
.video-tour,
.storage-tour,
[class*="whatsapp"],
[class*="video-tour"],
[class*="storage-tour"] {
  background-repeat: no-repeat;
  background-size: cover;
}

/* Stronger hover treatment without flat colour blocks */
.hm-header-cta:hover,
.wp-block-button__link:hover,
.cta-button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* Prevent old flat black/red declarations later in cascade from overpowering the header */
.hm-site-header .hm-submenu {
  background: linear-gradient(135deg, #151515 0%, #1d1d1d 60%, #270707 100%);
}
