/*
Theme Name: PCMG Corporate
Theme URI: https://www.pcmg.co.uk
Author: PCMG – Professional Cost Management Group
Description: Faithful WordPress recreation of pcmg.co.uk – energy, telecoms & water cost consultancy. Bootstrap 3 based, grey/purple palette.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: pcmg
Tags: corporate, business, energy, responsive, bootstrap
*/

/* ============================================================
   GOOGLE FONTS – loaded via functions.php
   Open Sans (body) + no special display font – site uses
   Helvetica Neue / system stack, keeping it faithful
   ============================================================ */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --pcmg-purple:       #794795;
  --pcmg-purple-dark:  #5e3574;
  --pcmg-purple-light: #9b66b2;
  --pcmg-grey-nav:     #7c7c7b;
  --pcmg-grey-dark:    #4d4d4c;
  --pcmg-grey-mid:     #898989;
  --pcmg-grey-light:   #eaeaea;
  --pcmg-grey-bg:      #f2f2f0;
  --pcmg-white:        #ffffff;
  --pcmg-link:         #337ab7;
  --pcmg-link-hover:   #23527c;
  --pcmg-text:         #333333;
  --pcmg-masthead-bg:  #7c7c7b;

  --font-stack: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-width: 1170px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 14px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-stack);
  font-size: 14px;
  line-height: 1.6;
  color: var(--pcmg-text);
  background: var(--pcmg-white);
  margin: 0; padding: 0;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--pcmg-link); text-decoration: none; }
a:hover { color: var(--pcmg-link-hover); text-decoration: underline; }

ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-stack);
  font-weight: 700;
  line-height: 1.2;
  color: var(--pcmg-text);
  margin: 0 0 10px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 15px;
}
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.col { padding: 0 15px; flex: 1; }

/* Bootstrap-style columns */
.col-md-2  { width: 16.6667%; padding: 0 15px; }
.col-md-3  { width: 25%;      padding: 0 15px; }
.col-md-4  { width: 33.3333%; padding: 0 15px; }
.col-md-6  { width: 50%;      padding: 0 15px; }
.col-md-8  { width: 66.6667%; padding: 0 15px; }
.col-md-9  { width: 75%;      padding: 0 15px; }
.col-md-12 { width: 100%;     padding: 0 15px; }

/* ============================================================
   MASTHEAD (top header with logo + social)
   ============================================================ */
.masthead {
  background: var(--pcmg-white);
  padding: 14px 0;
  border-bottom: 1px solid var(--pcmg-grey-light);
}
.masthead .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.masthead-logo {
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none !important;
}
.masthead-logo .logo-wordmark {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--pcmg-grey-dark);
  letter-spacing: -0.02em;
  line-height: 1;
}
.masthead-logo .logo-tagline {
  font-size: 0.78rem;
  color: var(--pcmg-grey-mid);
  line-height: 1.3;
  font-weight: 400;
  border-left: 1px solid var(--pcmg-grey-light);
  padding-left: 12px;
}
.masthead-logo .logo-tagline span { display: block; }
.masthead-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.masthead-search {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pcmg-grey-mid);
  padding: 4px;
  font-size: 1rem;
}
.masthead-search:hover { color: var(--pcmg-grey-dark); }
.social-links { display: flex; gap: 6px; align-items: center; }
.social-links a {
  display: block;
  width: 26px; height: 26px;
}
.social-links a img { width: 26px; height: 26px; }
.social-links a svg { width: 26px; height: 26px; }
/* LinkedIn blue, Twitter/X blue */
.social-links a.linkedin svg { fill: #0077b5; }
.social-links a.twitter  svg { fill: #1da1f2; }

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.navbar {
  background: var(--pcmg-masthead-bg); /* #7c7c7b grey */
  margin: 0; padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.navbar .container {
  display: flex;
  align-items: stretch;
}
.nav-list {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
}
.nav-list > li {
  position: relative;
}
.nav-list > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  height: 46px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--pcmg-white);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.nav-list > li > a:hover,
.nav-list > li.current-menu-item > a,
.nav-list > li.current-menu-ancestor > a {
  background: rgba(0,0,0,0.2);
  text-decoration: none;
  color: var(--pcmg-white);
}
/* Contact Us — purple highlight */
.nav-list > li.nav-contact > a,
.nav-list > li > a.nav-contact {
  background: var(--pcmg-purple);
}
.nav-list > li.nav-contact > a:hover,
.nav-list > li > a.nav-contact:hover {
  background: var(--pcmg-purple-dark);
}
/* Caret */
.nav-caret {
  font-size: 0.6rem;
  opacity: 0.7;
}

/* Dropdown */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--pcmg-white);
  border: 1px solid rgba(0,0,0,0.12);
  border-top: 3px solid var(--pcmg-purple);
  min-width: 200px;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  animation: dropFade 0.15s ease;
}
@keyframes dropFade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-list > li:hover > .dropdown-menu { display: block; }

