/* Custom CSS for DIVYAPRIT ENGINEERS Website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Global responsive adjustments */
* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

video,
iframe {
    max-width: 100%;
}

.responsive-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.responsive-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

table {
    width: 100%;
}

@media (max-width: 768px) {
    .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Custom button hover effects */
.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Mobile menu animation */
.mobile-menu {
    transition: all 0.3s ease;
}

/* Form styling */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ea580c;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success and error message animations */
.message-animation {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ea580c;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c2410c;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
}

/* 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: 0;
}

/* Focus styles for better accessibility */
.focus-visible:focus {
    outline: 2px solid #ea580c;
    outline-offset: 2px;
}

/* Map container styling */
.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.map-container iframe {
    border: none;
}

/* Loading state for form */
.form-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Breadcrumb styling */
.breadcrumb {
    display: flex;
    align-items: center;
    space-x: 0.5rem;
}

.breadcrumb-item {
    color: #6b7280;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: #9ca3af;
}

.breadcrumb-item:last-child {
    color: #ea580c;
    font-weight: 500;
}

/* Tab styling */
.tab-active {
    border-bottom: 2px solid #ea580c;
    color: #ea580c;
}

/* Accordion styling */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 500px;
}

/* Badge styling */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Testimonial card styling */
.testimonial-card {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    border-left: 4px solid #ea580c;
}

