/**
 * CompleteMyLook - Custom Stylesheet
 * 
 * Design System:
 * - Primary: Purple gradient (#6C63FF → #512DA8)
 * - Secondary: Warm gold (#D4AF37 → #B8860B)
 * - Supports: English (LTR) + Arabic (RTL)
 * 
 * Structure:
 * 1. CSS Variables (colors, spacing, transitions)
 * 2. Base styles & typography
 * 3. Components (forms, cards, buttons)
 * 4. Layout sections (header, footer, hero)
 * 5. Responsive (mobile-first approach)
 * 6. RTL overrides
 */

/* ===================================
   CSS VARIABLES & ROOT
   =================================== */

:root {
    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Lora', serif;
    --font-ar-heading: 'Cairo', sans-serif;
    --font-ar-body: 'IBM Plex Sans Arabic', sans-serif;
    
    /* Colors */
    --color-background: #F7F7FB;
    --color-surface: #ffffff;
    --color-text: #2E2E2E;
    --color-text-light: #555555;
    --color-primary: #6C63FF;
    --color-primary-dark: #512DA8;
    --color-secondary: #512DA8;
    --color-warm-gold: #D4AF37;
    --color-warm-gold-dark: #B8860B;
    --color-accent: #f7fafc;
    --color-card-bg: #F9F9FB;
    --color-border: #E6E6E9;
    --color-success: #1F8E6D;
    --color-success-dark: #0E7D57;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-hover: 0 10px 40px rgba(81, 45, 168, 0.25);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Timing */
    --duration-fast: 150ms;
    --duration-medium: 300ms;
    --duration-slow: 600ms;
    --transition: all var(--duration-medium) cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout & Sizing */
    --header-height: 60px;
    --nav-top-mobile: 60px;
    --input-min-height: 48px;
    --color-swatch-size: 32px;
    --loading-spinner-size: 60px;
    --step-icon-size: 44px;
    
    /* Breakpoints */
    --mobile-breakpoint: 768px;
    --tablet-breakpoint: 1024px;
}

/* ===================================
   BASE STYLES & RESETS
   =================================== */

/* General Body Styles */
body {
    font-family: var(--font-primary);
    background: var(--color-background);
    color: var(--color-text);
    margin: 0;
    padding: 2rem;
    line-height: 1.7;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    z-index: -1;
}

/* Responsive media defaults */
img, video {
    max-width: 100%;
    height: auto;
}

/* ===================================
   LAYOUT & CONTAINERS
   =================================== */

/* Container */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 2rem auto;
    background-color: var(--color-surface);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

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

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

/* ===================================
   TYPOGRAPHY
   =================================== */

/* Headings */
h1 {
    font-family: var(--font-secondary);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 2.5rem;
    letter-spacing: -0.5px;
}

h2 {
    font-family: var(--font-secondary);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 3rem 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-accent);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

h3 {
    font-family: var(--font-secondary);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
}

/* ===================================
   FORM CONTROLS & INPUTS
   =================================== */

/* Form Styles */
form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

form > div {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

label span {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Dual Input (Slider + Number) */
.dual-input {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
}

.dual-input input[type="number"] {
    width: 90px;
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    transition: var(--transition);
    appearance: textfield; /* Remove spinner */
    -moz-appearance: textfield; /* Remove spinner in Firefox */
}

/* Remove spinner in Chrome, Safari, Edge */
.dual-input input[type="number"]::-webkit-outer-spin-button,
.dual-input input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dual-input input[type="number"]:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.dual-input input[type="number"]:hover {
    border-color: var(--color-primary);
}

.input-unit {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-light);
    white-space: nowrap;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--color-accent);
    outline: none;
    margin-top: 0.5rem;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-md);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-md);
}

.gender-container,
.style-container {
    grid-column: 1 / -1;
}

.gender-options,
.style-options {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.gender-options input[type="radio"],
.style-options input[type="radio"] {
    display: none;
}

.gender-options label,
.style-options label {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    min-width: 120px;
}

/* Gender selection styling - unified brand gradient */
#male:checked + label,
#female:checked + label {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

#male + label:hover,
#female + label:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* Style options styling */
#style_casual:checked + label,
#style_smart_casual:checked + label,
#style_formal_dressy:checked + label,
#style_streetwear:checked + label,
#style_minimalist:checked + label,
#style_classic:checked + label,
#style_sporty_athleisure:checked + label {
    background: linear-gradient(135deg, var(--color-warm-gold), var(--color-warm-gold-dark));
    color: white;
    border-color: var(--color-warm-gold);
    box-shadow: var(--shadow-md);
}

