/* KernelRun - Custom CSS
   Template: 2108_dashboard (Bootstrap 4, FA5)
   Strategy: Option A â€” Keep template CSS + override with custom.css
   Accent: #3b82f6
*/

/* === CSS Variables === */
:root {
    --accent: #3b82f6;
    --accent-dark: #2563eb;
    --accent-light: #dbeafe;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface2: #f0f4f8;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: rgba(0,0,0,0.08);
    --radius: 10px;
    --nav-height: 70px;
    --bg-rgb: 248,250,252;
}

/* === Global Reset Overrides === */
body {
    font-family: 'Open Sans', sans-serif;
    font-size: 18px;
    line-height: 1.9;
    color: var(--text);
    background-color: var(--bg);
}

h1, h2, h3, h4 {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 700;
    color: var(--text);
}

h1 { font-size: 58px; line-height: 1.15; }
h2 { font-size: 40px; line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.4; font-weight: 600; }
p  { font-size: 18px; line-height: 1.9; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); text-decoration: none; }

/* === Container Narrow === */
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
}

/* === R77: Nav cleanup === */
.nav-item {
    margin-bottom: 0 !important;
    background-image: none !important;
}
.site-logo { max-width: none !important; }
.btn-accent, .cta-primary, .cta-secondary { white-space: nowrap; }

/* === Navigation === */
.navbar {
    background-color: var(--surface) !important;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    padding: 0 24px;
    min-height: var(--nav-height);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-brand img {
    height: 36px;
    width: auto;
}

.navbar-brand .brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.tm-site-icon { display: none; }
.tm-site-title { display: none; }

.navbar-nav .nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted) !important;
    padding: 8px 14px !important;
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active .nav-link {
    color: var(--accent) !important;
}

.navbar-nav .nav-item.active .nav-link {
    font-weight: 600;
}

.nav-cta {
    background-color: var(--accent);
    color: #ffffff !important;
    border-radius: 6px;
    padding: 8px 18px !important;
    margin-left: 8px;
}

.nav-cta:hover {
    background-color: var(--accent-dark);
    color: #ffffff !important;
}

/* Template nav override */
#navbarSupportedContent .navbar-nav.mx-auto {
    margin: 0 !important;
}

/* === Page Shell (replaces .container dashboard wrapper) === */
#home { background: none; }
#home > .container { max-width: 100%; padding: 0; }
#home > .container > .row { margin: 0; }

/* === Hero Section === */
.hero-section {
    background-color: var(--surface);
    padding: 100px 0 80px;
    border-bottom: 1px solid var(--border);
}

.hero-section h1 {
    font-size: 58px;
    font-weight: 700;
    color: var(--text);
    max-width: 700px;
    margin-bottom: 24px;
}

.hero-section .hero-sub {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 580px;
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.hero-image-wrap {
    border-radius: var(--radius);
    overflow: hidden;
}

/* R79: Hero container transparent */
.header-thumb {
    background: transparent !important;
    border: none !important;
}

/* === Buttons === */
.btn-primary-custom {
    display: inline-block;
    background-color: var(--accent);
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-primary-custom:hover {
    background-color: var(--accent-dark);
    color: #ffffff !important;
}

.btn-secondary-custom {
    display: inline-block;
    background-color: transparent;
    color: var(--text) !important;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 8px;
    border: 2px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.btn-secondary-custom:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
}

/* === Sections === */
.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--surface2);
    padding: 80px 0;
}

.section-dark {
    background-color: #1e293b;
    padding: 80px 0;
    color: #e2e8f0;
}

