html {
    height: 100%;
}

:root {
    --bg-color: #050505;
    --text-color: #f1f1f1;
    --accent: #007aff;
    --overlay-gradient: linear-gradient(to bottom, rgba(5,5,5,0.7) 0%, rgba(5,5,5,0) 30%, rgba(5,5,5,0) 70%, rgba(5,5,5,1) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.top-bar {
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 5vw;
    font-size: 0.75rem;
    height: 35px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-world {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.lang-select {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 0.75rem;
    cursor: pointer;
    outline: none;
    font-weight: 500;
}
.lang-select option {
    color: #000;
}

.top-bar-right {
    display: flex;
    gap: 25px;
}

.top-link {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.top-link:hover {
    color: #fff;
}

.main-nav {
    background: linear-gradient(to bottom, #2b2b2d 0%, #0c0c0e 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); /* Subtle bottom line */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5vw;
    height: 70px;
    gap: 20px;
}

.nav-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-left .logo {
    height: 35px;
    object-fit: contain;
    /* Removed global filters here to ensure logo colors are handled by specific page contexts if needed */
}

.nav-center {
    display: flex;
    gap: 30px;
    align-items: center;
    height: 100%;
    justify-content: center;
    flex: 1;
}

.nav-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 400; /* Normal text */
    font-size: 0.9rem;
    position: relative;
    padding: 24px 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -1px; /* Exactly over the border */
    left: 0;
    width: 100%;
    height: 2px;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff;
    font-weight: 700; /* Bold when hovered or active */
}

.nav-link:hover::after, .nav-link.active::after {
    background-color: #ffffff; /* White line on hover/active */
}

/* Mega Menu */
.mega-dropdown {
    position: static; /* Allows menu to span the full width */
}

.mega-menu {
    position: absolute;
    top: 70px; /* Adjusted: removed 35px top-bar height */
    left: 0;
    transform: none;
    width: 100vw;
    z-index: 20;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    padding: 24px 0 32px 0;
}

.mega-menu-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 30px; 
    max-width: 1200px;
    margin: 0 auto;
}

.mega-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 0;
    transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.mega-item:hover {
    transform: translateY(-4px) scale(1.05); /* Apple-like slight pop */
}

.mega-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 10px;
    transition: color 0.2s;
    letter-spacing: 0.3px;
}

.mega-pill {
    width: 76px;
    height: 44px;
    background-color: #ffffff;
    border-radius: 22px; /* Smooth pill shape */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: box-shadow 0.2s;
}

.mega-item:hover .mega-pill {
    box-shadow: 0 8px 24px rgba(255,255,255,0.15);
}

.mega-item:hover .mega-text {
    color: #ffffff;
}

.mega-pill img {
    height: 24px;
    width: auto;
    object-fit: contain;
}

/* Inherit hover mechanics for dropdown */
.mega-dropdown:hover .nav-link {
    color: #ffffff;
    font-weight: 700;
}

.mega-dropdown:hover .nav-link::after {
    background-color: #ffffff;
}

.mega-dropdown:hover .mega-menu {
    display: flex;
}

/* Vertical Apple-style Dropdown for Soluciones */
.vertical-menu {
    position: absolute;
    top: 70px; /* Adjusted: removed 35px top-bar height */
    left: 0;
    width: 100vw;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: none;
    padding: 60px 0 80px 0;
    z-index: 1001;
}

.mega-dropdown:hover .vertical-menu {
    display: block;
}

.vertical-menu-container {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Specific layout for the two-column Products Mega-Menu */
.vertical-menu-container.mega-layout {
    width: 85%;
    max-width: 1400px;
    flex-direction: row;
    align-items: flex-start;
}

.vertical-menu-column {
    display: flex;
    flex-direction: column;
}

.vertical-menu-column.categories {
    flex: 0 0 400px; /* Slightly wider to reach the center */
    border-right: 1px solid transparent;
    padding-right: 40px;
    transition: border-color 0.3s ease;
}

/* Show the vertical line only when any category link is hovered OR when navigating the products column */
.vertical-menu-container.mega-layout:has(.vertical-menu-link:hover) .vertical-menu-column.categories,
.vertical-menu-container.mega-layout:has(.vertical-menu-column.products:hover) .vertical-menu-column.categories {
    border-right-color: rgba(255, 255, 255, 0.05);
}

.vertical-menu-column.products {
    flex: 1;
    padding-left: 60px;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-height: 400px; /* Ensure a large hit area */
}

/* Show products column when a category is hovered OR when the products column itself is being navigated */
.vertical-menu-container:has(.vertical-menu-link:hover) .vertical-menu-column.products,
.vertical-menu-column.products:hover {
    opacity: 1;
}

.vertical-menu-category {
    font-size: 12px;
    color: #838385;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.vertical-menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vertical-menu-link {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    font-family: 'Red Hat Display', sans-serif;
    display: block;
    width: 100%;
    position: relative; /* Base for the bridge */
}

/* Hover Bridge: Creates an invisible connection between the link and the products column */
.vertical-menu-link::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100px; /* Extends 100px to the right to bridge any gap */
    bottom: 0;
    width: 100px;
    z-index: 10;
    pointer-events: auto;
}

.vertical-menu-link:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* Sub-product styles synced with main categories */
.product-group {
    display: none;
    flex-direction: column;
    gap: 12px;
}

/* Show specific group when its parent is hovered OR when the group itself is hovered */
.vertical-menu-container:has(.category-quimica:hover) #group-quimica,
#group-quimica:hover,
.vertical-menu-container:has(.category-hematologia:hover) #group-hematologia,
#group-hematologia:hover,
.vertical-menu-container:has(.category-inmunoensayo:hover) #group-inmunoensayo,
#group-inmunoensayo:hover,
.vertical-menu-container:has(.category-orina:hover) #group-orina,
#group-orina:hover,
.vertical-menu-container:has(.category-animal:hover) #group-animal,
#group-animal:hover,
.vertical-menu-container:has(.category-software:hover) #group-software,
#group-software:hover,
.vertical-menu-container:has(.category-refrigeracion:hover) #group-refrigeracion,
#group-refrigeracion:hover,
.vertical-menu-container:has(.category-microscopios:hover) #group-microscopios,
#group-microscopios:hover,
.vertical-menu-container:has(.category-centrifugas:hover) #group-centrifugas,
#group-centrifugas:hover,
.vertical-menu-container:has(.category-osmosis:hover) #group-osmosis,
#group-osmosis:hover,
.vertical-menu-container:has(.category-energia:hover) #group-energia,
#group-energia:hover,
.vertical-menu-container:has(.category-equipos:hover) #group-equipos,
#group-equipos:hover,
.vertical-menu-container:has(.category-reactivos:hover) #group-reactivos,
#group-reactivos:hover {
    display: flex;
}

.product-link {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    font-family: 'Red Hat Display', sans-serif;
    display: block;
}

.product-link:hover {
    color: rgba(255, 255, 255, 0.6);
}

.nav-right {
    display: flex;
    gap: 25px;
    align-items: center;
}

.icon-btn {
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.icon-btn:hover {
    color: #ffffff;
}

/* Premium Mode Toggle (Human vs Animal) */
.mode-toggle-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.mode-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.mode-pill {
    position: relative;
    width: 110px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.mode-label {
    font-family: 'Inter', sans-serif;
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.4);
    transition: opacity 0.3s ease, color 0.3s ease;
    pointer-events: none;
    flex: 1;
    text-align: center;
}

.mode-knob {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.mode-avatar {
    position: absolute;
    width: 26px;
    height: 26px;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.4s ease;
}

/* State Management: Human (Default/Left) */
body.mode-human .label-human {
    opacity: 0; /* Active label hidden */
}

body.mode-human .label-animal {
    opacity: 1; /* Inactive label visible */
    color: rgba(255, 255, 255, 0.7);
}

body.mode-human .avatar-animal {
    opacity: 0;
    transform: scale(0.8) rotate(-10deg);
}

body.mode-human .avatar-human {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* State Management: Animal (Right) */
body.mode-animal .mode-knob {
    transform: translateX(72px); /* (110 - 2 border - 34 knob - 2 padding) */
}

body.mode-animal .label-animal {
    opacity: 0; /* Active label hidden */
}

body.mode-animal .label-human {
    opacity: 1; /* Inactive label visible */
    color: rgba(255, 255, 255, 0.7);
}

body.mode-animal .avatar-human {
    opacity: 0;
    transform: scale(0.8) rotate(10deg);
}

body.mode-animal .avatar-animal {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Hover Effects */
.mode-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.mode-pill:hover .mode-knob {
    background: rgba(255, 255, 255, 0.15);
}

/* Premium Search Experience */
.search-active {
    overflow: hidden;
}

.search-active .scroll-container,
.search-active main,
.search-active footer {
    filter: blur(8px);
    transition: filter 0.4s ease;
}

.search-overlay {
    position: absolute;
    top: 100%; /* Perfectly flush with the header bottom */
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

body.search-open .search-overlay {
    opacity: 1;
    visibility: visible;
}

.search-panel {
    position: absolute;
    top: 100%; /* Perfectly flush with the header bottom */
    left: 0;
    width: 100vw;
    background: #0c0c0e; /* Matches the bottom color of the header gradient */
    z-index: 999;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, visibility 0.4s ease;
    padding: 0 5vw 60px 5vw;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.search-open .search-panel {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-field {
    display: flex;
    align-items: center;
    padding: 0; /* Removed top/bottom padding to start exactly at the header line */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 30px;
    position: relative;
    height: 80px; 
}

.search-icon-large {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 15px;
    flex-shrink: 0;
}

#search-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 500;
    width: 100%;
    outline: none;
    font-family: inherit;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.close-search {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.close-search:hover {
    color: #fff;
    transform: scale(1.1);
}

.search-results-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
}

body.search-open .search-results-content {
    opacity: 1;
    transform: translateY(0);
}

.search-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
    font-weight: 600;
}

.quick-links {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.quick-links li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}

.quick-links li a:hover {
    background: rgba(0, 122, 255, 0.15); /* Corporative tint */
    color: var(--accent);
    transform: translateX(4px);
}

.arrow-icon {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
    color: var(--accent);
}

.quick-links li a:hover .arrow-icon {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-field {
        height: 80px;
    }
    
    #search-input {
        font-size: 1.25rem;
    }
    
    .quick-links {
        grid-template-columns: 1fr;
    }
}

/* Extra polishing for the search animation */
@keyframes slideDownBlur {
    from {
        transform: translateY(-20px);
        opacity: 0;
        filter: blur(10px);
    }
    to {
        transform: translateY(0);
        opacity: 1;
        filter: blur(0);
    }
}

/* Premium Branded Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #f5f5f7; /* Light neutral gray / Apple-style background */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out;
}

.premium-loader-content {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-static {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.05)); /* Very soft shadow only */
}

.logo-pulse {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: logoPulseRipple 1.6s ease-out infinite;
    filter: blur(0px);
}

@keyframes logoPulseRipple {
    0% {
        transform: scale(1);
        opacity: 0.8;
        filter: blur(0px);
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
        filter: blur(12px);
    }
}

/* Scroll section handling */
.scroll-container {
    /* Large enough to allow for a long scroll experience (e.g. 5x viewport height) */
    height: 600vh;
    position: relative;
}

.sticky-hero {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    /* Object-fit is not available for canvas, 
       we'll handle scaling in JS to mimic object-fit: cover */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.content-overlay {
    position: absolute;
    z-index: 2;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    pointer-events: none; /* Let clicks pass through if needed */
}

.hero-text-content {
    max-width: 800px;
    margin: 0 auto;
    will-change: transform, opacity;
}

.hero-title {
    font-size: 5vw;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5vw;
    font-weight: 400;
    color: rgba(255,255,255,0.8);
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* The gradient overlay ensures smooth blending boundaries */
.sticky-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-gradient);
    z-index: 1;
    pointer-events: none;
}

/* Carousel Section */
.carousel-section {
    padding: 8vh 0;
    background-color: var(--bg-color); /* Matches the dark background of the page */
    position: relative;
    z-index: 10;
}

.carousel-heading {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 32px;
    padding: 40px 5vw;
    /* Hide scrollbar for a seamless look */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.carousel-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.carousel-card {
    flex: 0 0 320px; /* Reduced from 360px for a more delicate look */
    aspect-ratio: 4 / 5; /* Requested ratio 4/5 */
    border-radius: 32px; /* 32px rounded corners */
    scroll-snap-align: center; /* Mandatory snap positioning */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.carousel-card:hover {
    transform: translateY(-10px);
}

/* Base Volumetric Style (Shared Structure) */
.card-volumetric {
    background-color: #121214; 
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Light beams and glow colors for each respective card */
.card-blue {
    background-image: 
        radial-gradient(ellipse at center top, rgba(0, 122, 255, 0.6) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(240, 123, 0, 0.2) 0%, rgba(0,0,0,0) 50%);
    box-shadow: 
        0 20px 50px rgba(0, 122, 255, 0.4),
        inset 0 2px 20px rgba(255, 255, 255, 0.15);
}

.card-purple {
    background-image: 
        radial-gradient(ellipse at center top, rgba(162, 0, 255, 0.6) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(0, 122, 255, 0.2) 0%, rgba(0,0,0,0) 50%);
    box-shadow: 
        0 20px 50px rgba(162, 0, 255, 0.4),
        inset 0 2px 20px rgba(255, 255, 255, 0.15);
}

.card-green {
    background-image: 
        radial-gradient(ellipse at center top, rgba(52, 199, 89, 0.6) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(0, 122, 255, 0.2) 0%, rgba(0,0,0,0) 50%);
    box-shadow: 
        0 20px 50px rgba(52, 199, 89, 0.4),
        inset 0 2px 20px rgba(255, 255, 255, 0.15);
}

.card-yellow {
    background-image: 
        radial-gradient(ellipse at center top, rgba(230, 255, 0, 0.5) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(0, 122, 255, 0.1) 0%, rgba(0,0,0,0) 50%);
    box-shadow: 
        0 20px 50px rgba(230, 255, 0, 0.3),
        inset 0 2px 20px rgba(255, 255, 255, 0.15);
}

.card-gray {
    background-image: 
        radial-gradient(ellipse at center top, rgba(142, 142, 147, 0.5) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(255, 255, 255, 0.1) 0%, rgba(0,0,0,0) 50%);
    box-shadow: 
        0 20px 50px rgba(142, 142, 147, 0.3),
        inset 0 2px 20px rgba(255, 255, 255, 0.15);
}

.card-ice {
    /* Glowing ice-blue color for refrigeration theme */
    background-image: 
        radial-gradient(ellipse at center top, rgba(135, 206, 250, 0.6) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(0, 255, 255, 0.2) 0%, rgba(0,0,0,0) 50%);
    box-shadow: 
        0 20px 50px rgba(135, 206, 250, 0.35),
        inset 0 2px 20px rgba(180, 240, 255, 0.25);
}

.card-title {
    font-size: 1.8rem; /* Reduced from 2.2rem to fit smaller card */
    font-weight: 800;
    margin-bottom: 12px;
}

.card-desc {
    font-size: 0.95rem; /* Reduced from 1.1rem to fit smaller card */
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.85;
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
    .carousel-card {
        flex: 0 0 85vw; /* Fills screen leaving slight margin */
        padding: 30px;
    }
}

/* Carousel Controls */
.carousel-control-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 50px;
}

.carousel-indicators {
    display: flex;
    align-items: center;
    background-color: #2a2a2c; /* Apple-like dark pill */
    padding: 12px 16px;
    border-radius: 40px;
    gap: 10px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    padding: 0;
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

.dot.active {
    width: 24px;
    background-color: #ffffff;
    border-radius: 6px;
}

/* Cinematic 3D Card System */
.cinematic-container {
    perspective: 2000px;
    flex: 0 0 320px; /* Reduced from 360px */
    aspect-ratio: 4 / 5;
    scroll-snap-align: center;
}

.cinematic-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s ease;
    border-radius: 32px;
    cursor: pointer;
    /* Removed overflow: hidden to allow pop-out effect */
}

.cinematic-card:hover {
    transform: translateY(-5%) rotateX(20deg);
}

/* Layered Elements */
.card-layer-bg {
    position: absolute;
    inset: 0;
    border-radius: 32px;
    z-index: 1;
    transform: translateZ(0);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Reusing existing card gradients for the background layer */
.card-layer-bg.card-blue {
    background-image: 
        radial-gradient(ellipse at center top, rgba(0, 122, 255, 0.6) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(240, 123, 0, 0.2) 0%, rgba(0,0,0,0) 50%);
    background-color: #121214;
    box-shadow: inset 0 2px 20px rgba(255, 255, 255, 0.15);
}

.card-layer-bg.card-purple {
    background-image: 
        radial-gradient(ellipse at center top, rgba(162, 0, 255, 0.6) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(0, 122, 255, 0.2) 0%, rgba(0,0,0,0) 50%);
    background-color: #121214;
    box-shadow: inset 0 2px 20px rgba(255, 255, 255, 0.15);
}

.card-layer-bg.card-green {
    background-image: 
        radial-gradient(ellipse at center top, rgba(52, 199, 89, 0.6) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(0, 122, 255, 0.2) 0%, rgba(0,0,0,0) 50%);
    background-color: #121214;
    box-shadow: inset 0 2px 20px rgba(255, 255, 255, 0.15);
}

.card-layer-bg.card-yellow {
    background-image: 
        radial-gradient(ellipse at center top, rgba(230, 255, 0, 0.5) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(0, 122, 255, 0.1) 0%, rgba(0,0,0,0) 50%);
    background-color: #121214;
    box-shadow: inset 0 2px 20px rgba(255, 255, 255, 0.15);
}

.card-layer-bg.card-gray {
    background-image: 
        radial-gradient(ellipse at center top, rgba(142, 142, 147, 0.5) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(255, 255, 255, 0.1) 0%, rgba(0,0,0,0) 50%);
    background-color: #121214;
    box-shadow: inset 0 2px 20px rgba(255, 255, 255, 0.15);
}

.card-layer-bg.card-ice {
    background-image: 
        radial-gradient(ellipse at center top, rgba(135, 206, 250, 0.6) 0%, rgba(0,0,0,0) 60%),
        radial-gradient(ellipse at bottom right, rgba(0, 255, 255, 0.2) 0%, rgba(0,0,0,0) 50%);
    background-color: #121214;
    box-shadow: inset 0 2px 20px rgba(255, 255, 255, 0.15);
}

.card-layer-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 20%, rgba(0,0,0,0) 80%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
}

.card-layer-content {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    z-index: 3;
    transform: translate3d(0, 0, 80px);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.cinematic-card:hover .card-layer-content {
    transform: translate3d(0, 28px, 200px);
}

.card-layer-foreground {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: translate3d(0, -15%, 40px);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.6s ease;
    padding: 20px;
}

.cinematic-card:hover .card-layer-foreground {
    transform: translate3d(0, -10%, 150px);
}

.card-layer-foreground img {
    width: 100%;
    height: auto;
    max-height: 210px; /* Reduced from 240px for better balance */
    object-fit: contain;
    filter: drop-shadow(0 30px 40px rgba(0,0,0,0.8));
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.cinematic-card:hover .card-layer-foreground img {
    transform: scale(1.15); /* Slightly enlarge to break boundaries */
}

.card-layer-foreground .img-hover {
    position: absolute;
    opacity: 0;
}

.cinematic-card:hover .card-layer-foreground .img-base {
    opacity: 0;
}

.cinematic-card:hover .card-layer-foreground .img-hover {
    opacity: 1;
}

/* Shadow underneath the card for floating effect */
.cinematic-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 20px;
    background: rgba(0,0,0,0.8);
    border-radius: 50%;
    filter: blur(25px);
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    z-index: 0;
}

.cinematic-card:hover::before {
    opacity: 0.8;
    transform: translateY(40px) scale(1.1);
}

.nav-chevron {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    padding: 10px;
}

.nav-chevron:hover {
    color: #fff;
}

.play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #2a2a2c;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background-color 0.3s, transform 0.1s;
}

.play-btn:hover {
    background-color: #3a3a3c;
}

.play-btn:active {
    transform: scale(0.95);
}

/* Ecosystem Section */
.ecosystem-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8vh 8vw;
    background-color: var(--bg-color);
    gap: 40px;
}

.ecosystem-image {
    flex: 1; 
    max-width: 55%;
    display: flex;
    justify-content: flex-start;
}

.ecosystem-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
}

.ecosystem-text {
    flex: 1;
    max-width: 45%;
    text-align: right; 
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ecosystem-eyebrow {
    color: #f07b00; /* Orange highlight matching reference */
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.ecosystem-title {
    color: #ffffff;
    font-size: 3.5rem; /* Adjusted for impact */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.ecosystem-desc {
    color: #e5e5ea;
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 400;
    max-width: 600px;
}

/* Responsiveness for ecosystem */
@media (max-width: 1024px) {
    .ecosystem-section {
        flex-direction: column;
        padding: 10vh 5vw;
        gap: 60px;
    }
    .ecosystem-image, .ecosystem-text {
        max-width: 100%;
        text-align: center;
        align-items: center;
    }
    .ecosystem-title {
        font-size: 3rem;
    }
}

/* Complete Workflow Section */
.workflow-section {
    background-color: var(--bg-color);
    padding: 60px 5vw 120px 5vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Gallery layout (flex row, baseline bottom) */
.workflow-gallery {
    display: flex;
    justify-content: center;
    align-items: flex-end; 
    margin-bottom: 400px; /* Massively increased to fully clear the optical reflection */
    -webkit-box-reflect: below 2px linear-gradient(to bottom, transparent 0%, transparent 40%, rgba(0,0,0,0.6) 100%);
}

.wf-img {
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.8)); /* Restored standard shadow */
    transition: transform 0.3s ease;
}

/* Specific heights and layering (Restored to original elegant spacing) */
.wf-astreo { height: 420px; z-index: 2; margin-right: -15px; }
.wf-ueolo24 { height: 260px; z-index: 1; margin-right: -10px; }
.wf-eolo24 { height: 380px; z-index: 3; }
.wf-eolo12 { height: 230px; z-index: 1; margin-left: -5px; }
.wf-ups { height: 460px; z-index: 2; margin-left: -20px; }

/* Content block styling */
.workflow-content {
    text-align: center;
    max-width: 1000px;
    z-index: 10;
    position: relative; 
}

.wf-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 35px;
    letter-spacing: -0.5px;
}

.wf-text {
    font-size: 1.1rem;
    color: #a1a1a6; /* iOS style gray */
    line-height: 1.6;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wf-text p {
    margin: 0 auto;
    max-width: 850px;
}

/* Responsiveness for workflow */
@media (max-width: 1024px) {
    .workflow-gallery {
        flex-wrap: wrap;
        -webkit-box-reflect: none; /* Disable reflection on mobile wraps to avoid glitches */
        gap: 30px;
        align-items: center;
    }
    .wf-img {
        margin: 0 !important;
        height: auto;
        max-width: 45%;
    }
    .wf-eolo24 { max-width: 80%; }
    .wf-title { font-size: 2.5rem; }
}

/* IVD Premium Parallax Cards */
.ivd-parallax-container {
    perspective: 1500px;
}
.ivd-parallax-content {
    transform-style: preserve-3d;
    will-change: transform;
}
.ivd-parallax-layer {
    will-change: transform;
}

/* Hover active transitions (spring-like direct tracking) */
.ivd-parallax-container:hover .ivd-parallax-content {
    transition: transform 0.15s ease-out;
}
.ivd-parallax-container:hover .ivd-layer-product {
    transition: transform 0.15s ease-out, filter 0.5s ease;
}
.ivd-parallax-container:hover .ivd-layer-shape {
    transition: transform 0.15s ease-out;
}
.ivd-parallax-container:hover .ivd-layer-text {
    transition: transform 0.15s ease-out, opacity 0.5s ease;
}

/* Return transitions (smooth ease back when not hovering) */
.ivd-parallax-container:not(:hover) .ivd-parallax-content {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    transform: rotateY(0deg) rotateX(0deg) !important;
}
.ivd-parallax-container:not(:hover) .ivd-layer-product {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), filter 0.5s ease;
    transform: translateZ(30px) !important;
}
.ivd-parallax-container:not(:hover) .ivd-layer-shape {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateZ(0px) !important;
}
.ivd-parallax-container:not(:hover) .ivd-layer-text {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.5s ease;
    transform: translate(-50%, -50%) translateZ(-10px) !important;
}

/* Base Rest Positions */
.ivd-layer-product {
    transform: translateZ(30px);
}
.ivd-layer-text {
    transform: translate(-50%, -50%) translateZ(-10px);
}

/* Boreas Pro Series Hero Section */
.boreas-hero {
    background: radial-gradient(circle at top right, #ffffff, #f5f5f7 70%);
    padding: 120px 0;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.boreas-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}

.boreas-content {
    flex: 1;
    max-width: 550px;
    opacity: 0;
    transform: translateY(30px);
}

.boreas-image-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
}

.boreas-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #1d1d1f; /* Changed to Black (Apple standard) */
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
}

.boreas-headline {
    font-family: 'Red Hat Display', sans-serif;
    font-size: clamp(60px, 8vw, 90px);
    font-weight: 800;
    line-height: 1;
    color: #1d1d1f;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}

.text-boreas-orange {
    color: #FF4100; /* Matched to Flujo de Trabajo Analítico */
}

.text-boreas-gradient {
    background: linear-gradient(to right, #6e2ebf, #bf2e98); /* Matched to provided photo */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.boreas-subheadline {
    font-family: 'Red Hat Display', sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    color: #1d1d1f;
    margin-bottom: 40px;
}

.boreas-body {
    font-family: 'Inter', sans-serif;
    font-size: 19px;
    line-height: 1.6;
    color: #424245;
    margin-bottom: 45px;
    font-weight: 400;
}

.boreas-benefits {
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.boreas-benefit-item {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    color: #1d1d1f;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.boreas-cta {
    display: inline-block;
    background-color: #0071e3;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 17px;
    padding: 14px 28px;
    border-radius: 980px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.boreas-cta:hover {
    background-color: #0077ed;
    transform: scale(1.02);
}

/* Animations */
.fade-up-init {
    animation: boreasFadeUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.anim-delay-1 { animation-delay: 0.2s; }
.anim-delay-2 { animation-delay: 0.4s; }

@keyframes boreasFadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .boreas-container {
        flex-direction: column;
        text-align: center;
        gap: 60px;
        padding: 0 20px;
    }
    .boreas-content {
        max-width: 100%;
    }
    .boreas-headline {
        font-size: 55px;
    }
    .boreas-subheadline {
        font-size: 28px;
    }
    .boreas-body {
        font-size: 17px;
    }
    .boreas-benefit-item {
        justify-content: center;
    }
}

/* ====================================================
   Premium Scrollbar Styling (Apple-style)
   ==================================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f5f5f7;
}

::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 10px;
    border: 3px solid #f5f5f7;
}


::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

/* Category Cards (Apple/Samsung Style) */
.category-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    background-color: #ffffff !important;
    border-radius: 20px !important;
    padding: 24px 16px !important;
    width: 140px !important;
    height: 160px !important;
    border: 1.5px solid #d2d2d7 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    outline: none !important;
    text-decoration: none !important;
}

.category-card:hover {
    transform: translateY(-4px) scale(1.02) !important;
    border-color: #86868b !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05) !important;
}

.category-card.active {
    background-color: #ffffff !important;
    border-color: #007aff !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 1px #007aff !important;
}

.category-card .category-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1d1d1f !important;
    font-family: 'Inter', sans-serif !important;
    line-height: 1.2 !important;
    margin-bottom: auto !important;
}

.category-card .category-image-container {
    width: 100% !important;
    height: 70px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: auto !important;
}

.category-card img {
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain !important;
    transition: transform 0.4s ease !important;
}

.category-card:hover img {
    transform: scale(1.1) !important;
}

/* Adjust the container for cards */
#filter-chips {
    align-items: flex-start !important;
    padding-bottom: 20px !important;
}

/* Utility Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Premium Search Results UI */
.search-results-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 20px;
}

.search-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 -10px;
    border: 1px solid transparent;
}

.search-result-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.search-result-info {
    flex: 1;
}

.search-result-category {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
}

.search-result-title {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 6px 0;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.search-result-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

.search-result-arrow {
    color: rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.search-result-row:hover .search-result-arrow {
    opacity: 1;
    transform: translateX(0);
    color: #0071e3;
}

.search-highlight {
    background-color: rgba(0, 113, 227, 0.2);
    color: #00a2ff;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 500;
}

/* Empty State Styling */
.search-no-results {
    padding: 80px 20px;
    text-align: center;
}

.search-no-results-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    font-family: 'Red Hat Display', sans-serif;
}

.search-no-results-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Inter', sans-serif;
}

/* ==========================================================================
   Premium Horizontal Category Carousel (Apple & Samsung Inspired)
   ========================================================================== */

/* Wrapper and Carousel Layout */
.category-carousel-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

.category-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 16px;
    padding: 10px 8px 20px 8px; /* Aligned with grid px-2 */
    -webkit-overflow-scrolling: touch;
    align-items: stretch;
    cursor: grab;
}

.category-carousel:active {
    cursor: grabbing;
}

/* Hide scrollbar for clean aesthetic */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Base Card Styling (Apple inspired minimal) */
.category-card-premium {
    flex: 0 0 auto;
    width: 180px; /* Provides consistent spacing */
    min-height: 180px;
    background-color: #ffffff;
    border-radius: 24px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start; /* Align with left edge */
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    text-align: center;
    position: relative;
    user-select: none;
}

@media (min-width: 768px) {
    .category-card-premium {
        width: 220px;
        min-height: 200px;
    }
}

/* Soft levitation on hover */
.category-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    background-color: #fdfdfd;
}

/* Smooth Image Container */
.category-image-wrapper {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (min-width: 768px) {
    .category-image-wrapper {
        width: 100px;
        height: 100px;
    }
}

.category-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.06));
}

