/* Custom CSS for Dilli Bhatta Website */

/* Base Styles */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.font-heading {
    font-family: 'Poppins', sans-serif;
}

/* Navigation Styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #1e40af;
    transition: width 0.3s ease;
}

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

/* Button Styles */
.btn-primary {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

/* Hero Section */
.hero-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

/* Hero Image Animations */
.hero-image-container {
    animation: heroFloat 6s ease-in-out infinite;
}

.hero-image-frame {
    position: relative;
    transition: all 0.5s ease;
}

.hero-image-frame:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.floating-icon {
    animation: floatingIcon 3s ease-in-out infinite;
}

/* Modern Floating Badge Styles */
.floating-badge {
    animation: floatingBadge 4s ease-in-out infinite;
}

.satellite-badge-1 {
    animation: satelliteFloat1 3s ease-in-out infinite;
}

.satellite-badge-2 {
    animation: satelliteFloat2 3.5s ease-in-out infinite;
}

/* Particles Animation */
.particles-container {
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
}

.particle-1 {
    width: 4px;
    height: 4px;
    top: 20%;
    left: 10%;
    animation: float1 8s infinite ease-in-out;
}

.particle-2 {
    width: 6px;
    height: 6px;
    top: 60%;
    left: 80%;
    animation: float2 10s infinite ease-in-out;
}

.particle-3 {
    width: 3px;
    height: 3px;
    top: 30%;
    right: 15%;
    animation: float3 7s infinite ease-in-out;
}

.particle-4 {
    width: 5px;
    height: 5px;
    bottom: 40%;
    left: 20%;
    animation: float4 9s infinite ease-in-out;
}

.particle-5 {
    width: 4px;
    height: 4px;
    top: 70%;
    right: 25%;
    animation: float5 6s infinite ease-in-out;
}

.particle-6 {
    width: 7px;
    height: 7px;
    bottom: 20%;
    right: 10%;
    animation: float6 11s infinite ease-in-out;
}

/* Keyframe Animations */
@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes floatingIcon {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(5deg);
    }
}

@keyframes floatingBadge {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(3deg);
    }
}

@keyframes satelliteFloat1 {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
    }
    50% {
        transform: translateY(-3px) translateX(2px) scale(1.1);
    }
}

@keyframes satelliteFloat2 {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
    }
    50% {
        transform: translateY(3px) translateX(-2px) scale(1.1);
    }
}

@keyframes float1 {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.7;
    }
    33% {
        transform: translateY(-20px) translateX(10px);
        opacity: 1;
    }
    66% {
        transform: translateY(10px) translateX(-5px);
        opacity: 0.5;
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-30px) translateX(-15px);
        opacity: 1;
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.8;
    }
    25% {
        transform: translateY(-15px) translateX(8px);
        opacity: 0.4;
    }
    75% {
        transform: translateY(20px) translateX(-12px);
        opacity: 1;
    }
}

@keyframes float4 {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.6;
    }
    40% {
        transform: translateY(-25px) translateX(20px);
        opacity: 1;
    }
    80% {
        transform: translateY(15px) translateX(-10px);
        opacity: 0.3;
    }
}

@keyframes float5 {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.9;
    }
    60% {
        transform: translateY(-18px) translateX(-8px);
        opacity: 0.5;
    }
}

@keyframes float6 {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-35px) translateX(25px);
        opacity: 1;
    }
    70% {
        transform: translateY(25px) translateX(-20px);
        opacity: 0.7;
    }
}

/* Social Links */
.social-link {
    transition: all 0.3s ease;
    transform: scale(1);
}

.social-link:hover {
    transform: scale(1.2);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
    transform: translateY(0);
}

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

/* Gallery Styles - Hall of Photos */
.gallery-hall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-template-rows: auto;
    gap: 1.5rem;
    align-items: start;
}

.gallery-featured {
    grid-column: span 2;
    grid-row: span 2;
}

