/* Custom Animations */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-slide-up {
    animation: slide-up 0.8s ease-out;
}

.animate-slide-in {
    animation: slide-in 0.5s ease-out;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b45309;
}

/* Navbar Scrolled State */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

/* Background Clip Text Support */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Gradient Text */
.text-transparent {
    color: transparent;
}

/* Custom Backdrop Blur */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

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

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
}

/* Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* Focus Styles */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Prevent Text Selection on Buttons */
button {
    user-select: none;
    -webkit-user-select: none;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Custom Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Grid Gap Fix for Safari */
.grid {
    display: grid;
}

/* Aspect Ratio for Images */
.aspect-4-3 {
    aspect-ratio: 4 / 3;
}

/* Custom Shadow */
.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Button Hover Effects */
button {
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

/* Card Hover Effect */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Lightbox Animation */
#lightbox {
    animation: fade-in 0.3s ease-out;
}

#lightbox img {
    animation: slide-up 0.4s ease-out;
}

/* Mobile Menu Animation */
#mobile-menu {
    animation: slide-up 0.3s ease-out;
}

/* Form Input Focus */
input:focus,
textarea:focus {
    border-color: #fbbf24 !important;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Gradient Overlay */
.gradient-overlay {
    position: relative;
}

.gradient-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
    pointer-events: none;
}

/* Blur Effect */
.blur-xl {
    filter: blur(40px);
}

/* Scale Animation */
@keyframes scale-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-scale-in {
    animation: scale-in 0.4s ease-out;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(251, 191, 36, 0.3);
    border-top: 3px solid #fbbf24;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

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

/* Star Rating */
.star-filled {
    fill: #fbbf24;
    color: #fbbf24;
}

/* Pagination Dot Active */
.pagination-dot {
    transition: all 0.3s ease;
}

.pagination-dot.active {
    width: 3rem;
    background-color: #f59e0b;
}

/* Image Zoom on Hover */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Text Gradient */
.text-gradient {
    background: linear-gradient(to right, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Border Gradient */
.border-gradient {
    border-image: linear-gradient(to right, #fbbf24, #f59e0b) 1;
}

/* Custom Radio Buttons */
input[type="radio"]:checked + label {
    background-color: #fef3c7;
    border-color: #fbbf24;
}

/* Custom Checkbox */
input[type="checkbox"]:checked {
    background-color: #f59e0b;
    border-color: #f59e0b;
}

/* Disabled State */
.disabled,
[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Print Styles */
@media print {
    nav,
    footer,
    button {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    * {
        border-color: currentColor !important;
    }
}

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if needed */
}