.category-card-premium:hover .category-image-wrapper {
    transform: scale(1.05);
}

/* Clean Typography */
.category-name {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #424245; /* Apple subtext gray */
    transition: color 0.3s ease;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .category-name {
        font-size: 15px;
    }
}

/* The "Active" Refined State (No black background!) */
.active-category {
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.12), inset 0 0 0 2px #0071e3;
    border-color: transparent;
}

.active-category .category-name {
    color: #1d1d1f; /* Darker Apple text */
    font-weight: 600;
}

.active-category:hover {
    transform: none; /* Keeps it grounded when active */
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.15), inset 0 0 0 2px #0071e3;
}

/* Carousel Controls (Floating Arrow Buttons) */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: -20px;
    right: -20px;
    transform: translateY(calc(-50% - 5px)); /* Compensate for 10px-20px padding difference */
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none; /* Let clicks pass to cards except on buttons */
    z-index: 10;
    margin-top: 0;
}

.carousel-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0; /* Hidden by default */
    visibility: hidden;
}

/* Show buttons when hovering over the wrapper */
.category-carousel-wrapper .relative:hover .carousel-nav-btn {
    opacity: 1;
    visibility: visible;
}

.carousel-nav-btn:hover {
    background-color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.carousel-nav-btn:active {
    transform: scale(0.95);
}

/* Adjust position for specific arrows */
#cat-prev { transform: translateX(10px); }
#cat-next { transform: translateX(-10px); }

.category-carousel-wrapper:hover #cat-prev { transform: translateX(0); }
.category-carousel-wrapper:hover #cat-next { transform: translateX(0); }

.carousel-progress {
    width: 150px;
    height: 4px;
    background-color: #e5e5ea;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.carousel-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 25%; /* Dynamically updated via JS */
    background-color: #1d1d1f;
    border-radius: 2px;
    transition: transform 0.1s linear;
    transform-origin: left;
}

@media (max-width: 768px) {
    /* Hide arrows on mobile, encourage swipe */
    .carousel-nav-btn {
        display: none;
    }
    
    .carousel-progress {
        width: 100px;
    }
}

/* --- Necessary Cookies Banner (Apple Style) --- */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: 90%;
    max-width: 600px;
    background-color: #ffffff;
    color: #1d1d1f;
    padding: 24px 32px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
    opacity: 0;
    font-family: 'Inter', -apple-system, sans-serif;
}

