/* custom.css - Terran Robotics */
/* ALL values in px, NO rem */

/* =====================
   CSS Variables
   ===================== */
:root {
    --accent: #c0392b;
    --accent-dark: #a93226;
    --bg-dark: #1a1a1a;
    --bg-rgb: 26, 26, 26;
    --text-dark: #1a1a1a;
    --text-light: #e2e8f0;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
}

/* =====================
   Typography Overrides
   ===================== */
h1, h2, h3, h4, h5, h6 {
    text-transform: none;
    letter-spacing: normal;
}

body {
    font-size: 18px;
    color: #1a1a1a;
    background: #ffffff;
}

/* =====================
   Navbar Override
   (Replace sidebar with horizontal nav)
   ===================== */
body {
    padding-left: 0 !important;
}

/* Hide original sidebar if template has one */
#sidebar, .sidebar, .side-nav, .tm-sidebar, .left-nav {
    display: none !important;
}

/* Main content: remove sidebar offset */
#content, .tm-content, .main-content, .page-wrapper {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Horizontal navbar */
.navbar {
    background-color: #1a1a1a;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 12px 0;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-brand .brand-text {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    margin-left: 10px;
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav .nav-link {
    color: #e2e8f0 !important;
    font-size: 15px;
    font-weight: 500;
    padding: 20px 16px !important;
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active .nav-link {
    color: #c0392b !important;
}

/* 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;
}

/* Scroll active state */
.navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.98) !important;
}

.navbar.scrolled .navbar-nav > li > a {
    color: #e2e8f0 !important;
}

/* =====================
   Buttons
   ===================== */
.btn-primary {
    background: #c0392b;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
    background: #a93226;
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: #c0392b;
    border: 2px solid #c0392b;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
    background: #c0392b;
    color: #fff;
    text-decoration: none;
}

