/*
Theme Name: Smarter Consulting Theme
Theme URI: https://www.smarterconsulting.co.uk/
Author: Andrew Robbins .JP MBCS
Author URI: https://www.smarterconsulting.co.uk/
Description: Custom wordpress theme for Smarter Consulting. </br> created as an example of how easy it is to create a simple HTML / CSS website and the convert it to a simple wordpress theme.
Version: 1.0.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-background, custom-logo, custom-menu, responsive-layout
Text Domain: smarterconsulting
*/

/* -------------------------------------------------------------------------- */
/* == Global Resets & Base Styles == */
/* -------------------------------------------------------------------------- */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fdfdfd;
  color: #2e2e2e;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block; /* Prevents bottom margin/whitespace issue with some images */
}

/* -------------------------------------------------------------------------- */
/* == Header, Logo & Navigation == */
/* -------------------------------------------------------------------------- */
header {
  background-color: #ffffff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: relative; /* For absolute positioning of mobile menu */
}

/* Logo */
header .custom-logo-link img,
header .logo-container img { /* Covers WP custom logo and manual logo container */
  max-width: 250px;
  height: auto;
}

/* Hamburger Icon */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 25px;
  height: 20px;
  cursor: pointer;
  order: 3; /* Ensure it's typically last in flex order on mobile if nav is also present */
}

.hamburger span {
  height: 3px;
  width: 100%;
  background-color: #003366;
  border-radius: 2px;
  display: block;
}

/* Navigation Menu */
.nav-links { /* This is the <nav> container */
  order: 2; /* Default order for desktop */
}

.nav-links .header-main-menu { /* Targets the UL generated by wp_nav_menu */
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.nav-links .header-main-menu li {
  margin: 0;
}

.nav-links .header-main-menu a {
  display: block;
  padding: 0.5rem 0;
  margin-left: 1.5rem;
  text-decoration: none;
  font-weight: 500;
  color: #003366;
  font-size: 1rem;
  transition: color 0.3s;
}

.nav-links .header-main-menu li:first-child a {
    margin-left: 0; /* No left margin for the first menu item */
}

.nav-links .header-main-menu a:hover {
  color: #0055a5;
}

/* -------------------------------------------------------------------------- */
/* == Mega Menu Styles (Desktop) == */
/* -------------------------------------------------------------------------- */

/* This ensures the hover effects only apply on screens wider than the mobile breakpoint */
@media (min-width: 769px) {

    /* Position the parent menu item to anchor the sub-menu */
    .nav-links .header-main-menu li {
        position: relative;
    }

    /* Style for the sub-menu (the dropdown) */
    .nav-links .header-main-menu .sub-menu {
        display: none; /* Hide sub-menus by default */
        position: absolute; /* Position absolutely to the parent li */
        top: 100%; /* Position it right below the parent item */
        left: 0;
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        list-style-type: none;
        padding: 0.5rem 0;
        margin: 0;
        min-width: 200px; /* Give the dropdown a suitable width */
        z-index: 1000; /* Ensure it appears above other content */
    }

    /* Make sub-menu items display as a vertical list */
    .nav-links .header-main-menu .sub-menu li {
        width: 100%;
    }

    /* Style for the links within the sub-menu */
    .nav-links .header-main-menu .sub-menu a {
        padding: 0.75rem 1.5rem; /* Add comfortable padding */
        margin: 0; /* Reset margins from the parent menu */
        width: 100%;
        box-sizing: border-box; /* Ensure padding doesn't break the layout */
        color: #003366;
        white-space: nowrap; /* Prevent text from wrapping */
    }

    .nav-links .header-main-menu .sub-menu a:hover {
        background-color: #f4f4f4;
        color: #0055a5;
    }

    /* Show the sub-menu on hover of the parent list item */
    .nav-links .header-main-menu li:hover > .sub-menu {
        display: block;
    }
    /* Align submenu to the right for far-right menu items */
.nav-links .header-main-menu .menu-item-align-right .sub-menu {
    left: auto; /* Unset the default left alignment */
    right: 0; /* Align the right edge of the submenu with the right edge of the parent */
}

}


/* -------------------------------------------------------------------------- */
/* == Hero Section == */
/* -------------------------------------------------------------------------- */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background-color: #f4f4f4;
}

