/* Hemagni Build Pro - Custom Animations & Styles */

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Loading Animation for Images */
img {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Smooth Hover Transitions */
a, button {
    transition: all 0.3s ease;
}

/* Card Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Text Selection */
::selection {
    background-color: #f97316;
    color: white;
}
::-moz-selection {
    background-color: #f97316;
    color: white;
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
button:focus, a:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-fire {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse Animation for CTA */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.pulse-animation {
    animation: pulse 2s infinite;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Slide In Left */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Slide In Right */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Scale In */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.scale-in {
    animation: scaleIn 0.5s ease-out;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Custom Shadow Styles */
.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.shadow-custom-lg {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Backdrop Blur */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .backdrop-blur-custom {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* Gradient Backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
}
.gradient-fire {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}
.gradient-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Grid Animations */
.grid-item {
    opacity: 0;
    transform: translateY(20px);
    animation: gridFadeIn 0.6s ease-out forwards;
}
.grid-item:nth-child(1) { animation-delay: 0.1s; }
.grid-item:nth-child(2) { animation-delay: 0.2s; }
.grid-item:nth-child(3) { animation-delay: 0.3s; }
.grid-item:nth-child(4) { animation-delay: 0.4s; }
.grid-item:nth-child(5) { animation-delay: 0.5s; }
.grid-item:nth-child(6) { animation-delay: 0.6s; }
.grid-item:nth-child(7) { animation-delay: 0.7s; }
.grid-item:nth-child(8) { animation-delay: 0.8s; }
.grid-item:nth-child(9) { animation-delay: 0.9s; }

@keyframes gridFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Typography */
@media (max-width: 640px) {
    html { font-size: 14px; }
}

/* Print Styles */
@media print {
    .no-print { display: none !important; }
    body { font-size: 12pt; line-height: 1.5; color: #000; background: #fff; }
}

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

/* High Contrast */
@media (prefers-contrast: high) {
    body { color: #000; background: #fff; }
    a { text-decoration: underline; }
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #1e3a5f;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Testimonial Card Hover */
.testimonial-card {
    transition: all 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Project Card Overlay - always visible */
.project-overlay {
    opacity: 1;
}

/* Nav Link Active State */
.nav-link.active {
    color: #f97316;
    font-weight: 600;
}

/* Form Input Focus Glow */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    animation: slideInDown 0.3s ease;
}
@keyframes slideInDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Error Message */
.error-message {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    animation: slideInDown 0.3s ease;
}

/* Image Placeholder */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Divider */
.divider {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}
.divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #1e3a5f, #2563eb);
    border-radius: 9999px;
}

/* Industrial accent line */
.accent-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #f97316, #ea580c);
    border-radius: 2px;
}

/* Steel texture overlay */
.steel-texture {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.03) 2px,
        rgba(255,255,255,0.03) 4px
    );
}

/* Gallery filter button active */
.filter-btn.active {
    background-color: #1e3a5f;
    color: white;
}

/* Client logo */
.client-logo {
    opacity: 1;
    transition: all 0.3s ease;
}
.client-logo:hover {
    transform: scale(1.05);
}
