/* Custom styles for Palencia Winery Tasting Room */

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

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

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

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection color */
::selection {
    background: #0d9488;
    color: white;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

/* Subtle float animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Pulse animation for the live indicator */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Fade in animation for scroll reveals */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animations only when reduced motion is not preferred */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }

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

    .reveal-delay-1 {
        transition-delay: 0.1s;
    }

    .reveal-delay-2 {
        transition-delay: 0.2s;
    }

    .reveal-delay-3 {
        transition-delay: 0.3s;
    }

    .reveal-delay-4 {
        transition-delay: 0.4s;
    }
}

/* Focus visible styles */
*:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Button hover effects */
button, a {
    transition: all 0.2s ease-in-out;
}

/* Image hover zoom container */
img {
    transition: transform 0.5s ease;
}

/* Card hover lift */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form input focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu,
    button {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    .bg-gradient-to-br {
        background: #1e293b !important;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .bg-teal-700 {
        background-color: ButtonText;
    }

    .text-teal-700 {
        color: ButtonText;
    }
}

/* Landscape mobile optimization */
@media (max-width: 640px) and (orientation: landscape) {
    .min-h-screen {
        min-height: 100vh;
        min-height: 100dvh;
    }

    section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

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

    html {
        scroll-behavior: auto;
    }
}

/* Accessibility: skip to content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0d9488;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Loading state for form submission */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Tablet breakpoint adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .font-display {
        font-size: clamp(2rem, 5vw, 3rem);
    }
}

/* Very large screens */
@media (min-width: 1536px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}

/* Dark mode support (if browser preference is set) */
@media (prefers-color-scheme: dark) {
    /* These will be overridden by our explicit color choices */
}

/* Ensure touch targets are large enough */
@media (pointer: coarse) {
    button,
    a,
    input,
    select,
    textarea {
        min-height: 44px;
        min-width: 44px;
    }
}