#style_casual + label:hover,
#style_smart_casual + label:hover,
#style_formal_dressy + label:hover,
#style_streetwear + label:hover,
#style_minimalist + label:hover,
#style_classic + label:hover,
#style_sporty_athleisure + label:hover {
    border-color: var(--color-warm-gold);
    transform: translateY(-2px);
}

/* ===================================
   BUTTONS & CTAS
   =================================== */

input[type="submit"] {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(81, 45, 168, 0.20);
}

input[type="submit"]:active {
    transform: translateY(0);
}

/* ===================================
   CARDS & LAYOUTS
   =================================== */

/* Results Page Styles */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

/* Card Styles */
.card {
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: var(--transition);
}

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

.card:hover::before {
    opacity: 1;
}

/* Look Group */
.outfit-group {
    margin-bottom: 3rem;
    animation: fadeIn 0.6s ease-out;
}

.group-summary {
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0.75rem 0 1.5rem 0;
    padding: 1rem 1.25rem;
    background: var(--color-accent);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-sm);
    font-style: italic;
}

[dir="rtl"] .group-summary {
    border-left: none;
    border-right: 3px solid var(--color-primary);
}

/* ===================================
   RECOMMENDATIONS
   =================================== */

/* Outfit Groups */
.outfit-group {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.outfit-group:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.outfit-group h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 1rem 0;
}

.group-summary {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    max-width: 600px;
}

/* Outfit Items */
.outfit-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.outfit-item {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.outfit-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}


/* Item Image Container */
.item-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.outfit-item:hover .item-image {
    transform: scale(1.05);
}

.item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.5;
}


/* Item Info */
.item-info {
    padding: 1.5rem;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.item-category {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-color {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: capitalize;
}

/* Item Actions */
.item-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.buy-btn {
    flex: 1;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}



/* Empty State */
.no-recommendations {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state {
    max-width: 400px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #1a202c;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.retry-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(81, 45, 168, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .outfit-items {
        grid-template-columns: 1fr;
    }
}

.product-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image::after {
    content: '👕';
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
    z-index: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.recommendation-card:hover .product-image img {
    transform: scale(1.08);
}

.product-image img + .product-image::after {
    display: none;
}

.card-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.recommendation-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
    line-height: 1.4;
    color: #1a202c;
    letter-spacing: -0.01em;
}

.recommendation-card p {
    font-size: 0.95rem;
    color: var(--color-text);
}

.category {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem !important;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(81, 45, 168, 0.2);
}

.color-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background-color: var(--card-accent, transparent);
    flex-shrink: 0;
    position: relative;
}

.color-swatch::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3));
    pointer-events: none;
}

.color-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
    text-transform: capitalize;
    letter-spacing: 0.01em;
}

.buy-button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    margin: 0;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    align-self: stretch;
    position: relative;
    overflow: hidden;
}

.buy-button::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;
}

.buy-button:hover::before {
    left: 100%;
}

.buy-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}

/* Custom File Upload */
#files-container {
    grid-column: 1 / -1;
}

.file-upload-wrapper {
    position: relative;
    margin-top: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 10;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 150px;
    border: 3px dashed #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    background: linear-gradient(135deg, #fafbfc 0%, #f7fafc 100%);
    box-sizing: border-box;
}

.file-upload-wrapper:hover .file-upload-label {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    box-shadow: var(--shadow-md);
}

.file-upload-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    font-weight: 300;
}

