/* 裝修易 - Premium Modern Design System */

:root {
    /* Sophisticated Color Palette - Luxury Interior Design Theme */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --secondary-color: #f59e0b;
    --secondary-dark: #d97706;
    --secondary-light: #fbbf24;
    
    /* Elegant Accent Colors */
    --accent-emerald: #059669;
    --accent-slate: #475569;
    --accent-rose: #e11d48;
    --accent-indigo: #4f46e5;
    --accent-teal: #0d9488;
    --accent-amber: #f59e0b;
    
    /* Sophisticated 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;
    
    /* Premium Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Professional Gradients */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
    --gradient-emerald: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    --gradient-slate: linear-gradient(135deg, #475569 0%, #64748b 50%, #94a3b8 100%);
    --gradient-luxury: linear-gradient(135deg, #1e40af 0%, #2563eb 25%, #059669 50%, #f59e0b 75%, #e11d48 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --gradient-surface: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    
    /* Advanced Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 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);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-colored: 0 10px 25px -5px rgb(37 99 235 / 0.25);
    --shadow-warm: 0 10px 25px -5px rgb(245 158 11 / 0.25);
    --shadow-emerald: 0 10px 25px -5px rgb(5 150 105 / 0.25);
    
    /* Modern Border Radius */
    --radius-xs: 0.125rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-4xl: 2rem;
    --radius-full: 9999px;
    
    /* Professional Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;
    
    /* Animation System */
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Layout System */
    --navbar-height: 76px;
    --container-max-width: 1400px;
    --content-max-width: 1200px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: 'Inter', 'PingFang TC', 'Microsoft YaHei', 'SF Pro Display', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #ffffff;
    overflow-x: hidden;
    padding-top: var(--navbar-height);
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern Typography System */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    margin-bottom: var(--space-lg);
}

.display-1 { font-size: 6rem; font-weight: 800; line-height: 1; }
.display-2 { font-size: 5.5rem; font-weight: 800; line-height: 1; }
.display-3 { font-size: 4.5rem; font-weight: 800; line-height: 1.1; }
.display-4 { font-size: 3.5rem; font-weight: 700; line-height: 1.1; }
.display-5 { font-size: 3rem; font-weight: 700; line-height: 1.2; }
.display-6 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; }

.h1, h1 { font-size: 2.5rem; }
.h2, h2 { font-size: 2rem; }
.h3, h3 { font-size: 1.75rem; }
.h4, h4 { font-size: 1.5rem; }
.h5, h5 { font-size: 1.25rem; }
.h6, h6 { font-size: 1.125rem; }

p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.6;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Premium Navigation System */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--ease-out);
    padding: var(--space-md) 0;
    z-index: 1050;
    min-height: var(--navbar-height);
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm) 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    background: var(--gradient-luxury);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s var(--ease-out);
    text-decoration: none;
    display: flex;
    align-items: center;
    margin-right: var(--space-2xl);
}

.navbar-brand:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.navbar-brand i {
    background: var(--gradient-secondary) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-size: 1.5rem;
    margin-right: var(--space-sm);
    transition: all 0.3s var(--ease-bounce);
}

.navbar-brand:hover i {
    transform: rotate(5deg) scale(1.1);
}

.navbar-toggler {
    border: none;
    padding: var(--space-sm);
    border-radius: var(--radius-lg);
    transition: all 0.3s var(--ease-out);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px var(--primary-color)20;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: var(--space-md) var(--space-lg);
    color: var(--text-secondary) !important;
    transition: all 0.3s var(--ease-out);
    position: relative;
    border-radius: var(--radius-xl);
    margin: 0 var(--space-xs);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link i {
    color: var(--text-light);
    transition: all 0.3s var(--ease-out);
    margin-right: var(--space-sm);
    font-size: 0.875rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
    transform: translateY(-1px);
}

.navbar-nav .nav-link:hover i,
.navbar-nav .nav-link.active i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: var(--space-sm);
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s var(--ease-out);
    transform: translateX(-50%);
    border-radius: var(--radius-full);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 60%;
}

/* Special Navigation Elements */
.nav-phone {
    background: var(--gradient-emerald) !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: var(--radius-full) !important;
    padding: var(--space-sm) var(--space-lg) !important;
    box-shadow: var(--shadow-emerald);
    margin-left: var(--space-md);
}

.nav-phone:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: var(--shadow-xl);
    color: #ffffff !important;
}

