/*
Theme Name: Reframe Marketing
Theme URI: https://reframemarketing.com
Author: Reframe Marketing
Description: One-page theme for Reframe Marketing (real estate marketing). Edit every section from Appearance → Customize → Reframe Website, and add projects under Portfolio. Contact form messages are emailed and also saved under Enquiries.
Version: 1.0.1
Requires at least: 6.0
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: reframe
*/

/* ==========================================================
   Screen sizes follow Bootstrap:
     ≥1200px desktop · 992–1199 small laptop · 768–991 tablet
     576–767 large phone · ≤575 phone
   ========================================================== */

:root {
  --red: #CE1313;
  --red-dark: #a93226;
  --bright-red: #ff0000;
  --navy: #050B20;
  --navy-deep: #030715;
  --card: #13182E;
  --slab: 'Roboto Slab', serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--navy);
  font-family: 'Roboto', sans-serif;
  color: #fff;
  overflow-x: clip;
}

img,
video {
  max-width: 100%;
}

img {
  height: auto;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid #82AEDF;
  outline-offset: 3px;
}

/* ---------- WordPress helpers ---------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  margin: 0;
  top: 8px;
  left: 8px;
  z-index: 100000;
  padding: 12px 20px;
  background: #fff;
  color: var(--navy);
  border-radius: 6px;
  text-decoration: none;
}

.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text,
.wp-element-caption { font-size: 14px; color: #aab; margin-top: 6px; }

/* ---------- Shared red buttons ---------- */
.header-btn,
.banner-btn,
.about-btn,
.footer-contact-btn,
.submit-btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  border: none;
  border-radius: 10px;
  padding: 16px 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.header-btn:hover,
.banner-btn:hover,
.about-btn:hover,
.footer-contact-btn:hover,
.submit-btn:hover {
  background: var(--red-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(192, 57, 43, 0.18);
}

/* ==========================================================
   Header & navigation
   ========================================================== */
.site-header {
  padding: 27px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  flex-shrink: 0;
}

.logo img {
  height: 38px;
  width: auto;
}

.main-nav {
  flex: 1;
}

.main-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(28px, 6vw, 90px);
}

.main-nav-list li {
  position: relative;
}

.main-nav a {
  display: block;
  padding: 10px 0;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 32px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: var(--red);
}

/* Drop-down (any menu item that has sub-items) */
.menu-item-has-children > a::after {
  content: '↓';
  display: inline-block;
  font-size: 10px;
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.menu-item-has-children.active > a::after {
  transform: rotate(180deg);
}

.main-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 10px 0;
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.main-nav .menu-item-has-children.active > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Open on mouse hover on desktop */
@media (hover: hover) and (min-width: 992px) {
  .main-nav .menu-item-has-children:hover > .sub-menu,
  .main-nav .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
  }
}

.main-nav .sub-menu a {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: #ccc;
  border-left: 2px solid transparent;
  transition: all 0.3s ease;
}

.main-nav .sub-menu a:hover {
  color: var(--red);
  border-left-color: var(--red);
  padding-left: 30px;
}

/* Optional header button (Customize → Reframe Website → Header) */
.header-btn {
  flex-shrink: 0;
  padding: 12px 22px;
  font-size: 16px;
  white-space: nowrap;
}

/* Hamburger button (hidden on desktop) */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* ==========================================================
   Banner
   ========================================================== */
.banner {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Same height as the original banner (1008 × 560) */
  min-height: max(540px, 55.56vw);
  overflow: hidden;
  background: var(--navy-deep);
}

.banner-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bannershadow {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, #050b209c, #030715);
}

.banner-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 48px;
  padding-bottom: 48px;
}

.bannershadow h1 {
  font-size: clamp(34px, 8.5vw, 86px);
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.bannershadow h1 span {
  color: var(--bright-red);
  font-family: var(--slab);
}

.bannershadow p {
  max-width: 760px;
  font-size: 18px;
  line-height: 32px;
  color: #fff;
}

.client-logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 30px;
  opacity: 0.2;
}

.client-logos img {
  display: block;
  max-height: 50px;
  width: auto;
}

