/* Base Styles */
:root {
    --primary-orange: #f27a22; /* Matches the gear orange */
    --primary-orange-hover: #d66415;
    --secondary-blue: #6d9db2; /* Matches Nelson's blue vest */
    --secondary-blue-hover: #558296;
    --accent-yellow: #ffd90f; /* Nelson's skin yellow for accents */

    --text-dark: #222627; /* Dark slate gray from the logo text */
    --text-light: #f5f7f8;
    --bg-dark: #1b1e1f; /* A rich, deep slate gray background matching the logo's charcoal */
    --bg-light: #f6f8f9;
    --link-color: var(--primary-orange);
    --link-hover: var(--primary-orange-hover);
    --nav-bg: rgba(27, 30, 31, 0.85); /* Blurred glassmorphism with slate base */
    --nav-border: rgba(255, 255, 255, 0.08);
    --footer-bg: #edf1f2;
    --footer-text: #61686b;
    --footer-border: #d5dadc;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Typography Utilities */
.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.light-theme {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Global Navigation */
.global-nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 44px;
    background-color: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    border-bottom: 1px solid var(--nav-border);
}

.nav-content {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
}

.nav-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 44px;
}

.nav-link {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-link.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #ffffff;
    text-transform: none; /* Keep natural text casing */
}

.nav-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.logo-text strong {
    color: var(--link-color);
}

.nav-link:hover {
    color: var(--link-color);
}

.nav-link svg {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.nav-link:hover svg {
    opacity: 1;
    color: var(--link-color);
}

/* Sections Base */
section {
    position: relative;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero {
    height: 780px; /* Increased from 700px to accommodate logo and prevent overlap */
    margin-top: 44px; /* for nav offset */
    margin-bottom: 12px;
}

.secondary-hero {
    height: 700px;
    margin-top: 0;
    margin-bottom: 12px;
}

.content-wrapper {
    position: relative;
    z-index: 2;
    padding-top: 35px; /* Reduced from 55px to prevent overlap */
    max-width: 800px;
    width: 100%;
}

.hero-logo-wrapper {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.hero-logo {
    height: 80px; /* Reduced from 120px to prevent overlap */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero:hover .hero-logo {
    transform: scale(1.08) rotate(3deg);
}

.hero-title, .grid-title {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.hero-subtitle, .grid-subtitle {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 0.004em;
    margin-bottom: 14px;
}

.cta-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.btn {
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 980px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background-color: var(--link-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--link-hover);
    transform: scale(1.05);
}

.btn-secondary {
    color: var(--secondary-blue);
    border: 1px solid var(--secondary-blue);
}

.btn-secondary:hover {
    background-color: var(--secondary-blue);
    color: white;
}

/* Image Showcases (replacing mockups) */
.hero-image-container {
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none;
    padding-bottom: 12px; /* Small spacing (tab) under the image */
}

.image-showcase {
    width: 85%;
    max-width: 680px;
    height: 380px;
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    position: relative;
    background: #0d0d0d;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
}

.image-showcase img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero:hover .image-showcase {
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 -10px 50px rgba(242, 122, 34, 0.3); /* Orange glow for main hero */
}

.secondary-hero:hover .image-showcase {
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 -10px 50px rgba(109, 157, 178, 0.25); /* Blue glow for secondary tech hero */
}

.hero:hover .image-showcase img, .secondary-hero:hover .image-showcase img {
    transform: scale(1.05);
}

.light-theme .image-showcase {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -15px 35px rgba(0, 0, 0, 0.1);
    background: #f0f0f2;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 12px;
    margin-bottom: 12px;
    background-color: var(--bg-light);
}

.grid-item {
    height: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid-item:hover {
    transform: translateY(-4px);
}

.grid-item .hero-title, .grid-item .grid-title {
    font-size: 36px;
    margin-top: 40px;
}

.grid-item .hero-subtitle, .grid-item .grid-subtitle {
    font-size: 20px;
}

.grid-image-container {
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none;
    padding-bottom: 8px; /* Small spacing (tab) under the grid image */
}

.grid-image-showcase {
    width: 80%;
    height: 290px;
    border-radius: 12px 12px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    background: #0d0d0d;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
}

.grid-image-showcase img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid-item:hover .grid-image-showcase {
    transform: translateY(-6px);
    box-shadow: 0 -8px 35px rgba(242, 122, 34, 0.25); /* Orange glow for dark theme cards */
}

.grid-item.light-theme:hover .grid-image-showcase {
    box-shadow: 0 -8px 30px rgba(109, 157, 178, 0.25); /* Blue glow for light theme cards */
}

.grid-item:hover .grid-image-showcase img {
    transform: scale(1.06);
}

.light-theme .grid-image-showcase {
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.08);
    background: #f0f0f2;
}

/* Footer */
.global-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 22px;
    font-size: 14px;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.footer-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.footer-logo-text strong {
    color: var(--link-color);
}

.footer-content {
    max-width: 980px;
    margin: 0 auto;
}

.footer-note {
    padding-bottom: 10px;
    color: #1d1d1f;
    font-weight: 500;
}

.footer-divider {
    border: none;
    height: 1px;
    background-color: var(--footer-border);
    margin: 20px 0;
}

.footer-directory {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.directory-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.directory-column h4 {
    color: #1d1d1f;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.05em;
}

.directory-column ul li {
    margin-bottom: 10px;
}

.directory-column a {
    color: var(--link-color);
}

.directory-column a:hover {
    text-decoration: underline;
    color: var(--link-hover);
}

.footer-base {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--footer-border);
    flex-wrap: wrap;
}

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

.content-wrapper {
    animation: fadeIn 1s ease-out forwards;
}

/* Responsive */
@media (max-width: 1068px) {
    .hero-title { font-size: 44px; }
    .hero-subtitle { font-size: 22px; }
}

@media (max-width: 734px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        height: 680px; /* Reduced height on mobile */
    }
    
    .image-showcase {
        height: 280px; /* Reduced image height on mobile to prevent overlap */
    }
    
    .hero-logo {
        height: 60px; /* Smaller logo on mobile */
    }
    
    .hero-title { font-size: 36px; }
    .hero-subtitle { font-size: 18px; }
    
    .nav-list li:not(.logo-text, .search-icon) {
        display: none;
    }
    
    .footer-directory {
        flex-direction: column;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    z-index: 99999;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    transition: transform 0.3s ease;
}

.whatsapp-float::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    animation: whatsappPulse 2.5s infinite;
    top: 0;
    left: 0;
    pointer-events: none;
}

.whatsapp-badge-text {
    position: absolute;
    right: 75px;
    background-color: rgba(17, 17, 17, 0.95);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    background-color: #20ba5a;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:hover svg {
    transform: scale(1.05);
}

.whatsapp-float:hover .whatsapp-badge-text {
    opacity: 1;
    transform: translateX(0);
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}
