/*
Theme Name: SMB LLP CPA
Theme URI: https://smbcpa.ca
Author: SMB LLP
Author URI: https://smbcpa.ca
Description: Custom theme for SMB LLP Chartered Professional Accountants
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smbcpa
*/

/* ===========================
   CSS VARIABLES & RESET
=========================== */
:root {
  --teal:        #006d6d;
  --teal-dark:   #005252;
  --teal-light:  #e6f4f4;
  --text:        #333333;
  --text-muted:  #666666;
  --page-title:  #b5b5b5;
  --border:      #e8e8e8;
  --white:       #ffffff;
  --bg-light:    #f4f7f9;
  --font:        'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
}

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

a { color: var(--teal); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal-dark); }

ul { list-style: none; }

/* ===========================
   TYPOGRAPHY
=========================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.page-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--page-title);
  font-weight: 700;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.9rem;
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--text);
}

p { margin-bottom: 1.2rem; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

/* ===========================
   LAYOUT
=========================== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 60px 0; }
.section--gray { background: var(--bg-light); }

/* ===========================
   HEADER & NAV
=========================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 75px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img { height: 55px; width: auto; }
.site-logo svg { height: 55px; width: auto; }

/* Desktop Nav */
#primary-nav ul {
  display: flex;
  gap: 0;
  align-items: center;
}

#primary-nav ul li { position: relative; }

#primary-nav ul li a {
  display: block;
  padding: 10px 16px;
  font-size: .88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text);
  transition: color .2s;
}

#primary-nav ul li a:hover,
#primary-nav ul li.current-menu-item > a {
  color: var(--teal);
}

/* Dropdown */
#primary-nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 2px solid var(--teal);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  flex-direction: column;
  gap: 0;
}

#primary-nav ul li:hover > ul { display: flex; }

#primary-nav ul li ul li a {
  padding: 10px 20px;
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

#primary-nav ul li ul li:last-child a { border-bottom: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all .3s;
}

/* Mobile Nav */
#mobile-nav {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 12px 0;
}

#mobile-nav.is-open { display: block; }

#mobile-nav ul { flex-direction: column; }

#mobile-nav ul li a {
  display: block;
  padding: 12px 24px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

#mobile-nav ul li a:hover { color: var(--teal); background: var(--teal-light); }

#mobile-nav ul ul li a {
  padding-left: 40px;
  font-weight: 400;
  font-size: .85rem;
  background: var(--bg-light);
}

/* ===========================
   HERO SECTION
=========================== */
.hero {
  position: relative;
  overflow: hidden;
  height: 360px;
  background: #1a2a2a;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,80,80,.55), rgba(0,0,0,.2));
}

/* ===========================
   HOME INTRO
=========================== */
.home-intro {
  padding: 60px 0;
  text-align: left;
}

.home-intro h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text);
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.home-intro p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 700px;
  text-align: justify;
}

/* ===========================
   SERVICE CARDS (Home)
=========================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 2rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: box-shadow .25s, transform .25s;
}

.service-card:hover {
  box-shadow: 0 6px 20px rgba(0,109,109,.12);
  transform: translateY(-3px);
}

.service-card .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  color: var(--teal);
}

.service-card .icon svg { width: 100%; height: 100%; fill: var(--teal); }

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .8rem;
  color: var(--text);
}

.service-card p {
  font-size: .9rem;
  color: var(--text-muted);
  text-align: justify;
}

.service-card a.card-link {
  display: inline-block;
  margin-top: 14px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: underline;
}

/* ===========================
   PAGE HEADER BANNER
=========================== */
.page-banner {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

/* ===========================
   CONTENT PAGE
=========================== */
.page-content {
  padding: 0 0 60px;
}

.page-content h2 {
  font-size: 1.3rem;
  color: var(--text);
  margin: 1.8rem 0 .6rem;
}

.page-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.page-content ul li {
  color: var(--text-muted);
  margin-bottom: .4rem;
  font-size: .95rem;
}

.page-content ul li strong { color: var(--text); }

/* ===========================
   ABOUT PAGE
=========================== */
.about-content p {
  font-size: 1rem;
  text-align: justify;
  margin-bottom: 1.4rem;
}

/* ===========================
   TEAM PAGE
=========================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 1rem;
}

.team-member {
  border-left: 4px solid var(--teal);
  padding: 0 0 0 20px;
}

.team-member__photo {
  width: 200px;
  height: 220px;
  object-fit: cover;
  margin-bottom: 18px;
  border-radius: 4px;
}

.team-member__name {
  font-size: 1.1rem;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: .6rem;
}

.team-member__bio {
  font-size: .93rem;
  color: var(--text-muted);
  text-align: justify;
  margin-bottom: .8rem;
}

.team-member__contact {
  font-size: .88rem;
  color: var(--text-muted);
}

.team-member__contact a { color: var(--teal); }

/* ===========================
   CONTACT PAGE
=========================== */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 1rem;
}

