/*
Theme Name: MD Corporate Advisory
Theme URI: https://mdadvisory.co.tz
Author: Impactsphere Comms
Author URI: https://impactsphere.com
Description: Custom WordPress theme for MD Corporate Advisory — corporate advisory firm based in Tanzania.
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: md-advisory
*/

/* ========== DESIGN SYSTEM ========== */
:root {
    --navy: #0a1f33;
    --deep-teal: #0d3b4f;
    --forest: #1a3a2e;
    --gold: #c9a84c;
    --gold-hover: #d4b356;
    --warm-gray: #f4f2ee;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6b6b6b;
    --white: #ffffff;
    --border-light: #e0ddd6;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.1);
    --radius: 4px;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Helvetica Neue', 'Arial', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    padding-top: 90px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.container--narrow {
    max-width: 850px;
}

.section-padding {
    padding: 80px 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.25;
    color: var(--navy);
}

h1 { font-size: 3rem; letter-spacing: -0.5px; }
h2 { font-size: 2.2rem; letter-spacing: -0.3px; margin-bottom: 24px; }
h3 { font-size: 1.3rem; margin-bottom: 12px; }

p {
    color: var(--text-medium);
    margin-bottom: 16px;
    font-size: 1rem;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

a:hover { color: var(--navy); }

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn--primary {
    background-color: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
.btn--primary:hover {
    background-color: transparent;
    color: var(--gold);
    border-color: var(--gold);
}

.btn--secondary {
    background-color: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.6);
}
.btn--secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn--dark {
    background-color: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}
.btn--dark:hover {
    background-color: transparent;
    color: var(--navy);
    border-color: var(--navy);
}

.eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
    display: block;
}

/* ========== NAVIGATION ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--white);
    height: 80px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0 40px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
    transition: height 0.3s ease;
}

.site-header.scrolled {
    height: 70px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
    position: relative;
}

.site-logo__img {
    width: 500px;
    height: 140px;
    object-fit: contain;
    object-position: left center;
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.site-header.scrolled .site-logo__img {
    width: 400px;
    height: 112px;
}

.site-logo:hover .site-logo__img {
    opacity: 0.85;
}

.site-nav {
    display: flex;
    gap: 32px;
    align-items: center;
    justify-self: end;
}

.site-nav a {
    color: var(--navy);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.current-menu-item > a,
.site-nav .current_page_item > a {
    color: var(--gold);
}

.site-nav .nav-cta {
    padding: 12px 28px;
    background-color: var(--navy);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    margin-left: 12px;
}

.site-nav .nav-cta:hover {
    background-color: var(--gold);
    color: var(--navy);
}

/* ========== PAGE HERO ========== */
.page-hero {
    background-color: var(--navy);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 31, 51, 0.95) 0%, rgba(26, 58, 46, 0.7) 100%);
}

.page-hero__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.page-hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 16px;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* ========== HERO (HOMEPAGE) ========== */
.hero {
    position: relative;
    min-height: calc(100vh - 90px);
    display: flex;
    align-items: center;
    background-color: var(--navy);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 31, 51, 0.94) 0%, rgba(26, 58, 46, 0.82) 50%, rgba(10, 31, 51, 0.65) 100%);
    z-index: 1;
}

.hero__bg-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: repeating-linear-gradient(45deg, rgba(201, 168, 76, 0.03) 0px, rgba(201, 168, 76, 0.03) 2px, transparent 2px, transparent 12px);
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 750px;
    padding: 80px 0;
}

.hero__eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 20px;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 24px;
}

.hero__sub {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 650px;
}

.hero__ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ========== SECTIONS ========== */
.why-md { background-color: var(--white); }

.why-md__intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.why-md__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.tile {
    background-color: var(--warm-gray);
    border-radius: var(--radius);
    padding: 32px 24px;
    transition: all 0.3s ease;
    border-top: 3px solid transparent;
}

