/* ===================================
   EFPPRO.eu Custom Styles
   European Foam and Plastics Production
   =================================== */

/* Root Variables */
:root {
    --primary-blue: #1e40af;
    --primary-blue-dark: #1e3a8a;
    --primary-blue-light: #3b82f6;
    --secondary-blue: #60a5fa;
    --accent-color: #2563eb;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --transition-speed: 0.3s;
}

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

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

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

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

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

/* Body Reset */
body {
    overflow-x: hidden;
}

/* Fade-in Animation */
.fade-in {
    animation: fadeIn 1s ease-in;
}

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

/* Navbar Scroll Effect */
#navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Navigation Active Link */
.nav-link.active {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Hero Section Enhancements */
#home {
    position: relative;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(30, 64, 175, 0.95) 100%);
    z-index: 0;
}

#home > div {
    position: relative;
    z-index: 1;
}

/* Animated Background Pattern */
.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.1) 35px, rgba(255,255,255,.1) 70px);
    z-index: 0;
}

/* Card Hover Effects */
.card-hover {
    transition: all var(--transition-speed) ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button Animations */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Section Spacing */
section {
    scroll-margin-top: 80px;
}

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

/* Stats Counter Animation */
.stat-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

/* Icon Containers */
.icon-container {
    transition: all var(--transition-speed) ease;
}

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

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Form Submit Button */
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button[type="submit"]:hover::after {
    width: 300px;
    height: 300px;
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Scroll to Top Button */
#scroll-top {
    transition: all var(--transition-speed) ease;
}

#scroll-top.show {
    display: block !important;
}

/* Product Cards Grid Enhancement */
.product-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.product-card:hover {
    border-color: var(--primary-blue-light);
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(30, 64, 175, 0.25);
}

/* Technology Badge */
.tech-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Timeline Effect for Solutions */
.timeline-item {
    position: relative;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-radius: 2px;
}

/* Glassmorphism Effect */
.glass-effect {
    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);
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* Pulse Animation */
@keyframes pulse-ring {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.pulse-ring {
    animation: pulse-ring 2s ease-in-out infinite;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    nav,
    #scroll-top,
    #contact {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Accessibility Enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-blue-900 {
        background-color: #000080 !important;
    }
    
    .text-gray-600 {
        color: #000000 !important;
    }
}

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

/* Selection Styling */
::selection {
    background-color: var(--primary-blue);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-blue);
    color: white;
}

/* Link Hover Effects */
a {
    transition: all var(--transition-speed) ease;
}

/* Image Loading Effect */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Container Max Width Override */
.container-custom {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Custom Grid Gaps */
.grid-gap-custom {
    gap: 2.5rem;
}

@media (max-width: 768px) {
    .grid-gap-custom {
        gap: 1.5rem;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    body {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .bg-white {
        background-color: #374151 !important;
    }
    
    .text-gray-900 {
        color: #f9fafb !important;
    }
    */
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Border Radius Utilities */
.rounded-custom {
    border-radius: 1.5rem;
}

/* Shadow Utilities */
.shadow-custom {
    box-shadow: 0 20px 25px -5px rgba(30, 64, 175, 0.1),
                0 10px 10px -5px rgba(30, 64, 175, 0.04);
}

/* Gradient Borders */
.gradient-border {
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-radius: inherit;
    z-index: -1;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* End of Styles */