/* Custom Animations and Styles */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #0369a1;
}

/* 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: #0ea5e9;
    color: white;
}

::-moz-selection {
    background-color: #0ea5e9;
    color: white;
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 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;
}

/* Shimmer Effect for Loading */
@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 Support Check */
@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, #0ea5e9 0%, #0369a1 100%);
}

.gradient-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 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; }

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


/* Responsive Typography Scaling */
@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 for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here when needed */
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #0ea5e9;
    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 */
.project-overlay {
    transition: all 0.4s ease;
    opacity: 0;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

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

/* Form Input Focus Glow */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 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 Lazy Loading Placeholder */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}


/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-primary {
    background: #0ea5e9;
    color: white;
}

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

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

/* Divider Styles */
.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, #0ea5e9, #0369a1);
    border-radius: 9999px;
}

/* Swiper Navigation Buttons - Responsive */
.swiper-button-next,
.swiper-button-prev {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
    color: #0284c7;
}

@media (max-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 32px;
        height: 32px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 28px;
        height: 28px;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 10px;
    }
}

/* Swiper Custom Navigation Buttons for Project Images */
.swiper-button-next-custom,
.swiper-button-prev-custom {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.swiper-button-next-custom:hover,
.swiper-button-prev-custom:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transform: translateY(-50%) scale(1.1);
}

.swiper-button-next-custom {
    right: 20px;
}

.swiper-button-prev-custom {
    left: 20px;
}

.swiper-button-next-custom::after,
.swiper-button-prev-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 2px solid #0ea5e9;
    border-right: 2px solid #0ea5e9;
}

.swiper-button-next-custom::after {
    transform: rotate(45deg);
    margin-left: -3px;
}

.swiper-button-prev-custom::after {
    transform: rotate(-135deg);
    margin-right: -3px;
}

/* Swiper Pagination Styling */
.swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
    width: 10px;
    height: 10px;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #0ea5e9;
}

/* New Projects Pagination - Blue Bars */
.new-projects-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    width: 30px;
    height: 4px;
    border-radius: 2px;
}

.new-projects-swiper .swiper-pagination-bullet-active {
    background: #0ea5e9;
    width: 40px;
    height: 4px;
}

/* Completed Projects Pagination - Green Bars */
.completed-projects-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    width: 30px;
    height: 4px;
    border-radius: 2px;
}

.completed-projects-swiper .swiper-pagination-bullet-active {
    background: #10b981;
    width: 40px;
    height: 4px;
}

/* New Projects - Image Carousel Dots */
.project-images-swiper-vistara .swiper-pagination-bullet,
.project-images-swiper-meridian .swiper-pagination-bullet,
.project-images-swiper-amrutha .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7);
    opacity: 1;
    width: 8px;
    height: 8px;
    border: 2px solid rgba(14, 165, 233, 0.3);
}

.project-images-swiper-vistara .swiper-pagination-bullet-active,
.project-images-swiper-meridian .swiper-pagination-bullet-active,
.project-images-swiper-amrutha .swiper-pagination-bullet-active {
    background: #0ea5e9;
    border-color: #0ea5e9;
    width: 10px;
    height: 10px;
}

/* Completed Projects - Image Carousel Dots */
[class^="project-images-swiper-"] .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7);
    opacity: 1;
    width: 8px;
    height: 8px;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

[class^="project-images-swiper-"] .swiper-pagination-bullet-active {
    background: #10b981;
    border-color: #10b981;
    width: 10px;
    height: 10px;
}

/* Responsive Swiper Adjustments */
@media (max-width: 768px) {
    .swiper-button-next-custom,
    .swiper-button-prev-custom {
        width: 35px;
        height: 35px;
    }

    .swiper-button-next-custom {
        right: 10px;
    }

    .swiper-button-prev-custom {
        left: 10px;
    }
}