.tile:hover {
    border-top-color: var(--gold);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.tile h3 { font-size: 1.05rem; margin-bottom: 10px; }

.tile p {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

.who-we-serve { background-color: var(--warm-gray); }

.who-we-serve__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.client-block {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
}

.client-block h3 { font-size: 1.05rem; }

.client-block p {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.practice-areas { background-color: var(--white); }

.practice-areas__intro {
    max-width: 650px;
    margin-bottom: 50px;
}

.practice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.practice-card {
    padding: 32px 28px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.practice-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
}

.practice-card h3 {
    font-size: 1.1rem;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold);
    margin-bottom: 16px;
    display: inline-block;
}

.practice-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.practice-card p + p { margin-top: 12px; }

.insights { background-color: var(--warm-gray); }

.insights__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.insight-card {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.insight-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.insight-card h3 { font-size: 1.05rem; margin-bottom: 8px; }

.insight-card h3 a {
    color: var(--navy);
    text-decoration: none;
}

.insight-card h3 a:hover { color: var(--gold); }

.insight-card .date {
    font-size: 0.78rem;
    color: var(--text-light);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.insight-card .excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.contact-section { background-color: var(--white); }

.contact-section__intro {
    max-width: 650px;
    margin-bottom: 50px;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 800px;
}

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

.form-group--full { grid-column: 1 / -1; }

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: var(--warm-gray);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

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

.about-content { background-color: var(--white); }

.positioning-anchor {
    background-color: var(--warm-gray);
    padding: 24px 32px;
    border-left: 4px solid var(--gold);
    margin: 32px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.positioning-anchor p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0;
}

/* ========== FOOTER ========== */
.site-footer {
    background-color: var(--forest);
    padding: 70px 0 30px;
    color: rgba(255, 255, 255, 0.75);
}

.site-footer__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 25px;
}

.site-footer__brand { max-width: 500px; }

.site-footer__logo {
    width: 480px;
    height: 140px;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 24px;
    display: block;
}

.site-footer__brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.7;
}

.site-footer__nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-footer__nav h4 {
    color: var(--gold);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.site-footer__nav a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer__nav a:hover { color: var(--gold); }

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.site-footer__bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-bottom: 0;
}

.site-footer__bottom a {
    color: var(--gold);
    text-decoration: none;
}

.site-footer__bottom a:hover { color: var(--white); }

/* ========== MENU TOGGLE (Mobile) ========== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--navy);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .site-header { padding: 0 30px; }
    .site-logo__img { width: 420px; height: 118px; }
    .site-nav { gap: 24px; }
}

@media (max-width: 1024px) {
    .why-md__grid,
    .who-we-serve__grid { grid-template-columns: repeat(2, 1fr); }
    .practice-grid { grid-template-columns: repeat(2, 1fr); }
    .insights__grid { grid-template-columns: repeat(2, 1fr); }
    .site-logo__img { width: 380px; height: 106px; }
}

@media (max-width: 900px) {
    body { padding-top: 80px; }
    .site-header { height: 70px; }
    .hero { min-height: calc(100vh - 80px); }
    .site-logo__img { width: 340px; height: 95px; }
    .site-header.scrolled .site-logo__img { width: 280px; height: 78px; }
    .site-nav { gap: 16px; }
    .site-nav a { font-size: 0.85rem; }
}

@media (max-width: 768px) {
    body { padding-top: 70px; }
    .site-header { height: 60px; padding: 0 20px; }
    .site-header.scrolled { height: 55px; }
    .hero { min-height: auto; }
    .container { padding: 0 20px; }
    .section-padding { padding: 60px 0; }
    h1 { font-size: 2.4rem; }
    .hero h1 { font-size: 2.2rem; }
    .page-hero h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .site-logo__img { width: 280px; height: 78px; }
    .site-header.scrolled .site-logo__img { width: 240px; height: 67px; }
    .site-nav { display: none; }
    .menu-toggle { display: block; }
    .why-md__grid,
    .who-we-serve__grid,
    .insights__grid { grid-template-columns: 1fr; }
    .practice-grid { grid-template-columns: 1fr; }
    .contact-form { grid-template-columns: 1fr; }
    .hero__content { padding: 60px 0; }
    .site-footer__top { flex-direction: column; }
    .site-footer__logo { width: 350px; height: 102px; }
}

@media (max-width: 480px) {
    .site-logo__img { width: 240px; height: 67px; }
    .site-header.scrolled .site-logo__img { width: 200px; height: 56px; }
    .site-footer__logo { width: 280px; height: 82px; }
}