/* Main Styles */
:root {
    --coffee-brown: #8B4513;
    --coffee-light: #D2B48C;
    --coffee-dark: #5D4037;
    --cream: #FFF8DC;
    --warm-orange: #FF8C42;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--coffee-dark);
    background-color: var(--cream);
}

/* Navigation */
.nav-link {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    color: var(--coffee-dark);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--coffee-brown);
}

.nav-link.active {
    color: var(--coffee-brown);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background-color: #d65a1a; /* Darker orange for better contrast */
    color: white;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #b84a15; /* Even darker on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    padding: 12px 32px;
    background-color: transparent;
    border: 2px solid #d65a1a; /* Darker orange for better contrast */
    color: #d65a1a; /* Darker orange for better contrast */
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #d65a1a; /* Darker orange for better contrast */
    color: white;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                     url('../images/others/hero-background-coffee.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* Fallback for hero section if image fails to load */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--coffee-brown) 0%, var(--coffee-dark) 100%);
    z-index: -1;
}

/* Service Cards */
.service-card {
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Blog Cards */
.blog-card {
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-3px);
}

/* Blog card links with better contrast */
.blog-card a[href*="/blog/"] {
    color: #d65a1a !important; /* Darker orange for better contrast */
    font-weight: 600;
}

.blog-card a[href*="/blog/"]:hover {
    color: #b84a15 !important; /* Even darker on hover */
    text-decoration: underline;
}

/* Form Styles */
.form-input {
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--coffee-brown);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

/* Metrics Animation */
.metric-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.metric-item:nth-child(2) {
    animation-delay: 0.1s;
}

.metric-item:nth-child(3) {
    animation-delay: 0.2s;
}

.metric-item:nth-child(4) {
    animation-delay: 0.3s;
}

/* Lazy Loading Images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* Chat Widget */
#chat-widget {
    position: fixed;
    z-index: 1000;
}

#chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
}

#chat-button svg {
    width: 1.5rem;
    height: 1.5rem;
}

#chat-window {
    animation: slideInUp 0.3s ease-out;
    z-index: 1001;
}

/* Ensure chat widget doesn't interfere with other fixed elements */
@media screen and (max-width: 767px) {
    #chat-window {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 4rem;
        width: calc(100vw - 2rem);
        margin: 0 1rem;
        max-height: 60vh;
    }
    
    #chat-messages {
        max-height: calc(60vh - 120px);
    }
}

/* Newsletter subscription button with better contrast */
#newsletter-form button[type="submit"] {
    background-color: #d65a1a !important; /* Darker orange for better contrast */
    color: white !important;
    font-weight: 600;
}

#newsletter-form button[type="submit"]:hover {
    background-color: #b84a15 !important; /* Even darker on hover */
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--coffee-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--coffee-brown);
}

/* Selection */
::selection {
    background-color: var(--warm-orange);
    color: white;
}

/* Focus States */
*:focus {
    outline: 2px solid var(--warm-orange);
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.3);
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Special Offers Styles */
.special-offer-card {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.special-offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.special-offer-card::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 ease;
}

.special-offer-card:hover::before {
    left: 100%;
}

.special-offer-modal {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.discount-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(45deg, #FF8C42, #FF6B35);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Filter Button Styles */
.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--coffee-brown);
    background: transparent;
    color: var(--coffee-brown);
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--coffee-brown);
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--coffee-brown);
    color: white;
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3);
}

/* Menu Item Hover Effects */
.menu-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.menu-item img {
    transition: transform 0.3s ease;
}

.menu-item:hover img {
    transform: scale(1.05);
}

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

.order-btn::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 ease;
}

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

.order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Discount Indicator Animation */
#discount-indicator {
    animation: slideInDown 0.5s ease-out;
}

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

/* Success Animation */
.success-checkmark {
    animation: checkmarkBounce 0.6s ease-out;
}

@keyframes checkmarkBounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}