.cookie-banner.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cookie-banner-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cookie-banner-text {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-cookie {
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.btn-cookie-primary {
    background-color: #1d1d1f;
    color: #ffffff;
}

.btn-cookie-primary:hover {
    background-color: #000000;
    transform: scale(1.02);
}

.btn-cookie-secondary {
    background-color: #f5f5f7;
    color: #1d1d1f;
}

.btn-cookie-secondary:hover {
    background-color: #e8e8ed;
}

/* Toast Notification */
.cookie-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #1d1d1f;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0;
    pointer-events: none;
}

.cookie-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 480px) {
    .cookie-banner {
        bottom: 16px;
        padding: 20px;
        width: calc(100% - 32px);
    }
    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }
    .btn-cookie {
        width: 100%;
    }
}

/* Animations */
@keyframes animate-fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: animate-fade-in 0.3s ease forwards;
}

/* --- Alphatec Anti-spam System --- */
.alphatec-antispam {
  margin: 24px 0;
}

.alphatec-robot-check {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #d2d2d7;
  border-radius: 16px;
  background: #ffffff;
  color: #1d1d1f;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.alphatec-robot-check:hover {
  border-color: #86868b;
}

.alphatec-robot-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.robot-box {
  width: 22px;
  height: 22px;
  border: 1.5px solid #86868b;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.alphatec-robot-check input:checked + .robot-box {
  background: #1d1d1f;
  border-color: #1d1d1f;
}

