/* Custom Tailwind Configuration */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom Colors - Light Brown Theme */
:root {
    --brown-50: #faf8f6;
    --brown-100: #f5f1eb;
    --brown-200: #e8ddd0;
    --brown-300: #d4c4b0;
    --brown-400: #b8a088;
    --brown-500: #9d7d66;
    --brown-600: #8b6f5a;
    --brown-700: #6b5645;
    --brown-800: #4a3d31;
    --brown-900: #2a221c;
}

/* Font Family */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

.animate-fade-in-up-delay {
    animation: fade-in-up 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-fade-in-up-delay-2 {
    animation: fade-in-up 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Video Background Overlay */
#hero-video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Fallback background if video doesn't load */
section#home {
    background: linear-gradient(135deg, var(--brown-700) 0%, var(--brown-900) 100%);
}

section#home::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(107, 86, 69, 0.6) 0%, rgba(42, 34, 28, 0.7) 100%);
    z-index: 1;
}

/* Ensure video is behind overlay but above background */
#hero-video {
    z-index: 0;
}

/* Content should be above everything */
section#home > div.relative {
    z-index: 10;
}

/* Section Spacing */
section {
    scroll-margin-top: 80px;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--brown-600);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brown-700);
}

/* Button Animations */
button, a[href^="#"] {
    transition: all 0.3s ease;
}

/* Gallery Image Hover Effect */
.gallery-item {
    overflow: hidden;
    position: relative;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 111, 90, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

/* Form Input Focus */
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--brown-600);
    box-shadow: 0 0 0 3px rgba(139, 111, 90, 0.1);
}

/* Count-Up Animation */
.count-up {
    display: inline-block;
}

/* 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);
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
}

/* Loading Animation for Video */
.video-loading {
    background: linear-gradient(135deg, var(--brown-600) 0%, var(--brown-800) 100%);
}

/* Accessibility */
*:focus {
    outline: 2px solid var(--brown-600);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav,
    footer,
    #hero-video {
        display: none;
    }
}

/* Material Catalog Modal Styles */
#material-catalog-modal {
    animation: fadeIn 0.3s ease-out;
}

#material-catalog-modal > div {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.catalog-image-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 0.5rem;
}

.catalog-image-container img {
    max-width: 100%;
    height: auto;
}