.file-upload-text {
    color: var(--color-text-light);
    font-size: 1rem;
    font-weight: 500;
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    z-index: 1000;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 1rem;
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Main Header */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(108, 99, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    transition: all var(--duration-medium) ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.site-header.scrolled .brand-title,
.site-header.scrolled .nav-link {
    color: var(--color-text);
}

.site-header.scrolled .brand-icon {
    color: var(--color-primary);
}

.site-header.scrolled .lang-toggle {
    color: var(--color-text);
    background: var(--color-accent);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    gap: 2rem;
}

/* Brand Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.brand-logo:hover {
    transform: translateY(-2px);
}

.brand-icon {
    width: 32px;
    height: 32px;
    color: white;
    transition: var(--transition);
}

.brand-title {
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
    color: white;
    transition: var(--transition);
}

/* Main Navigation */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.625rem 1.25rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: white;
    transition: transform var(--duration-medium) ease;
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.lang-toggle svg {
    width: 20px;
    height: 20px;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--duration-medium) ease;
    min-width: 150px;
    z-index: 1000;
}

.lang-selector.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.lang-option:hover {
    background: var(--color-accent);
    border-left-color: var(--color-primary);
}

.lang-option.active {
    background: var(--color-accent);
    border-left-color: var(--color-primary);
    font-weight: 600;
    color: var(--color-primary);
}

/* Header CTA Button */
.btn-header-cta {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: white;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: #ffffff;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all var(--duration-medium) ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

.site-header.scrolled .hamburger-line {
    background: var(--color-text);
}

/* Error Message */
.error-message {
    grid-column: 1 / -1;
    background: #FEE2E2;
    color: #7F1D1D;
    padding: 1.25rem;
    border: 2px solid #FCA5A5;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Back Button */
.back-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.75rem;
    background: white;
    color: var(--color-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: 2px solid var(--color-primary);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.back-button:hover {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===================================
   LOADING STATES
   =================================== */

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-medium) ease, visibility var(--duration-medium) ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: white;
    padding: 3rem 4rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: fadeInScale 0.4s ease-out;
    max-width: 500px;
    width: 90%;
}

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

.loading-spinner {
    width: var(--loading-spinner-size);
    height: var(--loading-spinner-size);
    border: 5px solid var(--color-accent);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 0.8s linear infinite;
}

.loading-message {
    color: var(--color-text);
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
}

.loading-submessage {
    color: var(--color-text-light);
    font-size: 0.95rem;
    text-align: center;
    margin-top: -0.75rem;
}

.loading-progress {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--color-accent);
    transition: all var(--duration-medium) ease;
    opacity: 0.6;
    transform: translateX(-10px);
}

.progress-step.active {
    opacity: 1;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    transform: translateX(0);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.progress-step.completed {
    opacity: 1;
    background: var(--color-success);
    color: white;
    transform: translateX(0);
}

.progress-step.completed .step-icon {
    transform: scale(1.1);
}

.step-icon {
    font-size: 1.5rem;
    transition: transform var(--duration-medium) ease;
    min-width: 2rem;
    text-align: center;
}

.step-text {
    font-weight: 500;
    font-size: 0.95rem;
    flex: 1;
}

/* Animation for step transitions */
@keyframes stepPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.progress-step.active .step-icon {
    animation: stepPulse 1.5s ease-in-out infinite;
}

/* RTL Support for Progress Steps */
[dir="rtl"] .progress-step {
    transform: translateX(10px);
}

[dir="rtl"] .progress-step.active,
[dir="rtl"] .progress-step.completed {
    transform: translateX(0);
}

/* ===================================
   RESPONSE DETAILS SECTION
   =================================== */

.response-details {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
}

.response-details h2 {
    color: var(--color-text);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.detail-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.detail-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.detail-card h3 {
    color: var(--color-text);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-info,
.token-stats,
.time-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.model-item,
.token-item,
.time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-accent);
}

.model-item:last-child,
.token-item:last-child,
.time-item:last-child {
    border-bottom: none;
}

.token-item.total,
.time-item.total {
    border-top: 2px solid var(--color-primary);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-weight: 600;
}

.model-label,
.token-label,
.time-label {
    color: var(--color-text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.model-name,
.token-value,
.time-value {
    color: var(--color-text);
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
}

.model-name {
    color: var(--color-primary);
    background: var(--color-accent);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.token-value {
    color: var(--color-success);
}

.time-value {
    color: var(--color-warm-gold);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .detail-card {
        padding: 1rem;
    }
    
    .response-details h2 {
        font-size: 1.3rem;
    }
}

/* Submit Button Loading State */
input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

input[type="submit"].submitting {
    position: relative;
    color: transparent;
}

input[type="submit"].submitting::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Success Message */
.success-message {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
    padding: 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .container {
        padding: 2rem 1.5rem;
        margin: 1rem auto;
        border-radius: var(--radius-md);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    form {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .collection-grid {
        grid-template-columns: 1fr;
    }
    
    .recommendations-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .recommendation-card {
        min-height: 320px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .card-content {
        padding: 1.25rem;
    }
    
    .buy-button {
        margin-top: 1.25rem;
        padding: 0.875rem 1.5rem;
    }
    
    /* Mobile Header Styles */
    .site-header-inner {
        padding: 0.75rem 1rem;
        gap: 1rem;
    }
    
    .brand-icon {
        width: 28px;
        height: 28px;
    }
    
    .brand-title {
        font-size: 1.1rem;
    }
    
    .main-nav {
        position: fixed;
        top: var(--nav-top-mobile);
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all var(--duration-medium) ease;
        max-height: calc(100vh - var(--nav-top-mobile));
        overflow-y: auto;
    }
    
    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .nav-link {
        padding: 1rem 1.25rem;
        color: var(--color-text);
        border-radius: var(--radius-sm);
    }
    
    .nav-link:hover {
        background: var(--color-accent);
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .btn-header-cta {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .lang-dropdown {
        left: auto;
        right: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .gender-options,
    .style-options {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Mobile: Stack slider on top, number input below for easier tap */
    .dual-input {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 0.75rem;
    }
    
    .dual-input input[type="range"] {
        order: 1;
        grid-column: 1;
    }
    
    .dual-input input[type="number"] {
        order: 2;
        grid-column: 1;
        width: 100%;
        font-size: 1.2rem;
        padding: 1rem;
        /* Minimum font size to prevent iOS zoom */
        min-height: var(--input-min-height);
    }
    
    .input-unit {
        order: 2;
        grid-column: 1;
        text-align: center;
        margin-top: -0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    
    .container {
        padding: 1.5rem 1rem;
        margin: 0.5rem auto;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .file-upload-label {
        min-height: 120px;
        padding: 1.5rem;
    }
    
    .file-upload-icon {
        font-size: 2.5rem;
    }
}

/* ===================================
   RTL SUPPORT
   =================================== */

/* RTL Support */
[dir="rtl"] .lang-dropdown {
    left: 0;
    right: auto;
}

[dir="rtl"] .lang-option {
    border-left: none;
    border-right: 3px solid transparent;
}

[dir="rtl"] .lang-option:hover,
[dir="rtl"] .lang-option.active {
    border-left: none;
    border-right-color: var(--color-primary);
}

[dir="rtl"] h2::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .recommendation-card::before {
    left: auto;
    right: 0;
}

/* RTL typography overrides */
[dir="rtl"] body {
    font-family: var(--font-ar-body);
}
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
    font-family: var(--font-ar-heading);
}

[dir="rtl"] .brand-title {
    font-family: var(--font-ar-heading);
}

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

/* ===================================
   ACCESSIBILITY
   =================================== */

/* Focus States for Accessibility */
*:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

input[type="submit"]:focus-visible,
.buy-button:focus-visible,
.back-button:focus-visible {
    outline-color: white;
}

/* ===================================
   LANDING PAGE SECTIONS
   =================================== */

/* Landing Sections */
.hero {
    padding: 6rem 0 4rem 0;
    position: relative;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}
.hero .container {
    background: transparent;
    box-shadow: none;
    text-align: center;
    padding: 0 1rem;
}
.hero-title {
    color: #ffffff;
    margin-top: 0;
    /* Override global h1 gradient text for better contrast on gradient bg */
    -webkit-text-fill-color: #ffffff;
    background: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
}
.hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin: 1rem auto 2rem auto;
    max-width: 820px;
}
.hero-media {
    width: 100%;
    max-width: 860px;
    height: 360px;
    margin: 2rem auto 0 auto;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fafbfc 0%, #f7fafc 100%);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.overlay-bubble {
    position: absolute;
    bottom: 1rem;
    inset-inline-start: 1rem;
    background: #111827;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    max-width: 90%;
    font-weight: 600;
}
.overlay-bubble.small {
    font-size: 0.9rem;
}
.accent-sparkle {
    background: linear-gradient(135deg, #ffffff, #F3E8FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gold-accent {
    background: linear-gradient(135deg, var(--color-warm-gold), #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.cta-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}
.btn {
    display: inline-block;
    padding: 0.9rem 1.6rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    box-shadow: 0 10px 30px rgba(81, 45, 168, 0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(81, 45, 168, 0.35);
}
.btn-secondary {
    background: #ffffff;
    color: var(--color-primary-dark);
    border: 2px solid var(--color-primary-dark);
}
.btn-secondary:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-color: transparent;
}

.btn-gold {
    background: linear-gradient(135deg, var(--color-warm-gold), var(--color-warm-gold-dark));
    color: #ffffff;
    border: 2px solid var(--color-warm-gold);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.25);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(212, 175, 55, 0.35);
    background: linear-gradient(135deg, var(--color-warm-gold-dark), var(--color-warm-gold));
}
.microcopy {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.section {
    padding: 1rem 0;
}
.section-subtitle {
    color: var(--color-text-light);
    text-align: center;
    margin-top: -0.75rem;
}

/* Value Grid */
.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.value-item {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.value-item .challenge {
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.value-item .solution {
    color: var(--color-text-light);
}

/* Smart Engine */
.smart-examples {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
    display: grid;
    gap: 0.75rem;
}
.smart-examples li {
    background: var(--color-accent);
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    border-inline-start: 3px solid var(--color-primary);
}

.smart-examples li:nth-child(2n) {
    border-inline-start-color: var(--color-warm-gold);
}

.smart-examples li:nth-child(2n) .gold-accent {
    color: var(--color-warm-gold);
}
[dir="rtl"] .smart-examples li {
    border-inline-start: none;
    border-inline-end: 3px solid var(--color-primary);
}

[dir="rtl"] .smart-examples li:nth-child(2n) {
    border-inline-end-color: var(--color-warm-gold);
}

/* Before/After Gallery */
.before-after-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.media-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}
.media-placeholder {
    height: 220px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    position: relative;
}
.media-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.media-placeholder.with-bubble { position: relative; }
.media-card .tag {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: #111827;
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-size: 0.8rem;
    z-index: 2;
}
.media-card .tag-success { background: var(--color-success); }

/* Footer Simple */
.footer-simple {
    grid-column: 1 / -1;
    text-align: center;
}
.footer-links { margin-bottom: 0.75rem; }
.footer-links a { color: #ffffff; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* Steps (How It Works) */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0 0 0;
}
.step-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 34px rgba(81, 45, 168, 0.18);
    border-color: var(--color-primary);
}

.step-card:nth-child(2) {
    border-color: var(--color-warm-gold);
}

.step-card:nth-child(2):hover {
    border-color: var(--color-warm-gold-dark);
    box-shadow: 0 12px 34px rgba(212, 175, 55, 0.18);
}
.step-icon {
    width: var(--step-icon-size);
    height: var(--step-icon-size);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.step-card:nth-child(2) .step-icon {
    background: linear-gradient(135deg, var(--color-warm-gold), var(--color-warm-gold-dark));
}

.step-image {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.step-image img {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.step-card:hover .step-image img {
    transform: scale(1.05);
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0 0 0;
}
.feature-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.25rem;
    box-shadow: var(--shadow-sm);
}
.feature-card strong {
    display: block;
    margin: 0.25rem 0 0.5rem 0;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0 0 0;
}
.testimonial-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.testimonial-card {
    border-left: 4px solid var(--color-success);
}
[dir="rtl"] .testimonial-card {
    border-left: none;
    border-right: 4px solid var(--color-success);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #F5EFEA 0%, #FFFFFF 100%);
    padding: 4rem 0;
}
.cta-section .container {
    text-align: center;
}

/* Footer */
.footer {
    background: #512DA8;
    color: #ffffff;
    padding: 3rem 0 2rem 0;
    border-top: 4px solid #6C63FF;
}
.footer .container {
    background: transparent;
    box-shadow: none;
}
.footer a { color: #ffffff; text-decoration: none; }
.footer a:hover { color: var(--color-primary); text-decoration: underline; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}
.footer h4 { margin-top: 0; color: #ffffff; }
.footer ul { list-style: none; padding: 0; margin: 0.5rem 0 0 0; }
.footer li { margin: 0.25rem 0; }
.footer-bottom { grid-column: 1 / -1; margin-top: 1.5rem; opacity: 0.9; }

/* Responsive tweaks for sections */
@media (max-width: 1024px) {
    .hero { padding: 5rem 0 3rem 0; }
}
@media (max-width: 768px) {
    .hero { padding: 4rem 0 2.5rem 0; }
    .cta-buttons { flex-direction: column; }
    .steps { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .before-after-grid { grid-template-columns: 1fr; }
    /* Ensure hero and gallery images scale on phones */
    .hero-media { height: auto; }
    .hero-media img { height: auto; }
    .media-placeholder { height: auto; }
    .media-placeholder img { height: auto; }
}

