/* North Kivu Mining - Design System */
:root {
    --primary: #FF8C00;
    --primary-hover: #E67E00;
    --bg-dark: #0A0A0A;
    --bg-light: #121212;
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --accent-blue: #007BFF;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Accessibility Focus States */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {

    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    line-height: 1.1;
}

h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-tag {
    display: inline-block;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

section {
    padding: 8rem 0;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.nav-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 2000;
}

.mobile-toggle span {
    width: 30px;
    height: 2px;
    background: var(--text-main);
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.btn {
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 140, 0, 0.2);
}

.btn-outline {
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    background: transparent;
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.hero-content {
    max-width: 700px;
}

.hero h1 span {
    color: var(--primary);
    display: block;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin: 2rem 0;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

/* Grid & Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--bg-light);
    border: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 140, 0, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

/* Statistics Section (Milestones style) */
.stats-section {
    background: var(--bg-light);
    padding: 1.5rem 0;
    /* Override generic section padding for a very thin strip */
    border-bottom: 1px solid var(--glass-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item h2 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-item p {
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
}

/* Project Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.project-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 400px;
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    transition: var(--transition);
}

.project-card:hover::before {
    background: rgba(0, 0, 0, 0.6);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    z-index: 2;
}

.project-card:hover img {
    transform: scale(1.1);
}

/* Leadership Section */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.leader-card {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.leader-img {
    width: 200px;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

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

/* Footer */
footer {
    background: #050505;
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--glass-border);
}

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

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* History Timeline */
.timeline-section {
    background: var(--bg-dark);
    position: relative;
    padding-bottom: 12rem;
}

.timeline-container {
    position: relative;
    padding: 4rem 0;
}

.timeline-track {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--glass-border);
    transform: translateY(-50%);
}

.timeline-items {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.timeline-item {
    width: 200px;
    text-align: center;
    position: relative;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: var(--bg-dark);
    border: 3px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
    position: relative;
}

.timeline-item:hover .timeline-dot {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    transform: scale(1.3);
}

.timeline-content {
    position: absolute;
    width: 250px;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 2rem;
}

.timeline-item:nth-child(even) .timeline-content {
    bottom: 2rem;
    padding-top: 0;
    padding-bottom: 2rem;
}

.year {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.milestone {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Testimonials */
.testimonials {
    background: var(--bg-light);
}

.testimonials-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
}

.testimonials-nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.25rem;
}

.nav-btn:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.testimonials-slider-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.testimonials-slider {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.testimonial-card-slide {
    flex: 0 0 calc(50% - 1rem);
    /* 2 items per view */
    min-width: 0;
}

.testimonial-card {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 20px;
    text-align: left;
    transition: var(--transition);
}

.testimonial-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.testimonial-author {
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.testimonial-role {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.testimonial-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.testimonial-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #ccc;
}

/* Compliance Grid */
.compliance-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    opacity: 0.6;
    flex-wrap: wrap;
}

.compliance-item {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    border: 2px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 8px;
}

/* Animations Scroll Reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: 1s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal].active {
    opacity: 1;
    transform: translateY(0);
}

/* Subpage Headers - DEPRECATED */

.subpage-intro {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin-top: 1.5rem;
}

/* ================================================
   RESPONSIVE OVERRIDES — Mobile-First Strategy
   ================================================ */

/* --- Tablet: 1024px and below --- */
@media (max-width: 1024px) {

    .features-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Inline 4-col services grid on home page → 2 cols */
    .services-inline-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Services page stats row: allow wrapping */
    .services-stats-row {
        flex-wrap: wrap;
        gap: 2rem !important;
    }
}

/* --- Mobile: 768px and below --- */
@media (max-width: 768px) {

    /* Core layout */
    section {
        padding: 4rem 0;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Grids: all collapse to 1 column */
    .features-grid,
    .projects-grid,
    .stats-grid,
    .leadership-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Inline grids (set directly on elements via style="") */
    .about-inline-grid,
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .services-inline-grid,
    [style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }

    /* Stats section */
    .stats-section {
        padding: 3rem 0;
    }

    /* Stats numbers */
    .stat-item h2 {
        font-size: 2.5rem;
    }

    /* Leader cards */
    .leader-card {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .leader-img {
        width: 160px;
        height: 200px;
        margin: 0 auto;
    }

    /* Timeline — vertical layout */
    .timeline-items {
        flex-direction: column;
        gap: 3rem;
        align-items: flex-start;
        padding-left: 1.5rem;
    }

    .timeline-track {
        left: 2rem;
        width: 2px;
        height: 100%;
        top: 0;
        transform: none;
    }

    .timeline-item {
        width: 100%;
        text-align: left;
    }

    .timeline-content {
        position: relative;
        left: 2.5rem;
        transform: none;
        padding-top: 0;
        width: auto;
    }

    .timeline-item:nth-child(even) .timeline-content {
        bottom: 0;
        padding-bottom: 0;
    }

    /* Testimonials */
    .testimonial-card-slide {
        flex: 0 0 100%;
    }

    .testimonials-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    /* Buttons */
    .btn {
        width: 100%;
        text-align: center;
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hide desktop CTA in nav */
    .nav-content .btn {
        display: none;
    }

    /* Hamburger toggle */
    .mobile-toggle {
        display: flex;
    }

    /* Mobile full-screen nav overlay */
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1500;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.75rem;
        font-family: var(--font-heading);
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }

    /* Hero buttons — stack vertically */
    .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }

    /* Hero paragraph nudge */
    .hero p {
        font-size: 1rem;
    }

    /* Footer bottom */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    /* Project cards height reduction */
    .project-card {
        height: 280px;
    }

    /* Services page stats inline row */
    [style*="display: flex; gap: 4rem;"] {
        flex-wrap: wrap !important;
        gap: 1.5rem !important;
    }

    /* CTA section padding */
    .cta-section [style*="padding: 5rem"] {
        padding: 3rem 1.5rem !important;
    }

    /* About page UVP grid */
    .uvp-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --- Small Mobile: 480px and below --- */
@media (max-width: 480px) {

    .container {
        padding: 0 1.25rem;
    }

    /* Services page: 4-column grid → single column */
    .services-inline-grid,
    [style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    /* Testimonial card padding */
    .testimonial-card {
        padding: 2rem 1.25rem;
    }

    /* Feature card padding */
    .feature-card {
        padding: 2rem 1.25rem;
    }

    /* Project overlay padding */
    .project-overlay {
        padding: 1.5rem;
    }

    /* Nav mobile link size */
    .nav-links a {
        font-size: 1.5rem;
    }

    /* Hero section smaller padding */
    .hero {
        padding-top: 80px;
    }

    /* Stat numbers */
    .stat-item h2 {
        font-size: 2.25rem;
    }

    /* Footer logo size */
    .logo {
        font-size: 1rem;
    }

    /* Compliance items */
    .compliance-item {
        font-size: 1rem;
        padding: 0.75rem 1.25rem;
    }
}