/*
Theme Name: Mamo Building Services - Ryan Pattison OCT 25
Theme URI: https://rpatty.xyz
Author: Ryan Pattison
Author URI: https://rpatty.xyz
Description: A clean, modern, responsive WordPress theme for Mamo Building Services with professional layouts and automated setup.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mamo
Copyright: © 2025 Ryan Pattison
*/

/* CSS Variables */
:root {
  --mamo-navy: #0e2235;
  --mamo-sky: #110d51;
  --mamo-gold: #f2b705;
  --mamo-orange: #f97316;
  --mamo-gray-900: #1f2937;
  --mamo-gray-700: #374151;
  --mamo-gray-500: #6b7280;
  --mamo-gray-200: #e5e7eb;
  --mamo-gray-100: #f3f4f6;
  --container: 1200px;
}

/* Reset + base */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "SF Pro Display", "SF Pro Text", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial,
    "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--mamo-gray-900);
  background: #fff;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--mamo-sky);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
/* orange accent on hover alongside blue */
a:focus,
a:hover {
  color: var(--mamo-orange);
}
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}
.hidden {
  display: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--mamo-gray-200);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand img {
  height: 42px;
  width: auto;
}
.brand .site-title {
  font-weight: 700;
  color: var(--mamo-navy);
  font-size: 1.1rem;
  margin: 0;
}

/* Nav */
.primary-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.primary-nav a {
  color: var(--mamo-gray-900);
  font-weight: 600;
}
.primary-nav a:hover {
  color: var(--mamo-sky);
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.75rem;
}
.primary-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.primary-nav .menu > li > a {
  display: block;
  padding: 0.5rem 0;
}

/* Mega dropdown */
.primary-nav .menu > li {
  position: relative;
}
.primary-nav .menu > li .mega {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  min-width: 420px;
  background: #fff;
  border: 1px solid var(--mamo-gray-200);
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 0.75rem 1rem;
  display: none;
  z-index: 100;
}
.primary-nav .menu > li:hover .mega {
  display: block;
}
.primary-nav .mega-inner {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
}
.primary-nav .mega-title {
  margin: 0.25rem 0 0.25rem;
  font-weight: 800;
  color: var(--mamo-navy);
}
.primary-nav .mega-list {
  list-style: disc;
  margin: 0.25rem 0 0.25rem;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.25rem;
}
.primary-nav .mega-list a {
  color: var(--mamo-gray-900);
  font-weight: 700;
}
.primary-nav .mega-list a:hover {
  color: var(--mamo-sky);
}