/* White-bg section: dark outline button */
.btn-secondary-dark {
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary-dark:hover {
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
}

/* Dark-bg: white outline button */
.btn-secondary-light {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary-light:hover {
    background: #ffffff;
    color: #1a1a1a;
    text-decoration: none;
}

.btn-gap {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
}

/* =====================
   Section Defaults
   ===================== */
.section {
    padding: 80px 0;
}

.section-sm {
    padding: 48px 0;
}

.section-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #c0392b;
    margin-bottom: 12px;
}

/* =====================
   Hero Section
   ===================== */
.hero-section {
    background-color: #1a1a1a;
    background-image: url('[Image: autonomous construction robots building a house frame at dusk, dramatic lighting | 1280x640]');
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    min-height: 620px;
    display: flex;
    align-items: center;
    color: #e2e8f0;
    position: relative;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    padding: 100px 15px;
}

.hero-section h1 {
    font-size: 58px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 20px;
    max-width: 700px;
}

.hero-section p {
    font-size: 20px;
    color: #c8d6e5;
    max-width: 560px;
    margin-bottom: 0;
    line-height: 1.6;
}

/* R79: Hero container transparent */
.header-thumb {
    background: transparent !important;
    border: none !important;
}

/* R89: Template overlay must not block clicks */
.tm-bg-overlay,
[class*="overlay"] {
    pointer-events: none !important;
}

/* =====================
   Page Hero (inner pages)
   ===================== */
.page-hero {
    background-color: #1a1a1a;
    color: #e2e8f0;
    padding: 80px 0 60px;
    text-align: center;
}

.page-hero h1 {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.page-hero p {
    font-size: 20px;
    color: #c8d6e5;
    max-width: 600px;
    margin: 0 auto;
}

/* =====================
   Feature Cards
   ===================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 991px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .features-grid { grid-template-columns: 1fr; }
}

.feature-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}

.feature-card .feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.feature-card .feature-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* R87: uniform icon/heading/desc sizes */
.feature-card .fas,
.feature-card .far,
.feature-card .fab {
    font-size: 32px;
    color: #c0392b;
    margin-bottom: 20px;
    display: block;
    height: 48px;
    line-height: 48px;
}

/* =====================
   How It Works / Steps
   ===================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 991px) {
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .steps-grid { grid-template-columns: 1fr; }
}

.step {
    text-align: center;
    padding: 32px 20px;
}

.step-num {
    display: block;
    font-size: 48px;
    font-weight: 800;
    color: #c0392b;
    line-height: 1;
    margin-bottom: 16px;
}

.step h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.step p {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* =====================
   Stats Bar
   ===================== */
.stats-bar {
    background: #c0392b;
    color: #ffffff;
    padding: 48px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

@media (max-width: 767px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-item .stat-num {
    display: block;
    font-size: 40px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-item .stat-label {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
}

/* =====================
   CTA Section
   ===================== */
.cta-section {
    background: #1a1a1a;
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 40px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 20px;
    color: #c8d6e5;
    max-width: 560px;
    margin: 0 auto 32px;
}

/* =====================
   Team Cards
   ===================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@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: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    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;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.team-role {
    font-size: 14px;
    font-weight: 600;
    color: #c0392b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.team-bio {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* =====================
   Blog Grid
   ===================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 991px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .blog-grid { grid-template-columns: 1fr; }
}

.blog-grid > [class*="col-"] {
    max-width: 100%;
    flex: none;
    padding: 0;
}

.blog-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 10px;
}

.blog-card-meta .category {
    color: #c0392b;
    font-weight: 600;
}

.blog-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-card p {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
}

.blog-card h3 a {
    color: #1a1a1a;
    text-decoration: none;
}

.blog-card h3 a:hover {
    color: #a93226;
}

.blog-card .read-more {
    color: #a93226;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.blog-card .read-more:hover {
    color: #8b2d23;
    text-decoration: underline;
}

/* R-IMG: Blog article images */
.blog-article img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

/* =====================
   About Page
   ===================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

@media (max-width: 767px) {
    .about-grid { grid-template-columns: 1fr; }
}

.about-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* =====================
   Solutions Cards
   ===================== */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 991px) {
    .solutions-grid { grid-template-columns: 1fr; }
}

.solution-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
}

.solution-card .solution-icon {
    font-size: 40px;
    color: #c0392b;
    margin-bottom: 20px;
    height: 48px;
    line-height: 48px;
}

.solution-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.solution-card p {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 20px;
}

.solution-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.solution-card ul li {
    font-size: 15px;
    color: #4a5568;
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
}

.solution-card ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #c0392b;
    position: absolute;
    left: 0;
    top: 8px;
    font-size: 13px;
}

/* =====================
   Contact Page
   ===================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

@media (max-width: 767px) {
    .contact-grid { grid-template-columns: 1fr; }
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    display: block;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
    color: #1a1a1a;
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #c0392b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.contact-form textarea {
    height: 160px;
    resize: vertical;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-info-item .icon {
    width: 40px;
    height: 40px;
    background: #c0392b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.contact-info-item h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.contact-info-item p {
    font-size: 15px;
    color: #4a5568;
    margin: 0;
}

.map-placeholder {
    background: #e9ecef;
    border-radius: 8px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    color: #6c757d;
    font-size: 16px;
}

/* =====================
   Container Narrow
   ===================== */
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =====================
   Footer
   ===================== */
footer {
    background: #111111;
    color: #e2e8f0;
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

@media (max-width: 767px) {
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

footer h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

footer p {
    font-size: 15px;
    color: #8fabc4;
    line-height: 1.7;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer ul li {
    margin-bottom: 10px;
}

footer ul li a {
    color: #8fabc4;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s;
}

footer ul li a:hover {
    color: #c0392b;
}

.footer-address {
    font-size: 14px;
    color: #8fabc4;
    margin-top: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* =====================
   Cookie Banner
   ===================== */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    color: #e2e8f0;
    z-index: 9999;
    padding: 20px 0;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
}

.cookie-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
}

.cookie-text strong {
    display: block;
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 4px;
}

.cookie-text p {
    font-size: 14px;
    color: #8fabc4;
    margin: 0;
}

.cookie-text a {
    color: #c0392b;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

#cookie-accept {
    background: #c0392b;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

#cookie-decline {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
}

/* =====================
   Utility
   ===================== */
.bg-light-gray {
    background: #f8f9fa;
}

.bg-dark {
    background: #1a1a1a;
    color: #e2e8f0;
}

.text-accent {
    color: #c0392b;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: 40px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
}

.section-header.light h2 {
    color: #ffffff;
}

.section-header.light p {
    color: #c8d6e5;
}

/* Values grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 767px) {
    .values-grid { grid-template-columns: 1fr; }
}

.value-card {
    padding: 32px 24px;
    border-left: 4px solid #c0392b;
    background: #f8f9fa;
}

.value-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.value-card p {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* Product page */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 767px) {
    .spec-grid { grid-template-columns: 1fr; }
}

.spec-item {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    border-left: 4px solid #c0392b;
}

.spec-item h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.spec-item p {
    font-size: 15px;
    color: #4a5568;
    margin: 0;
}

/* Culture section */
.culture-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

@media (max-width: 767px) {
    .culture-stats { grid-template-columns: repeat(2, 1fr); }
}

.culture-stat-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #c0392b;
}

.culture-stat-label {
    font-size: 14px;
    color: #4a5568;
}

/* ============================================================
   Fix CTA button contrast (complete override) — appended
   ============================================================ */
.cta-section .btn-accent,
.cta-section .btn-primary,
.bg-dark-brand .btn-accent,
.bg-dark-brand .btn-primary {
  background-color: #ffffff !important;
  border: 2px solid #ffffff !important;
  color: #1a1a1a !important;
}
.cta-section .btn-accent:hover,
.cta-section .btn-primary:hover,
.bg-dark-brand .btn-accent:hover,
.bg-dark-brand .btn-primary:hover {
  background-color: transparent !important;
  color: #ffffff !important;
}
/* Outline/secondary buttons on dark bg */
.cta-section .btn-secondary,
.cta-section .btn-outline,
.bg-dark-brand .btn-secondary {
  border-color: #ffffff !important;
  color: #ffffff !important;
}

/* =====================
   Card Equal Height (blog/team)
   ===================== */
.card-equal-height {
    display: flex;
    flex-wrap: wrap;
}
.card-equal-height > [class*="col-"] {
    display: flex;
}
.card-equal-height > [class*="col-"] > .blog-card,
.card-equal-height > [class*="col-"] > .team-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Blog card image constraint */
.blog-card-img {
    max-height: 220px;
    object-fit: cover;
    width: 100%;
}
