/*
    Promadaz Electrical Enterprise - Custom Styles
    Author: Senior Frontend Developer
    Design System: Modern Industrial with Figma-inspired precision
*/

/* CSS Variables for Design Consistency */
:root {
    --promadaz-blue: #1e40af;
    --promadaz-dark: #0f172a;
    --promadaz-amber: #f59e0b;
    --promadaz-light: #f8fafc;
    --promadaz-gray: #64748b;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Custom Selection Color */
::selection {
    background-color: var(--promadaz-blue);
    color: white;
}

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

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

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

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

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

/* Animation Classes */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 1s ease-out forwards;
}

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

/* Search Input Reset */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    display: none;
}

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

/* Hover Lift Effect for Cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

/* Navigation Dropdown Animation */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.group:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile Menu Transition */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Hero Gradient Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}

/* Image Loading State */
img {
    background-color: #e2e8f0;
    transition: opacity 0.3s ease;
}

img[src] {
    opacity: 1;
}

/* Button Press Effect */
button:active,
a:active {
    transform: scale(0.98);
}

/* Form Input Autofill Styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset;
    transition: background-color 5000s ease-in-out 0s;
}

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

/* Print Styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 90%;
        opacity: 0.8;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-promadaz-blue {
        background-color: #0000ff;
    }
    
    .text-promadaz-amber {
        color: #ff8c00;
    }
}