/* ===================================
   ZENESIS PLANT ENGINEERING - DESIGN SYSTEM
   A modern, industrial design for engineering solutions
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* === CSS CUSTOM PROPERTIES === */
:root {
    /* Color Palette - Honeybee Theme (Universal) */
    --primary-blue: #ffb400;
    /* Golden Yellow */
    --primary-blue-dark: #e6a200;
    --primary-blue-light: #ffcc33;
    --accent-orange: #ffb400;
    /* Golden Yellow */
    --accent-orange-dark: #e6a200;
    --accent-orange-light: #ffcc33;

    /* Neutrals - Deep Dark Brown */
    --dark-bg: #2b1d14;
    --dark-bg-secondary: #3d2b1f;
    --dark-bg-tertiary: #4d3a2b;
    --text-primary: #ffffff;
    --text-secondary: #e0d0c0;
    --text-muted: #a09080;
    --border-color: #5d4a3b;
    --overlay: rgba(43, 29, 20, 0.95);

    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-heading: 'Montserrat', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Layout */
    --max-width: 1200px;
    --header-height: 80px;
}

/* === RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    font-weight: 400;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--text-primary);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

/* === HEADER & NAVIGATION === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--overlay);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--spacing-xl);
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0;
    /* Prevent logo from shrinking */
}

.logo img {
    height: 50px;
    /* Fixed height - never changes */
    min-height: 50px;
    max-height: 50px;
    width: auto;
    min-width: 150px;
    /* Minimum width to prevent collapse */
    object-fit: contain;
    transition: none;
    /* No animations */
    flex-shrink: 0;
    /* Never shrink */
}

/* Prevent image downloading */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 700;
    padding: 0.5rem 1rem;
    /* Standardized padding */
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    display: flex;
    align-items: center;
    font-size: 1rem;
    /* Slightly smaller for better fit */
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Add arrow to dropdown on desktop using pseudo-element */
.dropdown>.dropdown-link-wrapper>a::after {
    content: '▼';
    font-size: 0.6rem;
    margin-left: 8px;
    transition: transform var(--transition-fast);
}

.dropdown:hover>.dropdown-link-wrapper>a::after {
    transform: rotate(180deg);
}

.nav-menu a:hover {
    color: var(--text-primary);
    background: var(--dark-bg-tertiary);
}

.nav-menu a.active {
    color: var(--accent-orange);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--accent-orange);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-link-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
}

.dropdown-toggle-btn {
    display: none;
    /* Hidden on desktop, shown on mobile */
}

.dropdown-arrow {
    display: none;
    /* Hide the old arrow in favor of the toggle btn */
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dark-bg-secondary);
    min-width: 280px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    list-style: none;
    padding: var(--spacing-xs) 0;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown:hover .dropdown-toggle-btn {
    transform: rotate(180deg);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: none;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background: var(--dark-bg-tertiary);
    color: var(--accent-orange);
}

/* Mobile Dropdown */
@media (max-width: 1150px) {
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0, 0, 0, 0.15);
        box-shadow: none;
        border: none;
        padding-left: 0;
        width: 100%;
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown.active .dropdown-toggle-btn {
        transform: rotate(180deg);
        color: var(--accent-orange) !important;
        /* Color change on active */
        background: #fff5e6 !important;
        /* Slight tint on active */
    }

    .dropdown-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 50px;
        min-height: 50px;
        background: #ffffff !important;
        /* Bright white box */
        color: #2b1d14 !important;
        /* Dark brown arrow */
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        font-size: 0.9rem;
        cursor: pointer;
        z-index: 5;
    }

    /* Hide the desktop pseudo-arrow on mobile */
    .dropdown>.dropdown-link-wrapper>a::after {
        display: none;
    }

    .dropdown-link-wrapper {
        display: flex;
        align-items: stretch;
        width: 100%;
    }

    .dropdown-link-wrapper a {
        flex: 1;
    }

    .nav-menu .dropdown-menu a {
        padding: 0.8rem 1.5rem;
        /* Reduced padding */
        border-left: 4px solid transparent;
        font-size: 0.85rem;
        /* Smaller font size */
        white-space: normal;
        /* Allow text to wrap */
        line-height: 1.4;
        /* Better readability for wrapped text */
    }

    .nav-menu .dropdown-menu a:hover {
        border-left-color: var(--accent-orange);
    }
}