@media (max-width: 900px) {
  .primary-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--mamo-gray-200);
    flex-direction: column;
    padding: 1rem;
  }
  .primary-nav.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .primary-nav .menu {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Hero */
.hero {
  position: relative;
  color: #fff;
  /* Blurred background image */
  background: none;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("images/construction.jpeg") center center/cover no-repeat;
  filter: blur(8px);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(14, 34, 53, 0.72); /* dark blue overlay */
}
.hero > * {
  position: relative;
  z-index: 2;
}
.hero .media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero .overlay {
  position: absolute;
  inset: 0; /* legacy - no background gradient for front-page replacement */
}
/* removed .overlay-img; new annotation image style below */
.hero-annotation {
  position: absolute;
  top: 18px;
  left: 18px;
  height: 56px;
  width: auto;
  display: block;
  background: transparent;
  pointer-events: none;
}
.hero .inner {
  position: relative;
  padding: 3.5rem 0;
}
.hero .inner {
  text-align: center;
}

/* Front-page hero logo sizing */
/* Full hero inner background */
.hero:not(.hero--split) .container.inner {
  background-image: url("images/construction.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Logo sizing: ~3x larger */
.hero-logo-img {
  max-height: 480px;
  width: auto;
  display: block;
  margin: 0 auto;
}
/* Override generic hero image sizing so the logo keeps its aspect ratio and isn't cropped */
.hero .media img.hero-logo-img,
.hero--split .media img.hero-logo-img {
  width: auto;
  height: auto;
  max-height: 466;
  object-fit: contain;
}
@media (max-width: 900px) {
  .hero-logo-img {
    max-height: 288px;
  }
  .hero .media img.hero-logo-img,
  .hero--split .media img.hero-logo-img {
    max-height: 288px;
  }
}

/* media--logo: allow the logo to overflow the media box and not be cropped */
.media--logo {
  overflow: visible;
}
.media--logo .hero-logo-img {
  display: block;
  max-width: 90%;
  height: auto;
  object-fit: contain;
}
.hero .inner p {
  margin: 0.5rem auto 0;
}
.hero .kicker {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cfe9f6;
  font-weight: 700;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  margin: 0.25rem 0 1rem;
  line-height: 1.15;
}
.hero p {
  max-width: 760px;
  color: #e8f4fb;
  font-size: 1.125rem;
}
.hero .cta {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 700;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--mamo-sky);
  color: #fff;
}
.btn-outline {
  border-color: #bfe8f7;
  color: #e8f4fb;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Adjusted hero logo image size to match <h1> */
.hero-logo-img {
  height: clamp(2rem, 6vw, 3.25rem); /* Matches the dynamic size of <h1> */
  width: auto; /* Maintain aspect ratio */
}

/* Set the dimensions for the hero logo image */
.hero-logo-img {
    width: 488px;
    height: 446px;
    object-fit: contain;
}

/* Split hero: keep split hero images fully saturated and unfiltered */
.hero--split .media img {
  opacity: 1;
  filter: none;
}

/* Non-split (full) heroes: keep a subtle dim on media images for readability */
.hero:not(.hero--split) .media img {
  opacity: 0.55;
}

/* Full hero: add a construction banner background to the inner container */
.hero:not(.hero--split) .container.inner {
  background-image: url("images/construction.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Split hero: media left, content right */
.hero--split .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
}
.hero--split .media {
  position: relative;
  order: 0;
}
.hero--split .media img {
  height: 420px;
  object-fit: cover;
}
.hero--split .hero-logo {
  position: relative;
  left: auto;
  top: auto;
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: none;
}
.hero--split .hero-logo img {
  height: 56px;
  width: auto;
  display: block;
}
.hero--split .content {
  position: relative;
  padding: 3rem;
}
.hero--split .content h1 {
  color: #fff;
  text-align: left;
}
.hero--split .content p {
  color: #e8f4fb;
  text-align: left;
}

@media (max-width: 900px) {
  .hero--split .container {
    grid-template-columns: 1fr;
  }
  .hero--split .media img {
    height: 260px;
  }
  .hero--split .hero-logo {
    left: 12px;
    top: 12px;
  }
}

/* Sections */
.section {
  padding: 3rem 0;
}
.section.alt {
  background: var(--mamo-gray-100);
}
.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 1rem;
}
.kicker {
  color: var(--mamo-sky);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
/* Header CTA */
.header-cta {
  margin-left: 0.75rem;
}

/* Cards grid */
.grid {
  display: grid;
  gap: 1rem;
}
.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) {
  .grid.cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.card {
  background: #fff;
  border: 1px solid var(--mamo-gray-200);
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.12);
}
.card .thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s;
}
.card .thumb {
  position: relative;
}
.card .thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(249,115,22,0.32) 0%, rgba(249,115,22,0.18) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  border-radius: inherit;
}
.card:hover .thumb::after {
  opacity: 1;
}
.card:hover .thumb img {
  filter: brightness(0.92) saturate(1.1);
}
.card .body {
  padding: 1rem;
}
.card .title {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  color: var(--mamo-navy);
}
.card .meta {
  color: var(--mamo-gray-500);
  font-size: 0.9rem;
}

/* Services animations */
.grid.cols-4 .card {
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 0.35s;
}
.grid.cols-4 .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(16, 24, 40, 0.12);
}

