/* Custom styles for Berhi Group machinery landing page */

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

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

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

/* Header sticky shadow */
header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #EBF8FF 0%, #BEE3F8 100%);
}

/* Form inputs styling */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Button hover effects */
.callback-btn,
.consultation-btn {
    transition: all 0.3s ease;
}

.callback-btn:hover,
.consultation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Modal styling */
#modal {
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

#modal:not(.hidden) {
    opacity: 1;
}

#modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#modal > div {
    transition: all 0.3s ease;
    transform: scale(0.95);
}

#modal:not(.hidden) > div {
    transform: scale(1);
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.3s ease;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
}

#mobile-menu.hidden {
    opacity: 0;
    pointer-events: none;
}

#mobile-menu > div {
    transition: transform 0.3s ease;
    transform: translateX(-100%);
}

#mobile-menu:not(.hidden) > div {
    transform: translateX(0);
}

/* Card hover effects */
.shadow-lg {
    transition: all 0.3s ease;
}

.shadow-lg:hover {
    transform: translateY(-5px);
}

/* Success/Error messages */
.success-message {
    background-color: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.error-message {
    background-color: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease-out;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Section dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 4rem 0;
}

/* Equipment cards */
.equipment-card {
    transition: all 0.3s ease;
}

.equipment-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Custom phone input styling */
input[type="tel"] {
    font-family: monospace;
}

/* Responsive utilities */
@media (max-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-5xl {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .text-4xl {
        font-size: 1.75rem;
    }
    
    .text-3xl {
        font-size: 1.5rem;
    }
    
    .py-16 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .py-24 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    /* Mobile menu visible */
    .lg\:hidden {
        display: block !important;
    }
    
    .lg\:flex {
        display: none !important;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    .callback-btn,
    .consultation-btn,
    #mobile-menu,
    #modal {
        display: none;
    }
}

/* Accessibility improvements */
.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 #2563eb;
    outline-offset: 2px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Icon placeholders for equipment section */
.equipment-icon {
    font-size: 4rem;
    color: #9CA3AF;
}

/* Gradient overlays */
.gradient-overlay {
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
}

/* Custom checkbox styles for forms */
input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Number animations */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-count {
    animation: countUp 1s ease-out;
}

/* Floating labels for form inputs */
.form-group {
    position: relative;
}

.form-group label {
    transition: all 0.2s ease;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.85);
    color: #2563eb;
}

/* Equipment category icons hover effect */
.bg-gray-200:hover .equipment-icon {
    color: #2563eb;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* CTA section wave effect */
.wave-bg {
    position: relative;
    overflow: hidden;
}

.wave-bg::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.2' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat;
    background-size: cover;
}

/* Testimonial quote marks */
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: #e5e7eb;
    font-family: Georgia, serif;
}

/* Loading states for buttons */
.btn-loading {
    position: relative;
    color: transparent;
}

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

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 10;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-new {
    background-color: #10b981;
    color: white;
}

.badge-popular {
    background-color: #f59e0b;
    color: white;
}

/* Preloader styles */
#preloader {
    backdrop-filter: blur(10px);
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

/* Animated gradient background for preloader */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

#preloader::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, #2563eb, #3b82f6, #60a5fa, #2563eb);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
    opacity: 0.1;
}

/* Logo glow effect */
@keyframes logoGlow {
    0%, 100% {
        filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
    }
    50% {
        filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(59, 130, 246, 0.8));
    }
}

#preloader img {
    animation: logoGlow 2s ease-in-out infinite;
}

/* Progress bar shine effect */
@keyframes progressShine {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

#progress-bar {
    background: linear-gradient(
        90deg,
        #2563eb 0%,
        #3b82f6 40%,
        #60a5fa 50%,
        #3b82f6 60%,
        #2563eb 100%
    );
    background-size: 200% 100%;
    animation: progressShine 2s linear infinite;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Sticky CTA on mobile */
@media (max-width: 768px) {
    .sticky-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: white;
        padding: 1rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 40;
    }
}