*,
html,
body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    box-sizing: border-box;
    position: relative;
    font-family: 'Raleway', 'Poppins', sans-serif;
}

:root {
    --gradient-primary: linear-gradient(145deg, #0866ad, #0a4c7e);
    --gradient-secondary: linear-gradient(145deg, #001627, #001e35);
    
    --primary: #0866ad;
    --primary-hover: #0a4c7e;
    --primary-soft: rgba(8, 102, 173, 0.1);
    --secondary: #001627;
    --secondary-hover: #001e35;
    --secondary-soft: rgba(0, 22, 39, 0.05);
    --light-bg: #ffffff;

    --text-light: #ffffff;
    --text-soft: #f8f9fa;
    --text-muted: #444c53;
    --text-dark: #001627;

    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 25px rgba(8, 102, 173, 0.15);
    --shadow-lg: 0 15px 40px rgba(8, 102, 173, 0.2);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    
    --border-radius-sm: 10px;
    --border-radius-md: 15px;
    --border-radius-lg: 25px;
    --border-radius-xl: 32px;
    
    --fabrication-color: #0866ad;
    --foundry-color: #c04000;
    --hydraulics-color: #2c5282;
    --sourcing-color: #2d6a4f;
    --eaas-color: #9c27b0;
}

/* Nav */
.landing_gallery {
    width: 100%;
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    transition: 0.5s ease-in-out;
    
    & > .land_container {
        width: 80%;
        position: relative;
        margin: 0 auto;
        transition: 0.5s ease-in-out;
        z-index: 2;
    }
}

/* Theme Block */
.theme_block {
    width: 15px;
    height: 15px;
    background-color: var(--primary);
}

/* Hero Section */
.gallery_hero {
    position: relative;
    min-height: 70vh;
    background: linear-gradient(135deg, #0a0a1a 0%, #001627 100%);
    overflow: hidden;
    
    & > .gallery_hero_overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url(../IMAGES/gallery-bg.jpg);
        background-size: cover;
        background-position: center;
        opacity: 0.2;
        z-index: 0;
    }
    
    & > .gallery_nav_wrapper {
        position: relative;
        z-index: 10;
    }
    
    & > .gallery_hero_content {
        position: relative;
        z-index: 5;
        max-width: 800px;
        margin: 0 auto;
        padding: 80px 20px 40px;
        text-align: center;
        
        & > .gallery_hero_badge {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 30px;
            
            & > .theme_block {
                background-color: var(--primary);
            }
            
            & > span {
                color: var(--primary);
                font-size: 0.9em;
                font-weight: 600;
                letter-spacing: 3px;
                text-transform: uppercase;
            }
        }
        
        & > .gallery_hero_title {
            font-size: 4em;
            line-height: 1.2;
            font-weight: 300;
            color: var(--text-light);
            margin-bottom: 25px;
            
            & > span {
                font-weight: 650;
                background: linear-gradient(135deg, var(--primary), #adcadf);
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
                background-clip: text;
            }
        }
        
        & > .gallery_hero_desc {
            font-size: 1.2em;
            line-height: 1.6;
            color: rgba(255, 255, 255, 0.8);
            max-width: 600px;
            margin: 0 auto;
        }
    }
    
    & > .gallery_hero_stats {
        position: relative;
        z-index: 5;
        display: flex;
        justify-content: center;
        gap: 60px;
        padding: 40px 20px;
        
        & > .gallery_stat {
            text-align: center;
            
            & > .gallery_stat_value {
                display: block;
                font-size: 2em;
                font-weight: 800;
                color: var(--primary);
                line-height: 1.2;
            }
            
            & > .gallery_stat_label {
                font-size: 0.85em;
                color: rgba(255, 255, 255, 0.7);
            }
        }
    }
}

.gallery_filters {
    padding: 20px 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    
    & > .gallery_filters_container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 15px;
        
        & > .gallery_filter_toggle {
            display: none;
            align-items: center;
            gap: 12px;
            padding: 12px 20px;
            background: white;
            border: 2px solid #e2e8f0;
            border-radius: 50px;
            font-size: 0.95em;
            font-weight: 600;
            color: var(--secondary);
            cursor: pointer;
            transition: all 0.3s ease;
            
            &:hover {
                border-color: var(--primary);
                color: var(--primary);
            }
            
            & > .toggle_icon {
                font-size: 1.1em;
            }
            
            & > .toggle_text {
                flex: 1;
            }
            
            & > .toggle_arrow {
                font-size: 0.8em;
                transition: transform 0.3s ease;
            }
            
            &.active .toggle_arrow {
                transform: rotate(180deg);
            }
        }
        
        & > .gallery_filter_tabs_wrapper {
            flex: 1;
            
            & > .gallery_filter_tabs {
                display: flex;
                gap: 15px;
                flex-wrap: wrap;
                
                & > .gallery_filter_btn {
                    padding: 10px 25px;
                    background: transparent;
                    border: 2px solid #e2e8f0;
                    border-radius: 50px;
                    font-size: 0.9em;
                    font-weight: 600;
                    color: var(--text-muted);
                    cursor: pointer;
                    transition: all 0.3s ease;
                    
                    &:hover {
                        border-color: var(--primary);
                        color: var(--primary);
                    }
                    
                    &.active {
                        background: var(--primary);
                        border-color: var(--primary);
                        color: white;
                    }
                }
            }
        }
        
        & > .gallery_filter_count {
            font-size: 0.9em;
            color: var(--text-muted);
            white-space: nowrap;
            
            & > span {
                font-weight: 700;
                color: var(--primary);
                font-size: 1.2em;
            }
        }
    }
}

/* Gallery Grid */
.gallery_grid_section {
    padding: 60px 0;
    background: #f8fafc;
    
    & > .gallery_grid_container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
        
        & > .gallery_grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 30px;
            
            & > .gallery_item {
                background: white;
                border-radius: var(--border-radius-lg);
                overflow: hidden;
                box-shadow: var(--shadow-sm);
                transition: all 0.3s ease;
                display: block;
                
                &:hover {
                    transform: translateY(-5px);
                    box-shadow: var(--shadow-xl);
                    
                    & > .gallery_item_inner > .gallery_image_wrapper > .gallery_overlay {
                        opacity: 1;
                    }
                }
                
                & > .gallery_item_inner {
                    & > .gallery_image_wrapper {
                        position: relative;
                        height: 250px;
                        overflow: hidden;
                        cursor: pointer;
                        
                        & > .gallery_image_placeholder {
                            width: 100%;
                            height: 100%;
                            background: linear-gradient(135deg, #4a4a4a, #2d2d2d);
                            display: flex;
                            flex-direction: column;
                            align-items: center;
                            justify-content: center;
                            color: white;
                            
                            & > .placeholder_icon {
                                font-size: 3em;
                                margin-bottom: 10px;
                            }
                            
                            & > span {
                                font-size: 0.9em;
                                opacity: 0.8;
                            }
                        }
                        
                        & > .gallery_overlay {
                            position: absolute;
                            top: 0;
                            left: 0;
                            width: 100%;
                            height: 100%;
                            background: rgba(8, 102, 173, 0.9);
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            opacity: 0;
                            transition: all 0.3s ease;
                            
                            & > .gallery_overlay_content {
                                text-align: center;
                                color: white;
                                
                                & > h4 {
                                    font-size: 1.2em;
                                    margin-bottom: 10px;
                                }
                                
                                & > .gallery_overlay_icon {
                                    font-size: 2em;
                                    display: inline-block;
                                    animation: pulse 1.5s ease infinite;
                                }
                            }
                        }
                    }
                    
                    & > .gallery_item_info {
                        padding: 20px;
                        
                        & > .gallery_item_badge {
                            display: inline-block;
                            padding: 5px 12px;
                            border-radius: 20px;
                            font-size: 0.75em;
                            font-weight: 600;
                            margin-bottom: 12px;
                            
                            &.fabrication {
                                background: rgba(8, 102, 173, 0.1);
                                color: var(--fabrication-color);
                            }
                            
                            &.foundry {
                                background: rgba(192, 64, 0, 0.1);
                                color: var(--foundry-color);
                            }
                            
                            &.hydraulics {
                                background: rgba(44, 82, 130, 0.1);
                                color: var(--hydraulics-color);
                            }
                            
                            &.sourcing {
                                background: rgba(45, 106, 79, 0.1);
                                color: var(--sourcing-color);
                            }
                            
                            &.eaas {
                                background: rgba(156, 39, 176, 0.1);
                                color: var(--eaas-color);
                            }
                        }
                        
                        & > .gallery_item_title {
                            font-size: 1.2em;
                            color: var(--secondary);
                            margin-bottom: 10px;
                            font-weight: 700;
                            line-height: 1.4;
                        }
                        
                        & > .gallery_item_desc {
                            font-size: 0.9em;
                            color: var(--text-muted);
                            line-height: 1.6;
                            margin-bottom: 15px;
                        }
                        
                        & > .gallery_item_meta {
                            display: flex;
                            gap: 15px;
                            font-size: 0.8em;
                            color: var(--text-muted);
                            
                            & > span {
                                display: flex;
                                align-items: center;
                                gap: 5px;
                            }
                        }
                    }
                }
            }
        }
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Empty State */
.gallery_empty_state {
    text-align: center;
    padding: 80px 20px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    & > .empty_state_icon {
        font-size: 4em;
        margin-bottom: 20px;
        color: var(--text-muted);
        opacity: 0.5;
    }
    
    & > h3 {
        font-size: 1.5em;
        color: var(--secondary);
        margin-bottom: 10px;
    }
    
    & > p {
        color: var(--text-muted);
    }
}

/* Load More Button */
.gallery_load_more {
    text-align: center;
    padding: 40px 20px 80px;
    background: #f8fafc;
    
    & > .load_more_btn {
        padding: 15px 40px;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 50px;
        font-size: 1em;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        
        &:hover {
            background: var(--primary-hover);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
    }
}

/* Modal */
.gallery_modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    
    &.active {
        display: flex;
        opacity: 1;
    }
    
    & > .gallery_modal_content {
        max-width: 90vw;
        max-height: 90vh;
        background: white;
        border-radius: var(--border-radius-lg);
        overflow: hidden;
        position: relative;
        
        & > .gallery_modal_close {
            position: absolute;
            top: 15px;
            right: 25px;
            font-size: 2em;
            cursor: pointer;
            color: white;
            z-index: 10;
            background: rgba(0, 0, 0, 0.5);
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            
            &:hover {
                background: rgba(0, 0, 0, 0.8);
                transform: scale(1.1);
            }
        }
        
        & > .gallery_modal_image {
            max-height: 60vh;
            overflow: hidden;
            
            & > .modal_placeholder {
                min-height: 400px;
            }
        }
        
        & > .gallery_modal_info {
            padding: 30px;
            
            & > .modal_badge {
                display: inline-block;
                padding: 5px 12px;
                border-radius: 20px;
                font-size: 0.8em;
                font-weight: 600;
                margin-bottom: 15px;
                
                &.fabrication {
                    background: rgba(8, 102, 173, 0.1);
                    color: var(--fabrication-color);
                }
                
                &.foundry {
                    background: rgba(192, 64, 0, 0.1);
                    color: var(--foundry-color);
                }
                
                &.hydraulics {
                    background: rgba(44, 82, 130, 0.1);
                    color: var(--hydraulics-color);
                }
                
                &.sourcing {
                    background: rgba(45, 106, 79, 0.1);
                    color: var(--sourcing-color);
                }
                
                &.eaas {
                    background: rgba(156, 39, 176, 0.1);
                    color: var(--eaas-color);
                }
            }
            
            & > h2 {
                font-size: 1.8em;
                color: var(--secondary);
                margin-bottom: 15px;
            }
            
            & > p {
                color: var(--text-muted);
                line-height: 1.6;
                margin-bottom: 20px;
            }
            
            & > .modal_meta {
                display: flex;
                gap: 20px;
                font-size: 0.9em;
                color: var(--text-muted);
                padding-top: 15px;
                border-top: 1px solid #e2e8f0;
            }
        }
    }
}

/* Floating Catalogue */
.floating-catalogue {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    
    & > .floating-btn {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px 28px;
        background: var(--secondary);
        color: white;
        text-decoration: none;
        border-radius: 50px;
        box-shadow: 0 5px 20px rgba(8, 102, 173, 0.3);
        transition: all 0.3s ease;
        border: 1px solid rgba(255, 255, 255, 0.1);
        
        &:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(8, 102, 173, 0.5);
            background: var(--secondary-hover);
        }
        
        & > .icon {
            font-size: 1.6em;
        }
        
        & > .text {
            font-weight: 500;
            font-size: 1em;
        }
    }
}

@media screen and (max-width: 992px) {
    .gallery_hero > .gallery_hero_content > .gallery_hero_title {
        font-size: 3em;
    }
    
    .gallery_grid_section > .gallery_grid_container > .gallery_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media screen and (max-width: 768px) {
    .landing_gallery {
        & > .land_container {
            width: 90%;
        }
    }
    
    .gallery_hero > .gallery_hero_content > .gallery_hero_title {
        font-size: 2.5em;
    }
    
    .gallery_hero > .gallery_hero_stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .gallery_filters {
        padding: 15px 0;
        
        & > .gallery_filters_container {
            flex-direction: column;
            align-items: stretch;
            gap: 12px;
            
            & > .gallery_filter_toggle {
                display: flex;
                width: 100%;
                justify-content: space-between;
            }
            
            & > .gallery_filter_tabs_wrapper {
                display: none;
                max-height: 0;
                overflow: hidden;
                transition: max-height 0.3s ease, opacity 0.3s ease;
                opacity: 0;
                
                &.active {
                    display: block;
                    max-height: 400px;
                    opacity: 1;
                }
                
                & > .gallery_filter_tabs {
                    flex-direction: column;
                    gap: 10px;
                    background: white;
                    padding: 15px;
                    border-radius: var(--border-radius-md);
                    box-shadow: var(--shadow-md);
                    border: 1px solid #e2e8f0;
                    
                    & > .gallery_filter_btn {
                        width: 100%;
                        text-align: center;
                        padding: 12px 20px;
                        font-size: 0.9em;
                    }
                }
            }
            
            & > .gallery_filter_count {
                text-align: center;
                width: 100%;
            }
        }
    }
    
    .gallery_grid_section > .gallery_grid_container > .gallery_grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .floating-catalogue > .floating-btn > .text {
        display: none;
    }
    
    .gallery_modal > .gallery_modal_content > .gallery_modal_info > h2 {
        font-size: 1.4em;
    }
    
    .gallery_modal > .gallery_modal_content > .gallery_modal_image > .modal_placeholder {
        min-height: 300px;
    }
}

@media screen and (max-width: 480px) {
    .gallery_hero > .gallery_hero_content > .gallery_hero_title {
        font-size: 2em;
    }
    
    .gallery_hero > .gallery_hero_content > .gallery_hero_desc {
        font-size: 1em;
    }
    
    .gallery_item_info > .gallery_item_title {
        font-size: 1.1em;
    }
    
    .gallery_item_info > .gallery_item_desc {
        font-size: 0.85em;
    }
    
    .gallery_filters > .gallery_filters_container > .gallery_filter_tabs_wrapper.active > .gallery_filter_tabs {
        padding: 12px;
    }
    
    .gallery_filters > .gallery_filters_container > .gallery_filter_tabs_wrapper > .gallery_filter_tabs > .gallery_filter_btn {
        padding: 10px 16px;
        font-size: 0.85em;
    }
    
    .gallery_modal > .gallery_modal_content > .gallery_modal_info {
        padding: 20px;
    }
    
    .gallery_modal > .gallery_modal_content > .gallery_modal_info > h2 {
        font-size: 1.2em;
    }
    
    .gallery_modal > .gallery_modal_content > .gallery_modal_info > p {
        font-size: 0.9em;
    }
}

@media screen and (max-width: 900px) and (orientation: landscape) {
    .gallery_hero {
        min-height: auto;
    }
    
    .gallery_hero_content {
        padding: 40px 20px !important;
    }
    
    .gallery_grid_section > .gallery_grid_container > .gallery_grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery_filters > .gallery_filters_container > .gallery_filter_tabs_wrapper.active > .gallery_filter_tabs {
        max-height: 300px;
        overflow-y: auto;
    }
}