/* Global styles for MetalTech Pro */

:root {
    --primary-red: #D20705;
    --light-bg: #FFFFFF;
    --light-gray: #F3F4F6;
    --medium-gray: #E5E7EB;
    --dark-gray: #1F2937;
    --text-dark: #111827;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Navigation blur */
.nav-blur {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Gradient text utility */
.text-gradient {
    background: linear-gradient(135deg, #D20705 0%, #E63946 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Primary CTA button */
.btn-primary {
    background: linear-gradient(135deg, #D20705 0%, #E63946 100%);
    transition: all 0.3s ease;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(210, 7, 5, 0.3);
}

/* Hoverable card */
.card-hover {
    transition: all 0.3s ease;
    border: 1px solid var(--medium-gray);
    background: var(--light-bg);
}

.card-hover:hover {
    transform: translateY(-5px);
    border-color: #D20705;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Reveal animation helper */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
    will-change: opacity, transform;
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure elements are visible by default if JS doesn't fire */
.section-reveal.no-js {
    opacity: 1;
    transform: translateY(0);
}

/* Always show on mobile */
@media (max-width: 1023px) {
    .section-reveal {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* Mobile menu styles */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
}

/* Responsive typography */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.875rem; /* 30px */
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.5rem; /* 24px */
    }
    
    h3 {
        font-size: 1.25rem; /* 20px */
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    h1 {
        font-size: 2.25rem; /* 36px */
    }
    
    h2 {
        font-size: 1.875rem; /* 30px */
    }
}

/* Lightbox styles */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-container {
    position: relative;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

@media (max-width: 640px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .lightbox-image {
        max-height: 80vh;
    }
}

/* Clickable image cursor */
.clickable-image {
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.clickable-image:hover {
    opacity: 0.85;
}

/* ==========================================
   CRITICAL FALLBACK: Ensure elements visible
   This prevents "hidden section" bug when CSS fails to load
   ========================================== */

/* Services section MUST always be visible */
#services {
    display: block !important;
    visibility: visible !important;
}

#services * {
    visibility: visible !important;
}

/* Service cards MUST be visible */
.service-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* All grid and flex containers in services */
#services .grid,
#services .flex {
    display: block !important;
}

@media (min-width: 640px) {
    #services .grid {
        display: grid !important;
    }
}

/* Tailwind text utilities fallback */
.text-gradient {
    color: #D20705 !important;
}

.bg-gray-50 {
    background-color: #F9FAFB;
}

.bg-gray-100 {
    background-color: #F3F4F6;
}

/* Ensure container layout works */
.container {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 1280px;
    padding: 0 1rem;
}