/* Feature icon animation */
.feature-icon {
    transition: transform 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* CTA section gradient */
.cta-gradient {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

/* Statistics counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-counter {
    animation: countUp 1s ease-out;
}

/* Product gallery styling */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Team member card styling */
.team-card {
    text-align: center;
    transition: transform 0.3s ease;
}

.team-card:hover {
    transform: translateY(-10px);
}

/* Process timeline styling */
.timeline-item {
    position: relative;
    padding-left: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 2rem;
    height: 2rem;
    background: #ea580c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .dark-mode-auto {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .high-contrast-auto {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Enhanced form validation styling */
.field-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-input.error {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.form-input.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Success message styling */
.success-message {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Error message styling */
.error-message {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading button styling */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Enhanced map styling */
.map-enhanced {
    filter: contrast(1.1) brightness(0.95);
    transition: filter 0.3s ease;
}

.map-enhanced:hover {
    filter: contrast(1.2) brightness(1);
}

/* Contact info card hover effects */
.contact-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.contact-card .icon-wrapper {
    transition: all 0.3s ease;
}

.contact-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

/* FAQ accordion styling */
.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #ea580c;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.1);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #fff7ed;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

/* Mobile-first responsive enhancements */
@media (max-width: 640px) {
    /* Force full width on mobile */
    html, body {
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .container,
    .container-fluid,
    .row {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    nav, header, footer, section, main {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-16 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    .text-6xl {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    .text-5xl {
        font-size: 2.25rem !important;
        line-height: 1.2 !important;
    }
    
    .text-4xl {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    .slider-container {
        height: 420px !important;
        width: 100% !important;
    }
    
    .slide .slide-bg {
        background-position: center;
    }
    
    .cta-buttons,
    .flex-even {
        flex-direction: column !important;
        gap: 1rem;
    }
    
    .stats-grid,
    .feature-grid {
        grid-template-columns: 1fr !important;
    }
    
    .max-w-6xl,
    .max-w-5xl,
    .max-w-4xl {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .map-container {
        height: 300px;
    }
    
    .contact-card {
        margin-bottom: 1rem;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Fix Bootstrap navbar on mobile */
    .navbar {
        width: 100% !important;
    }
    
    .navbar-collapse {
        width: 100% !important;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    .cta-buttons {
        gap: 1.5rem;
    }
    
    .slider-container {
        height: 520px !important;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Large screen optimizations */
@media (min-width: 1025px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .contact-form-container {
        padding: 2rem;
    }
}

/* Print optimizations for contact page */
@media print {
    .no-print-contact {
        display: none !important;
    }
    
    .contact-info-print {
        page-break-inside: avoid;
    }
    
    .map-container {
        display: none;
    }
    
    .contact-form-container {
        border: 1px solid #000;
        padding: 1rem;
    }
}

/* =
==== HERO SLIDER STYLES ===== */
.slider-container {
    position: relative;
    overflow: hidden;
}

.slide {
    transition: opacity 1s ease-in-out;
    opacity: 0;
    z-index: 1;
}

.slide.active {
    opacity: 1 !important;
    z-index: 2;
}

.slide .fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.slide.active .fade-in:nth-child(1) {
    animation-delay: 0.2s;
}

.slide.active .fade-in:nth-child(2) {
    animation-delay: 0.4s;
}

.slide.active .fade-in:nth-child(3) {
    animation-delay: 0.6s;
}

.slide.active .fade-in:nth-child(4) {
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slider indicators */
.indicator {
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: white !important;
    width: 2rem;
}

/* Slider controls hover effects */
.slider-container button {
    transform-origin: center;
    will-change: background-color;
}

.slider-container button:hover {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Responsive slider height */
@media (max-width: 768px) {
    .slider-container {
        height: 500px !important;
    }
}

@media (max-width: 640px) {
    .slider-container {
        height: 600px !important;
    }
}

/* Smooth transitions for all slides */
.slide * {
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* ===== IMAGE STYLES ===== */

/* Slider background images */
.slide-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Image hover effects */
.image-hover {
    transition: transform 0.3s ease;
}

.image-hover:hover {
    transform: scale(1.05);
}

/* Product image containers */
.product-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.product-image-container img {
    transition: transform 0.3s ease;
}

.product-image-container:hover img {
    transform: scale(1.1);
}

/* Fallback gradient backgrounds for missing images */
.fallback-bg-orange {
    background: linear-gradient(135deg, #fed7aa 0%, #fb923c 100%);
}

.fallback-bg-blue {
    background: linear-gradient(135deg, #dbeafe 0%, #3b82f6 100%);
}

.fallback-bg-green {
    background: linear-gradient(135deg, #dcfce7 0%, #22c55e 100%);
}

/* Image loading animation */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Gallery grid styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: end;
    padding: 1.5rem;
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
}

/* Responsive image adjustments */
@media (max-width: 768px) {
    .slide-bg {
        background-attachment: scroll;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item img {
        height: 200px;
    }
}

/* Image lazy loading */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Company images specific styles */
.company-image {
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.company-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Product showcase images */
.product-showcase {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.product-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.product-showcase:hover::before {
    left: 100%;
}

/* Image error handling */
.image-error {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.875rem;
    text-align: center;
    padding: 2rem;
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 90%;
}

.lightbox-caption {
    color: #f8fafc;
    font-size: 1rem;
    text-align: center;
    line-height: 1.5;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    background: rgba(234, 88, 12, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    padding: 0;
    backdrop-filter: blur(10px);
}

.lightbox-close i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background-color: rgba(234, 88, 12, 1);
    border-color: rgba(234, 88, 12, 1);
    transform: scale(1.1);
}

.lightbox-close:focus {
    outline: 3px solid #fb923c;
    outline-offset: 4px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: rgba(234, 88, 12, 0.9);
    border-color: rgba(234, 88, 12, 1);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:focus {
    outline: 3px solid #fb923c;
    outline-offset: 4px;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

@media (max-width: 768px) {
    .lightbox-caption {
        font-size: 0.9375rem;
        padding: 0 1rem;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 3rem;
        height: 3rem;
        font-size: 2rem;
        line-height: 1;
    }
    
    .lightbox-nav {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }
    
    .lightbox-prev {
        left: 0.5rem;
    }
    
    .lightbox-next {
        right: 0.5rem;
    }
}

/*
 ===== CLIENTS PAGE STYLES ===== */

/* Client logo cards */
.client-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.client-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.client-logo-container {
    transition: transform 0.3s ease;
}

.client-card:hover .client-logo-container {
    transform: scale(1.05);
}

/* Client statistics animation */
.stat-number {
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Testimonial cards */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Client grid responsive */
@media (max-width: 768px) {
    .client-card {
        padding: 1.5rem;
    }
}

/* Logo image styling */
.client-logo-container img {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.client-card:hover .client-logo-container img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Star rating styling */
.star-rating {
    color: #ea580c;
}

/* Client category badges */
.client-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #fff7ed;
    color: #ea580c;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Hover effect for client names */
.client-name {
    transition: color 0.3s ease;
}

.client-card:hover .client-name {
    color: #ea580c;
}