.hero h1 {
  font-size: 2.5rem;
  color: #003366;
  margin-top: 0;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.2rem;
  color: #444;
}

/* -------------------------------------------------------------------------- */
/* == Main Content Sections == */
/* -------------------------------------------------------------------------- */
.section { /* General content wrapper */
  padding: 3rem 2rem;
  max-width: 1000px;
  margin: auto;
}

.entry-content { /* WordPress default content wrapper */
    /* Styles for .entry-content if needed, often similar to .section */
}

.section h1, .entry-content h1,
.section h2, .entry-content h2 {
  font-size: 2rem;
  margin-top: 0; /* Good practice to reset top margin on headings */
  margin-bottom: 1.5rem;
  color: #333;
}
.section h1, .entry-content h1 { font-size: 2.2rem; } /* Slightly larger for H1s */


.section ul, .entry-content ul,
.section ol, .entry-content ol {
  list-style-type: disc;
  padding-left: 1.5rem;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.section ol, .entry-content ol { list-style-type: decimal; }

.section ul li, .entry-content ul li,
.section ol li, .entry-content ol li {
  margin-bottom: 0.5rem;
}

/* -------------------------------------------------------------------------- */
/* == WordPress Image Alignment & Caption Styles == */
/* -------------------------------------------------------------------------- */
.alignleft,
figure.alignleft {
    float: left;
    margin: 0.5em 1.5em 0.5em 0; /* top right bottom left - increased right margin for more space */
    display: block; /* display:block helps avoid some inline spacing issues before float kicks in */
}

.alignright,
figure.alignright {
    float: right;
    margin: 0.5em 0 0.5em 1.5em; /* top right bottom left - increased left margin */
    display: block;
}

.aligncenter,
figure.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.5em;
    margin-bottom: 1em; /* More bottom margin for centered items */
    clear: both; /* Ensure centered images clear preceding floats */
}

.alignnone,
figure.alignnone {
    float: none;
    margin: 0.5em 0;
    display: block; /* Treat as a block, but no float */
}

/* Ensure images within aligned figures don't add extra conflicting margins */
figure.alignleft img,
figure.alignright img,
figure.aligncenter img,
figure.alignnone img {
    margin-bottom: 0; /* Reset if figure itself provides bottom margin */
}

/* WordPress Captions */
.wp-caption {
    max-width: 100%; /* Ensure it doesn't overflow if image is smaller */
    background: #f7f7f7; /* Light background for caption area */
    border: 1px solid #e3e3e3;
    padding: 0.5em;
    margin-bottom: 1.5em; /* Space below caption */
    box-sizing: border-box;
}

.wp-caption img { /* Image inside a caption */
    display: block;
    margin: 0 auto 0.5em auto; /* Center image in caption, space below for text */
}

.wp-caption-text,
.wp-element-caption { /* .wp-element-caption is used by Block Editor */
    font-size: 0.9em;
    text-align: center;
    line-height: 1.4;
    margin: 0;
    color: #555;
}

/* Ensure aligned captions also float correctly */
.wp-caption.alignleft {
    float: left;
    margin: 0.5em 1.5em 1em 0;
}

.wp-caption.alignright {
    float: right;
    margin: 0.5em 0 1em 1.5em;
}

.wp-caption.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.5em;
    margin-bottom: 1.5em;
    clear: both;
}

/* Clearfix utility for containing floats */
.clearfix::after,
.entry-content::after, /* Often useful to apply to main content wrapper */
.section::after {
    content: "";
    clear: both;
    display: table;
}


/* -------------------------------------------------------------------------- */
/* == Service Boxes == */
/* -------------------------------------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem; /* Add some space if it follows other content */
}

.service-box {
  background: #fff;
  padding: 2rem;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #888;
  transition: border-color 0.3s;
}