.nav-language {
    background: rgba(37, 99, 235, 0.1) !important;
    border-radius: var(--radius-lg) !important;
    padding: var(--space-sm) var(--space-md) !important;
    transition: all 0.3s var(--ease-out) !important;
}

.nav-language:hover {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.nav-language:hover span,
.nav-language:hover i {
    color: #ffffff !important;
}

/* Modern Dropdown System */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: var(--space-lg);
    margin-top: var(--space-sm);
    border: 1px solid var(--gray-100);
    min-width: 200px;
}

/* Navbar Language Dropdown Specific Styling */
.navbar .dropdown-menu {
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    padding: var(--space-md);
    margin-top: var(--space-sm);
    min-width: 160px;
    background: #ffffff;
}

/* Member dropdown gets special width treatment */
.navbar .dropdown-menu.member-dropdown {
    min-width: 500px;
    border-radius: 28px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0;
    margin-top: 18px;
    backdrop-filter: blur(20px);
}

.navbar .dropdown-item {
    padding: var(--space-sm) var(--space-md);
    transition: all 0.2s var(--ease-out);
    border-radius: var(--radius-md);
    margin: 2px 0;
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.9rem;
}

.navbar .dropdown-item:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: none; /* Remove translateX for navbar */
}

.navbar .dropdown-item i {
    margin-right: var(--space-sm);
    transition: all 0.2s var(--ease-out);
    font-size: 0.85rem;
}

.navbar .dropdown-item:hover i {
    color: #ffffff;
}

/* Hero Section - Sophisticated Design */
.hero-section {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-4xl) 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(5, 150, 105, 0.08) 0%, transparent 50%);
    animation: heroFloat 12s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-20px) rotate(1deg);
        opacity: 0.8;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-stats {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-3xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-2xl);
    transition: all 0.4s var(--ease-out);
}

.hero-stats:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
}

.stat-item {
    text-align: center;
    padding: var(--space-lg);
    transition: all 0.3s var(--ease-out);
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item p {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-bottom: 0;
}

/* Page Header - For non-hero pages */
.page-header {
    background: var(--gradient-hero);
    padding: calc(var(--navbar-height) + var(--space-4xl)) 0 var(--space-4xl) 0;
    margin-top: calc(-1 * var(--navbar-height));
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    animation: heroFloat 8s ease-in-out infinite;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: #ffffff;
    margin-bottom: var(--space-lg);
}

.page-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    margin-bottom: 0;
}

/* Premium Section Layouts */
section {
    padding: var(--space-5xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    background: var(--gradient-luxury);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-lg);
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    margin: var(--space-xl) auto;
}

/* Feature Cards - Premium Design */
.feature-card {
    background: var(--gradient-surface);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-3xl);
    padding: var(--space-2xl);
    text-align: center;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s var(--ease-out);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-xl);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s var(--ease-bounce);
    position: relative;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon i {
    font-size: 2rem;
    color: #ffffff;
}

/* Individual Feature Colors */
.feature-card:nth-child(1) .feature-icon {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-colored);
}

.feature-card:nth-child(2) .feature-icon {
    background: var(--gradient-emerald);
    box-shadow: var(--shadow-emerald);
}

.feature-card:nth-child(3) .feature-icon {
    background: var(--gradient-secondary);
    box-shadow: var(--shadow-warm);
}

/* Premium Button System */
.btn {
    font-weight: 600;
    border-radius: var(--radius-2xl);
    padding: var(--space-lg) var(--space-2xl);
    transition: all 0.3s var(--ease-out);
    border: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-size: 1rem;
    letter-spacing: -0.01em;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s var(--ease-out);
}

.btn:hover::before {
    left: 100%;
}

.btn-lg {
    padding: var(--space-xl) var(--space-3xl);
    font-size: 1.125rem;
    border-radius: var(--radius-3xl);
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-colored);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
    color: #ffffff;
}

.btn-warning {
    background: var(--gradient-secondary);
    box-shadow: var(--shadow-warm);
    color: #ffffff;
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.3);
    color: #ffffff;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px) scale(1.02);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: var(--shadow-colored);
}

/* Portfolio Cards - Luxury Design */
.portfolio-card {
    border-radius: var(--radius-3xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s var(--ease-out);
    background: #ffffff;
    border: 1px solid var(--gray-100);
}

.portfolio-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-2xl);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(5, 150, 105, 0.9) 100%);
    opacity: 0;
    transition: all 0.4s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-hover-content {
    text-align: center;
    transform: translateY(20px);
    transition: all 0.4s var(--ease-out);
}

