/* Modern Custom Styles for MoveITEurope */

:root {
    --primary-green: #86af49;
    --secondary-green: #b5e7a0;
    --tertiary-green: #e3eaa7;
    --light-green: #d5e1df;
    --dark-green: #5a8a2e;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
}

/* Smooth animations */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero section animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Card hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(134, 175, 73, 0.2) !important;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern button styles */
.modern-button {
    position: relative;
    overflow: hidden;
}

.modern-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modern-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Decorative elements */
.decorative-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    z-index: 0;
}

/* Stats counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-number {
    animation: countUp 0.6s ease-out;
}

/* Service card icon animation */
.service-icon {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hover-lift:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-green);
}

/* Pattern background */
.pattern-bg {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(181, 231, 160, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(227, 234, 167, 0.08) 0%, transparent 50%);
}

/* Modern nav link hover effect */
.nav-link-modern {
    position: relative;
    padding-bottom: 4px;
}

.nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: width 0.3s ease;
}

.nav-link-modern:hover::after {
    width: 100%;
}

/* Pulse animation for CTA */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(134, 175, 73, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(134, 175, 73, 0);
    }
}

.pulse-on-hover:hover {
    animation: pulse 2s infinite;
}

/* Float animation */
.float {
    animation: float 3s ease-in-out infinite;
}

/* ===============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   =============================================== */

/* Base mobile styles (default) */
body {
    overflow-x: hidden;
}

/* Ensure all containers don't overflow */
.mud-container {
    padding-left: 16px;
    padding-right: 16px;
}

/* Typography responsive scaling */
@media (max-width: 959px) {
    /* Tablet and below */
    h1, .mud-typography-h1 {
        font-size: 2.5rem !important;
    }

    h2, .mud-typography-h2 {
        font-size: 2rem !important;
    }

    h3, .mud-typography-h3 {
        font-size: 1.75rem !important;
    }

    h5, .mud-typography-h5 {
        font-size: 1.25rem !important;
    }

    /* Reduce padding on mobile */
    section {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }

    /* Make decorative blobs smaller on mobile */
    .decorative-blob {
        width: 300px !important;
        height: 300px !important;
    }

    /* Reduce card padding on mobile */
    .hover-lift {
        padding: 24px !important;
    }

    /* Stack navigation items properly */
    .mud-appbar {
        padding: 8px 16px !important;
    }

    /* Reduce hover effects on mobile (touch devices) */
    .hover-lift:hover {
        transform: none !important;
    }
}

@media (max-width: 599px) {
    /* Mobile only */
    h1, .mud-typography-h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    h2, .mud-typography-h2 {
        font-size: 1.75rem !important;
    }

    h3, .mud-typography-h3 {
        font-size: 1.5rem !important;
    }

    h4, .mud-typography-h4 {
        font-size: 1.25rem !important;
    }

    h5, .mud-typography-h5 {
        font-size: 1.1rem !important;
    }

    /* Further reduce section padding */
    section {
        padding-top: 32px !important;
        padding-bottom: 32px !important;
    }

    /* Hide decorative blobs on small mobile */
    .decorative-blob {
        display: none !important;
    }

    /* Adjust button sizes */
    .mud-button-root {
        font-size: 0.95rem !important;
        padding: 10px 20px !important;
    }

    /* Make SVG illustrations smaller */
    svg {
        max-width: 100%;
        height: auto;
    }

    /* Adjust grid spacing */
    .mud-grid-spacing-xs-4 {
        margin: -8px !important;
    }

    .mud-grid-spacing-xs-6 {
        margin: -12px !important;
    }

    .mud-grid-spacing-xs-8 {
        margin: -16px !important;
    }
    /* Ensure properly aligned list items on mobile */
    .list-item-mobile, .list-item-mobile * {
        text-align: left !important;
        justify-content: flex-start !important;
    }

    .list-item-mobile {
        display: flex !important;
        gap: 12px !important;
        align-items: flex-start !important;
        width: 100% !important;
        flex-direction: row !important;
    }

    .list-item-mobile .mud-icon-root {
        margin-top: 2px !important;
        flex-shrink: 0 !important;
    }
}

