/* Custom CSS for FLUX Zone Coffee */

/* Logo Styling */
.logo-container img {
    transition: transform 0.3s ease, filter 0.3s ease;
    background: transparent;
    mix-blend-mode: multiply;
}

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

/* Remove white background from logo */
nav img[src*="flux-logo"],
footer img[src*="flux-logo"] {
    mix-blend-mode: multiply;
}

/* Hero logo with cream color effect */
.hero-logo {
    mix-blend-mode: normal;
    filter: brightness(0) invert(1);
}

/* Hero Logo Animation */
@keyframes logoGlow {
    0%, 100% {
        filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(245, 230, 211, 0.5));
    }
    50% {
        filter: brightness(0) invert(1) drop-shadow(0 0 40px rgba(245, 230, 211, 0.8));
    }
}

.hero-logo {
    animation: logoGlow 3s ease-in-out infinite;
}

/* Ensure logo color consistency across all screen sizes */
@media (max-width: 768px) {
    .hero-logo {
        filter: brightness(0) invert(1);
        animation: logoGlow 3s ease-in-out infinite;
    }
}

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

/* Body */
body {
    overflow-x: hidden;
}

/* Apply display font to all headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 700;
}

/* Apply Montserrat to all buttons and links styled as buttons */
button,
.btn-primary,
.btn-secondary,
a[class*="btn"],
nav a {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: none;
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    50% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay2 {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    66% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-delay {
    animation: fadeInDelay 1.5s ease-out;
}

.animate-fade-in-delay-2 {
    animation: fadeInDelay2 2s ease-out;
}

/* Fade in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(44, 24, 16, 0.1);
}

/* Navigation Links */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

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

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

/* Mobile Menu Transition */
#mobile-menu {
    transition: max-height 0.3s ease-out;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 300px;
}

/* Buttons */
.btn-primary {
    box-shadow: 0 4px 6px -1px rgba(92, 64, 51, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 10px 15px -3px rgba(92, 64, 51, 0.4);
}

.btn-secondary {
    box-shadow: 0 4px 6px -1px rgba(245, 230, 211, 0.3);
}

/* Experience Cards */
.experience-card {
    transition: all 0.3s ease;
}

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

/* QR Code Container */
#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrcode img,
#qrcode canvas {
    max-width: 100%;
    height: auto !important;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(92, 64, 51, 0.3);
    border-radius: 50%;
    border-top-color: #5C4033;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Image Lazy Loading Effect */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Hero Section Background */
#hero .absolute img {
    animation: slowZoom 20s ease-in-out infinite alternate;
}

@keyframes slowZoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #5C4033;
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #A67C52;
    outline-offset: 2px;
}

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

    section {
        page-break-inside: avoid;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .text-coffee-brown {
        color: #2C1810;
    }

    .text-warm-beige {
        color: #5C4033;
    }
}

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

/* Selection Color */
::selection {
    background-color: #A67C52;
    color: #F5E6D3;
}

::-moz-selection {
    background-color: #A67C52;
    color: #F5E6D3;
}

/* About Section Styles */
#about .relative.mx-auto {
    perspective: 1000px;
}

/* Gradient text effect */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

/* Button hover effects for about section */
#about button:hover {
    transform: translateX(4px);
}

/* Coffee image hover effect */
#about .fade-in:hover img {
    transform: scale(1.05);
    transition: transform 0.6s ease;
}

#about img {
    transition: transform 0.6s ease;
    filter: drop-shadow(0 25px 50px rgba(92, 64, 51, 0.3));
}

#about img:hover {
    filter: drop-shadow(0 30px 60px rgba(92, 64, 51, 0.4));
}

/* Mobile optimization for about section image */
@media (max-width: 768px) {
    #about img {
        filter: drop-shadow(0 15px 30px rgba(92, 64, 51, 0.25));
    }

    #about .rounded-2xl {
        box-shadow: 0 10px 40px rgba(92, 64, 51, 0.15);
    }
}

/* Welcome badge animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#about .inline-block {
    animation: fadeInDown 0.8s ease-out;
}

/* Decorative blur elements animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

#about .blur-3xl,
#about .blur-2xl {
    animation: float 6s ease-in-out infinite;
}

#about .blur-3xl:nth-child(2),
#about .blur-2xl:nth-child(2) {
    animation-delay: 1s;
    animation-duration: 8s;
}

#about .blur-2xl:nth-child(3) {
    animation-delay: 2s;
    animation-duration: 7s;
}

/* Map Styles */
#map {
    z-index: 1;
}

.custom-coffee-marker {
    background: transparent;
    border: none;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(92, 64, 51, 0.3);
}

.leaflet-popup-content {
    margin: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.leaflet-popup-tip {
    background: white;
}

/* Map container styling */
#map .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 4px;
    padding: 2px 6px;
}

/* Ensure map displays correctly */
#map .leaflet-tile-container {
    filter: brightness(0.98) contrast(1.02);
}