/* Technical Image Container */
.technical-image-container {
    position: relative;
    padding: 5px;
    /* Minimal padding to act like a border */
    background: var(--dark-bg-tertiary);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    width: 100%;
}

.technical-image-container img {
    width: 100%;
    height: auto;
    max-height: 500px;
    /* Increased max-height */
    object-fit: contain;
    display: block;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* === MAIN LAYOUT === */
main {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-2xl) 0;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='56' height='100' viewBox='0 0 56 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23ffcc33' stroke-opacity='0.1' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 56px 100px;
    pointer-events: none;
    z-index: 0;
}

.section .container {
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-subtitle {
    color: var(--accent-orange);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

/* === HERO SECTION === */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(rgba(43, 29, 20, 0.5), rgba(43, 29, 20, 0.7)), url('../assets/images/hero-machinery.png') top center/cover no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: var(--spacing-md);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--accent-orange);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.8s ease 0.2s both;
    font-weight: 700;
}

.hero-tagline {
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    color: var(--accent-orange);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease 0.1s both;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-orange);
    color: #2b1d14;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 180, 0, 0.3);
}

.btn-primary:hover {
    background: var(--accent-orange-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 180, 0, 0.4);
}

.btn-secondary {
    background: transparent;
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.btn-secondary:hover {
    background: var(--accent-orange);
    color: #2b1d14;
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* === CARDS === */
.card {
    background: var(--dark-bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue-light);
    box-shadow: 0 10px 30px rgba(10, 77, 143, 0.3);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* === GRID LAYOUTS === */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* === STATS === */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    text-align: center;
}

.stat-item {
    padding: var(--spacing-md);
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* === FOOTER === */
.footer {
    background: var(--dark-bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-logo {
    display: block;
    margin-bottom: var(--spacing-md);
}

.footer-logo img {
    height: 50px;
    width: auto;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-orange);
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    transition: all var(--transition-fast);
}

.footer-section a:hover {
    color: var(--accent-orange);
    padding-left: 5px;
}

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

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-contact-item {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    align-items: flex-start;
}

.footer-contact-item .icon {
    font-size: 1.2rem;
    color: var(--accent-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

/* Services 2x2 Grid */
.services-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.service-box {
    background: var(--dark-bg-tertiary);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: center;
}

.service-box img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.img-zen3k {
    object-position: center 75%;
}

.service-box:hover {
    transform: translateY(-5px);
    border-color: var(--accent-orange);
    background: var(--dark-bg-secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-box h3 {
    color: var(--accent-orange);
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
    transition: color var(--transition-fast);
}

.service-box:hover h3 {
    color: #fff;
}

.service-box p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .services-grid-2x2 {
        grid-template-columns: 1fr;
    }
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* === CONTACT FORM === */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    background: var(--dark-bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue-light);
    box-shadow: 0 0 0 3px rgba(13, 103, 191, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease;
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* === UTILITY CLASSES === */
.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--accent-orange);
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

@keyframes logoReveal {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

/* === RESPONSIVE === */
/* Tablet/Mobile breakpoint - show hamburger menu */
@media (max-width: 1150px) {
    :root {
        --header-height: 70px;
        --spacing-xl: 3rem;
        --spacing-2xl: 4rem;
    }

    /* Ensure logo stays fixed size on mobile */
    .logo img {
        height: 45px;
        min-height: 45px;
        max-height: 45px;
        min-width: 130px;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--dark-bg-secondary);
        flex-direction: column;
        padding: var(--spacing-md);
        padding-bottom: 100px;
        /* Ample space for scrolling */
        gap: 0;
        transition: left var(--transition-normal);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        display: flex;
        flex-direction: column;
        /* Stack children vertically */
        align-items: flex-start;
        /* Align to start */
        height: auto;
        /* Allow height to grow */
    }

    .nav-menu a {
        display: block;
        padding: 1.2rem var(--spacing-sm);
        font-size: 1.1rem;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .dropdown-link-wrapper {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .dropdown-toggle-btn {
        padding: 1.2rem;
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        background: rgba(255, 255, 255, 0.02);
    }

    .menu-toggle {
        display: flex;
        margin-left: auto;
        /* Push to the right end */
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .bulk-solids-grid {
        grid-template-columns: 2fr 1fr;
        /* Keep side-by-side on tablet */
    }

    .technical-image-container {
        height: 350px !important;
        /* Good height for tablet */
    }
}

/* === MOBILE ONLY (Phones) === */
@media (max-width: 768px) {

    /* Stack Bulk Solids images on phones */
    .bulk-solids-grid {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md) !important;
    }

    .technical-image-container {
        height: 350px !important;
        /* Large vertical height as requested */
    }

    /* Compact Operating Principles */
    .operating-principles-card {
        padding: var(--spacing-md) !important;
    }

    .operating-principles-grid {
        gap: var(--spacing-sm) !important;
    }

    .operating-principles-grid p {
        font-size: 0.9rem !important;
    }
}



@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
        max-width: 100%;
        overflow-x: hidden;
    }

    .section {
        padding: var(--spacing-lg) 0;
        overflow-x: hidden;
    }

    .services-grid-2x2 {
        grid-template-columns: 1fr;
    }

    /* Stack Bulk Solids images on mobile */
    .bulk-solids-grid {
        grid-template-columns: 1fr !important;
    }

    .bulk-solids-grid>div {
        height: auto !important;
    }

    .bulk-solids-grid .reveal>div {
        height: auto !important;
        min-height: 300px;
        padding: 5px !important;
    }

    .bulk-solids-grid img {
        width: 100%;
        height: auto;
        max-height: 400px;
        object-fit: contain;
    }

    .technical-image-container {
        height: 350px !important;
    }

    .technical-image-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

/* === UNIVERSAL MOBILE FIXES FOR ALL PHONES === */
/* Target all phones from smallest (320px) to largest (428px+) */
@media (max-width: 768px) {

    /* Prevent horizontal overflow on entire page */
    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Fix all containers */
    .container,
    .section,
    main,
    article,
    div {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Fix all images to stay within bounds */
    img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    /* Fix cards and content boxes */
    .card,
    .service-box,
    .partner-card,
    .feature-box {
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        padding: var(--spacing-md);
    }

    /* Fix text containers */
    p,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    span,
    li {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    /* Fix grids on mobile */
    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .services-grid-2x2 {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md) !important;
        max-width: 100%;
    }

    /* Fix partner cards specifically */
    .partner-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .partner-card img {
        max-width: 80% !important;
        margin: 0 auto;
        display: block;
    }

    /* Fix technical images */
    .technical-image-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden;
    }

    /* Fix feature boxes with icons */
    .powder-analysis-grid,
    .powder-tests-grid {
        grid-template-columns: 1fr !important;
    }

    /* Fix tables and complex layouts */
    table {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto;
        display: block;
    }

    /* Ensure section headers don't overflow */
    .section-header {
        padding: 0 var(--spacing-sm);
        text-align: center;
    }

    .section-header h2 {
        font-size: 1.5rem !important;
    }

    .section-header p {
        font-size: 0.95rem !important;
    }
}

/* === ULTRA WIDE MONITORS === */
@media (min-width: 2000px) {
    :root {
        --max-width: 1800px;
    }

    .nav-container {
        max-width: 2200px;
    }

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

    .hero-title {
        font-size: 5rem;
    }
}

/* === CYBERSECURITY: HIDE HONEYPOT === */
.hidden {
    display: none !important;
    visibility: hidden;
}