/* ==========================================================================
   BF Electrical Solutions — Design System
   TradieMate Repeatable Architecture v1.0

   Matches Figma design file: BF-Electrical
   Fonts: Titillium Web (headings), Roboto (body)
   Colors: Green palette (#0a2529, #02501e, #04964b, #16e070)
   ========================================================================== */

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--brand-black);
    line-height: 1.65;
    overflow-x: hidden;
    font-size: 18px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   TYPOGRAPHY — Figma: Titillium Web Bold Italic headings, Roboto body
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-style: italic;
    line-height: 1.2;
    color: var(--brand-black);
    text-transform: uppercase;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 28px;
    color: var(--brand-black);
    max-width: 72ch;
    font-weight: 400;
}

a {
    color: var(--brand-accent);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--brand-dark-green);
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.tm-section {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding: var(--section-pad) 20px;
}

.tm-section-full {
    width: 100%;
    padding: var(--section-pad) 20px;
}

.tm-section-dark {
    background-color: var(--brand-black);
    color: var(--brand-white);
}
.tm-section-dark h2,
.tm-section-dark h3,
.tm-section-dark p {
    color: var(--brand-white);
}

.tm-section-light {
    background-color: var(--brand-light);
}

/* ==========================================================================
   GRID SYSTEM
   ========================================================================== */

.tm-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--gap);
}

.tm-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap);
}

.tm-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--gap);
}

/* ==========================================================================
   BUTTONS — Green pill shape from Figma (#04964b)
   ========================================================================== */

.tm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 18px;
    line-height: 28px;
    padding: 11px 32px;
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.tm-btn-primary {
    background-color: var(--brand-medium-green);
    color: var(--brand-white);
    border-color: var(--brand-medium-green);
}
.tm-btn-primary:hover {
    background-color: var(--brand-dark-green);
    border-color: var(--brand-dark-green);
    color: var(--brand-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 150, 75, 0.3);
}

.tm-btn-secondary {
    background-color: transparent;
    color: var(--brand-black);
    border-color: var(--brand-black);
}
.tm-btn-secondary:hover {
    background-color: var(--brand-black);
    color: var(--brand-white);
}

.tm-btn-white {
    background-color: var(--brand-white);
    color: var(--brand-black);
    border-color: var(--brand-white);
}
.tm-btn-white:hover {
    background-color: transparent;
    color: var(--brand-white);
    border-color: var(--brand-white);
}

.tm-btn-sm {
    padding: 8px 20px;
    font-size: 16px;
}

.tm-btn-lg {
    padding: 14px 40px;
    font-size: 18px;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.tm-card {
    background: var(--brand-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--brand-grey-stroke);
    padding: 30px;
    transition: var(--transition);
}
.tm-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.tm-card-img {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    margin: -30px -30px 20px;
}
.tm-card-img img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.tm-card:hover .tm-card-img img {
    transform: scale(1.05);
}

.tm-service-card {
    text-align: left;
    padding: 30px;
    background: var(--brand-grey-bg);
    border: 1px solid var(--brand-grey-stroke);
    border-radius: var(--radius);
}
.tm-service-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}
.tm-service-card p {
    font-size: 16px;
    color: var(--brand-grey);
    margin-bottom: 16px;
}

/* ==========================================================================
   HERO SECTIONS — Full width, gradient overlay, rounded bottom corners
   ========================================================================== */

.tm-hero {
    position: relative;
    min-height: 780px;
    display: flex;
    align-items: center;
    padding: 100px 20px;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
}
.tm-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
    border-radius: 0 0 40px 40px;
}
.tm-hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    margin: 0 auto;
    color: var(--brand-white);
    width: 100%;
    padding: 0 30px;
}
.tm-hero h1 {
    color: var(--brand-white);
    font-size: clamp(3rem, 5vw, 4.0625rem);
    margin-bottom: 20px;
}
.tm-hero p {
    color: var(--brand-white);
    font-size: 18px;
    line-height: 28px;
    max-width: 652px;
    margin-bottom: 30px;
}

.tm-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--brand-white);
    border-radius: 50px;
    padding: 6px 20px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    color: var(--brand-white);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 24px;
}
.tm-hero-label::before {
    content: '';
    width: 9px;
    height: 9px;
    background: var(--brand-light-green);
    border-radius: 50%;
}