/* ==========================================================
   Who We Are
   ========================================================== */
.about {
  background: var(--navy);
  padding: 45px 0 95px;
}

.about-head {
  min-height: 300px;
  padding: 100px 0 0 120px;
  background: url(assets/images/who_bg.svg) no-repeat left top;
  background-size: contain;
}

.about-head h2 {
  font-size: 66px;
  font-weight: 700;
  color: #fff;
}

.about p {
  font-size: 16px;
  color: #fff;
}

.about .about-title {
  font-size: 20px;
  font-weight: 700;
  padding-bottom: 30px;
}

.about-btn {
  margin-top: 72px;
}

/* ==========================================================
   Section headings (Our Services / Portfolio)
   ========================================================== */
.services-heading {
  position: relative;
  margin-bottom: 48px;
  font-family: var(--slab);
  font-size: clamp(36px, 5.5vw, 66px);
  font-weight: 700;
  line-height: 0.7;
  color: #fff;
}

.services-heading-accent-wrap {
  position: relative;
  display: inline-block;
}

/* Red corner mark; sized in em so it scales with the heading */
.services-heading-accent {
  position: absolute;
  top: -0.27em;
  right: -0.48em;
  width: 0.48em;
  height: 0.27em;
  border-top: 0.09em solid var(--red);
  border-right: 0.09em solid var(--red);
  border-radius: 2px;
}

/* ==========================================================
   Our Services
   ========================================================== */
.services {
  background-color: var(--navy-deep);
  padding: 90px 0;
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 300px));
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.10);
  transition: box-shadow 0.3s, background 0.3s;
}

.service-card:hover {
  background: radial-gradient(ellipse 80% 50% at left bottom, var(--red) 0%, var(--card) 100%);
}

.service-card-icon {
  align-self: center;
  width: clamp(80px, 9vw, 120px);
  height: clamp(80px, 9vw, 120px);
  margin: clamp(40px, 5vw, 70px) 0;
}

.service-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.7;
}

.service-card-text {
  margin-top: 12px;
  font-family: var(--slab);
  font-size: clamp(20px, 2.3vw, 32px);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

/* ==========================================================
   Portfolio
   ========================================================== */
.portfolio {
  padding: 90px 0;
}

.portfolio-group + .portfolio-group {
  margin-top: 48px;
}

.portfolio-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.portfolio-heading h3 {
  margin-bottom: 0;
  font-size: 28px;
  font-weight: 300;
  line-height: 1.2;
}

.slider-controls {
  display: flex;
  flex-shrink: 0;
}

.slider-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0 10px;
  padding: 10px;
  background-color: #000;
  border: 1px solid var(--red);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.slider-controls button:hover {
  background-color: var(--red);
}

.slider-controls img {
  width: 16px;
  height: 28px;
}

.portfolio-slider-container {
  margin-top: 72px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  transition: transform 0.3s ease-in-out;
}

.portfolio-item:hover {
  transform: scale(1.02);
}

/* All project images show as squares, whatever size was uploaded */
.portfolio .portfolio-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  transition: opacity 0.3s;
}

.portfolio-item img:hover {
  opacity: 0.8;
}

