/* Hero Section Automatic Slider */
.hero-slide {
    animation: slideShow 15s infinite;
}

.hero-slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-slide:nth-child(2) {
    animation-delay: 5s;
}

.hero-slide:nth-child(3) {
    animation-delay: 10s;
}

@keyframes slideShow {
    0% {
        opacity: 0;
    }
    6.67% {
        opacity: 1;
    }
    33.33% {
        opacity: 1;
    }
    40% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

/* Smooth Image Transitions */
.hero-slide img {
    transition: transform 15s ease-in-out;
    transform: scale(1);
}

.hero-slide:hover img {
    transform: scale(1.05);
}

/* Gallery Enhanced Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Gallery Image Cards */
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    transition: all 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-card:hover {
    transform: translateY(-1rem) rotate(1deg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.gallery-card::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.6s ease;
    z-index: 1;
}

.gallery-card:hover::before {
    left: 100%;
}

/* Lightbox Animations */
.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

/* Gallery Button Hover Effects */
.gallery-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-btn::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.6s ease;
    z-index: 1;
}

.gallery-btn:hover::before {
    left: 100%;
}

/* Enhanced Backdrop Blur */
.backdrop-blur-enhanced {
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
}

/* Hero Section Custom Animations and Styles */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fade-in-up 1s ease-out forwards;
}

.animate-fade-in-left {
    animation: fade-in-left 1s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Animation Delays */
.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* Hero Section Specific Styles */
.hero-section {
    background-size: 400% 400%;
    animation: gradient-shift 8s ease infinite;
}

.hero-dot.active-dot {
    background-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.hero-dot:hover {
    transform: scale(1.1);
}

/* Glass Morphism Effect */
.glass-effect {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Custom Scrollbar for better UX */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #1b4332, #40916c);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #2d6a4f, #40916c);
}

/* Improved Focus States */
button:focus,
input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.3);
}

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .hero-section {
        min-height: 100vh;
        padding-top: 4rem;
    }

    .animate-fade-in-up,
    .animate-fade-in-left {
        animation-duration: 0.8s;
    }
}

/* Tablet Optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
    .hero-section {
        min-height: 100vh;
    }
}

/* Desktop Enhancements */
@media (min-width: 1025px) {
    .hero-section {
        min-height: 100vh;
    }

    .hero-form:hover {
        transform: translateY(-5px);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
}

/* Print Styles */
@media print {
    .hero-section {
        background: white;
        color: black;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hero-section {
        background: #000;
        color: #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in-up,
    .animate-fade-in-left,
    .animate-float,
    .hero-section {
        animation: none;
    }

    * {
        transition: none;
    }
}

/* Gallery Section Styles */
.gallery-tab.active {
    animation: tabActive 0.3s ease-in-out;
}

@keyframes tabActive {
    0% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Ensure proper aspect ratio for gallery images */
.aspect-w-4 {
    position: relative;
    width: 100%;
}

.aspect-w-4::before {
    content: '';
    display: block;
    padding-bottom: 75%; /* 4:3 aspect ratio */
}

.aspect-h-3 > img {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    object-fit: cover;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    #galleryTrack {
        flex-wrap: nowrap;
    }

    #galleryTrack > div {
        width: calc(50% - 0.5rem) !important;
    }
}

@media (max-width: 480px) {
    #galleryTrack > div {
        width: calc(100% - 1rem) !important;
    }
}

/* Smooth transitions */
#galleryTrack {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Lightbox enhancements */
#lightboxModal {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
