/* 
 * MERLAI LANDING PAGE THEME
 * Consistent Apple-inspired styling for all industry and city landing pages
 * Matches the main homepage design system exactly
 * EMERGENCY FIX: Ensure all graphics and styling render properly for live ad traffic
 */

/* Typography scaling to match homepage */
html {
    /* Globally scale the UI to mimic ~75% browser zoom at 100% zoom */
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-system);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--color-white);
    color: var(--color-gray-800);
    margin-top: 56px; /* Account for fixed nav */
}

/* Typography classes to match homepage exactly */
.text-display {
    /* Fixed rem-based sizes so hero text looks identical across environments */
    font-size: 3.1rem;
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 0.9;
}

/* Make hero headline larger so it comfortably wraps to two lines */
.hero .text-display {
    font-size: 4rem;
    font-weight: 700;
}

/* On wider viewports, bump hero display size further without using vw */
@media (min-width: 900px) {
    .hero .text-display {
        font-size: 5rem;
    }
}

.text-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.text-headline {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.text-body-lg {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 400;
    line-height: 1.4;
}

.text-body {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.5;
}

.text-caption {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-4xl) 0;
}

/* Buttons - Apple style matching homepage */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    border: none;
    border-radius: 24px;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-blue);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-large {
    /* Slightly tighter large buttons to avoid looking oversized on AWS */
    padding: 14px 28px;
    font-size: 0.95rem;
    border-radius: 26px;
}

/* Industry badge styling */
.industry-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e5e7eb;
    margin-bottom: var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    /* EMERGENCY FIX: Better visibility and professional appearance */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.industry-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Hero Section - Apple style matching homepage */
.hero {
    min-height: 80vh;
    background: var(--gradient-hero);
    color: var(--color-white);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* EMERGENCY FIX: Ensure hero background renders properly */
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    /* Fallback for browsers that don't support CSS variables */
    background: linear-gradient(135deg, #000000 0%, #1d1d1f 100%) !important;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-4xl) var(--space-lg);
}

.hero h1 {
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--color-white) 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--color-white);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section - Apple grid style matching homepage */
.features {
    background: var(--color-white);
    background: #ffffff; /* EMERGENCY FIX: Fallback for white sections */
    padding: var(--space-4xl) 0;
    /* Ensure clean section separation */
    border-top: 1px solid var(--color-gray-100);
    border-top: 1px solid #f3f3f3; /* Fallback */
}

.features-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.features-header h2 {
    margin-bottom: var(--space-lg);
    color: var(--color-gray-800);
}

.features-header p {
    color: var(--color-black);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.feature-card {
    background: var(--color-white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-blue);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-blue);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--color-gray-100);
    border-radius: var(--radius-md);
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: var(--gradient-blue);
    transform: scale(1.05);
}

.feature-card h3 {
    margin-bottom: var(--space-md);
    color: var(--color-gray-800);
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--color-black);
    line-height: 1.6;
}

/* CTA Section - Apple style matching homepage */
.cta-section {
    background: var(--color-gray-50);
    padding: var(--space-4xl) 0;
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    margin-bottom: var(--space-lg);
    color: var(--color-gray-800);
}

.cta-content p {
    margin-bottom: var(--space-xl);
    color: var(--color-black);
}

/* Testimonials Section - matching homepage style */
.testimonials {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: var(--space-4xl) 0;
}

.testimonials-header {
    text-align: center;
    margin-bottom: 4rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.testimonial-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border-left: 4px solid var(--color-blue);
}

/* Trust signals */
.trust-signals {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* Stats section for hero */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.hero-stats .stat {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
}

.hero-stats .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 4px;
}

.hero-stats .stat-label {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

/* Companies/Industries showcase */
.showcase-section {
    background: var(--color-gray-50);
    padding: var(--space-4xl) 0;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
}

.showcase-card {
    background: var(--color-white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    text-align: center;
    transition: all 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn:not(.mobile-menu .btn) {
        width: 100%;
        max-width: 300px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .hero-stats {
        gap: 24px;
    }

    .trust-signals {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: var(--space-2xl) var(--space-md);
    }

    .feature-card {
        padding: var(--space-lg);
    }
}

/* Smooth animations */
html {
    scroll-behavior: smooth;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Focus states */
.btn:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
}

/* EMERGENCY FIX: Mining/Healthcare Landing Page Specific Styling */
.why-mining,
.certifications,
.mine-sites {
    background: var(--color-gray-50);
    background: #f9f9f9; /* Fallback */
    padding: var(--space-4xl) 0;
    border-top: 1px solid var(--color-gray-200);
    border-top: 1px solid #e8e8ed; /* Fallback */
}

.challenges-grid,
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
}

.challenge-card,
.cert-item {
    background: var(--color-white);
    background: #ffffff; /* Fallback */
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    border: 1px solid #e8e8ed; /* Fallback */
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.challenge-card:hover,
.cert-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--color-blue);
    border-color: #0051d0; /* Fallback */
}

.sites-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.site-tag {
    background: var(--color-white);
    background: #ffffff; /* Fallback */
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--color-gray-300);
    border: 1px solid #d2d2d7; /* Fallback */
    font-size: 0.875rem;
    color: var(--color-gray-700);
    color: #424245; /* Fallback */
    transition: all 0.2s ease;
}

.site-tag:hover {
    background: var(--color-blue);
    background: #0051d0; /* Fallback */
    color: white;
    border-color: transparent;
}

/* FAQ Section Styling */
.faq {
    background: var(--color-white);
    background: #ffffff; /* Fallback */
    padding: var(--space-4xl) 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.faq-item {
    background: var(--color-gray-50);
    background: #f9f9f9; /* Fallback */
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-blue);
    border-left: 4px solid #0051d0; /* Fallback */
}

.faq-item h3 {
    color: var(--color-gray-800);
    color: #1d1d1f; /* Fallback */
    margin-bottom: var(--space-md);
}

.faq-item p {
    color: var(--color-gray-600);
    color: #6e6e73; /* Fallback */
    line-height: 1.6;
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-header h2 {
    color: var(--color-gray-800);
    color: #1d1d1f; /* Fallback */
    margin-bottom: var(--space-lg);
}

.section-header p {
    color: var(--color-gray-600);
    color: #6e6e73; /* Fallback */
    font-size: 1.125rem;
}

/* Override any existing custom button classes */
.btn-mining, 
.btn-mining-primary,
.btn-mining-secondary,
.btn-healthcare,
.btn-healthcare-primary,
.btn-healthcare-secondary,
.cta-button,
.cta-btn {
    /* Reset to use standard button styles */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: var(--space-sm) !important;
    padding: 14px 28px !important;
    border: none !important;
    border-radius: 26px !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    position: relative !important;
    overflow: hidden !important;
    background: var(--gradient-blue) !important;
    background: linear-gradient(135deg, #0051d0 0%, #003a9b 100%) !important; /* Fallback */
    color: var(--color-white) !important;
    color: #ffffff !important; /* Fallback */
    box-shadow: var(--shadow-sm) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important; /* Fallback */
}

.btn-mining:hover,
.btn-mining-primary:hover,
.btn-mining-secondary:hover,
.btn-healthcare:hover,
.btn-healthcare-primary:hover,
.btn-healthcare-secondary:hover,
.cta-button:hover,
.cta-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-md) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important; /* Fallback */
}