.portfolio-card:hover .portfolio-hover-content {
    transform: translateY(0);
}

/* CTA Section - Premium Design */
.cta-section {
    background: var(--gradient-luxury);
    position: relative;
    overflow: hidden;
    padding: var(--space-5xl) 0;
}

.cta-bg-effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: ctaFloat 15s ease-in-out infinite;
}

.bg-circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: 5s;
}

.bg-circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 30%;
    animation-delay: 10s;
}

@keyframes ctaFloat {
    0%, 100% { 
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.3;
    }
    50% { 
        transform: translate(30px, -30px) scale(1.1) rotate(180deg);
        opacity: 0.6;
    }
}

/* Premium Form Controls */
.form-control {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-lg) var(--space-xl);
    transition: all 0.3s var(--ease-out);
    background: #ffffff;
    font-size: 1rem;
    line-height: 1.5;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
    background: linear-gradient(135deg, #ffffff 0%, rgba(37, 99, 235, 0.02) 100%);
}

/* Premium Footer */
footer {
    background: var(--gradient-hero) !important;
    color: #ffffff;
    padding: var(--space-5xl) 0 var(--space-2xl);
    margin-top: 0 !important;
}

footer h5, footer h6 {
    color: #ffffff;
    margin-bottom: var(--space-lg);
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s var(--ease-out);
}

footer a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

/* Utility Classes */
.bg-light {
    background: var(--gradient-surface) !important;
}

