/* Custom CSS for ПчеленМед - Honey Selling Website */

/* Custom Animations */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(245, 158, 11, 0.6);
    }
}

/* Apply animations */
.animate-fade-in-up {
    animation: fade-in-up 1s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Mobile Navigation Styles */
.mobile-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1) !important;
    border-top: 2px solid #d97706 !important;
    z-index: 9999 !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    width: 100% !important;
}

.mobile-menu.hidden {
    display: none !important;
}

.mobile-nav-link {
    display: flex !important;
    align-items: center;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    color: #111827 !important;
    text-decoration: none;
    border-bottom: 2px solid #e5e7eb;
    transition: all 0.2s ease;
    background-color: #ffffff !important;
}

.mobile-nav-link:hover {
    background-color: #fed7aa !important;
    color: #ea580c !important;
}

.mobile-nav-link i {
    color: #d97706 !important;
    font-size: 20px;
}

.mobile-nav-link span {
    color: #111827 !important;
    font-weight: 600;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-menu-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 24px;
    color: #374151;
    transition: color 0.2s ease;
}

.mobile-menu-button:hover {
    color: #d97706;
}

@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
    
    .mobile-menu-button {
        display: none !important;
    }
}

/* Ensure mobile menu works on all screen sizes */
@media (max-width: 767px) {
    .mobile-menu {
        display: block !important;
        position: absolute !important;
        background: white !important;
        width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .mobile-menu-button {
        display: flex !important;
    }
    
    /* Fix for very small screens */
    .mobile-menu {
        font-size: 16px !important;
    }
    
    .mobile-nav-link {
        padding: 18px 20px !important;
        font-size: 18px !important;
        color: #000000 !important;
        background: #ffffff !important;
        border-bottom: 1px solid #cccccc !important;
        display: flex !important;
        align-items: center !important;
        text-decoration: none !important;
        font-weight: bold !important;
    }
    
    .mobile-nav-link i {
        color: #d97706 !important;
        margin-right: 15px !important;
        font-size: 22px !important;
    }
    
    .mobile-nav-link span {
        color: #000000 !important;
        font-weight: bold !important;
    }
    
    .mobile-nav-link:hover,
    .mobile-nav-link:active,
    .mobile-nav-link:focus {
        background-color: #fed7aa !important;
        color: #000000 !important;
    }
}

/* Additional mobile nav fixes */
@media screen and (max-width: 768px) {
    .mobile-menu a {
        color: #000000 !important;
        text-decoration: none !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .mobile-menu .mobile-nav-link {
        background-color: #ffffff !important;
        color: #000000 !important;
        min-height: 60px !important;
        display: flex !important;
        align-items: center !important;
    }
}

/* Background Pattern */
.bg-pattern {
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(217, 119, 6, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
    background-size: 100% 100%;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d97706, #b45309);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #b45309, #92400e);
}

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

/* Navigation Enhancements */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #d97706, #f59e0b);
    transition: width 0.3s ease-in-out;
}

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

/* Mobile menu transitions */
.mobile-menu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

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

.mobile-nav-link {
    transition: all 0.2s ease-in-out;
    transform: translateX(-10px);
    opacity: 0;
}

.mobile-menu.show .mobile-nav-link {
    transform: translateX(0);
    opacity: 1;
}

/* Button Enhancements */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::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.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    position: relative;
    overflow: hidden;
}

/* Card Hover Effects */
.honey-card {
    transform: translateY(0);
    transition: all 0.3s ease-in-out;
}

.honey-card:hover {
    transform: translateY(-5px);
}

.product-card {
    transform: translateY(0);
    transition: all 0.3s ease-in-out;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* Order Button Effects */
.order-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

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

.order-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Form Input Enhancements */
input, textarea {
    transition: all 0.3s ease-in-out;
}

input:focus, textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

/* Custom Grid Animations */
@keyframes grid-item-appear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.grid-item-animate {
    animation: grid-item-appear 0.6s ease-out forwards;
}

.grid-item-animate:nth-child(1) { animation-delay: 0.1s; }
.grid-item-animate:nth-child(2) { animation-delay: 0.2s; }
.grid-item-animate:nth-child(3) { animation-delay: 0.3s; }
.grid-item-animate:nth-child(4) { animation-delay: 0.4s; }

/* Section Dividers */
.section-divider {
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #d97706, #f59e0b, #d97706);
    border-radius: 2px;
}

/* Loading Animation */
@keyframes honeycomb-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.honeycomb-pulse {
    animation: honeycomb-pulse 2s ease-in-out infinite;
}

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

/* Icon Hover Effects */
.icon-hover {
    transition: all 0.3s ease-in-out;
}

.icon-hover:hover {
    transform: scale(1.1) rotate(5deg);
    color: #f59e0b;
}

/* Backdrop Blur Support */
@supports not (backdrop-filter: blur(10px)) {
    .backdrop-blur-md {
        background-color: rgba(255, 255, 255, 0.9);
    }
}

/* Custom Focus States */
*:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print Styles */
@media print {
    .sticky, nav, footer {
        display: none;
    }
    
    .bg-gradient-to-br {
        background: white !important;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .text-honey-600 {
        color: #92400e !important;
    }
    
    .bg-honey-50 {
        background-color: #fffbeb !important;
    }
}

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

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here if needed */
}

/* Performance Optimizations */
.transform-gpu {
    transform: translateZ(0);
    will-change: transform;
}

/* Custom Selection */
::selection {
    background-color: rgba(245, 158, 11, 0.3);
    color: #78350f;
}

::-moz-selection {
    background-color: rgba(245, 158, 11, 0.3);
    color: #78350f;
}

/* Additional Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-honey {
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.1);
}

.border-honey {
    border: 2px solid #f59e0b;
}

.bg-honey-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(217, 119, 6, 0.1) 0%, transparent 50%);
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f59e0b;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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