/* Mega menu for Services (two columns) */
.mega-menu {
  min-width: 500px !important;
  display: none;
  flex-direction: row;
}
.nav-list > li:hover > .mega-menu { display: flex; }
.mega-col {
  padding: 12px 0;
  min-width: 240px;
  border-right: 1px solid var(--pcmg-grey-light);
}
.mega-col:last-child { border-right: none; }
.mega-col-header {
  padding: 6px 16px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pcmg-purple);
  border-bottom: 1px solid var(--pcmg-grey-light);
  margin-bottom: 4px;
}

/* Standard dropdown items */
.dropdown-menu a,
.mega-col a {
  display: block;
  padding: 7px 16px;
  font-size: 0.86rem;
  color: var(--pcmg-text);
  white-space: nowrap;
  transition: all 0.12s ease;
  text-decoration: none;
}
.dropdown-menu a:hover,
.mega-col a:hover {
  background: var(--pcmg-grey-bg);
  color: var(--pcmg-purple);
  text-decoration: none;
  padding-left: 20px;
}
/* Violet sub-items */
.mega-col a.violet { color: var(--pcmg-purple); }
.mega-col a.violet:hover { color: var(--pcmg-purple-dark); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  padding: 10px 16px;
  cursor: pointer;
}

/* ============================================================
   HERO CAROUSEL (homepage)
   ============================================================ */
.hero-carousel {
  position: relative;
  background: var(--pcmg-grey-light);
  overflow: hidden;
  min-height: 320px;
}
.carousel-inner { position: relative; }
.carousel-slide {
  display: none;
  position: relative;
  min-height: 320px;
  align-items: center;
  background: linear-gradient(to right, #e8e8e8 0%, #d4d4d4 100%);
}
.carousel-slide.active { display: flex; }
.carousel-slide-content {
  position: relative;
  z-index: 2;
  padding: 50px 40px 50px 0;
  max-width: 55%;
}
.carousel-slide-content .slide-headline {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--pcmg-grey-dark);
  line-height: 1.15;
  margin-bottom: 16px;
}
.carousel-slide-content .slide-headline strong { font-weight: 900; }
.carousel-slide-content .slide-body {
  font-size: 1rem;
  color: var(--pcmg-grey-dark);
  margin-bottom: 0;
}
.carousel-slide-img {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}
.carousel-slide-img img {
  max-height: 320px;
  width: auto;
  object-fit: contain;
}
/* Slide with bordered box (like the "Depth like no other" slide) */
.slide-box {
  border: 3px solid var(--pcmg-grey-dark);
  padding: 18px 24px;
  display: inline-block;
  margin-bottom: 16px;
}
.slide-box p { font-size: 1.9rem; font-weight: 400; color: var(--pcmg-grey-dark); margin: 0; }
.slide-box p strong { font-weight: 900; }

/* Carousel controls */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.25);
  border: none;
  color: white;
  font-size: 1.4rem;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.carousel-prev:hover,
.carousel-next:hover { background: rgba(0,0,0,0.5); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* ============================================================
   SERVICE TABS (purple buttons below hero)
   ============================================================ */
.service-tabs {
  background: var(--pcmg-grey-light);
  border-bottom: 3px solid #d0d0d0;
}
.service-tabs .container {
  display: flex;
  justify-content: center;
}
.service-tab {
  display: block;
  padding: 14px 40px;
  background: var(--pcmg-purple);
  color: var(--pcmg-white);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-right: 1px solid rgba(255,255,255,0.2);
  transition: background 0.15s ease;
}
.service-tab:last-child { border-right: none; }
.service-tab:hover {
  background: var(--pcmg-purple-dark);
  color: var(--pcmg-white);
  text-decoration: none;
}

/* ============================================================
   HOMEPAGE CONTENT AREA
   ============================================================ */
.home-content {
  background: var(--pcmg-grey-bg);
  padding: 30px 0 40px;
}
.home-content .home-three-columns {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.home-main {
  flex: 0 0 66.6667%;
  max-width: 66.6667%;
  padding: 0 15px;
}
.home-sidebar {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
  padding: 0 15px;
}
.home-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pcmg-grey-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}
.home-intro-text p { color: var(--pcmg-grey-dark); font-size: 0.93rem; }
.home-intro-text ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 12px;
}
.home-intro-text ul li {
  margin-bottom: 3px;
  color: var(--pcmg-grey-dark);
  font-size: 0.93rem;
}
.home-intro-text ul li a { color: var(--pcmg-link); }

