/**
 * Pharmacie Amryate - Main Stylesheet
 * Modern, Professional Pharmacy Design
 */

/* CSS Variables */
:root {
    /* Primary Colors - Pharmacy Teal/Green */
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-300: #5eead4;
    --primary-400: #2dd4bf;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;
    --primary-700: #0f766e;
    --primary-800: #115e59;
    --primary-900: #134e4a;
    
    /* Accent Colors */
    --accent-gold: #f59e0b;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    
    /* Neutrals */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Semantic */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Font Family */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-arabic: 'Cairo', 'Noto Sans Arabic', sans-serif;
}

/* RTL Support for Arabic */
[dir="rtl"] {
    --font-sans: var(--font-arabic);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Language Selection Page */
.language-selector {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.language-selector::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.language-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 50px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: slideUp 0.5s ease;
}

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

.language-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.language-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.language-subtitle {
    color: var(--gray-500);
    margin-bottom: 36px;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.language-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 18px;
    font-weight: 500;
}

.language-btn:hover {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.language-btn:active {
    transform: scale(0.98);
}

.language-btn .flag {
    font-size: 24px;
}

/* Header */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 20px;
    color: var(--primary-700);
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-weight: 500;
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

.nav-link.active {
    color: var(--primary-700);
    background: var(--primary-100);
}

.language-switch {
    margin-left: 16px;
    padding: 8px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
}

.language-switch:hover {
    border-color: var(--primary-500);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    margin: 5px 0;
    transition: all var(--transition);
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        gap: 4px;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .language-switch {
        margin: 16px 0 0;
        width: 100%;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.pharmacy-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    font-size: 14px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.open {
    background: var(--success);
}

.status-dot.closed {
    background: var(--error);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .hero {
        padding: 50px 20px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
}

/* Services Grid */
.services {
    max-width: 1000px;
    margin: -60px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-200);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.service-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.service-desc {
    color: var(--gray-500);
    font-size: 15px;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .services {
        margin-top: -40px;
    }
    
    .service-card {
        padding: 24px;
    }
}

/* Page Container */
.page-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 17px;
}

/* Form Styles */
.form-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-label .required {
    color: var(--error);
    margin-left: 4px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 16px;
    transition: all var(--transition);
    background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 6px;
}

/* File Upload Zone */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--gray-50);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upload-text {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 13px;
    color: var(--gray-500);
}

/* Photo Previews */
.photo-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.photo-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--gray-100);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview .remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all var(--transition);
}

.photo-preview .remove-btn:hover {
    background: var(--error);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 118, 110, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-600);
    color: var(--primary-600);
}

.btn-outline:hover {
    background: var(--primary-50);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 18px;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Screen */
.success-screen {
    text-align: center;
    padding: 60px 30px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--success), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    animation: successPop 0.5s ease;
}

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

.success-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 24px;
}

.tracking-box {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
    color: white;
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.tracking-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.tracking-number {
    font-size: 36px;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
}

.success-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.success-info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--gray-600);
}

.success-info-item .icon {
    font-size: 20px;
}

.success-alert {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
}

.success-alert p {
    color: var(--primary-700);
    font-size: 14px;
}

.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Tracking Page */
.tracking-form {
    display: flex;
    gap: 12px;
    max-width: 450px;
    margin: 0 auto;
}