.portfolio-overlay {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  background: radial-gradient(ellipse 80% 50% at left bottom, var(--red) 0%, #13182e00 100%);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-overlay h3 {
  margin-bottom: 26px;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.portfolio-overlay h3 a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.portfolio-overlay p {
  margin: -16px 0 16px;
  font-size: 15px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.portfolio-quote-btn {
  display: inline-block;
  width: 100%;
  padding: 15px;
  background-color: #fff;
  color: var(--red);
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.portfolio-quote-btn:hover {
  color: var(--red-dark);
}

.portfolio-item:hover .portfolio-overlay,
.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-quote-btn,
.portfolio-item:focus-within .portfolio-overlay,
.portfolio-item:focus-within .portfolio-overlay h3,
.portfolio-item:focus-within .portfolio-quote-btn {
  opacity: 1;
  transform: translateY(0);
}

/* Phones and tablets have no hover, so show the project titles all the time */
@media (hover: none) {
  .portfolio-overlay,
  .portfolio-overlay h3,
  .portfolio-quote-btn {
    opacity: 1;
    transform: none;
  }

  .portfolio-item:hover {
    transform: none;
  }
}

.portfolio-empty {
  padding: 24px;
  background: var(--card);
  border-radius: 16px;
  color: #ccd;
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  background-color: #000;
  color: #fff;
  padding: 100px 0 0;
}

.footer-logo img {
  width: 206px;
  height: auto;
}

.footer-content {
  padding-top: 40px;
}

.footer-content h3 {
  font-weight: 600;
}

.social-icons {
  display: flex;
  gap: 10px;
  margin-bottom: 60px;
}

.social-link {
  display: inline-flex;
}

.social-link img {
  width: 20px;
  height: 20px;
  transition: opacity 0.3s ease;
}

.social-link:hover img {
  opacity: 0.8;
}

.footer-nav {
  display: flex;
  gap: 60px;
  margin-top: 30px;
}

.footer-nav-left,
.footer-nav-right {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-nav a {
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--bright-red);
}

.footer-hero-heading {
  position: relative;
  margin-bottom: 2.5rem;
  font-size: clamp(38px, 5.5vw, 66px);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.footer-accent-wrap {
  position: relative;
  display: inline-block;
}

/* Red corner mark; sized in em so it scales with the heading */
.footer-accent {
  position: absolute;
  top: 0.15em;
  right: -0.18em;
  width: 0.48em;
  height: 0.42em;
  border-top: 0.076em solid var(--red);
  border-right: 0.076em solid var(--red);
  border-radius: 2px;
}

.footer-contact-btn {
  margin-top: 72px;
  padding: 20px 30px;
}

/* Optional email / phone / address under the footer button */
.footer-contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  color: #cfd3e0;
  font-size: 16px;
}

.footer-contact-info a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-contact-info a:hover {
  color: var(--bright-red);
}

.footer-bottom-left {
  margin-top: 100px;
  padding: 26px 0;
  border-top: 0.5px solid #ffffff68;
}

.footer-bottom-left p {
  font-size: 14px;
  font-weight: 400;
  color: #fff;
}

/* ==========================================================
   Normal pages, blog posts and 404
   ========================================================== */
.page-wrap {
  padding: 60px 0 100px;
}

.page-wrap .container {
  max-width: 860px;
}

.page-title {
  margin-bottom: 32px;
  font-family: var(--slab);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
}

.page-title a {
  color: inherit;
  text-decoration: none;
}

.entry-meta {
  margin: -20px 0 28px;
  color: #aab;
  font-size: 14px;
}

.entry-content {
  font-size: 17px;
  line-height: 1.75;
  color: #e6e8f0;
}

.entry-content a {
  color: #ff6b6b;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 1.6em 0 0.6em;
  color: #fff;
}

.entry-content img {
  border-radius: 12px;
}

.entry-content blockquote {
  margin: 1.5em 0;
  padding-left: 20px;
  border-left: 4px solid var(--red);
  color: #ccd;
}

.post-teaser {
  padding: 28px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-teaser .page-title {
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 32px);
}

.post-teaser .entry-meta {
  margin: 0 0 12px;
}

.pagination-wrap {
  margin-top: 40px;
}

.pagination-wrap .page-numbers {
  display: inline-block;
  min-width: 44px;
  margin-right: 6px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  text-align: center;
  text-decoration: none;
}

.pagination-wrap .page-numbers.current,
.pagination-wrap a.page-numbers:hover {
  background: var(--red);
  border-color: var(--red);
}

/* ==========================================================
   "Get in Touch" popup
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  display: flex;
}

/* margin:auto centres the popup but still lets tall content scroll */
.modal-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: auto;
  padding: 2px;
  background: linear-gradient(62.16deg, #223781 0.87%, #82AEDF 100%);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: row;
  min-height: 500px;
  background: linear-gradient(118.15deg, #16285C 1.68%, #0E1839 100%);
  border: none;
  border-radius: 18px;
  overflow: hidden;
  color: #fff;
}

.modal-left,
.modal-right {
  flex: 1;
  min-width: 0;
  padding: 60px 40px;
}

.modal-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.modal-title {
  margin: 0 0 40px;
  font-family: var(--slab);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.logo-text {
  display: inline-flex;
  margin-bottom: 100px;
}

.logo-text img {
  height: 60px;
  width: auto;
}

.modal-social p {
  margin: 0 0 15px;
  font-size: 16px;
  font-weight: 300;
  color: #fff;
}

.modal-social .social-icons {
  gap: 15px;
  margin-bottom: 0;
}

.modal-social .social-link img {
  opacity: 0.8;
}

.modal-social .social-link:hover img {
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  border-radius: 50%;
  color: #8A9BA8;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.contact-form label {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 300;
  color: #fff;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px 20px;
  background: #2A3A5C;
  border: 1px solid #3A4A6C;
  border-radius: 8px;
  color: #fff;
  /* 16px stops iPhones from zooming in when a field is tapped */
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #82AEDF;
  box-shadow: 0 0 0 2px rgba(130, 174, 223, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

.contact-form textarea {
  min-height: 100px;
  resize: vertical;
}

.contact-form .hp-field {
  display: none !important;
}

.submit-btn {
  align-self: flex-start;
  margin-top: 10px;
  padding: 20px 50px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(206, 19, 19, 0.3);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.form-status {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.form-status:empty {
  display: none;
}

.form-status.is-success {
  color: #7EE2A0;
}

.form-status.is-error {
  color: #FF9A9A;
}

/* ==========================================================
   Small laptops (992px – 1199px)
   ========================================================== */
@media (max-width: 1199.98px) {
  .about-head {
    min-height: 260px;
    padding: 80px 0 0 70px;
  }

  .about-head h2 {
    font-size: 50px;
  }
}

/* ==========================================================
   Tablets and below (≤ 991px)
   ========================================================== */
@media (max-width: 991.98px) {
  /* Header: switch to the slide-in mobile menu */
  .hamburger-menu {
    display: flex;
    order: 3;
  }

  .header-btn {
    order: 2;
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    inset: 0;
    z-index: 1000;
    flex: none;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .main-nav.active {
    opacity: 1;
    visibility: visible;
  }

  .main-nav-list {
    position: absolute;
    top: 0;
    right: 0;
    width: min(85%, 400px);
    height: 100%;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 96px 32px 40px;
    overflow-y: auto;
    background: var(--card);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
  }

  .main-nav.active .main-nav-list {
    transform: translateX(0);
  }

  .main-nav-list > li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav-list > li:last-child {
    border-bottom: none;
  }

  .main-nav-list > li > a {
    font-size: 18px;
  }

  .main-nav .sub-menu {
    position: static;
    min-width: 0;
    max-height: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: hidden;
    transform: none;
    transition: max-height 0.3s ease, visibility 0.3s ease;
  }

  .main-nav .menu-item-has-children.active > .sub-menu {
    max-height: 600px;
    visibility: visible;
  }

  .main-nav .sub-menu a {
    padding: 10px 0 10px 16px;
    font-size: 16px;
  }

  .main-nav .sub-menu a:hover {
    padding-left: 24px;
  }

  /* Banner logos wrap onto extra rows instead of running off screen */
  .client-logos {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 32px;
    padding: 24px 16px;
    opacity: 0.35;
  }

  .client-logos img {
    width: auto;
    height: 24px;
  }

  /* Who We Are */
  .about {
    padding: 40px 0 72px;
  }

  .about-head {
    min-height: 240px;
    padding: 70px 0 0 70px;
    margin-bottom: 24px;
  }

  .about-head h2 {
    font-size: clamp(38px, 7vw, 56px);
  }

  .about-btn {
    margin-top: 32px;
  }

  /* Sections */
  .services,
  .portfolio {
    padding: 72px 0;
  }

  .services-heading {
    margin-bottom: 36px;
  }

  .portfolio-slider-container {
    margin-top: 32px;
  }

  /* Footer */
  .site-footer {
    padding-top: 72px;
  }

  .site-footer .col-lg-8 {
    margin-top: 56px;
  }

  .footer-contact-btn {
    margin-top: 0;
  }

  .footer-bottom-left {
    margin-top: 64px;
  }
}

/* Logged-in admins: keep the mobile menu below the WordPress toolbar */
@media (max-width: 991.98px) {
  .admin-bar .main-nav-list {
    padding-top: 128px;
  }
}

/* ==========================================================
   Large phones (≤ 767px)
   ========================================================== */
@media (max-width: 767.98px) {
  /* Service cards stack: icon on the left, text on the right */
  .service-cards {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
  }

  .service-card {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 24px;
  }

  .service-card-icon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    margin: 0;
  }

  .service-card-text {
    margin-top: 0;
    font-size: 22px;
  }

  /* Popup: one column, scrolls if taller than the screen */
  .modal-overlay {
    padding: 12px;
  }

  .modal-content {
    flex-direction: column;
    min-height: 0;
  }

  .modal-left {
    padding: 36px 24px 0;
  }

  .modal-right {
    padding: 24px 24px 32px;
  }

  .modal-title {
    margin: 0;
    padding-right: 36px;
    font-size: 30px;
  }

  .modal-brand {
    display: none;
  }

  .modal-close {
    top: 12px;
    right: 12px;
  }

  .contact-form {
    gap: 18px;
  }

  .submit-btn {
    align-self: stretch;
    margin-top: 6px;
    padding: 18px 30px;
  }
}

/* ==========================================================
   Phones (≤ 575px)
   ========================================================== */
@media (max-width: 575.98px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header {
    padding: 20px 0;
  }

  .nav-container {
    gap: 14px;
  }

  .header-btn {
    max-width: 45vw;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 14px;
    font-size: 14px;
  }

  .banner {
    min-height: 520px;
  }

  .bannershadow p {
    font-size: 16px;
    line-height: 1.6;
  }

  .banner-btn,
  .about-btn,
  .footer-contact-btn {
    font-size: 16px;
    padding: 14px 26px;
  }

  .client-logos {
    gap: 14px 24px;
  }

  .client-logos img {
    height: 20px;
  }

  .about-head {
    min-height: 200px;
    padding: 60px 0 0 44px;
  }

  .about .about-title {
    font-size: 18px;
    padding-bottom: 16px;
  }

  .services,
  .portfolio {
    padding: 56px 0;
  }

  .services-heading {
    margin-bottom: 28px;
  }

  .portfolio-group + .portfolio-group {
    margin-top: 40px;
  }

  .portfolio-heading h3 {
    font-size: 22px;
  }

  .slider-controls button {
    width: 44px;
    height: 44px;
    margin: 0 0 0 8px;
    padding: 8px;
  }

  .slider-controls img {
    width: 11px;
    height: 20px;
  }

  .portfolio-slider-container {
    margin-top: 20px;
  }

  .portfolio-item {
    border-radius: 20px;
  }

  .portfolio-overlay h3 {
    margin-bottom: 14px;
    font-size: 22px;
  }

  .portfolio-quote-btn {
    padding: 12px;
  }

  .site-footer {
    padding-top: 56px;
  }

  .footer-logo img {
    width: 170px;
  }

  .social-icons {
    margin-bottom: 36px;
  }

  .footer-nav {
    gap: 32px;
    margin-top: 0;
  }

  .footer-nav-left,
  .footer-nav-right {
    gap: 18px;
  }

  .footer-nav a {
    font-size: 15px;
  }

  .site-footer .col-lg-8 {
    margin-top: 48px;
  }

  .footer-hero-heading {
    margin-bottom: 28px;
  }

  .footer-bottom-left {
    margin-top: 48px;
    padding: 20px 0;
  }

  .form-row {
    flex-direction: column;
    gap: 18px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 12px 16px;
  }

  .modal-title {
    font-size: 26px;
  }

  .page-wrap {
    padding: 32px 0 72px;
  }
}

/* Respect "reduce motion" settings */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