/* ============================================================
   PAGE BANNER (inner pages)
   ============================================================ */
.page-banner {
  background: linear-gradient(to right, #e2e2df 0%, #d5d5d2 100%);
  padding: 0;
  position: relative;
  overflow: hidden;
  min-height: 160px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ccc;
}
.page-banner-inner {
  position: relative;
  z-index: 2;
  padding: 30px 0;
}
.page-banner-inner h1 {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--pcmg-purple);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}
.page-banner-img {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 45%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.page-banner-img img {
  max-height: 160px;
  width: auto;
  opacity: 0.85;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.8rem;
  color: var(--pcmg-grey-mid);
  padding: 8px 0 0;
}
.breadcrumbs a { color: var(--pcmg-grey-mid); }
.breadcrumbs a:hover { color: var(--pcmg-purple); }
.breadcrumbs .sep { margin: 0 5px; }

/* ============================================================
   INNER PAGE LAYOUT (sidebar + content)
   ============================================================ */
.page-layout {
  background: var(--pcmg-grey-bg);
  padding: 25px 0 50px;
}
.page-layout .container {
  display: flex;
  gap: 0;
  align-items: flex-start;
}
.page-sidebar {
  flex: 0 0 220px;
  width: 220px;
  padding: 0 15px 0 0;
  min-width: 0;
}
.page-main-content {
  flex: 1;
  min-width: 0;
  padding: 0 20px;
}
.page-sidebar-right {
  flex: 0 0 200px;
  width: 200px;
  padding: 0 0 0 15px;
  min-width: 0;
}

/* Sidebar nav widget */
.sidebar-nav-widget {
  background: var(--pcmg-white);
  border: 1px solid #ddd;
  margin-bottom: 16px;
}
.sidebar-nav-widget .widget-title {
  background: var(--pcmg-grey-dark);
  color: var(--pcmg-white);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 9px 12px;
  margin: 0;
  text-transform: uppercase;
}
/* Active section title — purple background */
.sidebar-nav-widget .widget-title.active {
  background: var(--pcmg-purple);
}
.sidebar-nav-widget ul { margin: 0; padding: 0; }
.sidebar-nav-widget ul li { border-bottom: 1px solid var(--pcmg-grey-light); }
.sidebar-nav-widget ul li:last-child { border-bottom: none; }
.sidebar-nav-widget ul li a {
  display: block;
  padding: 7px 12px;
  font-size: 0.84rem;
  color: var(--pcmg-text);
  text-decoration: none;
}
.sidebar-nav-widget ul li a:hover { color: var(--pcmg-purple); background: var(--pcmg-grey-bg); }
.sidebar-nav-widget ul li.active > a,
.sidebar-nav-widget ul li.current-menu-item > a {
  color: var(--pcmg-purple);
  font-weight: 700;
}
.sidebar-nav-widget ul li.parent > a {
  font-weight: 700;
  color: var(--pcmg-purple);
}
/* ">" prefix for sub-items */
.sidebar-nav-widget .sub-item a::before {
  content: '> ';
  color: var(--pcmg-grey-mid);
}

/* Contact us button (purple, right sidebar) */
.contact-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--pcmg-purple);
  color: var(--pcmg-white);
  padding: 16px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s ease;
}
.contact-cta-btn:hover {
  background: var(--pcmg-purple-dark);
  color: var(--pcmg-white);
  text-decoration: none;
}
.contact-cta-btn svg,
.contact-cta-btn .icon { font-size: 1.2rem; opacity: 0.85; }

/* ============================================================
   PAGE MAIN CONTENT TYPOGRAPHY
   ============================================================ */
