/* Custom CSS for Durgathali Power Company Website */

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

/* Advanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8);
    }
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-30px) translateX(20px) scale(1.1) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-10px) translateX(-15px) scale(0.9) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-25px) translateX(25px) scale(1.05) rotate(270deg);
        opacity: 0.4;
    }
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes floating-icon {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.9;
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), 0 0 40px rgba(34, 197, 94, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8), 0 0 80px rgba(34, 197, 94, 0.4);
    }
}

@keyframes text-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(34, 197, 94, 0.5);
    }
}

/* Hero Section Enhancements */
.animate-fade-in-up {
    animation: fadeInUp 1s ease-out;
}

/* Floating Particles */
.particle {
    position: absolute;
    background: linear-gradient(45deg, #3b82f6, #22c55e);
    border-radius: 50%;
    opacity: 0.3;
    animation: particle-float 6s infinite ease-in-out;
}

.particle-1 {
    width: 8px;
    height: 8px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle-2 {
    width: 12px;
    height: 12px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.particle-3 {
    width: 6px;
    height: 6px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.particle-4 {
    width: 10px;
    height: 10px;
    top: 30%;
    left: 70%;
    animation-delay: 1s;
}

.particle-5 {
    width: 14px;
    height: 14px;
    top: 70%;
    left: 50%;
    animation-delay: 3s;
}

.particle-6 {
    width: 16px;
    height: 16px;
    top: 15%;
    left: 60%;
    animation-delay: 5s;
}

.particle-7 {
    width: 7px;
    height: 7px;
    top: 45%;
    left: 15%;
    animation-delay: 1.5s;
}

.particle-8 {
    width: 11px;
    height: 11px;
    top: 85%;
    left: 75%;
    animation-delay: 4.5s;
}

/* Animated Background */
.animate-gradient {
    background: linear-gradient(-45deg, #1e3a8a, #2563eb, #16a34a, #22c55e);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

/* Floating Energy Icons */
.floating-icon {
    position: absolute;
    animation: floating-icon 4s ease-in-out infinite;
}

.floating-icon-1 {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.floating-icon-2 {
    top: 30%;
    right: 20%;
    animation-delay: 1s;
}

.floating-icon-3 {
    bottom: 30%;
    left: 25%;
    animation-delay: 2s;
}

.floating-icon-4 {
    bottom: 20%;
    right: 15%;
    animation-delay: 3s;
}

/* Navigation Enhancements */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

/* Enhanced Card Styles */
.stats-card {
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.8s;
}

.stats-card:hover::before {
    left: 100%;
}

/* Counter Animation */
.counter {
    display: inline-block;
    transition: all 0.3s ease;
}

/* Glass Morphism Effects */
.glass-morphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Advanced Button Styles */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::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;
}

.btn-glow:hover::before {
    left: 100%;
}

/* Project Card Enhancements */
.project-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(34, 197, 94, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Enhanced Glow Effects */
.glow-effect {
    transition: all 0.3s ease;
}

.glow-effect:hover {
    animation: glow-pulse 2s infinite;
}

.pulse-dot {
    animation: pulse 2s infinite;
}

.glow-text {
    transition: all 0.3s ease;
}

.glow-text:hover {
    animation: text-glow 2s infinite;
}

/* Enhanced Stats Cards */
.stats-card {
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.8s;
}

.stats-card:hover::before {
    left: 100%;
}

/* Loading Animations */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Form Styles */
.form-floating {
    position: relative;
}

.form-floating input,
.form-floating textarea {
    padding: 1rem 1rem 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    transition: all 0.3s ease;
}

.form-floating input:focus,
.form-floating textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-floating label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #6b7280;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-floating input:focus + label,
.form-floating input:not(:placeholder-shown) + label,
.form-floating textarea:focus + label,
.form-floating textarea:not(:placeholder-shown) + label {
    top: 0.25rem;
    font-size: 0.75rem;
    color: #3b82f6;
}

/* Notification Styles */
.notification {
    backdrop-filter: blur(10px);
    border-left: 4px solid transparent;
}

.notification.success {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.notification.error {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.notification.info {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* Gallery Styles */
.gallery-filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    color: #4b5563;
    background-color: white;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
    transform: scale(1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.gallery-filter-btn:hover {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
    transform: scale(1.05);
}

.gallery-filter-btn.active {
    background: linear-gradient(to right, #2563eb, #059669);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.gallery-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }

/* Gallery hover effects */
.gallery-item .group:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Lightbox custom styles */
.glightbox-clean .gslide-description {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    margin: 20px;
}

/* Gallery stats animation */
.gallery-stats {
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery image loading effect */
.gallery-item img {
    transition: opacity 0.3s ease;
}

.gallery-item img:not([src]) {
    opacity: 0;
}

/* Photo category badges */
.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-badge.projects {
    background-color: #dbeafe;
    color: #1e40af;
}

.category-badge.facilities {
    background-color: #dcfce7;
    color: #166534;
}

.category-badge.equipment {
    background-color: #f3e8ff;
    color: #7c2d12;
}

.category-badge.environment {
    background-color: #d1fae5;
    color: #065f46;
}

.category-badge.events {
    background-color: #fed7aa;
    color: #9a3412;
}

/* Gallery loading skeleton */
.gallery-skeleton {
    background-color: #e5e7eb;
    border-radius: 0.5rem;
    aspect-ratio: 4/3;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Enhanced gallery grid for mobile */
@media (max-width: 640px) {
    .gallery-filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .gallery-item {
        animation-delay: 0.1s !important;
    }
}

/* Gallery masonry effect */
.gallery-masonry {
    columns: 1;
    column-gap: 1.5rem;
}

@media (min-width: 640px) {
    .gallery-masonry {
        columns: 2;
    }
}

@media (min-width: 1024px) {
    .gallery-masonry {
        columns: 3;
    }
}

@media (min-width: 1280px) {
    .gallery-masonry {
        columns: 4;
    }
}

.gallery-masonry .gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    break-inside: avoid;
}

/* Photo zoom effect */
.photo-zoom {
    overflow: hidden;
    cursor: zoom-in;
}

.photo-zoom img {
    transition: transform 0.5s ease;
}

.photo-zoom:hover img {
    transform: scale(1.1);
}

/* Gallery search and filter animations */
.filter-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.filter-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Enhanced image overlay */
.image-overlay {
    background: linear-gradient(
        45deg,
        rgba(59, 130, 246, 0.8),
        rgba(16, 185, 129, 0.8)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

/* Gallery modal enhancements */
.gallery-modal {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.9);
}

/* Responsive gallery grid */
.gallery-responsive {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 640px) {
    .gallery-responsive {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .particle {
        display: none;
    }
    
    .text-responsive {
        font-size: clamp(2rem, 8vw, 4rem);
    }
    
    .hero-text-responsive {
        font-size: clamp(2.5rem, 10vw, 5rem);
        line-height: 1.1;
    }
}

@media (max-width: 480px) {
    .hero-text-responsive {
        font-size: 2rem;
    }
    
    .stats-grid-responsive {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
}

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

/* Focus Styles */
*:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000000;
    }
    
    .text-gray-300 {
        color: #ffffff;
    }
    
    .bg-gray-50 {
        background-color: #ffffff;
    }
}

/* Animation classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Custom gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
}

/* Custom hover effects */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Custom shadows */
.shadow-custom {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.shadow-custom-lg {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Hero section parallax effect */
.hero-parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Custom loading animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Button animations */
.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-animate:hover::before {
    left: 100%;
}

/* 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);
}

/* Typography enhancements */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile menu animation */
.mobile-menu-slide {
    transition: all 0.3s ease-in-out;
    transform: translateY(-100%);
}

.mobile-menu-slide.show {
    transform: translateY(0);
}

/* Form enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Progress indicators */
.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Image lazy loading placeholder */
.img-placeholder {
    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;
    }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hero-text-responsive {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .stats-grid-responsive {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-text-responsive {
        font-size: 2rem;
    }
    
    .stats-grid-responsive {
        grid-template-columns: 1fr;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* 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 */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000000;
    }
    
    .text-gray-300 {
        color: #ffffff;
    }
}

/* 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;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1f2937;
        --bg-secondary: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
    }
}

/* Reports Styles */
.report-filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    color: #4b5563;
    background-color: white;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
    transform: scale(1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.report-filter-btn:hover {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
    transform: scale(1.05);
}

.report-filter-btn.active {
    background: linear-gradient(to right, #2563eb, #059669);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.report-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.report-item:nth-child(1) { animation-delay: 0.1s; }
.report-item:nth-child(2) { animation-delay: 0.2s; }
.report-item:nth-child(3) { animation-delay: 0.3s; }
.report-item:nth-child(4) { animation-delay: 0.4s; }
.report-item:nth-child(5) { animation-delay: 0.5s; }
.report-item:nth-child(6) { animation-delay: 0.6s; }

/* Report card hover effects */
.report-item:hover {
    transform: translateY(-2px);
}

/* PDF icon animations */
.report-item .fas.fa-file-pdf {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -8px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -1px, 0);
    }
}

/* Report download button effects */
.report-item button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Enhanced mobile responsive for reports */
@media (max-width: 640px) {
    .report-filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .report-item .flex {
        flex-direction: column;
    }
    
    .report-item .flex-shrink-0 {
        align-self: center;
        margin-bottom: 1rem;
    }
    
    .report-item .flex.space-x-3 {
        flex-direction: column;
        gap: 0.5rem;
    }
}
