/**
 * HoneyRuns Landing Page Styles
 * Extracted and organized for maintainability
 */

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 15px rgba(253, 184, 19, 0.4); }
    50% { box-shadow: 0 0 25px rgba(253, 184, 19, 0.6); }
}

@keyframes honeyPulse {
    0%, 100% {
        border-color: rgba(253, 184, 19, 0.6);
        box-shadow: 0 0 0 0 rgba(253, 184, 19, 0);
    }
    50% {
        border-color: rgba(253, 184, 19, 0.8);
        box-shadow: 0 0 8px 2px rgba(253, 184, 19, 0.2);
    }
}

/* Animation Delay Utilities */
.delay-1s { animation-delay: -1s; }
.delay-2s { animation-delay: -2s; }
.delay-3s { animation-delay: -3s; }
.delay-4s { animation-delay: -4s; }


/* ============================================================================
   BASE & TYPOGRAPHY
   ============================================================================ */

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    scroll-padding-top: 40px; /* Account for fixed navbar height + extra spacing */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-weight: 900; }
h2, h3 { font-weight: 700; }
h4, h5 { font-weight: 600; }
h6 { font-weight: 500; }


/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.smooth-gradient {
    background: rgba(253, 184, 19, 0.08);
}

.star-rating {
    display: flex;
    margin-bottom: 1rem;
}

.star-rating svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #FDB813;
    fill: currentColor;
}


/* ============================================================================
   RUN CARD COMPONENTS
   ============================================================================ */

/* Run Card Text Styling - Match Next.js app exactly */
.run-card h4,
.run-card-mobile h4,
.run-card-running h4,
.run-card-completed h4,
[class*="run"] h4,
[id*="RunCard"] h4 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
    color: #2c1810 !important; /* Primary text - warm brown-black */
}

/* Run Card Base Styles */
.run-card-running,
.run-card-completed {
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 60px;
    transition: all 0.15s ease;
    width: 100% !important;
}