.page-main-content h1 {
  font-size: 1.1rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--pcmg-text);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.page-main-content h2 {
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--pcmg-purple);
  letter-spacing: 0.04em;
  margin: 20px 0 10px;
}
.page-main-content h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--pcmg-purple);
  margin: 16px 0 8px;
}
.page-main-content p { font-size: 0.9rem; color: var(--pcmg-text); margin-bottom: 12px; }
.page-main-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 14px;
}
.page-main-content ul li {
  padding: 3px 0 3px 14px;
  font-size: 0.88rem;
  position: relative;
}
.page-main-content ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--pcmg-text);
}
.page-main-content a { color: var(--pcmg-link); }
.page-main-content a:hover { color: var(--pcmg-link-hover); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-intro {
  background: var(--pcmg-white);
  border: 1px solid #ddd;
  padding: 20px 24px;
  margin-bottom: 6px;
}
.contact-intro p { font-size: 0.9rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--pcmg-white);
  padding: 36px 0 20px;
  border-top: 1px solid var(--pcmg-grey-light);
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.footer-logo-col {
  flex: 0 0 220px;
  padding-right: 30px;
}
.footer-logo {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--pcmg-grey-light);
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
}
.footer-logo:hover { text-decoration: none; color: var(--pcmg-grey-mid); }
.footer-nav-col {
  flex: 1;
  padding: 0 20px;
}
.footer-nav-col h5 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pcmg-grey-mid);
  margin-bottom: 10px;
}
.footer-nav-col ul li {
  padding: 2px 0;
}
.footer-nav-col ul li::before { content: '•'; margin-right: 6px; color: var(--pcmg-grey-mid); font-size: 0.7rem; }
.footer-nav-col ul li a {
  font-size: 0.84rem;
  color: var(--pcmg-grey-mid);
}
.footer-nav-col ul li a:hover { color: var(--pcmg-purple); text-decoration: none; }

.footer-bottom-bar {
  background: var(--pcmg-grey-nav);
  padding: 12px 0;
  margin-top: 24px;
}
.footer-bottom-bar .container {
  display: flex;
  justify-content: flex-end;
}
.footer-bottom-bar p {
  font-size: 0.8rem;
  color: var(--pcmg-white);
  margin: 0;
}
.footer-bottom-bar a { color: rgba(255,255,255,0.8); }
.footer-bottom-bar a:hover { color: var(--pcmg-white); text-decoration: none; }
.footer-bottom-bar .sep { margin: 0 8px; color: rgba(255,255,255,0.4); }

/* ============================================================
   UTILITIES
   ============================================================ */
.separator { height: 1px; background: #d8d8d8; margin: 20px 0; }
.text-purple { color: var(--pcmg-purple); }
.text-grey   { color: var(--pcmg-grey-mid); }
.text-upper  { text-transform: uppercase; }
.bg-grey     { background: var(--pcmg-grey-bg); }
.hidden { display: none; }
.clearfix::after { content: ''; display: table; clear: both; }

/* ============================================================
   WORDPRESS STANDARD CLASSES
   ============================================================ */
.wp-caption { max-width: 100%; }
.alignleft  { float: left; margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }
.aligncenter { display: block; margin: 0 auto 10px; }

/* Pagination */
.pagination {
  display: flex;
  gap: 4px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #ddd;
  color: var(--pcmg-link);
  font-size: 0.86rem;
  border-radius: 2px;
}
.pagination .current {
  background: var(--pcmg-purple);
  border-color: var(--pcmg-purple);
  color: white;
}
.pagination a:hover {
  background: var(--pcmg-grey-bg);
  text-decoration: none;
}

/* Advice / blog card */
.advice-card {
  background: var(--pcmg-white);
  border: 1px solid #ddd;
  padding: 18px;
  margin-bottom: 16px;
}
.advice-card h3 { font-size: 0.95rem; margin-bottom: 6px; }
.advice-card h3 a { color: var(--pcmg-link); font-weight: 700; }
.advice-card h3 a:hover { color: var(--pcmg-purple); }
.advice-card p { font-size: 0.86rem; color: var(--pcmg-grey-mid); margin-bottom: 0; }
.advice-card .post-meta { font-size: 0.78rem; color: var(--pcmg-grey-mid); margin-top: 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  .col-md-2, .col-md-3, .col-md-4,
  .col-md-6, .col-md-8, .col-md-9 { width: 100%; }
  .home-main, .home-sidebar { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 768px) {
  .nav-list { display: none; flex-direction: column; width: 100%; }
  .nav-list.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-list > li > a { height: auto; padding: 12px 20px; }
  .dropdown-menu, .mega-menu { position: static; box-shadow: none; border: none; display: none; flex-direction: column; }
  .page-layout .container { flex-direction: column; }
  .page-sidebar, .page-sidebar-right { width: 100%; flex: none; padding: 0; }
  .page-main-content { padding: 0; }
  .footer-inner { flex-direction: column; }
  .footer-logo-col { flex: none; width: 100%; padding-right: 0; margin-bottom: 20px; }
  .masthead-logo .logo-tagline { display: none; }
  .carousel-slide-content { max-width: 100%; padding: 30px 0; }
  .carousel-slide-img { display: none; }
}