.service-box:hover {
  border-left-color: #0055a5;
}

.service-box strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #222;
}

/* -------------------------------------------------------------------------- */
/* == CTA Banner == */
/* -------------------------------------------------------------------------- */
.cta-banner {
  width: 100%;
  background-color: #003366;
  color: #ffffff;
  text-align: center;
  padding: 3rem 1rem;
  margin-top: 4rem;
  box-sizing: border-box;
}

.cta-banner p,
.cta-text {
  font-size: 1.5rem;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.cta-button {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
  font-weight: bold;
  color: #ffffff;
  background-color: #0055a5;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #006fdc;
}

/* -------------------------------------------------------------------------- */
/* == Footer == */
/* -------------------------------------------------------------------------- */
footer {
  background-color: #f4f4f4;
  color: #555;
  text-align: center;
  padding: 2rem;
  font-size: 0.95rem;
}

footer a {
  color: #333;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* == Pricing Toggle & Tables == */
/* -------------------------------------------------------------------------- */
.pricing-toggle {
  text-align: center;
  margin: 2rem 0;
}

.toggle-button {
  background-color: #e0e0e0;
  color: #003366;
  border: none;
  padding: 0.75rem 1.5rem;
  margin: 0.2rem 0.5rem; /* Allow wrapping for buttons */
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.toggle-button:hover,
.toggle-button.active {
  background-color: #003366;
  color: white;
}

.rate-table-container {
  margin-top: 2rem;
}
.rate-table-container.hidden {
    display: none;
}

.rate-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem; /* Slightly smaller for tables */
}

.rate-table th,
.rate-table td {
  border: 1px solid #ccc;
  padding: 0.75rem 1rem; /* Slightly smaller padding */
  text-align: left;
}

.rate-table th {
  background-color: #003366;
  color: white;
}

.rate-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* -------------------------------------------------------------------------- */
/* == Miscellaneous (from original file) == */
/* -------------------------------------------------------------------------- */
.dl-links a {
    margin-left: 1.5rem;
    text-decoration: none;
    font-weight: 500;
    color: #003366;
    font-size: 1rem;
    transition: color 0.3s;
}
.dl-links a:hover {
    color: #0055a5;
}

/* -------------------------------------------------------------------------- */
/* == Responsive Styles == */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  header {
    /* Header already flex-wrap, so hamburger should move correctly */
  }

  .nav-links { /* This is the <nav> container itself */
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%; /* Take full width when open */
    background-color: #fff;
    position: absolute;
    top: 100%; /* Position below the header. Assumes header height is consistent. May need JS to calculate if header height varies. */
    left: 0;
    padding: 1rem 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10000; /* High z-index */
    order: 4; /* Ensure it's definitely last in source order for mobile if needed */
    box-sizing: border-box;
  }

  .nav-links.show { /* This class is toggled by JS */
    display: flex;
  }

  .nav-links .header-main-menu { /* The UL */
    flex-direction: column;
    width: 100%;
  }

  .nav-links .header-main-menu li {
    width: 100%;
  }

  .nav-links .header-main-menu a {
    margin: 0 0 1rem 0; /* Full width links, no left margin */
    padding: 0.75rem 0; /* Vertical padding */
    width: 100%;
    box-sizing: border-box;
  }

  .hamburger {
    display: flex; /* Show hamburger icon */
  }

  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .section h1, .entry-content h1 { font-size: 1.9rem; }
  .section h2, .entry-content h2 { font-size: 1.7rem; }


  .cta-banner { padding: 2rem 1rem; }
  .cta-banner p, .cta-text { font-size: 1.2rem; }
  .cta-button { padding: 0.7rem 1.5rem; font-size: 0.9rem; }

  /* Responsive tables might need horizontal scroll or different display */
  .rate-table-container {
      overflow-x: auto; /* Allow horizontal scroll for tables on small screens */
  }
  .rate-table {
      min-width: 600px; /* Or whatever min-width makes sense before breaking */
  }
}