.run-card-running:hover,
.run-card-completed:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Running Cards - Specific Styling */
.run-card-running {
    background: white !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

/* Completed Cards - Specific Styling */
.run-card-completed {
    background: rgba(34, 197, 94, 0.03) !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    opacity: 0.8;
}

/* Run Card Text Colors */
.run-card h4 + div {
    color: #2c1810 !important; /* Same as titles */
}

.run-card h4 + div + div {
    color: #4a3426 !important; /* Secondary text - lighter brown */
}


/* ============================================================================
   RUN ICON COMPONENT
   ============================================================================ */

.runicon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.runicon-line {
    height: 2px;
    width: 100%;
    border-radius: 1px;
    background: #94A3B8;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s ease;
}

/* Action Required / Waiting for Approval - Top line shifted */
.runicon-action-required .runicon-line-top {
    transform: translateX(-40%);
    background: #F59E0B;
}

/* Running - Middle line shifted */
.runicon-running .runicon-line-middle {
    transform: translateX(-40%);
    background: #F59E0B;
}

/* Completed - Bottom line green */
.runicon-completed .runicon-line-bottom {
    background: #22C55E;
}

/* Priority Variants - Action Required */
.runicon-action-required.runicon-high .runicon-line-top {
    background: #F97316;
}

.runicon-action-required.runicon-medium .runicon-line-top {
    background: #FB923C;
}

.runicon-action-required.runicon-low .runicon-line-top {
    background: #FDBA74;
}

/* Priority Variants - Running */
.runicon-running.runicon-high .runicon-line-middle {
    background: #F97316;
}

.runicon-running.runicon-medium .runicon-line-middle {
    background: #FB923C;
}

.runicon-running.runicon-low .runicon-line-middle {
    background: #FDBA74;
}


/* ============================================================================
   MAP COMPONENTS
   ============================================================================ */

.regional-focus-map {
    width: 100%;
    height: 100%;
    position: relative;
}

.regional-focus-map svg {
    width: 100%;
    height: 100%;
}

/* Fix tooltip width and positioning to prevent squeezing */
.datamaps-hoverover {
    position: absolute !important;
    z-index: 9999 !important;
    pointer-events: none !important;
    white-space: nowrap !important;
    min-width: 200px !important;
}


/* ============================================================================
   RESPONSIVE - MOBILE STYLES
   ============================================================================ */

@media (max-width: 768px) {
    /* Prevent horizontal overflow on mobile */
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    #how-it-works {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    #how-it-works > * {
        max-width: 100% !important;
    }

    #how-it-works .flex.justify-center.mb-8.border-b {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Hide the yellow custom arrow on mobile */
    #dynamicArrow {
        display: none !important;
    }

    /* Reduce gap between navbar and title on mobile */
    .relative.max-w-7xl.py-16 {
        padding-top: 1.5rem !important;
        padding-bottom: 2rem !important;
    }

    /* Mobile-optimized CTA button */
    .cta-button-mobile {
        width: 100% !important;
        justify-content: center !important;
        padding: 1rem 1.5rem !important;
        min-height: 48px !important; /* Touch-friendly */
        border-radius: 12px !important;
    }

    #ctaButtonContainer {
        margin-bottom: 1rem !important;
        padding: 0 !important;
    }

    /* Reduce grid gap on mobile for tighter spacing */
    .grid.lg\:grid-cols-2.gap-16 {
        gap: 2rem !important;
    }

    /* Reduce bottom margin on title container */
    .text-center.lg\:text-left.mb-16 {
        margin-bottom: 1.5rem !important;
    }

    /* Fix runs dashboard height and width jumping when switching tabs */
    #runsDashboard {
        min-height: 400px;
        max-width: 100%;
        overflow-x: hidden;
    }

    #queueCards,
    #runningCards,
    #completedCards {
        min-height: 300px;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Ensure run cards and approve buttons fit properly */
    .run-card-mobile {
        width: 88% !important;
        min-width: 0 !important;
    }

    .approve-button-mobile {
        flex-shrink: 0;
        font-size: 0.75rem !important;
        padding: 4px 8px !important;
    }

    /* Make running and completed cards full width on mobile */
    #runningCards > div,
    #completedCards > div {
        width: 100% !important;
    }

    /* Ensure run context info doesn't overflow */
    .run-context {
        min-width: 80px !important;
    }

    /* Hide the scale section map on mobile */
    #testimonials .relative.w-full.h-80 {
        display: none !important;
    }


/* ============================================================================
   NAVIGATION HOVER EFFECTS
   ============================================================================ */

/* Animated underline effect for menu items */
.animated-underline {
    position: relative;
}

.animated-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: #FDB813; /* Honey gold color */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms ease-out;
}

.animated-underline:hover::after {
    transform: scaleX(1);
}

/* Hero "1 click" animated underline - permanent gold, lighter gold slides in on hover (5px thick) */
.hero-animated-underline {
    position: relative;
    white-space: nowrap;
}

/* Permanent base underline */
.hero-animated-underline::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 5px;
    background-color: #FDB813; /* Standard gold */
    z-index: 1;
}

/* Stronger/darker gold underline that slides in on hover */
.hero-animated-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 5px;
    background-color: #E09600; /* Darker, stronger gold */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms ease-out;
    z-index: 2;
}

.hero-animated-underline:hover::after {
    transform: scaleX(1);
}

/* Footer "1 click" animated underline - permanent gold, stronger gold slides in on hover (2px thin) */
.footer-animated-underline {
    position: relative;
}

/* Permanent base underline */
.footer-animated-underline::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: #FDB813; /* Standard gold */
    z-index: 1;
}

/* Stronger/darker gold underline that slides in on hover */
.footer-animated-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: #E09600; /* Darker, stronger gold */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms ease-out;
    z-index: 2;
}

.footer-animated-underline:hover::after {
    transform: scaleX(1);
}

/* ============================================================================
   RESPONSIVE - DESKTOP STYLES
   ============================================================================ */

@media (min-width: 769px) {
    /* Make checkmarks more minimal on larger screens */
    .approve-button-mobile {
        font-size: 0.9rem !important;
        padding: 6px 8px !important;
    }


}
