:root {
    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --primary: #0a0a0a;
    --primary-hover: #171717;
    --accent-green: #4ade80;
    --accent-green-dark: #22c55e;
    --accent-cyan: #06b6d4;
    --accent-cyan-dark: #0891b2;
    --accent-blue: #2563eb;
    --text-main: #374151;
    --text-muted: #6b7280;
    --bg-body: #ffffff;
    --bg-surface: #ffffff;
    --bg-muted: #f8fafc;
    --border: #eaeaea;
    --border-dark: #d1d5db;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.03);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-sans); }
html { scroll-behavior: smooth; }
body { background: var(--bg-body); color: var(--primary); overflow-x: hidden; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; display: flex; flex-direction: column; align-items: center; width: 100%; }

@keyframes unifiedFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header & Navigation */
.global-header {
    background: transparent;
    border-bottom: 1px solid transparent;
    display: flex;
    justify-content: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 500;
    transition: all 0.3s ease;
}

.global-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.global-header nav {
    width: 90%;
    max-width: 1400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    position: relative;
}

.nav-logo a {
    text-decoration: none;
    color: #000;
    font-weight: 800;
    font-size: 25px;
    letter-spacing: -0.6px;
    display: inline-flex;
    align-items: center;
}

.accent-dot {
    background: linear-gradient(135deg, var(--brand-accent-1, var(--accent-green)), var(--brand-accent-2, var(--accent-cyan)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    font-weight: 900;
    margin-left: 2px;
}

.sister-site-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    margin-left: 12px;
    transition: all 0.2s ease;
}
.sister-site-badge:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links ul {
    display: flex;
    column-gap: 28px;
    list-style-type: none;
    align-items: center;
}

.nav-links ul li a {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-links ul li a:hover,
.nav-links ul li a.active { color: #000000; }

.btn-nav {
    background: #000000;
    padding: 9px 20px;
    color: #ffffff !important;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #000000;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-nav:hover {
    background: #ffffff;
    color: #000000 !important;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}

.has-megamenu {
    position: static;
}

.megamenu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border);
    border-top: 3px solid #000000;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 32px 38px;
    display: grid;
    grid-template-columns: 1.15fr 1.15fr 1.35fr;
    gap: 32px;
    z-index: 550;
    margin-top: 0;
}

/* Invisible bridge so mouse does not leave hover tunnel between nav link and megamenu */
.megamenu::before {
    content: '';
    position: absolute;
    top: -24px;
    left: 0;
    right: 0;
    height: 24px;
    background: transparent;
    pointer-events: auto;
}

.megamenu-column h4 {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.megamenu-column ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start !important;
}

.megamenu-column ul li { width: 100%; }

.megamenu-item {
    display: block;
    padding: 8px 10px;
    margin-left: -10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease !important;
    text-decoration: none;
}

.megamenu-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.megamenu-item .item-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
}

.megamenu-item p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 400;
    line-height: 1.45;
}

.megamenu-featured {
    background: #000000;
    border-radius: var(--radius-md);
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    height: 100%;
    box-shadow: var(--shadow-md);
    border: 1px solid #1f2937;
}

.megamenu-featured h5 {
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.megamenu-featured p {
    color: #9ca3af;
    font-size: 12.5px;
    line-height: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.featured-btn {
    background: #ffffff;
    color: #000000 !important;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.featured-btn:hover {
    background: var(--accent-cyan);
    color: #000000 !important;
    transform: translateX(3px);
}

/* Common Buttons & Badges */
.btn-primary {
    background: var(--primary);
    color: #ffffff;
    padding: 14px 30px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    border: 1px solid var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--primary-hover);
    color: #ffffff;
    box-shadow: var(--btn-hover-shadow, 0 8px 24px rgba(0,0,0,0.2));
}

.btn-outline,
.btn-primary.btn-outline {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid var(--border-dark) !important;
}

.btn-outline:hover,
.btn-primary.btn-outline:hover {
    background: #f8fafc !important;
    color: #000000 !important;
    border-color: #0f172a !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.btn-cyan {
    background: #0891b2;
    border-color: #0891b2;
    color: #ffffff !important;
}

.btn-cyan:hover {
    background: #0e7490;
    border-color: #0e7490;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.35);
}

.btn-sister-green,
.btn-primary.btn-outline.btn-sister-green {
    background: #ffffff !important;
    border-color: #166534 !important;
    color: #166534 !important;
}

.btn-sister-green:hover,
.btn-primary.btn-outline.btn-sister-green:hover {
    background: #f0fdf4 !important;
    border-color: #15803d !important;
    color: #15803d !important;
}

.btn-sister-cyan,
.btn-primary.btn-outline.btn-sister-cyan {
    background: #ffffff !important;
    border-color: #0891b2 !important;
    color: #0891b2 !important;
}

.btn-sister-cyan:hover,
.btn-primary.btn-outline.btn-sister-cyan:hover {
    background: #ecfeff !important;
    border-color: #06b6d4 !important;
    color: #0e7490 !important;
}

.sassy-badge {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
}

.badge-cyan { background: rgba(6, 182, 212, 0.15); color: #0e7490; border: 1px solid rgba(6, 182, 212, 0.25); }
.badge-green { background: rgba(74, 222, 128, 0.15); color: #15803d; border: 1px solid rgba(74, 222, 128, 0.25); }
.badge-blue { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; border: 1px solid rgba(37, 99, 235, 0.22); }
.badge-dark { background: #111827; color: #f9fafb; }

/* Hero Common Layout (Shared across GridLogic & MeshLogic) */
.hero-content {
    width: 90%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
    position: relative;
    z-index: 2; /* CRITICAL: Ensures content renders above background overlays */
}

.hero-title {
    font-size: clamp(38px, 5.2vw, 76px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -2px;
    color: #0f172a;
    max-width: 1100px;
}

.hero-desc {
    font-size: clamp(16px, 1.25vw, 19.5px);
    line-height: 1.7;
    color: #334155;
    max-width: 780px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

/* Sections & Layout */
.section-container {
    width: 90%;
    max-width: 1400px;
    padding: 85px 0;
    display: flex;
    flex-direction: column;
    gap: 44px;
}

.section-header { text-align: left; max-width: 820px; }
.section-header h2 { font-size: 34px; font-weight: 800; letter-spacing: -0.7px; margin-bottom: 12px; color: #111827; line-height: 1.2; }
.section-header p { font-size: 16px; color: var(--text-main); line-height: 1.65; }

.page-header-section {
    width: 100%;
    padding: 170px 0 70px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.page-header-content {
    width: 90%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: #000; }
.breadcrumbs span { color: #9ca3af; }

.page-title {
    font-size: clamp(34px, 4.5vw, 56px);
    font-weight: 800;
    letter-spacing: -1.5px;
    color: #111827;
    line-height: 1.1;
}

.page-desc {
    font-size: 18px;
    color: var(--text-main);
    line-height: 1.65;
    max-width: 820px;
}

/* Grid Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 28px;
    width: 100%;
}

.unified-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.unified-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.unified-card h3, .unified-card h4 { font-size: 20px; color: var(--primary); font-weight: 700; }
.unified-card p { color: var(--text-main); font-size: 14px; line-height: 1.65; flex-grow: 1; }

.tags-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.tag { padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 500; }

.card-action-link {
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.unified-card:hover .card-action-link {
    transform: translateX(4px);
}

/* Service Detail Layout */
.service-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    width: 100%;
}

.service-main-content {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.service-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sidebar-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.spec-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}

.spec-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.5;
}

.spec-list li svg {
    flex-shrink: 0;
    margin-top: 3px;
}

/* Tabs */
.sassy-tabs-header { 
    display: flex; 
    gap: 20px; 
    border-bottom: 1px solid var(--border); 
    margin-bottom: 24px; 
    overflow-x: auto; 
    white-space: nowrap; 
    padding-bottom: 2px;
}

.sassy-tab { 
    padding: 12px 4px; 
    font-size: 15px; 
    font-weight: 500; 
    color: var(--text-muted); 
    cursor: pointer; 
    border-bottom: 2px solid transparent; 
    transition: all 0.2s ease; 
}

.sassy-tab:hover { color: var(--primary); }
.sassy-tab.active { 
    color: var(--primary); 
    border-color: #000000; 
    font-weight: 600; 
}

.sassy-tab-content { font-size: 14.5px; color: var(--text-main); line-height: 1.7; }

/* Contact Form Layout */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
    background: #ffffff;
    padding: 48px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.contact-card-box {
    background: #fafafa;
    padding: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-main); }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm); font-family: inherit; font-size: 14px;
    outline: none; transition: all 0.2s; background: #ffffff;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

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

.form-status-alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.65); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
}

.modal-box {
    background: #ffffff; width: 90%; max-width: 480px;
    border-radius: var(--radius-md); padding: 36px; text-align: center;
    box-shadow: var(--shadow-lg);
}

/* Footer */
footer {
    width: 100%;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border);
    background: #ffffff;
    padding: 65px 0 35px 0;
    margin-top: auto;
}

.footer-wrapper {
    width: 90%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
}

.footer-links-group {
    display: flex;
    column-gap: 48px;
    flex-wrap: wrap;
    row-gap: 20px;
}

.footer-links-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-group ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links-group ul li a:hover { color: #000000; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 25px;
    color: var(--text-muted);
    font-size: 13px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Mobile Navigation */
.mobile-toggle-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #000000;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: #ffffff;
    z-index: 1001;
    padding: 30px 24px;
    box-shadow: -10px 0 35px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.mobile-drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.mobile-drawer-links li a {
    text-decoration: none;
    color: #111827;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-sub-menu {
    list-style: none;
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-sub-menu li a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

@media (max-width: 1024px) {
    .nav-links { display: none; }
    .mobile-toggle-btn { display: block; }
    .contact-layout { grid-template-columns: 1fr; padding: 32px; gap: 35px; }
    .service-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .section-header h2 { font-size: 27px; }
    .grid-cards { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}