.alphatec-robot-check input:checked + .robot-box::after {
  content: "✓";
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
}

.robot-text {
  font-size: 15px;
  line-height: 1.3;
}

.alphatec-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.alphatec-antispam-error {
  margin-top: 8px;
  font-size: 13px;
  color: #b00020;
  min-height: 18px;
}

.alphatec-robot-check.is-error {
  border-color: #b00020;
}




/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #fff;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.menu-active .hamburger {
    background: transparent;
}

.menu-active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 80px 5vw 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

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

.mobile-nav-link {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-link .chevron {
    transition: transform 0.3s ease;
}

.mobile-nav-link.active .chevron {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;
    padding: 10px 0 10px 20px;
    flex-direction: column;
    gap: 15px;
}

.mobile-submenu-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.mobile-submenu-link:hover {
    color: #fff;
}

/* Breakpoints */
@media (max-width: 1024px) {
    .nav-center {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .nav-right .search-icon {
        margin-right: 15px;
    }
}

@media (max-width: 767px) {
    .site-header {
        height: 60px;
    }

    .main-nav {
        height: 60px;
        padding: 0 4vw;
    }

    .logo {
        height: 28px !important;
    }

    .mode-toggle-container {
        display: none; /* Hide premium toggle on very small screens or simplify */
    }

    /* Footer Accordion */
    .site-footer .grid {
        grid-template-columns: 1fr !important;
    }

    .footer-section h3 {
        padding: 15px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        margin: 0 !important;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .footer-section h3::after {
        content: '+';
        font-size: 1.2rem;
        transition: transform 0.3s;
    }

    .footer-section.active h3::after {
        content: '-';
        transform: rotate(180deg);
    }

    .footer-section ul {
        display: none;
        padding: 15px 0;
    }

    .footer-section.active ul {
        display: flex;
    }
}

/* Tablet: 768px a 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .hero-split {
        flex-direction: column !important;
    }
}