.text-gradient {
    background: var(--gradient-luxury);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-lift {
    transition: all 0.3s var(--ease-out);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s var(--ease-out) forwards;
    opacity: 0;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s var(--ease-out) forwards;
    opacity: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 var(--space-xl);
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 70px;
        --space-5xl: 3rem;
        --space-4xl: 2.5rem;
        --space-3xl: 2rem;
        --space-2xl: 1.5rem;
    }
    
    body {
        padding-top: var(--navbar-height);
        font-size: 16px;
    }
    
    /* Typography improvements for tablet */
    .display-3 {
        font-size: 2.25rem;
        line-height: 1.1;
    }
    
    .display-4 {
        font-size: 1.875rem;
        line-height: 1.2;
    }
    
    .display-5 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    h1, .h1 { font-size: 2rem; }
    h2, .h2 { font-size: 1.75rem; }
    h3, .h3 { font-size: 1.5rem; }
    
    .lead {
        font-size: 1.125rem;
        line-height: 1.6;
    }
    
    /* Hero section tablet optimization */
    .hero-section {
        min-height: 70vh;
        padding: var(--space-3xl) 0;
        text-align: center;
    }
    
    .hero-content .d-flex {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }
    
    .hero-stats .row {
        justify-content: center;
    }
    
    .hero-stats .col-6 {
        flex: 0 0 auto;
        width: 45%;
        margin-bottom: var(--space-md);
    }
    
    /* Navigation improvements */
    .navbar {
        padding: var(--space-sm) 0;
    }
    
    .navbar-nav .nav-link {
        padding: var(--space-md) var(--space-lg);
        margin: var(--space-xs) 0;
        text-align: center;
        font-size: 1rem;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar-collapse {
        margin-top: var(--space-md);
        background: rgba(255, 255, 255, 0.98);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        padding: var(--space-md);
    }
    
    /* Button improvements for tablet */
    .btn {
        padding: var(--space-md) var(--space-xl);
        font-size: 1rem;
        min-height: 48px;
    }
    
    .btn-lg {
        padding: var(--space-lg) var(--space-2xl);
        font-size: 1.125rem;
        min-height: 52px;
    }
    
    /* Feature cards tablet optimization */
    .feature-card {
        padding: var(--space-xl);
        margin-bottom: var(--space-lg);
        text-align: center;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        margin: 0 auto var(--space-lg);
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    /* Portfolio cards improvements */
    .portfolio-card {
        margin-bottom: var(--space-lg);
    }
    
    .portfolio-image {
        min-height: 200px;
    }
    
    /* Section spacing */
    section {
        padding: var(--space-4xl) 0;
    }
    
    .section-header {
        text-align: center;
        margin-bottom: var(--space-3xl);
    }
    
    /* Form improvements */
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: var(--space-md);
        min-height: 48px;
    }
    
    .form-control-lg {
        font-size: 16px;
        padding: var(--space-lg);
        min-height: 52px;
    }
    
    /* Container padding */
    .container {
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }
}

@media (max-width: 576px) {
    :root {
        --navbar-height: 65px;
        --space-5xl: 2.5rem;
        --space-4xl: 2rem;
        --space-3xl: 1.5rem;
        --space-2xl: 1.25rem;
        --space-xl: 1rem;
    }
    
    body {
        padding-top: var(--navbar-height);
        font-size: 15px;
    }
    
    /* Extra small screen typography */
    .display-3 {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .display-4 {
        font-size: 1.625rem;
        line-height: 1.15;
    }
    
    .display-5 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    h1, .h1 { font-size: 1.75rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.25rem; }
    h4, .h4 { font-size: 1.125rem; }
    
    /* Hero section for extra small screens */
    .hero-section {
        min-height: 60vh;
        padding: var(--space-2xl) 0;
    }
    
    .hero-content {
        text-align: center;
        padding: 0 var(--space-sm);
    }
    
    .hero-stats .col-6 {
        flex: 0 0 auto;
        width: 50%;
        margin-bottom: var(--space-sm);
        padding: var(--space-xs);
    }
    
    .stat-item {
        padding: var(--space-sm);
        margin-bottom: 0;
        min-height: auto;
    }
    
    /* Compact stats for very small screens */
    .stat-item h3 {
        font-size: 1.125rem !important;
        line-height: 1;
        margin-bottom: 0.125rem;
    }
    
    .stat-item p {
        font-size: 0.65rem !important;
        line-height: 1;
        margin-bottom: 0;
    }
    
    /* Reduce hero stats container spacing */
    .hero-stats {
        margin-top: var(--space-md);
        margin-bottom: 0;
    }
    
    .hero-stats .row.g-4 {
        --bs-gutter-x: 0.25rem;
        --bs-gutter-y: 0.25rem;
    }
    
    /* Navigation for extra small screens */
    .navbar-brand {
        font-size: 1.25rem;
        max-width: none;
        white-space: normal;
    }
    
    .navbar-brand span {
        display: inline;
        font-size: 0.9rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: var(--space-sm);
    }
    
    .navbar-nav .nav-link {
        font-size: 1.125rem;
        padding: var(--space-lg);
    }
    
    /* Container extra padding */
    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    
    /* Mobile-first button styling */
    .btn {
        width: 100%;
        margin-bottom: var(--space-md);
        padding: var(--space-lg) var(--space-xl);
        min-height: 52px;
        font-size: 1.125rem;
    }
    
    .btn-sm {
        min-height: 44px;
        font-size: 1rem;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    /* Feature cards mobile optimization */
    .feature-card {
        padding: var(--space-lg);
        margin-bottom: var(--space-xl);
    }
    
    .feature-icon {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    /* Portfolio grid adjustments */
    .portfolio-card {
        margin-bottom: var(--space-xl);
    }
    
    .portfolio-image {
        min-height: 180px;
    }
    
    /* Form stack improvements */
    .row.g-4 > .col-md-6,
    .row.g-4 > .col-lg-4,
    .row.g-4 > .col-lg-6,
    .row.g-4 > .col-lg-8 {
        margin-bottom: var(--space-lg);
    }
    
    .form-floating {
        margin-bottom: var(--space-lg);
    }
    
    /* Section spacing reduction */
    section {
        padding: var(--space-3xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-2xl);
    }
    
    /* Page header adjustments */
    .page-header {
        padding: var(--space-3xl) 0 var(--space-2xl);
    }
    
    /* Sticky elements become static on mobile */
    .sticky-top {
        position: static !important;
        margin-top: var(--space-xl);
    }
    
    /* Contact items stack */
    .contact-item {
        margin-bottom: var(--space-lg);
    }
    
    /* Step sections mobile optimization */
    .step-section {
        margin-bottom: var(--space-2xl);
        padding: var(--space-lg);
    }
    
    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    /* Alert mobile optimization */
    .alert {
        margin-bottom: var(--space-lg);
        padding: var(--space-lg);
        border-radius: var(--radius-lg);
    }
    
    /* Card mobile optimization */
    .card-body {
        padding: var(--space-lg);
    }
    
    /* Navigation dropdown improvements */
    .dropdown-menu {
        box-shadow: var(--shadow-xl);
        border: none;
        margin-top: var(--space-sm);
    }
    
    /* Better touch targets */
    .dropdown-item {
        padding: var(--space-md) var(--space-lg);
        font-size: 1rem;
    }
}

/* Text Wrapping and Overflow Fixes for Mobile */
* {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Specific text elements that need proper wrapping */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
}

p, .lead, .text-muted, .badge, .alert {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
}

/* Navbar brand text wrapping */
.navbar-brand {
    white-space: nowrap;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navigation links text wrapping */
.navbar-nav .nav-link {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: center;
}

/* Button text wrapping */
.btn {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: center;
}

/* Card title and content text wrapping */
.card-title, .card-text, .card-header, .card-body {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Portfolio card text wrapping */
.portfolio-card h5, .portfolio-card p {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
}

/* Feature card text wrapping */
.feature-card h4, .feature-card h5, .feature-card p {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Form labels and inputs text wrapping */
.form-label, .floating-label label, .form-control, .form-select {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Alert and badge text wrapping */
.alert, .badge {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Table text wrapping */
.table td, .table th {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* Dropdown items text wrapping */
.dropdown-item {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Enhanced shadow system */
.shadow-soft {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}

.shadow-strong {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}

/* Enhanced border radius system */
.border-radius-sm {
    border-radius: var(--radius-sm) !important;
}

.border-radius-lg {
    border-radius: var(--radius-lg) !important;
}

.border-radius-xl {
    border-radius: var(--radius-xl) !important;
}

.border-radius-2xl {
    border-radius: var(--radius-2xl) !important;
}

.border-radius-3xl {
    border-radius: var(--radius-3xl) !important;
}

/* Feature cards */
.feature-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--ease-out);
    overflow: hidden;
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Contact icons */
.contact-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
}

/* Section dividers */
.section-divider {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    margin: var(--space-lg) auto;
}

/* Enhanced form styling */
.floating-label {
    position: relative;
}

.floating-label input {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.floating-label label {
    position: absolute;
    top: 0;
    left: 0.75rem;
    padding: 0.375rem 0;
    pointer-events: none;
    transition: all 0.1s ease-in-out;
    transform-origin: 0 0;
}

.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: var(--primary-color);
}

/* Hover lift effect */
.hover-lift {
    transition: all 0.3s var(--ease-out);
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Contact items styling */
.contact-item {
    transition: all 0.3s var(--ease-out);
    border-radius: var(--radius-lg);
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Step sections */
.step-section {
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: var(--space-xl);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
}

/* Renovation cards */
.renovation-card {
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    border-radius: var(--radius-lg) !important;
}

.renovation-card:hover {
    border-color: var(--primary-color) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.renovation-card input[type="radio"]:checked + label {
    color: var(--primary-color);
}

.renovation-card:has(input:checked) {
    border-color: var(--primary-color) !important;
    background: linear-gradient(145deg, #f8fafc 0%, #edf2f7 100%);
}

/* Enhanced accordion styling */
.accordion-item {
    border: none !important;
    margin-bottom: 1rem;
    border-radius: var(--radius-xl) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-button {
    background: var(--white);
    border: none;
    border-radius: var(--radius-xl) !important;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    color: var(--gray-800);
}

.accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: white;
    box-shadow: none;
}

.accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

.accordion-body {
    padding: 1.5rem;
    background: var(--gray-50);
}

/* Form enhancements */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: var(--primary-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

/* Utility classes */
.cursor-pointer {
    cursor: pointer;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Mobile Text Wrapping and Display Fixes */
@media (max-width: 768px) {
    /* Enhanced text wrapping for mobile */
    * {
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Prevent text overflow in containers */
    .container, .container-fluid {
        overflow-x: hidden;
    }
    
    /* Hero section text fixes */
    .hero-section h1, .hero-section h2, .hero-section .display-3, .hero-section .display-4 {
        line-height: 1.2;
        word-spacing: normal;
        letter-spacing: -0.02em;
        margin-bottom: var(--space-lg);
    }
    
    .hero-section p, .hero-section .lead {
        line-height: 1.6;
        margin-bottom: var(--space-lg);
        word-spacing: normal;
    }
    
    /* Navigation text fixes */
    .navbar-brand {
        max-width: 150px;
        font-size: 1.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .navbar-nav .nav-link {
        font-size: 1rem;
        padding: var(--space-md) var(--space-lg);
        white-space: normal;
        text-align: center;
        line-height: 1.4;
    }
    
    /* Button text fixes */
    .btn {
        white-space: normal;
        line-height: 1.4;
        padding: var(--space-md) var(--space-lg);
        min-height: 48px;
        word-spacing: normal;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: var(--space-lg) var(--space-xl);
        min-height: 52px;
        line-height: 1.4;
    }
    
    /* Feature card text fixes */
    .feature-card h4, .feature-card h5 {
        font-size: 1.25rem;
        line-height: 1.3;
        margin-bottom: var(--space-md);
        word-spacing: normal;
    }
    
    .feature-card p {
        font-size: 0.9rem;
        line-height: 1.5;
        word-spacing: normal;
    }
    
    /* Portfolio card text fixes */
    .portfolio-card h5 {
        font-size: 1.125rem;
        line-height: 1.3;
        margin-bottom: var(--space-sm);
        word-spacing: normal;
    }
    
    .portfolio-card p {
        font-size: 0.875rem;
        line-height: 1.5;
        word-spacing: normal;
    }
    
    /* Form text fixes */
    .form-label, .floating-label label {
        font-size: 0.9rem;
        line-height: 1.4;
        word-spacing: normal;
    }
    
    .form-control, .form-select {
        font-size: 16px !important; /* Prevent zoom */
        line-height: 1.4;
        word-spacing: normal;
    }
    
    /* Alert and badge text fixes */
    .alert {
        font-size: 0.9rem;
        line-height: 1.5;
        word-spacing: normal;
        padding: var(--space-lg);
    }
    
    .badge {
        font-size: 0.8rem;
        line-height: 1.3;
        padding: 0.4rem 0.8rem;
        word-spacing: normal;
    }
    
    /* Trust indicators text fixes */
    .hero-content .d-flex small {
        font-size: 0.8rem;
        line-height: 1.3;
        white-space: normal;
        word-spacing: normal;
    }
    
    /* Stats text fixes */
    .stat-item h3 {
        font-size: 1.5rem;
        line-height: 1.1;
        margin-bottom: 0.25rem;
    }
    
    .stat-item p {
        font-size: 0.75rem;
        line-height: 1.2;
        word-spacing: normal;
    }
    
    /* Hero stats mobile optimization */
    .hero-stats {
        margin-top: var(--space-lg);
    }
    
    .hero-stats .row {
        gap: var(--space-sm);
    }
    
    .hero-stats .col-6 {
        padding: var(--space-sm);
    }

    .step-section {
        padding: var(--space-md);
        margin-bottom: var(--space-lg);
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .feature-card {
        padding: var(--space-lg) !important;
        text-align: center;
    }
    
    /* Trust indicators mobile stack */
    .hero-content .d-flex.align-items-center {
        flex-direction: column;
        align-items: center !important;
        gap: var(--space-md);
        text-align: center;
    }
    
    /* Portfolio card improvements */
    .portfolio-hover-content {
        opacity: 1;
        transform: translateY(0);
    }
    
    .portfolio-overlay {
        background: rgba(0, 0, 0, 0.7);
        opacity: 1;
    }
    
    /* Search box mobile friendly */
    .search-box .d-flex {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .search-box .form-control {
        margin-bottom: var(--space-md);
    }
    
    /* Navigation improvements */
    .navbar-toggler {
        border: 2px solid var(--primary-color);
        border-radius: 8px;
        padding: 0.5rem;
        background: transparent;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
        border-color: var(--primary-color);
    }
    
    .navbar-toggler-icon {
        background-image: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
    }
    
    .navbar-toggler-icon::before {
        content: "☰";
        font-size: 1.5rem;
        color: var(--primary-color);
        font-weight: bold;
        line-height: 1;
    }
    
    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
        content: "✕";
        font-size: 1.25rem;
    }
    
    /* Better section spacing */
    .bg-light section {
        padding: var(--space-3xl) 0;
    }
}

/* Portfolio Page Mobile Optimizations */
@media (max-width: 768px) {
    /* Portfolio header improvements */
    .portfolio-header .search-box .d-flex {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .portfolio-header .search-box .form-control {
        margin-bottom: var(--space-md);
        margin-right: 0 !important;
    }
    
    .portfolio-header .search-box .btn {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
    }
    
    /* Portfolio cards mobile layout */
    .portfolio-card {
        margin-bottom: var(--space-xl);
    }
    
    .portfolio-card .btn {
        width: 100%;
        margin-bottom: var(--space-sm);
        min-height: 44px;
        font-size: 0.9rem;
    }
    
    .portfolio-card .btn-lg {
        width: auto;
        min-width: 120px;
        padding: var(--space-md) var(--space-lg);
    }
    
    .portfolio-card .d-flex {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    
    /* Portfolio pagination mobile */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-item {
        margin: 0.125rem;
    }
    
    .pagination .page-link {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.875rem;
        min-width: 44px;
        text-align: center;
    }
    
    /* Portfolio gallery controls */
    .carousel-control-prev,
    .carousel-control-next {
        width: 15%;
        opacity: 0.8;
    }
    
    .carousel-indicators {
        bottom: 10px;
    }
    
    .carousel-indicators button {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        margin: 0 2px;
    }
}

@media (max-width: 576px) {
    /* Portfolio header for very small screens */
    .portfolio-header h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
        margin-bottom: var(--space-md);
    }
    
    .portfolio-header .lead {
        font-size: 1rem !important;
        line-height: 1.5;
    }
    
    /* Portfolio search improvements */
    .search-box .form-control {
        font-size: 16px !important; /* Prevent iOS zoom */
        border-radius: 12px;
        padding: var(--space-md);
    }
    
    .search-box .btn {
        border-radius: 12px;
        font-weight: 600;
        letter-spacing: 0.025em;
    }
    
    /* Portfolio cards very small screens */
    .portfolio-card .p-4 {
        padding: var(--space-lg) !important;
    }
    
    .portfolio-card h5 {
        font-size: 1.125rem !important;
        line-height: 1.3;
        margin-bottom: var(--space-md);
    }
    
    .portfolio-card p {
        font-size: 0.875rem !important;
        line-height: 1.5;
        margin-bottom: var(--space-md);
    }
    
    /* Portfolio meta info mobile */
    .portfolio-meta small {
        font-size: 0.75rem !important;
    }
    
    /* CTA section mobile */
    .portfolio-cta h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: var(--space-md);
    }
    
    .portfolio-cta .lead {
        font-size: 0.95rem !important;
        line-height: 1.5;
    }
    
    .portfolio-cta .btn {
        width: 100%;
        margin-top: var(--space-lg);
        min-height: 52px;
        font-size: 1.125rem;
        font-weight: 600;
    }
}

/* Extra Small Screen Text Optimizations */
@media (max-width: 576px) {
    /* Force text wrapping on all elements */
    * {
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
    }
    
    /* Container overflow prevention */
    .container, .container-fluid, .row, .col, [class*="col-"] {
        overflow-x: hidden;
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* Hero section text optimization for very small screens */
    .hero-section h1, .hero-section .display-3 {
        font-size: 1.75rem !important;
        line-height: 1.2;
        margin-bottom: var(--space-md);
        word-spacing: -0.1em;
        letter-spacing: -0.02em;
    }
    
    .hero-section h2, .hero-section .display-4 {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: var(--space-md);
        word-spacing: normal;
    }
    
    .hero-section p, .hero-section .lead {
        font-size: 1rem !important;
        line-height: 1.6;
        margin-bottom: var(--space-lg);
        word-spacing: normal;
    }
    
    /* Navigation text for very small screens */
    .navbar-brand {
        font-size: 1.125rem !important;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .navbar-nav .nav-link {
        font-size: 1.125rem !important;
        padding: var(--space-lg) var(--space-md);
        line-height: 1.4;
        text-align: center;
        white-space: normal;
    }
    
    /* Button text optimization */
    .btn {
        font-size: 1rem !important;
        line-height: 1.4;
        padding: var(--space-lg) var(--space-xl);
        min-height: 52px;
        white-space: normal;
        width: 100%;
        margin-bottom: var(--space-md);
    }
    
    .btn-sm {
        font-size: 0.9rem !important;
        min-height: 44px;
        padding: var(--space-md) var(--space-lg);
    }
    
    /* Feature and portfolio card text */
    .feature-card h4, .feature-card h5 {
        font-size: 1.125rem !important;
        line-height: 1.3;
        margin-bottom: var(--space-sm);
        text-align: center;
    }
    
    .feature-card p {
        font-size: 0.875rem !important;
        line-height: 1.5;
        text-align: center;
    }
    
    .portfolio-card h5 {
        font-size: 1rem !important;
        line-height: 1.3;
        margin-bottom: var(--space-sm);
    }
    
    .portfolio-card p {
        font-size: 0.8rem !important;
        line-height: 1.5;
    }
    
    /* Form text optimization */
    .form-label, .floating-label label {
        font-size: 0.875rem !important;
        line-height: 1.4;
        white-space: normal;
    }
    
    /* Enhanced form improvements */
    .form-floating > .form-control {
        font-size: 16px !important; /* Prevent zoom on iOS */
        height: auto;
        padding: 1rem 0.75rem 0.5rem 0.75rem;
        line-height: 1.4;
        white-space: normal;
    }
    
    .form-floating > label {
        padding: 1rem 0.75rem;
    }
    
    /* Step section mobile improvements */
    .step-header .d-flex {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .step-number {
        margin-bottom: var(--space-md);
        margin-right: 0;
    }
    
    /* Badge improvements */
    .badge {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    /* Carousel improvements */
    .carousel-control-prev,
    .carousel-control-next {
        width: 15%;
    }
    
    .carousel-indicators {
        bottom: 10px;
    }
    
    /* Dropdown improvements */
    .dropdown-menu {
        min-width: 200px;
        max-width: 90vw;
    }
    
    /* Footer improvements */
    footer .row > div {
        margin-bottom: var(--space-xl);
        text-align: center;
    }
    
    /* Language selector improvements */
    .nav-language {
        justify-content: center;
        margin: var(--space-md) 0;
    }
    
    /* Hero section mobile specific */
    .hero-section .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    
    /* Card improvements */
    .card {
        box-shadow: var(--shadow-md);
        border: none;
    }
    
    .card-header {
        padding: var(--space-lg);
        background: var(--gray-50);
    }
    
    /* Better touch targets */
    .btn, .btn-lg, .btn-sm {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Portfolio grid mobile specific */
    .portfolio-card .card-body {
        padding: var(--space-lg);
    }
    
    /* Navbar brand mobile adjustments */
    .navbar-brand i {
        margin-right: 0.25rem;
    }
    
    /* Chinese text specific fixes */
    [lang="zh"], [lang="zh-HK"], [lang="zh-CN"], [lang="zh-TW"] {
        word-break: break-all !important;
        line-break: anywhere !important;
        overflow-wrap: anywhere !important;
    }
    
    /* Japanese text specific fixes */
    [lang="ja"] {
        word-break: break-all !important;
        line-break: anywhere !important;
        overflow-wrap: anywhere !important;
    }
    
    /* English text specific fixes */
    [lang="en"] {
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        -webkit-hyphens: auto !important;
        -moz-hyphens: auto !important;
    }
    
    /* Global text overflow prevention */
    .text-nowrap {
        white-space: normal !important;
    }
    
    /* Badge and small text elements */
    .badge, .badge-sm, small, .small {
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.3 !important;
    }
    
    /* Dropdown menu text fixes */
    .dropdown-menu {
        white-space: normal !important;
        max-width: 90vw !important;
        word-wrap: break-word !important;
    }
    
    .dropdown-item {
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.4 !important;
    }
    
    /* AI Decorator Mobile Specific Improvements */
    .hero-section-enhanced {
        padding: var(--space-3xl) 0;
    }
    
    .hero-showcase-card {
        margin-bottom: var(--space-lg);
    }
    
    .showcase-before-after {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .showcase-arrow {
        transform: rotate(90deg);
        margin: var(--space-md) 0;
    }
    
    .showcase-before,
    .showcase-after {
        width: 100%;
    }
    
    .hero-stats .col-4 {
        margin-bottom: var(--space-md);
    }
    
    .hero-cta .btn {
        display: block;
        width: 100%;
        margin-bottom: var(--space-md);
    }
    
    /* Before/After images mobile sizing */
    .showcase-before img,
    .showcase-after img {
        max-height: 200px;
        object-fit: cover;
        width: 100%;
    }
    
    /* AI Badge mobile positioning */
    .ai-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Testimonial cards mobile stack */
    .testimonial-card {
        margin-bottom: var(--space-xl);
        padding: var(--space-lg);
        text-align: center;
    }
}

/* Very small screens - below 400px */
@media (max-width: 400px) {
    .navbar-brand {
        font-size: 1.125rem !important;
        max-width: 180px;
    }
    
    .navbar-brand span {
        font-size: 0.85rem !important;
    }
    
    .navbar-brand i {
        font-size: 1rem;
    }
}

/* Ultra small screens - below 320px */
@media (max-width: 320px) {
    .navbar-brand {
        font-size: 1rem !important;
        max-width: 150px;
    }
    
    .navbar-brand span {
        font-size: 0.8rem !important;
        display: none !important; /* Only hide on very small screens */
    }
    
    .navbar-brand i {
        font-size: 1.125rem !important; /* Keep icon visible and slightly larger when text is hidden */
    }
} 