/* Custom animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes blob {
    0%, 100% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

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

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

/* Animation classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-blob {
    animation: blob 7s infinite;
}

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

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

/* Blob styles */
.blob {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: blob 7s infinite;
}

.blob-1 {
    animation-delay: 0s;
}

.blob-2 {
    animation-delay: 0s;
}

.blob-3 {
    animation-delay: 0s;
}

/* Header transition */
.header-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #E5E7EB;
}

/* Language toggle */
.lang-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: #F3F4F6;
    border-radius: 9999px;
    padding: 4px;
}

.lang-option {
    padding: 8px 16px;
    border-radius: 9999px;
    transition: all 0.3s;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

.lang-option.active {
    background: #25D366;
    color: white;
}

/* RTL support */
[dir="rtl"] {
    font-family: 'Cairo', sans-serif;
}

[dir="ltr"] {
    font-family: 'Inter', sans-serif;
}

/* RTL utilities */
[dir="rtl"] .rtl\:ml-auto {
    margin-left: auto;
}

[dir="rtl"] .rtl\:mr-auto {
    margin-right: auto;
}

[dir="rtl"] .rtl\:pl-4 {
    padding-left: 1rem;
}

[dir="rtl"] .rtl\:pr-4 {
    padding-right: 1rem;
}

[dir="rtl"] .rtl\:text-right {
    text-align: right;
}

[dir="rtl"] .rtl\:text-left {
    text-align: left;
}

/* Code syntax highlighting */
.code-block {
    background: #1F2937;
    color: #F9FAFB;
    border-radius: 12px;
    padding: 24px;
    overflow-x: auto;
}

.code-keyword { color: #F59E0B; }
.code-string { color: #10B981; }
.code-comment { color: #6B7280; }
.code-function { color: #3B82F6; }

/* Pricing calculator */
.price-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #E5E7EB;
    outline: none;
    width: 100%;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #25D366;
    cursor: pointer;
}

.price-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #25D366;
    cursor: pointer;
    border: none;
}

/* Country buttons */
.country-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    border-radius: 12px;
    border: 2px solid #E5E7EB;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.country-btn:hover {
    border-color: #25D366;
    background: #F0FDF4;
}

.country-btn.active {
    border-color: #25D366;
    background: #F0FDF4;
}

/* World map background */
.world-map-bg {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 500" opacity="0.1"><path d="M100 100 L200 100 L200 200 L100 200 Z M300 150 L400 150 L400 250 L300 250 Z M500 80 L600 80 L600 180 L500 180 Z M700 120 L800 120 L800 220 L700 220 Z" fill="%23075E54"/></svg>');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Documentation navigation */
.docs-nav .nav-section {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    border-radius: 8px;
    color: #6B7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.docs-nav .nav-section:hover {
    background: #F3F4F6;
    color: #374151;
}

.docs-nav .nav-section.active {
    background: #E8F5E9;
    color: #25D366;
}

.docs-nav .nav-section svg {
    margin-right: 8px;
}

.docs-section {
    display: none;
}

.docs-section.active {
    display: block;
}

/* Blog filters */
.category-filter {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #E5E7EB;
    background: white;
    color: #6B7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-filter:hover {
    border-color: #25D366;
    color: #25D366;
}

.category-filter.active {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

/* FAQ */
.faq-item .faq-question svg {
    transition: transform 0.3s;
}

.faq-item .faq-question[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.faq-answer {
    transition: all 0.3s;
}

/* Copy button */
.copy-btn {
    cursor: pointer;
    user-select: none;
}

.copy-btn:hover {
    opacity: 0.8;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .blob {
        width: 60%;
        height: 60%;
    }

    .code-block {
        padding: 16px;
        font-size: 14px;
    }

    .lang-toggle {
        padding: 2px;
    }

    .lang-option {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .animate-float,
    .animate-blob,
    .animate-fade-in,
    .animate-slide-up {
        animation: none;
    }
}

/* Focus states */
.focus-visible:focus {
    outline: 2px solid #25D366;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .code-block {
        background: #0F172A;
    }
}
