/* ============================================
   TBM UNIFIED NAVIGATION & FOOTER STYLES
   Shared stylesheet for all TBM Green pages
   Generated: January 2026
   ============================================ */

/* CSS Variables (fallbacks for pages without root vars) */
:root {
    --tbm-green-primary: #1a5f2a;
    --tbm-green-light: #2a7a3a;
    --tbm-green-dark: #0f4a1f;
    --green-primary: #1a5f2a;
    --green-light: #2a7a3a;
    --green-accent: #8BC34A;
    --green-pale: #E8F5E9;
    --text-dark: #1a1a1a;
    --text-gray: #555;
    --white: #ffffff;
    --bg-light: #f0fdf4;
}

/* ============================================
   TBM UNIFIED NAVIGATION STYLES
   ============================================ */

.tbm-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white, #ffffff);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.tbm-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tbm-nav-logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--tbm-green-primary, #1a5f2a);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tbm-nav-logo svg {
    width: 36px;
    height: 36px;
    fill: currentColor;
}

.tbm-nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.tbm-nav-links > li {
    position: relative;
}

.tbm-nav-links a {
    text-decoration: none;
    color: var(--text-dark, #1a1a1a);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    padding: 0.5rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tbm-nav-links a:hover {
    color: var(--tbm-green-primary, #1a5f2a);
}

.tbm-dropdown-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.tbm-nav-phone {
    font-weight: 600;
    color: var(--tbm-green-primary, #1a5f2a) !important;
}

.tbm-nav-cta {
    background: var(--tbm-green-primary, #1a5f2a) !important;
    color: var(--white, #ffffff) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: background 0.3s, transform 0.2s !important;
    white-space: nowrap;
}

.tbm-nav-cta:hover {
    background: var(--tbm-green-light, #2a7a3a) !important;
    transform: translateY(-1px);
}

/* Dropdown Menus */
.tbm-dropdown {
    position: relative;
}

.tbm-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white, #ffffff);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 1rem 0.75rem;
    padding-top: 1.25rem;
    margin-top: 0;
    z-index: 1001;
    min-width: 220px;
    border: 1px solid #e2e8f0;
}

/* Invisible bridge to prevent hover gap */
.tbm-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.tbm-dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-dark, #1a1a1a);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.9rem;
}

.tbm-dropdown-menu a:hover {
    background: var(--bg-light, #f0fdf4);
    color: var(--tbm-green-primary, #1a5f2a);
}

/* Mega Menu */
.tbm-mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white, #ffffff);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 1.5rem;
    padding-top: 1.75rem;
    margin-top: 0;
    z-index: 1001;
    min-width: 600px;
    border: 1px solid #e2e8f0;
}

/* Invisible bridge to prevent hover gap */
.tbm-mega-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.tbm-mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.tbm-mega-menu-column h4 {
    color: var(--tbm-green-primary, #1a5f2a);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--tbm-green-light, #2a7a3a);
}

.tbm-mega-menu-column a {
    display: block;
    padding: 0.4rem 0;
    color: var(--text-gray, #555);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
    font-size: 0.875rem;
}

.tbm-mega-menu-column a:hover {
    color: var(--tbm-green-primary, #1a5f2a);
    padding-left: 0.5rem;
}

.tbm-dropdown:hover .tbm-dropdown-menu {
    display: block;
}

.tbm-dropdown:hover .tbm-mega-menu {
    display: block;
}

.tbm-dropdown:hover .tbm-dropdown-arrow {
    transform: rotate(180deg);
}

.tbm-dropdown-menu:hover,
.tbm-mega-menu:hover {
    display: block;
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */

.tbm-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

.tbm-hamburger:focus {
    outline: 2px solid var(--tbm-green-primary, #1a5f2a);
    outline-offset: 2px;
}

.tbm-hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-dark, #1a1a1a);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.tbm-hamburger-line + .tbm-hamburger-line {
    margin-top: 5px;
}

.tbm-hamburger.active .tbm-hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.tbm-hamburger.active .tbm-hamburger-line:nth-child(2) {
    opacity: 0;
}

.tbm-hamburger.active .tbm-hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.tbm-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tbm-mobile-overlay.active {
    opacity: 1;
}

.tbm-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: var(--white, #ffffff);
    z-index: 1001;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.tbm-mobile-menu.active {
    right: 0;
}

.tbm-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.tbm-mobile-logo {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--tbm-green-primary, #1a5f2a);
}

.tbm-mobile-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.75rem;
    color: var(--text-gray, #555);
    border-radius: 8px;
    transition: background 0.2s;
}

.tbm-mobile-close:hover {
    background: var(--bg-light, #f0fdf4);
}

.tbm-mobile-nav {
    list-style: none;
    margin: 0;
    padding: 1rem 0;
}

.tbm-mobile-nav li {
    border-bottom: 1px solid #e2e8f0;
}

.tbm-mobile-nav > li > a,
.tbm-mobile-nav > li > button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.5rem;
    color: var(--text-dark, #1a1a1a);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.tbm-mobile-nav > li > a:hover,
.tbm-mobile-nav > li > button:hover {
    background: var(--bg-light, #f0fdf4);
}

.tbm-mobile-dropdown-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
    fill: var(--text-gray, #555);
}

.tbm-mobile-dropdown-btn.active .tbm-mobile-dropdown-arrow {
    transform: rotate(180deg);
}

.tbm-mobile-submenu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8faf8;
}

.tbm-mobile-submenu.active {
    display: block;
}

.tbm-mobile-submenu a {
    display: block;
    padding: 0.875rem 1.5rem 0.875rem 2.5rem;
    color: var(--text-gray, #555);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.tbm-mobile-submenu a:hover {
    background: #e8f5e9;
    color: var(--tbm-green-primary, #1a5f2a);
}

.tbm-mobile-cta {
    display: block;
    margin: 1.5rem;
    padding: 1rem;
    text-align: center;
    background: var(--tbm-green-primary, #1a5f2a);
    color: var(--white, #ffffff) !important;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.tbm-mobile-cta:hover {
    background: var(--tbm-green-light, #2a7a3a);
}

.tbm-mobile-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--tbm-green-primary, #1a5f2a);
    border-top: 1px solid #e2e8f0;
}

.tbm-mobile-network {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8faf8;
}

.tbm-mobile-network h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-gray, #555);
    margin-bottom: 0.75rem;
}

.tbm-mobile-network a {
    display: block;
    padding: 0.5rem 0;
    color: var(--tbm-green-primary, #1a5f2a);
    text-decoration: none;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .tbm-nav-links {
        display: none;
    }

    .tbm-hamburger {
        display: flex;
    }

    .tbm-mobile-menu,
    .tbm-mobile-overlay {
        display: block;
    }
}

body.tbm-menu-open {
    overflow: hidden;
}

/* Touch device dropdown support */
.tbm-dropdown.touch-active .tbm-dropdown-menu,
.tbm-dropdown.touch-active .tbm-mega-menu {
    display: block !important;
}
.tbm-dropdown.touch-active .tbm-mega-menu {
    display: grid !important;
}

/* ============================================
   TBM NETWORK BANNER STYLES
   ============================================ */

.tbm-network-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #0d0d1a 100%);
    padding: 2.5rem 2rem;
    border-top: 3px solid var(--tbm-green-primary, #2D5A27);
}

.tbm-network-container {
    max-width: 1200px;
    margin: 0 auto;
}

.tbm-network-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tbm-network-header h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tbm-network-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.tbm-network-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.tbm-network-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.tbm-network-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--tbm-green-primary, #2D5A27);
    transform: translateY(-2px);
}

.tbm-network-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.tbm-network-card-icon svg {
    width: 18px;
    height: 18px;
}

.tbm-network-card-icon.commercial {
    background: linear-gradient(135deg, #1a5f2a 0%, #22863a 100%);
}

.tbm-network-card-icon.eco {
    background: linear-gradient(135deg, #2D5A27 0%, #4A7C43 100%);
}

.tbm-network-card-icon.exterior {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
}

.tbm-network-card h4 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.tbm-network-card .domain,
.tbm-network-card .tbm-domain {
    color: #8BC34A;
    font-size: 0.75rem;
    margin-bottom: 0.35rem;
    display: block;
}

.tbm-network-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
}

/* ============================================
   TRUST BADGES
   ============================================ */

.tbm-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tbm-trust-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
}

.tbm-trust-badge svg {
    width: 14px;
    height: 14px;
    fill: #8BC34A;
    flex-shrink: 0;
}

.tbm-trust-badge span {
    white-space: nowrap;
}

/* ============================================
   TBM UNIFIED FOOTER V2 STYLES
   ============================================ */

.tbm-unified-footer-v2 {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    padding: 2.5rem 2rem 1.5rem;
}

.tbm-footer-main {
    max-width: 1200px;
    margin: 0 auto;
}

.tbm-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
}

.tbm-footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #8BC34A;
    margin: 0 0 0.25rem 0;
}

.tbm-footer-tagline {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 0.75rem 0;
}

.tbm-footer-description {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0 0 1rem 0;
}

.tbm-footer-brand h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.tbm-footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tbm-footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tbm-footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s;
}

.tbm-footer-contact-item svg {
    width: 16px;
    height: 16px;
    fill: #8BC34A;
}

.tbm-footer-contact-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.tbm-footer-contact-item a:hover,
a.tbm-footer-contact-item:hover {
    color: #8BC34A;
}

.tbm-footer-links h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #8BC34A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tbm-footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tbm-footer-links li {
    margin-bottom: 0.6rem;
}

.tbm-footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.tbm-footer-links a:hover {
    color: #ffffff;
}

.tbm-social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tbm-social-link {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
}

.tbm-social-link:hover {
    background: var(--tbm-green-primary, #2D5A27);
}

.tbm-social-link svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
}

.tbm-footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1.5rem 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tbm-footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
}

.tbm-footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.tbm-footer-legal {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.tbm-footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.tbm-footer-legal a:hover {
    color: #ffffff;
}

.tbm-legal-sep {
    color: rgba(255, 255, 255, 0.3);
}

.tbm-footer-location {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0;
}

.tbm-footer-emails {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tbm-footer-hours {
    margin-top: 0.5rem;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1024px) {
    .tbm-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .tbm-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .tbm-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .tbm-network-grid {
        grid-template-columns: 1fr;
    }
    .tbm-footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .tbm-footer-contact-info {
        align-items: center;
    }
    .tbm-social-links {
        justify-content: center;
    }
    .tbm-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .tbm-footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
    .tbm-footer-legal {
        justify-content: center;
    }
    .tbm-trust-badges {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .tbm-footer-grid {
        grid-template-columns: 1fr;
    }
    .tbm-trust-badges {
        justify-content: center;
    }
}