.tm-hero-trust {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}
.tm-hero-trust .avatars {
    display: flex;
}
.tm-hero-trust .avatars img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--brand-white);
    margin-left: -10px;
    object-fit: cover;
}
.tm-hero-trust .avatars img:first-child {
    margin-left: 0;
}
.tm-hero-trust span {
    font-weight: 700;
    font-size: 18px;
    color: var(--brand-white);
}

/* ==========================================================================
   LINK BANNER (below hero — Services/Industries)
   ========================================================================== */

.tm-link-banner {
    max-width: var(--max-width);
    margin: -70px auto 0;
    position: relative;
    z-index: 10;
    background: var(--brand-white);
    border: 1px solid var(--brand-grey-stroke);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tm-link-card {
    background: var(--brand-grey-bg);
    border: 1px solid var(--brand-grey-stroke);
    border-radius: var(--radius);
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.tm-link-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-white);
    border: 1px solid var(--brand-grey-stroke);
    border-radius: 70px;
    padding: 11px 20px;
    font-weight: 600;
    font-size: 16px;
    color: var(--brand-black);
    margin-left: auto;
    white-space: nowrap;
    transition: var(--transition);
}
.tm-link-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    background: var(--brand-medium-green);
    border-radius: 50%;
    color: var(--brand-white);
    font-size: 14px;
    flex-shrink: 0;
}

/* ==========================================================================
   CLIENT LOGOS BAR
   ========================================================================== */

.tm-logo-bar {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 40px;
    border-bottom: 1px solid var(--brand-grey-stroke);
}
.tm-logo-bar img {
    height: 60px;
    width: auto;
    object-fit: contain;
    opacity: 0.8;
    transition: var(--transition);
}
.tm-logo-bar img:hover {
    opacity: 1;
}

/* ==========================================================================
   SECTOR/INDUSTRY CARDS GRID
   ========================================================================== */

.tm-sector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.tm-sector-card {
    background: var(--brand-white);
    border: 1px solid var(--brand-grey-stroke);
    border-radius: var(--radius);
    padding: 30px;
}
.tm-sector-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
}
.tm-sector-card p {
    font-size: 16px;
    line-height: 24px;
    color: var(--brand-grey);
    margin-bottom: 20px;
}
.tm-sector-card .tm-learn-more {
    font-weight: 600;
    font-size: 16px;
    color: var(--brand-black);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tm-sector-card--cta {
    background: var(--brand-medium-green);
    border-color: var(--brand-medium-green);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
.tm-sector-card--cta h3,
.tm-sector-card--cta p {
    color: var(--brand-white);
}

/* ==========================================================================
   USP / WHY CHOOSE US — Alternating image+text
   ========================================================================== */

.tm-usp-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--section-pad) 20px;
}
.tm-usp-section--reversed {
    direction: rtl;
}
.tm-usp-section--reversed > * {
    direction: ltr;
}

.tm-usp-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.tm-usp-content .tm-eyebrow {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    color: var(--brand-dark-green);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

/* ==========================================================================
   BRAND STATEMENT / CTA BANNER
   ========================================================================== */

.tm-brand-banner {
    background: var(--brand-dark-green);
    color: var(--brand-white);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.tm-brand-banner h2 {
    color: var(--brand-white);
    max-width: 800px;
    margin: 0 auto 20px;
}

.tm-cta-banner {
    background: var(--brand-medium-green);
    color: var(--brand-white);
    text-align: center;
    padding: 60px 20px;
    border-radius: var(--radius-lg);
}
.tm-cta-banner h2 {
    color: var(--brand-white);
    margin-bottom: 12px;
}
.tm-cta-banner p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ==========================================================================
   QUOTE CARD (sidebar CTA)
   ========================================================================== */

.tm-quote-card {
    background: var(--brand-grey-bg);
    border: 1px solid var(--brand-grey-stroke);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
}

/* ==========================================================================
   FORMS (Fluent Forms overrides)
   ========================================================================== */

.fluentform .ff-el-input--label label {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--brand-black);
}

.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform input[type="tel"],
.fluentform textarea,
.fluentform select {
    border: 1px solid var(--brand-grey-stroke);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 16px;
    transition: var(--transition);
}
.fluentform input:focus,
.fluentform textarea:focus,
.fluentform select:focus {
    border-color: var(--brand-medium-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 150, 75, 0.15);
}

.fluentform .ff_submit_btn_wrapper .ff-btn-submit {
    background: var(--brand-medium-green) !important;
    border: none !important;
    border-radius: var(--radius-pill) !important;
    font-family: var(--font-body) !important;
    font-weight: 700 !important;
    padding: 11px 32px !important;
    font-size: 18px !important;
    transition: var(--transition) !important;
}
.fluentform .ff_submit_btn_wrapper .ff-btn-submit:hover {
    background: var(--brand-dark-green) !important;
    transform: translateY(-2px);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.tm-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--brand-white);
}