.contact-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 36px 24px;
  text-align: center;
}

.contact-card .icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--teal);
}

.contact-card .icon svg { width: 100%; height: 100%; fill: var(--teal); }

.contact-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .6rem;
}

.contact-card p {
  font-size: .9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Contact Form */
.contact-form-wrap {
  margin-top: 50px;
}

.contact-form-wrap h2 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.contact-form {
  max-width: 640px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .95rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color .2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.form-group textarea { height: 140px; resize: vertical; }

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--teal);
  color: var(--white);
  font-size: .9rem;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s;
  font-family: var(--font);
}

.btn:hover { background: var(--teal-dark); color: var(--white); }

/* Map */
.map-wrap {
  margin-top: 40px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-wrap iframe {
  width: 100%;
  height: 320px;
  border: none;
  display: block;
}

/* ===========================
   SERVICES SUB-PAGE
=========================== */
.service-detail p {
  font-size: 1rem;
  text-align: justify;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}

.service-detail h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.6rem 0 .8rem;
}

.service-detail ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.4rem;
}

.service-detail ul li {
  padding: 6px 0 6px 22px;
  position: relative;
  font-size: .95rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.service-detail ul li:last-child { border-bottom: none; }

.service-detail ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
}

/* ===========================
   FOOTER
=========================== */
#site-footer {
  background: #1a2a2a;
  color: #ccc;
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 36px;
}

.footer-col h4 {
  color: var(--white);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}

.footer-col p,
.footer-col a {
  font-size: .85rem;
  color: #aaa;
  display: block;
  margin-bottom: 6px;
  line-height: 1.6;
}

.footer-col a:hover { color: var(--white); }

.footer-logo { margin-bottom: 12px; }
.footer-logo svg { height: 44px; width: auto; }
.footer-logo img { height: 44px; width: auto; filter: brightness(0) invert(1); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  text-align: center;
  font-size: .8rem;
  color: #777;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  #primary-nav { display: none; }
  .nav-toggle { display: flex; }

  .hero { height: 240px; }

  .home-intro h1 { font-size: 1.6rem; }

  .services-grid { grid-template-columns: 1fr; }

  .team-grid { grid-template-columns: 1fr; }

  .contact-cards { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .header-inner { height: 64px; }
  .site-logo svg, .site-logo img { height: 44px; }
}

/* ===========================
   WORDPRESS BLOCK EDITOR CONTENT
=========================== */
.about-content p,
.service-detail p,
.page-content .entry-content p,
.wp-block-paragraph { 
    font-size: 1rem;
    color: var(--text-muted);
    text-align: justify;
    margin-bottom: 1.2rem;
}

.about-content h2, .service-detail h2 { font-size: 1.3rem; color: var(--text); margin: 1.8rem 0 .8rem; }
.about-content h3, .service-detail h3 { font-size: 1.1rem; color: var(--text); margin: 1.4rem 0 .6rem; }

/* Lists from block editor */
.about-content ul, .service-detail ul,
.wp-block-list, .page-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.4rem;
}

.about-content ul li, .service-detail ul li,
.wp-block-list li, .page-content ul li {
    padding: 7px 0 7px 22px;
    position: relative;
    font-size: .95rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.about-content ul li:last-child,
.service-detail ul li:last-child,
.wp-block-list li:last-child,
.page-content ul li:last-child { border-bottom: none; }

.about-content ul li::before,
.service-detail ul li::before,
.wp-block-list li::before,
.page-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--teal);
    border-radius: 50%;
}

/* Strong / bold in content */
.about-content strong, .service-detail strong { color: var(--text); font-weight: 700; }

/* Team page block editor layout */
.team-member-block {
    display: flex;
    gap: 28px;
    border-left: 4px solid var(--teal);
    padding-left: 20px;
    margin-bottom: 48px;
    align-items: flex-start;
}

.team-member-block img {
    width: 180px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.team-member-block h2 { color: var(--teal); font-size: 1.1rem; margin-bottom: .5rem; }
.team-member-block p { text-align: left; }
.team-member-block a { color: var(--teal); }

@media (max-width: 600px) {
    .team-member-block { flex-direction: column; }
    .team-member-block img { width: 140px; height: 160px; }
}
