﻿/* Custom Styles for EB Global Mart */

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

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    overflow-x: hidden;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    font-size: 80%;
}

/* Simple Fade Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Product Card Styling */
.product-card {
    transition: border-color 0.3s ease;
    border: 1px solid #e5e7eb;
}

.product-card:hover {
    border-color: #1e3a8a;
}

.product-card img {
    transition: opacity 0.3s ease;
}

.product-card:hover img {
    opacity: 0.9;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #e5e7eb;
    border-top-color: #1e3a8a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Responsive Image Optimization */
img {
    max-width: 100%;
    height: auto;
}

.home-hero-illustration {
    align-items: flex-end;
    justify-content: flex-end;
}

.home-hero-image {
    max-height: 100%;
    object-position: center bottom;
}

@media (min-width: 1025px) {
    .home-hero-illustration {
        padding-right: 1.5rem;
    }

    .home-hero-image {
        transform: translateY(8px) scale(1.28) !important;
    }
}

/* Button Styling */
button, a.button {
    cursor: pointer;
}

button:active {
    transform: translateY(1px);
}

/* Language Button Active State */
.lang-btn.active {
    background-color: transparent;
    color: #1e5ba8;
    font-weight: 700;
}

/* Focus states for accessibility */
input:focus, select:focus, button:focus, textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Utility classes */
.transition-colors {
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Mobile optimization */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Modal Overlay */
.modal-overlay {
    backdrop-filter: blur(4px);
}

/* Status Step Active */
.status-active {
    background-color: #1e3a8a !important;
}

.status-complete {
    background-color: #16a34a !important;
}

.line-active {
    background-color: #1e3a8a !important;
}

/* Accessibility */
:focus {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav, footer, #voice-btn {
        display: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Homepage responsive overrides */
@media (max-width: 1024px) {
    /* Make the hero section flow naturally instead of forcing 100vh */
    section.relative.overflow-hidden.h-screen {
        height: auto !important;
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    /* Ensure the two-column hero stacks into a single column */
    .grid.grid-cols-1.lg\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    /* Reduce fixed image scaling that causes overflow on small screens */
    .relative img.object-contain,
    .w-\[130\%\], .h-\[130\%\] {
        width: 100% !important;
        height: auto !important;
        max-width: 420px;
        margin: 0 auto;
        transform: none !important;
    }

    /* Tighter container padding for mobile */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Headline and paragraph sizing */
    h1 {
        font-size: 2rem !important;
        line-height: 1.08 !important;
        text-align: left;
    }

    .text-left {
        text-align: left !important;
    }

    /* Mobile nav tweaks */
    nav#navbar .nav-link {
        padding: 0.45rem 0 !important;
    }

    /* Make sure mobile menu is usable (JS still controls visibility) */
    #mobile-menu {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    /* Small screen heading size */
    h1 {
        font-size: 1.6rem !important;
    }

    .container .text-left p {
        font-size: 0.95rem !important;
    }

    /* Slightly smaller logo on very small screens */
    a[href="index.html"] img {
        height: 40px !important;
    }

    /* Reduce large CTA padding on small screens */
    .inline-block.bg-yellow-400 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-top: 0.6rem !important;
        padding-bottom: 0.6rem !important;
    }
}

/* Hero adjustments to match mobile screenshot */
@media (max-width: 420px) {
    /* Make hero section fill viewport on small phones and hide overflow */
    .home-hero {
        min-height: 100vh !important;
        padding-top: 1.25rem;
        padding-bottom: 0 !important;
        overflow: hidden !important;
    }

    /* Large, bold headline like the screenshot */
    .home-hero h1,
    .home-hero .text-4xl {
        font-size: 3rem !important;
        line-height: 1.02 !important;
        font-weight: 800 !important;
        text-align: left !important;
    }

    /* Paragraph readability */
    .home-hero p {
        font-size: 1rem !important;
        max-width: 92% !important;
        text-align: left !important;
        margin-top: 0.5rem !important;
    }

    /* CTA pill styling */
    .inline-block.bg-yellow-400 {
        padding: 14px 28px !important;
        border-radius: 9999px !important;
        box-shadow: 0 12px 24px rgba(0,0,0,0.18) !important;
        font-weight: 800 !important;
        color: #153f6e !important;
    }

    /* Position hero illustration at bottom center and prevent overflow */
    /* Make the grid container the positioning context */
    .home-hero .grid.grid-cols-1.lg\:grid-cols-2 {
        position: relative !important;
    }


    /* Add extra bottom padding on the left content so text doesn't overlap the image.
       Use vh so spacing scales with viewport and image can sit flush to bottom. */
    .home-hero .grid.grid-cols-1.lg\:grid-cols-2 > div:first-child {
        padding-bottom: 58vh !important;
        padding-top: 1.25rem !important; /* nudge hero content down on small screens */
    }

    /* Target the second column (illustration) and anchor it to bottom-center.
       Constrain by max-height so the full image (including feet) fits within viewport. */
    .home-hero .grid.grid-cols-1.lg\:grid-cols-2 > div:nth-child(2) {
        position: absolute !important;
        bottom: -8px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 82% !important;
        max-width: 360px !important;
        height: auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: flex-end !important;
        pointer-events: none !important;
    }

    /* Ensure the image scales to fit the remaining viewport height so feet are visible.
       Subtract approx header + text area (140px) to keep image fully visible. */
    .home-hero .grid.grid-cols-1.lg\:grid-cols-2 > div:nth-child(2) img.object-contain {
        width: auto !important;
        max-width: 100% !important;
        max-height: calc(100vh - 235px) !important;
        object-fit: contain !important;
        object-position: center bottom !important;
        display: block !important;
        pointer-events: none !important;
        margin: 0 auto !important;
        transform: translateY(0) scale(0.98) !important;
    }

    /* Ensure hero text sits above the image (targeted) */
    .home-hero .grid > div:first-child,
    .home-hero .grid > div:first-child * {
        position: relative !important;
        z-index: 30 !important;
    }

    /* Keep navbar on top so hamburger remains clickable */
    nav#navbar {
        position: relative !important;
        z-index: 9999 !important;
    }

    /* Ensure nav flex container spaces logo and hamburger on small screens */
    nav#navbar .flex.items-center.w-full {
        justify-content: space-between !important;
        align-items: center !important;
    }

    /* Reduce header logo size for mobile */
    nav#navbar img {
        height: 36px !important;
    }
}

/* Keep brand on one line and hamburger to the right on small screens */
@media (max-width: 480px) {
    nav#navbar .flex.items-center.w-full {
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }

    /* Make brand text smaller and prevent wrapping */
    nav#navbar a.flex.items-center .text-lg {
        font-size: 1rem !important;
        white-space: nowrap !important;
        line-height: 1 !important;
    }

    /* Slightly smaller logo */
    nav#navbar a.flex.items-center img {
        height: 32px !important;
        width: auto !important;
    }

    /* Ensure hamburger is pushed to the far right */
    #mobile-menu-btn {
        margin-left: auto !important;
        z-index: 10000 !important;
    }

    /* Hide tagline on very small screens (redundant, but safe) */
    nav#navbar a.flex.items-center .text-xs {
        display: none !important;
    }
}

/* Mobile menu overlay styles */
@media (max-width: 1024px) {
    #mobile-menu-overlay {
        display: none;
    }
    #mobile-menu-overlay.hidden {
        display: none;
    }
    #mobile-menu-overlay:not(.hidden) {
        display: flex;
    }
    #mobile-menu-overlay nav a {
        color: #1e5ba8;
    }
}

/* Fade In Up Custom Animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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