@media (max-width: 768px) {
    .gallery-featured {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .gallery-hall-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .gallery-hall-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .gallery-featured {
        grid-column: span 2;
        grid-row: span 2;
    }
}

/* Gallery Frame Effects */
.gallery-item {
    position: relative;
    transform: perspective(1000px);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(2deg);
    z-index: 10;
}

.gallery-item:nth-child(even):hover {
    transform: perspective(1000px) rotateY(-5deg) rotateX(-2deg);
}

/* Photo Frame Borders */
.gallery-item::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(45deg, #f59e0b, #1e40af, #dc2626, #059669);
    border-radius: 1rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::before {
    opacity: 0.3;
    animation: borderGlow 2s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% {
        filter: blur(5px);
    }
    100% {
        filter: blur(10px);
    }
}

/* Spotlight Effect */
.gallery-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Gallery Stats Animation */
.gallery-stats {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hall Lighting Effects */
.gallery-hall-grid::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    z-index: -1;
}

/* Enhanced hover effects for featured image */
.gallery-featured:hover {
    transform: perspective(1000px) scale(1.02) rotateY(2deg);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(245, 158, 11, 0.3);
}

/* Gallery item content overlay */
.gallery-item .absolute.bottom-0 {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

/* Masonry-style layout for larger screens */
@media (min-width: 1200px) {
    .gallery-hall-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-auto-rows: 200px;
    }
    
    .gallery-featured {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .gallery-item:nth-child(4) {
        grid-row: span 1;
    }
    
    .gallery-item:nth-child(7) {
        grid-row: span 1;
    }
}

/* Gradient backgrounds for placeholder items */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

/* Custom gradient stops */
.from-blue-600 {
    --tw-gradient-from: #2563eb;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(37, 99, 235, 0));
}

.to-blue-800 {
    --tw-gradient-to: #1e40af;
}

/* Modal Styles */
.modal-overlay {
    backdrop-filter: blur(5px);
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Section Animations */
.section-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.section-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

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

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

::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 4px;
}

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

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e40af;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.15);
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px);
}

/* Blog Cards */
.blog-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.blog-card:hover {
    border-color: #1e40af;
    box-shadow: 0 15px 35px rgba(30, 64, 175, 0.1);
}

/* Press Cards */
.press-card {
    transition: all 0.3s ease;
    transform: scale(1);
}

.press-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-primary,
    .bg-secondary {
        background: transparent !important;
        color: black !important;
    }
}

/* Accessibility */
.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 */
.focus-outline:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000000;
    }
    
    .text-gray-700 {
        color: #000000;
    }
    
    .border-gray-200 {
        border-color: #000000;
    }
}

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .auto-dark-card {
        background-color: #374151;
        border-color: #4b5563;
    }
}

/* Custom Utilities */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.gradient-text {
    background: linear-gradient(135deg, #1e40af, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Layout Utilities */
.container-fluid {
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-right: auto;
    margin-left: auto;
}

.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

/* Interactive Elements */
.interactive-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Typography */
.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

/* Spacing */
.space-y-safe > * + * {
    margin-top: clamp(1rem, 4vw, 2rem);
}

.space-x-safe > * + * {
    margin-left: clamp(1rem, 4vw, 2rem);
}

/* Responsive Images */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-cover {
    object-fit: cover;
    object-position: center;
}

.img-contain {
    object-fit: contain;
    object-position: center;
}

/* Responsive Hero Image Styles */
@media (max-width: 768px) {
    .hero-image-container {
        animation-duration: 4s;
    }
    
    .particles-container {
        display: none; /* Hide particles on mobile for better performance */
    }
    
    .hero-image-frame {
        width: 280px !important;
        height: 280px !important;
    }
    
    .floating-icon {
        width: 20px !important;
        height: 20px !important;
        bottom: -3px !important;
        right: -3px !important;
    }
    
    .floating-icon i {
        font-size: 1rem !important;
    }
    
    /* Responsive styles for new floating badge */
    .floating-badge {
        transform: scale(0.8);
        bottom: -4px !important;
        right: -4px !important;
    }
    
    .satellite-badge-1,
    .satellite-badge-2 {
        display: none; /* Hide satellite badges on mobile for cleaner look */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-image-frame {
        width: 360px !important;
        height: 360px !important;
    }
}

/* Enhanced image positioning */
.hero-image-frame img {
    object-fit: cover;
    object-position: center top;
    filter: brightness(1.05) contrast(1.1);
    transition: all 0.7s ease;
}

.hero-image-frame:hover img {
    filter: brightness(1.1) contrast(1.15);
}

/* Lightbox Styles */
#lightbox {
    backdrop-filter: blur(5px);
    z-index: 9999;
}

#lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

#lightbox-title {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px 24px;
    margin: 0 auto;
    max-width: 80%;
}

/* Gallery item hover animations */
.gallery-item img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-item:hover img {
    filter: brightness(1.1);
}

/* Mobile Menu Styles */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#mobile-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.mobile-nav-link {
    transition: all 0.2s ease;
    border-radius: 6px;
}

.mobile-nav-link:hover {
    background-color: rgba(30, 64, 175, 0.1);
    transform: translateX(4px);
}

/* Mobile menu button animation */
#mobile-menu-btn {
    transition: all 0.2s ease;
}

#mobile-menu-btn:hover {
    transform: scale(1.05);
}

/* Gallery Filter Buttons */
.filter-btn {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #e5e7eb;
    color: #374151;
    transform: translateY(-1px);
}

.filter-btn.active {
    background-color: #1e40af;
    color: white;
    border-color: #1e40af;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* Gallery Item Animations */
.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

/* Gallery Grid Responsive */
@media (max-width: 768px) {
    .gallery-item {
        margin-bottom: 1rem;
    }
}

/* Load More Button */
#load-more-btn {
    transition: all 0.3s ease;
}

#load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
}