.tracking-form .form-input {
    flex: 1;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

/* Tracking Result */
.tracking-result {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-top: 30px;
}

.tracking-header {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
    color: white;
    padding: 30px;
    text-align: center;
}

.tracking-id {
    font-size: 32px;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.tracking-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.tracking-body {
    padding: 30px;
}

.tracking-section {
    margin-bottom: 24px;
}

.tracking-section:last-child {
    margin-bottom: 0;
}

.tracking-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.tracking-detail {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.tracking-detail:last-child {
    border-bottom: none;
}

.tracking-detail-label {
    color: var(--gray-500);
}

.tracking-detail-value {
    font-weight: 600;
    color: var(--gray-800);
    text-align: right;
}

.tracking-medications {
    background: var(--gray-50);
    padding: 16px;
    border-radius: var(--radius);
    white-space: pre-line;
    font-size: 15px;
    line-height: 1.8;
}

.tracking-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.tracking-photo {
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
}

.tracking-photo:hover {
    transform: scale(1.05);
}

.tracking-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Not Found */
.not-found {
    text-align: center;
    padding: 60px 20px;
}

.not-found-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.not-found h3 {
    font-size: 24px;
    color: var(--gray-800);
    margin-bottom: 10px;
}

.not-found p {
    color: var(--gray-500);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 50px 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.footer-section p,
.footer-section a {
    color: var(--gray-300);
    line-height: 2;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1000px;
    margin: 30px auto 0;
    padding-top: 30px;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .tracking-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .tracking-form .form-input {
        width: 100%;
        font-size: 16px;
    }
    
    .tracking-form .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    color: var(--primary-800);
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

/* RTL Adjustments */
[dir="rtl"] .form-label .required {
    margin-left: 0;
    margin-right: 4px;
}

[dir="rtl"] .tracking-detail-value {
    text-align: left;
}

[dir="rtl"] .photo-preview .remove-btn {
    right: auto;
    left: 6px;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.back-btn:hover {
    background: var(--gray-50);
    border-color: var(--primary-500);
    color: var(--primary-700);
    transform: translateX(-3px);
    box-shadow: var(--shadow);
}

[dir="rtl"] .back-btn:hover {
    transform: translateX(3px);
}

.back-btn .arrow {
    font-size: 18px;
    transition: transform var(--transition);
}

.back-btn:hover .arrow {
    transform: translateX(-3px);
}

[dir="rtl"] .back-btn .arrow {
    transform: rotate(180deg);
}

[dir="rtl"] .back-btn:hover .arrow {
    transform: rotate(180deg) translateX(-3px);
}

/* Page Top Bar - for back button */
.page-top-bar {
    padding: 16px 0;
    margin-bottom: 8px;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease;
}

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

.slide-up {
    animation: slideUp 0.5s ease;
}

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

.slide-in-left {
    animation: slideInLeft 0.4s ease;
}

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

.slide-in-right {
    animation: slideInRight 0.4s ease;
}

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

.scale-in {
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.bounce-in {
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Staggered animations for lists */
.stagger-item {
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }

/* Hover effects */
.hover-lift {
    transition: transform var(--transition), box-shadow var(--transition);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Enhanced Card Animations */
.form-card,
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-card:hover {
    box-shadow: var(--shadow-xl);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(15, 118, 110, 0.15);
}

/* Button hover animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.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;
}

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

.btn:active {
    transform: scale(0.98);
}

/* Input focus animations */
.form-input,
.form-textarea,
.form-select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    transform: translateY(-2px);
}

/* Success icon pulse */
.success-icon {
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
}

/* Floating animation for icons */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

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

/* Shimmer loading effect */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Page load animation */
.page-container {
    animation: pageLoad 0.5s ease;
}

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

/* Smooth scroll indicator */
.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

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

/* Status badge animation */
.status-badge {
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: scale(1.05);
}

/* Tracking number copy animation */
.tracking-number {
    transition: all 0.3s ease;
    cursor: pointer;
}

.tracking-number:hover {
    transform: scale(1.02);
    background: var(--primary-100);
}

.tracking-number:active {
    transform: scale(0.98);
}

/* Photo upload preview animation */
.preview-item {
    animation: previewIn 0.3s ease;
}

@keyframes previewIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* RTL support for animations */
[dir="rtl"] .slide-in-left {
    animation: slideInRight 0.4s ease;
}

[dir="rtl"] .slide-in-right {
    animation: slideInLeft 0.4s ease;
}

/* Smooth link transitions */
a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* Nav link hover effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* Back button enhanced */
.back-btn {
    transition: all 0.3s ease;
}

.back-btn:hover {
    transform: translateX(-5px);
    color: var(--primary-600);
}

[dir="rtl"] .back-btn:hover {
    transform: translateX(5px);
}

/* Logo animation */
.logo-icon {
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(10deg) scale(1.1);
}

/* Footer links animation */
.footer a {
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.footer a:hover {
    color: var(--primary-400);
    transform: translateX(3px);
}

[dir="rtl"] .footer a:hover {
    transform: translateX(-3px);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Loading spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success checkmark animation */
.success-check {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.5s ease;
}

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

/* Smooth page transitions */
.page-container {
    animation: pageIn 0.4s ease;
}

@keyframes pageIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Card hover effects */
.service-card,
.form-card,
.tracking-result {
    transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

/* Button press effect */
.btn:active {
    transform: scale(0.97);
}

/* Input focus glow */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    animation: focusGlow 0.3s ease;
}

@keyframes focusGlow {
    0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.4); }
    100% { box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1); }
}

/* Print Styles */
@media print {
    .header, .footer, .btn, .no-print, .back-btn {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .tracking-result {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