.section-dark h2 { color: #f1f5f9; }
.section-dark h3 { color: #e2e8f0; }
.section-dark p { color: #c8d6e5; }
.section-dark .text-muted { color: #8fabc4 !important; }

.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 580px;
    margin-bottom: 48px;
}

/* === Feature Cards === */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 48px;
}

@media (max-width: 991px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
}

.feature-card .card-icon {
    width: 48px;
    height: 48px;
    background-color: var(--accent-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* R81: Force accent color on all icons */
.feature-icon .fa, .card-icon .fa, .step-icon .fa {
    color: var(--accent) !important;
}

.feature-card .card-icon .fas,
.feature-card .card-icon .far {
    font-size: 22px;
    color: var(--accent) !important;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.feature-card p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.75;
    margin: 0;
}

/* === Stats Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

@media (max-width: 991px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
    text-align: center;
    padding: 32px 20px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat-num {
    font-size: 40px;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 15px;
    color: var(--text-muted);
}

/* === Steps / How It Works === */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 48px;
}

@media (max-width: 991px) {
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .steps-grid { grid-template-columns: 1fr; }
}

/* R80: Steps horizontal grid, vertical card content */
.step {
    text-align: center;
    padding: 32px 24px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--accent);
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 20px;
}

.step h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.step p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

/* === Page Hero (inner pages) === */
.page-hero {
    background-color: var(--surface);
    padding: 64px 0 56px;
    border-bottom: 1px solid var(--border);
}

.page-hero h1 {
    font-size: 44px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.page-hero p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0;
}

/* === Team Cards === */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

@media (max-width: 991px) {
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .team-grid { grid-template-columns: 1fr; }
}

.team-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    margin: 0 auto 20px;
    display: block;
}

.team-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.team-role {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.team-bio {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.team-email {
    font-size: 14px;
    color: var(--accent);
}

/* === Blog Grid === */
/* R78: Fixed 3-column CSS grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 48px;
}

@media (max-width: 991px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .blog-grid { grid-template-columns: 1fr; }
}

.blog-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.blog-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-img {
    background-color: var(--surface2);
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-body {
    padding: 20px 22px 24px;
    flex: 1;
}

.blog-card-body time {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}

.blog-card-body h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.5;
}

.blog-card-body p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* === Pricing Cards === */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 48px;
    align-items: start;
}

@media (max-width: 991px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
}

.pricing-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.pricing-card .badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.price {
    font-size: 42px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
    line-height: 1;
}

.price span {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-muted);
}

.price-desc {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
}

.features li {
    font-size: 15px;
    color: var(--text);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.features li::before {
    content: 'âœ“';
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

/* === Contact Page === */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
    color: var(--text);
}

.contact-list li .fas {
    color: var(--accent);
    margin-top: 4px;
    flex-shrink: 0;
}

.contact-form .form-control {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    background-color: var(--surface);
    color: var(--text);
}

.contact-form .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
    outline: none;
}

/* === Accordion (Pricing FAQ) === */
.accordion .card {
    border: 1px solid var(--border);
    border-radius: var(--radius) !important;
    margin-bottom: 8px;
    overflow: hidden;
}

.accordion .card-header {
    background-color: var(--surface);
    border: none;
    padding: 0;
}

.accordion .card-header button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 18px 20px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion .card-header button:hover {
    color: var(--accent);
}

.accordion .card-body {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.75;
    padding: 16px 20px 20px;
}

/* === CTA Section === */
.cta-section {
    background-color: var(--accent);
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    color: #ffffff;
    font-size: 36px;
    margin-bottom: 16px;
}

.cta-section p {
    color: rgba(255,255,255,0.85);
    font-size: 18px;
    max-width: 480px;
    margin: 0 auto 32px;
}

.btn-cta-white {
    display: inline-block;
    background-color: #ffffff;
    color: var(--accent) !important;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-cta-white:hover {
    background-color: #f0f4f8;
    color: var(--accent-dark) !important;
}

/* === Values Section === */
.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-top: 48px;
}

@media (max-width: 767px) {
    .values-grid { grid-template-columns: 1fr; }
}

.value-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.value-icon {
    width: 44px;
    height: 44px;
    background-color: var(--accent-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.value-icon .fas {
    font-size: 20px;
    color: var(--accent) !important;
}

.value-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.value-content p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.7;
}

/* === Case Study Cards === */
.case-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 48px;
}

@media (max-width: 991px) {
    .case-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .case-grid { grid-template-columns: 1fr; }
}

.case-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.case-metric {
    font-size: 38px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 10px;
}

.case-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.case-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* === Footer === */
footer {
    background-color: #1e293b;
    color: #c8d6e5;
    padding: 60px 0 32px;
}

/* Override template footer */
footer.row { margin: 0 !important; }
.tm-mt-small { margin-top: 0 !important; }
.tm-bg-black { background: transparent !important; padding: 0 !important; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 767px) {
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

footer h3 {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 16px;
    text-transform: none !important;
    letter-spacing: normal !important;
}

footer p {
    font-size: 15px;
    color: #8fabc4;
    line-height: 1.7;
}

.footer-address {
    font-size: 14px;
    color: #8fabc4;
    margin-top: 8px;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer ul li {
    margin-bottom: 8px;
}

footer ul li a {
    font-size: 15px;
    color: #8fabc4;
    text-decoration: none;
    transition: color 0.2s;
}

footer ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: #8fabc4;
    margin: 0;
}

/* === Cookie Banner === */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1e293b;
    color: #e2e8f0;
    z-index: 9999;
    padding: 20px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.cookie-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-text strong {
    display: block;
    font-size: 16px;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.cookie-text p {
    font-size: 14px;
    color: #8fabc4;
    margin: 0;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--accent);
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

#cookie-decline {
    background-color: transparent;
    color: #8fabc4;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#cookie-decline:hover {
    border-color: #8fabc4;
    color: #e2e8f0;
}

#cookie-accept {
    background-color: var(--accent);
    color: #ffffff;
    border: none;
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

#cookie-accept:hover {
    background-color: var(--accent-dark);
}

/* === R89: Template overlay pointer events === */
.tm-bg-overlay, [class*="overlay"] { pointer-events: none !important; }

/* === R85: Dark sections solid text === */
.section-dark * { opacity: 1 !important; }

/* === Responsive Fixes === */
@media (max-width: 767px) {
    h1, .hero-section h1 { font-size: 38px; }
    h2, .section-title { font-size: 30px; }
    .page-hero h1 { font-size: 34px; }
    .steps-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
}

/* === Template override: hide admin-specific elements === */
.tm-content-row { display: block; }
#reportsPage { background: var(--bg) !important; }

/* === Utility === */
.text-accent { color: var(--accent); }
.bg-accent { background-color: var(--accent); }
.mt-48 { margin-top: 48px; }
.mb-48 { margin-bottom: 48px; }

/* === Card Grid Alignment Fix (web0411 patch) === */
.row.features-grid {
    display: flex !important;
    flex-wrap: wrap !important;
}
.row.features-grid > [class*="col-"] {
    display: flex !important;
    flex-direction: column !important;
}
.feature-card-deep {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}
.feature-card-deep .feature-icon-sm {
    width: 52px;
    height: 52px;
    background-color: var(--accent-light, rgba(99,102,241,0.12));
    border-radius: 10px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 22px;
    color: var(--accent);
}
.feature-card-deep .feature-icon-sm .fa,
.feature-card-deep .feature-icon-sm .fas,
.feature-card-deep .feature-icon-sm span {
    color: var(--accent) !important;
    font-size: 22px;
}

/* === Navbar CTA Button Fix — R75 === */
.nav-cta {
    background-color: var(--accent) !important;
    color: #ffffff !important;
    padding: 8px 20px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    display: inline-block !important;
    border: none !important;
    white-space: nowrap !important;
}
.nav-cta:hover {
    background-color: var(--accent-dark) !important;
    color: #ffffff !important;
}
/* Remove default nav-link styling from cta */
.navbar-nav .nav-item .nav-cta {
    padding: 8px 20px !important;
    margin-top: 2px !important;
}

/* === Article / Blog image sizing (R-IMG) === */
.img-fluid,
.blog-hero-img,
.article-thumbnail img,
.article-thumbnail,
article img,
.post-content img,
.container-narrow img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 8px;
    margin: 24px 0;
}