/* Tablet specific adjustments */
@media (min-width: 600px) and (max-width: 959px) {
    .mud-container {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Desktop optimizations */
@media (min-width: 960px) {
    /* Enable hover effects only on desktop */
    .hover-lift:hover {
        transform: translateY(-8px) !important;
    }

    /* Better spacing for large screens */
    .mud-container-maxwidth-xl {
        max-width: 1400px;
    }
}

/* Extra large screens */
@media (min-width: 1920px) {
    .mud-container-maxwidth-xl {
        max-width: 1600px;
    }

    h1, .mud-typography-h1 {
        font-size: 4rem !important;
    }
}

/* Fix for forms on mobile */
@media (max-width: 599px) {
    .mud-input-root,
    .mud-select,
    .mud-input-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }

    .mud-form .mud-grid .mud-grid-item {
        padding: 8px !important;
    }
}

/* Ensure images and SVGs are responsive */
img, svg {
    max-width: 100%;
    height: auto;
}

/* Fix overflow issues */
.mud-paper,
.mud-card {
    overflow: hidden;
}

/* Make tables responsive */
@media (max-width: 959px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Footer responsive adjustments */
@media (max-width: 599px) {
    footer .mud-grid-item {
        text-align: center !important;
    }
}

/* Ensure text doesn't overflow */
p, .mud-typography-body1, .mud-typography-body2 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Additional mobile fixes */
@media (max-width: 599px) {
    /* Stack hero buttons vertically */
    section div[style*="display: flex; gap: 20px"] > .mud-button-root {
        width: 100% !important;
    }

    /* Ensure proper spacing on mobile cards */
    .hover-lift {
        margin-bottom: 16px;
    }

    /* Fix service page visual cards */
    .mud-grid-item[style*="md=\"6\""] > div[class*="hover-lift"] {
        padding: 32px 24px !important;
    }

    /* Make SVG containers smaller on mobile */
    .mud-grid-item[style*="md=\"6\""] svg {
        height: 200px !important;
    }
}

/* Navigation responsive visibility */
.nav-mobile {
    display: flex;
}

.nav-desktop {
    display: none !important;
}

/* Show desktop nav on tablets and larger (≥ 768px) */
@media (min-width: 768px) {
    .nav-desktop {
        display: flex !important;
    }

    .nav-mobile {
        display: none !important;
    }

    /* Hide mobile drawer on desktop */
    .mud-drawer.mobile-only {
        display: none !important;
    }
}

/* Ensure closed drawer doesn't show on mobile */
.mud-drawer:not(.mud-drawer--open) {
    transform: translateX(100%) !important;
}

/* Fix drawer overlay and prevent partial visibility */
.mud-drawer-temporary:not(.mud-drawer--open) {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Fix for mobile navigation */
@media (max-width: 959px) {
    /* Ensure nav items don't overflow */
    nav, .mud-appbar {
        flex-wrap: wrap;
    }
}

/* Prevent horizontal scroll on all devices */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
    width: 100%;
}

/* Fix MudBlazor container overflow */
.mud-layout, .mud-main-content {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Ensure appbar doesn't cause overflow */
.mud-appbar {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Make all sections properly contained */
section {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix SVG responsiveness */
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure grid items don't cause overflow */
.mud-grid {
    max-width: 100%;
}

/* Margin bottom utility classes */
.mb-12 {
    margin-bottom: 96px !important;
}

.mb-6 {
    margin-bottom: 48px !important;
}

.mt-6 {
    margin-top: 48px !important;
}

/* Make contact form more mobile friendly */
@media (max-width: 599px) {
    .mud-form .mud-input {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }

    .mud-select .mud-input {
        font-size: 16px !important;
    }

    /* Force service cards to stack properly */
    .mud-grid[class*="mb-12"] {
        flex-direction: column !important;
    }

    .mud-grid[class*="mb-12"] .mud-grid-item {
        order: 2;
        width: 100% !important;
    }

    .mud-grid[class*="mb-12"] .mud-grid-item:first-child {
        order: 1;
    }

    /* Reduce SVG size on services page */
    section[style*="background: white"] svg,
    section[style*="background: linear-gradient"] svg {
        max-height: 250px !important;
        width: auto !important;
        margin: 0 auto;
    }

    /* Better padding for service sections on mobile */
    section .hover-lift[style*="padding: 60px"],
    section .hover-lift[style*="padding: 56px 48px"],
    section .hover-lift[style*="padding: 48px 40px"] {
        padding: 32px 20px !important;
    }

    /* Make service descriptions more readable on mobile */
    .mud-typography-h3 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    .mud-typography-h5 {
        font-size: 1.15rem !important;
    }

    /* Utility to force left alignment */
    .align-start {
        align-items: flex-start !important;
        text-align: left !important;
    }

    .align-start > * {
        text-align: left !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
}
