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

/* Instagram Feed Styles */
.instagram-post {
    transition: all 0.3s ease;
    cursor: pointer;
}

.instagram-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading animation for Instagram feed */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.instagram-loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b45309;
}

/* Focus styles for accessibility */
.focus\:ring-amber-500:focus {
    --tw-ring-opacity: 1;
    --tw-ring-color: rgb(245 158 11 / var(--tw-ring-opacity));
}

/* Custom button hover effects */
.btn-primary {
    background-color: #d97706;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
    transform: scale(1);
}

.btn-primary:hover {
    background-color: #b45309;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    transform: scale(1.05);
}

.btn-secondary {
    border: 2px solid white;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: transparent;
}

.btn-secondary:hover {
    background-color: white;
    color: #111827;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
}

/* Instagram grid improvements */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Form styling improvements */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #f59e0b, 0 0 0 4px rgb(245 158 11 / 0.1);
    border-color: transparent;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Mobile language switcher */
    .language-dropdown {
        min-width: 180px;
        max-width: 200px;
        right: 0;
        left: auto;
    }
    
    .language-toggle {
        min-width: 100px;
    }
    
    /* Mobile contact sidebar */
    .contact-sidebar-box {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .contact-sidebar-box h3 {
        font-size: 0.95rem;
    }
    
    .contact-sidebar-box p,
    .contact-sidebar-box a {
        font-size: 0.8rem;
    }
}

/* Loading animation for form submission */
.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.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Instagram feed placeholder styling */
.instagram-placeholder {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Improved gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000 !important;
    }
    
    .bg-gray-50 {
        background-color: #fff !important;
    }
    
    .border-gray-300 {
        border-color: #000 !important;
    }
}

/* Language switcher styling */
.language-btn.active {
    background-color: #f59e0b !important;
    color: white !important;
    font-weight: 600;
}

.language-dropdown {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    min-width: 200px;
    max-width: 250px;
    z-index: 50;
}

.language-dropdown .language-btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
}

.language-toggle {
    transition: all 0.2s ease;
    min-width: 120px;
}

.language-toggle:hover {
    background-color: rgba(245, 158, 11, 0.1);
}

/* Current language indicator */
.current-language {
    font-weight: 600;
    min-width: 2rem;
    text-align: center;
}

/* Contact sidebar boxes - better text wrapping */
.contact-sidebar-box {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.contact-sidebar-box h3 {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.contact-sidebar-box p,
.contact-sidebar-box a {
    font-size: 0.875rem;
    line-height: 1.4;
    word-break: break-word;
}

/* Service area text improvements */
.service-area-text {
    font-size: 0.875rem;
    line-height: 1.4;
    hyphens: auto;
    word-wrap: break-word;
}

/* Multi-language content transitions */
[data-i18n] {
    transition: opacity 0.2s ease;
}

.i18n-loading [data-i18n] {
    opacity: 0.7;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}