/* About paragraph card */
.about-card {
  max-width: 820px;
  margin: 1rem auto;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.about-card .body {
  padding: 1.25rem 1.25rem;
}
.hero .about-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.hero .about-card p {
  color: var(--mamo-navy);
}

/* About page sections centered */
.section--about-intro .container {
  display: grid;
  place-items: center;
}
.section--about-intro .kicker,
.section--about-intro h2,
.section--about-intro h3 {
  text-align: center;
}

.accreditations .accred .title {
  font-weight: 700;
  color: var(--mamo-navy);
}
.accreditations .accred .meta {
  color: var(--mamo-gray-500);
}
.accreditations .accred .logo-thumb {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-bottom: 1px solid var(--mamo-gray-200);
}
.accreditations .accred .logo-thumb img {
  max-height: 64px;
  width: auto;
  object-fit: contain;
}

.accreditations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.accreditations .accred {
  flex: 1 1 calc(25% - 1rem);
  max-width: calc(25% - 1rem);
}
@media (max-width: 900px) {
  .accreditations .accred {
    flex: 1 1 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}

/* Content */
.content {
  padding: 2rem 0;
}
.content h1,
.content h2 {
  color: var(--mamo-navy);
  text-align: center;
}

/* Minimal Reviews */
.section--reviews-min {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.reviews-min {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.reviews-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}
.review-item {
  border: 1px solid var(--mamo-gray-200);
  border-radius: 0.75rem;
  padding: 1rem;
  background: #fff;
}
.review-item blockquote {
  margin: 0.5rem auto 0;
  color: var(--mamo-gray-900);
  font-style: italic;
}
.stars {
  color: #eab308;
  display: flex;
  gap: 0.15rem;
  justify-content: center;
}
.stars svg {
  fill: currentColor;
}
@media (max-width: 900px) {
  .reviews-list {
    grid-template-columns: 1fr;
  }
}

.review-item .leave-review {
  display: inline-block;
  margin-top: 1rem;
}
.btn--review {
  background: var(--mamo-gold);
  color: #1f1800;
  border-color: var(--mamo-gold);
  padding: 0.5rem 0.85rem;
  border-radius: 0.45rem;
}

/* Accreditations: center items for a polished look */
.accreditations {
  gap: 1rem;
}
.accreditations .accred {
  align-items: center;
  text-align: center;
  border: 0;
  box-shadow: none;
  border-radius: 0.5rem;
}
.accreditations .accred .body {
  display: grid;
  gap: 0.25rem;
  place-items: center;
}
.accreditations .accred .logo-thumb {
  background: transparent;
  padding: 14px;
  border-bottom: 0;
}

/* Footer contact icons */
.mini-block .contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.25rem;
}
.footer-mini .mini-block:nth-child(3) {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mini-block .contact-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mini-block .contact-list svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.mini-block .contact-list img {
  filter: brightness(0) invert(1) grayscale(1) !important;
  -webkit-filter: brightness(0) invert(1) grayscale(1) !important;
  opacity: 0.95;
}
.mini-block .contact-list i.fab, .mini-block .contact-list i.fas, .mini-block .contact-list i.fa-brands, .mini-block .contact-list i.fa-solid {
  color: #fff !important;
  font-size: 22px;
  vertical-align: middle;
  min-width: 22px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.12);
  transition: color 0.2s;
}
.mini-block .contact-list a {
  color: #fff;
  margin-left: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.mini-block .contact-list a:hover {
  color: var(--mamo-gold);
}
.mini-block .contact-list li {
  padding: 0.25rem 0.5rem;
  border-radius: 0.4rem;
  transition: background 0.2s;
}
.mini-block .contact-list li:hover {
  background: rgba(255,255,255,0.08);
}

/* Footer Cards */
.footer-cards {
  gap: 1.25rem;
}
.footer-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  padding: 1rem;
}
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}
.footer-list a {
  color: #fff;
}

/* Footer always at bottom */
.site-footer {
  background: var(--mamo-navy);
  color: #cfe0ee;
  margin-top: 2rem;
  font-size: 0.95rem;
  margin-bottom: 0;
}
.site-footer a {
  color: #fff;
}
.site-footer .grid {
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
}
.site-footer .bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 1rem;
  padding: 1rem 0;
  color: #a6c2d6;
  font-size: 0.9rem;
}
.site-footer .footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

main {
  flex: 1;
}

/* Footer cards centering + polish */
.footer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.25s ease, background 0.25s ease,
    border-color 0.25s ease;
}
.footer-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
  text-align: center;
}
.footer-address {
  color: #e6eef6;
  font-style: normal;
  margin: 0.25rem 0 0.75rem;
}

@media (max-width: 900px) {
  .site-footer .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .site-footer .grid {
    grid-template-columns: 1fr;
  }
}

/* Reveal Animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Footer grid like example (left aligned with dividers) */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 2rem;
  align-items: flex-start;
}
.footer-grid .footer-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding-right: 2rem;
  margin-right: 2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  border: 0;
}
.footer-grid .footer-card:last-child {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}
.footer-address {
  color: #e6eef6;
  font-style: normal;
  margin: 0.5rem 0 1rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid .footer-card {
    border-right: 0;
    margin-right: 0;
    padding-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 1rem;
  }
  .footer-grid .footer-card:last-child {
    border-bottom: 0;
  }
}
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Utilities */
.badge {
  display: inline-block;
  background: var(--mamo-gold);
  color: #1f1800;
  font-weight: 800;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
}

/* Compact footer (smaller, cleaner, centered) */
.site-footer--compact {
  padding: 24px 0 18px;
  font-size: 0.9rem;
}
.site-footer--compact .footer-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 1rem;
  align-items: start;
  text-align: center;
}
.site-footer--compact .mini-block h4 {
  margin: 0 0 0.4rem;
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.site-footer--compact .mini-block address {
  margin: 0 auto 0.4rem;
  color: #d8e6f2;
  font-style: normal;
  line-height: 1.4;
}
.site-footer--compact .mini-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}
.site-footer--compact .mini-block a {
  color: #fff;
  text-decoration: none;
}
.site-footer--compact .mini-block a:hover {
  text-decoration: underline;
}
.site-footer--compact .footer-mini-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #a6c2d6;
  font-size: 0.85rem;
}
@media (max-width: 900px) {
  .site-footer--compact .footer-mini {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .site-footer--compact .footer-mini {
    grid-template-columns: 1fr;
  }
}

/* Add hover effect for all services to highlight the image in orange */
.all-services img:hover {
  filter: brightness(1.2) sepia(1) hue-rotate(-50deg) saturate(5);
  transition: filter 0.3s ease;
}

/* Set the logo dimensions on the home/front page */
.front-page .logo img {
    width: 488px;
    height: 446px;
    object-fit: contain;
}