.tm-header-scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

header.brxe-header,
.bricks-header,
#brx-header {
    background: var(--brand-white) !important;
}

.tm-nav-link,
.bricks-nav-menu .menu-item a,
#brx-header .bricks-nav-menu a {
    font-family: var(--font-body) !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    color: var(--brand-black) !important;
    padding: 8px 16px;
    transition: var(--transition);
}
.tm-nav-link:hover,
.bricks-nav-menu .menu-item a:hover,
#brx-header .bricks-nav-menu a:hover {
    color: var(--brand-medium-green) !important;
}

.tm-header-cta,
#brx-header .tm-btn-primary {
    background: var(--brand-medium-green) !important;
    color: var(--brand-white) !important;
    border-radius: var(--radius-pill) !important;
    padding: 11px 32px !important;
    font-family: var(--font-body) !important;
    font-weight: 700 !important;
    font-size: 18px !important;
}

.tm-social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--brand-black);
    border-radius: 50%;
    color: var(--brand-white);
    font-size: 14px;
    transition: var(--transition);
}
.tm-social-icons a:hover {
    background: var(--brand-medium-green);
}

/* ==========================================================================
   PAGE HEADERS
   ========================================================================== */

.tm-page-header {
    position: relative;
    padding: 60px 20px;
    min-height: 300px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
}
.tm-page-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}
.tm-page-header h1 {
    color: var(--brand-white);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.tm-footer,
footer.brxe-footer,
.bricks-footer,
#brx-footer {
    background: var(--brand-dark-green) !important;
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 20px 30px;
}
.tm-footer h4 {
    color: var(--brand-white);
    margin-bottom: 20px;
}
.tm-footer a {
    color: rgba(255, 255, 255, 0.7);
}
.tm-footer a:hover {
    color: var(--brand-light-green);
}
.tm-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.875rem;
}

/* ==========================================================================
   BRICKS BUILDER GLOBAL OVERRIDES
   ========================================================================== */

.brxe-section {
    font-family: var(--font-body);
}

.brxe-heading {
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    font-style: italic !important;
    text-transform: uppercase !important;
    color: var(--brand-black);
}

.brxe-text,
.brxe-text-basic {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 28px;
    color: var(--brand-black);
}

.brxe-button {
    font-family: var(--font-body) !important;
    font-weight: 700 !important;
    border-radius: var(--radius-pill) !important;
}

.brxe-divider .line {
    border-color: var(--brand-grey-stroke) !important;
}

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */

.tm-testimonial {
    background: var(--brand-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--brand-grey-stroke);
    padding: 36px;
    position: relative;
}
.tm-testimonial::before {
    content: "\201C";
    font-size: 4rem;
    color: var(--brand-medium-green);
    opacity: 0.3;
    position: absolute;
    top: 16px;
    left: 24px;
}

.bf-stars {
    display: inline-flex;
    gap: 2px;
    color: #F5A623;
    font-size: 1.2rem;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.tm-text-center { text-align: center; }
.tm-text-white { color: var(--brand-white); }
.tm-text-accent { color: var(--brand-accent); }
.tm-bg-light { background-color: var(--brand-light); }
.tm-bg-dark { background-color: var(--brand-black); }
.tm-bg-dark-green { background-color: var(--brand-dark-green); }
.tm-bg-white { background-color: var(--brand-white); }

.tm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 991px) {
    .tm-section { padding: var(--section-pad-m) 16px; }
    .tm-hero { min-height: 500px; padding: 80px 16px; }
    .tm-grid-3, .tm-sector-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .tm-link-banner { grid-template-columns: 1fr; }
    .tm-usp-section { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 767px) {
    .tm-section { padding: 40px 16px; }
    .tm-hero { min-height: 400px; padding: 60px 16px; }
    .tm-hero h1 { font-size: 2rem; }
    .tm-card { padding: 24px; }
    .tm-btn { width: 100%; justify-content: center; }
    .tm-logo-bar { flex-wrap: wrap; gap: 20px; }
    .tm-sector-grid { grid-template-columns: 1fr; }
    .tm-cta-banner { padding: 40px 16px; }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
    .tm-fade-in {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    .tm-fade-in.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}
