/* ============================================
   EliteConstruct - Modern CSS
   ============================================ */

:root {
    --primary-color: #1a237e;
    --secondary-color: #ff6b35;
    --accent-color: #4fc3f7;
    --dark-bg: #0d1b2a;
    --light-bg: #f5f7fa;
    --text-dark: #2d3748;
    --text-light: #ffffff;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --success-color: #10b981;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    font-weight: 400;
}

[dir="rtl"] body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[dir="ltr"] body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ========== Navigation ========== */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Cairo', 'Poppins', sans-serif;
    color: var(--primary-color) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}

.navbar-brand:hover {
    color: var(--secondary-color) !important;
    transform: scale(1.05);
    transition: var(--transition);
}

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color) !important;
}

.lang-switcher {
    margin-left: 1rem;
}

@media (max-width: 768px) {
    .lang-switcher {
        margin-left: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
    }
}

.lang-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #283593 50%, var(--dark-bg) 100%);
    color: var(--text-light);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero .container {
    width: 100%;
}

.hero .row {
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M0,300 Q300,200 600,300 T1200,300 L1200,600 L0,600 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    font-family: 'Cairo', 'Poppins', sans-serif;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease 0.2s both;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.4s both;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    line-height: 1.8;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--secondary-color), #ff5722);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    animation: fadeInUp 1s ease 0.6s both;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
    font-family: 'Cairo', 'Poppins', sans-serif;
    letter-spacing: 0.5px;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #ff5722, var(--secondary-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    color: white;
}

/* ========== Section Styles ========== */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Cairo', 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    letter-spacing: -1px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), #ff5722);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    font-weight: 400;
}

/* ========== Section Background Pattern ========== */
.section {
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(26,35,126,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,107,53,0.05) 0%, transparent 50%),
        linear-gradient(135deg, rgba(26,35,126,0.02) 0%, rgba(255,107,53,0.02) 100%);
    pointer-events: none;
    z-index: 0;
}

.section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(26,35,126,0.01) 2px, rgba(26,35,126,0.01) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,107,53,0.01) 2px, rgba(255,107,53,0.01) 4px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    animation: background-move 20s linear infinite;
}

@keyframes background-move {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 40px 40px, -40px 40px;
    }
}

.section .container,
.section-title,
.portfolio-grid {
    position: relative;
    z-index: 1;
}

/* ========== Services Cards ========== */
.service-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
    margin-bottom: 2rem;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-card::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: var(--transition);
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.service-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--secondary-color), #ff5722);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    display: block;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(5deg);
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    font-family: 'Cairo', 'Poppins', sans-serif;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 400;
}

/* ========== Portfolio Section Background ========== */
.section {
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(26,35,126,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,107,53,0.05) 0%, transparent 50%),
        linear-gradient(135deg, rgba(26,35,126,0.02) 0%, rgba(255,107,53,0.02) 100%);
    pointer-events: none;
    z-index: 0;
}

.section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(26,35,126,0.01) 2px, rgba(26,35,126,0.01) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,107,53,0.01) 2px, rgba(255,107,53,0.01) 4px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    animation: background-move 20s linear infinite;
}

@keyframes background-move {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 40px 40px, -40px 40px;
    }
}

.section .container {
    position: relative;
    z-index: 1;
}

/* ========== Portfolio Grid ========== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    width: 100%;
    padding: 0;
    position: relative;
    z-index: 1;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    aspect-ratio: 1;
    background: white;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26,35,126,0.1), rgba(255,107,53,0.1));
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
    border-radius: 20px;
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
}

/* Modern Geometric Patterns */
.portfolio-image-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.portfolio-image-1::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 8px,
        rgba(255,255,255,0.15) 8px,
        rgba(255,255,255,0.15) 16px
    );
    animation: slide 25s linear infinite;
    will-change: transform;
}

.portfolio-image-1::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.portfolio-image-1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    clip-path: polygon(0 40%, 100% 0%, 100% 100%, 0% 100%);
}

.portfolio-image-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    position: relative;
}

.portfolio-image-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.2) 0%, transparent 50%);
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.portfolio-image-2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    clip-path: polygon(0 50%, 100% 20%, 100% 100%, 0% 100%);
}

.portfolio-image-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    position: relative;
}

.portfolio-image-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(30deg, rgba(255,255,255,0.12) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.12) 87.5%, rgba(255,255,255,0.12)),
        linear-gradient(150deg, rgba(255,255,255,0.12) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.12) 87.5%, rgba(255,255,255,0.12)),
        linear-gradient(30deg, rgba(255,255,255,0.12) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.12) 87.5%, rgba(255,255,255,0.12)),
        linear-gradient(150deg, rgba(255,255,255,0.12) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.12) 87.5%, rgba(255,255,255,0.12));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
    animation: pattern-shift 8s linear infinite;
}

@keyframes pattern-shift {
    0% {
        background-position: 0 0, 0 0, 40px 70px, 40px 70px;
    }
    100% {
        background-position: 80px 140px, 80px 140px, 120px 210px, 120px 210px;
    }
}

.portfolio-image-3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    clip-path: polygon(0 45%, 100% 15%, 100% 100%, 0% 100%);
}

.portfolio-image-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    position: relative;
}

.portfolio-image-4::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.12) 2px, rgba(255,255,255,0.12) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.12) 2px, rgba(255,255,255,0.12) 4px);
    opacity: 0.6;
    animation: grid-pulse 3s ease-in-out infinite;
}

@keyframes grid-pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
}

.portfolio-image-4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    clip-path: polygon(0 40%, 100% 10%, 100% 100%, 0% 100%);
}

.portfolio-image-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    position: relative;
}

.portfolio-image-5::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 3px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    animation: pulse-ring 3s ease-out infinite;
}

.portfolio-image-5::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 2px solid rgba(255,255,255,0.35);
    border-radius: 50%;
    animation: pulse-ring 3s ease-out infinite 0.5s;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

.portfolio-image-6 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    position: relative;
}

.portfolio-image-6::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
    background-size: 60px 60px;
    animation: diagonal-move 10s linear infinite;
}

@keyframes diagonal-move {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 60px 60px, -60px 60px;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.3;
    }
}

.portfolio-image-6::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    clip-path: polygon(0 50%, 100% 25%, 100% 100%, 0% 100%);
}

@keyframes slide {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(26,35,126,0.95) 0%, rgba(26,35,126,0.7) 30%, rgba(26,35,126,0.3) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 2rem;
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    pointer-events: none;
    border-radius: 20px;
}

.portfolio-item:hover .portfolio-overlay {
    background: linear-gradient(to top, rgba(26,35,126,0.98) 0%, rgba(26,35,126,0.85) 40%, rgba(26,35,126,0.5) 70%, transparent 100%);
    padding: 2.5rem;
}

.portfolio-overlay h3 {
    color: white;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    font-family: 'Cairo', 'Poppins', sans-serif;
    text-shadow: 0 2px 15px rgba(0,0,0,0.5), 0 4px 20px rgba(0,0,0,0.3);
    animation: fadeInUp 0.6s ease-out;
    transform: translateY(0);
}

.portfolio-category {
    color: rgba(255,255,255,0.95);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 600;
    font-family: 'Cairo', 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
    animation: fadeInUp 0.8s ease-out 0.2s both;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Pricing Cards ========== */
.pricing-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    border: 3px solid var(--secondary-color);
    transform: scale(1.05);
}

.pricing-card.featured::before {
    content: 'الأكثر طلباً';
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.85rem;
    font-weight: bold;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.price {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Cairo', 'Poppins', sans-serif;
    color: var(--primary-color);
    margin: 1.5rem 0;
}

.price span {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.pricing-features li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #ecf0f1;
    color: var(--text-secondary);
    font-weight: 400;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: '✓';
    color: var(--secondary-color);
    font-weight: bold;
    margin-left: 0.5rem;
}

/* ========== Contact Form ========== */
.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    width: 100%;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
    font-family: 'Cairo', 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group .row {
    margin-left: -10px;
    margin-right: -10px;
}

.form-group .row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

.form-control {
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
    font-family: 'Cairo', 'Poppins', sans-serif;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
    outline: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--secondary-color), #ff5722);
    color: white;
    padding: 0.8rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    font-family: 'Cairo', 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #ff5722, var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.contact-info {
    background: var(--primary-color);
    color: white;
    padding: 3rem;
    border-radius: 15px;
    min-height: 100%;
    width: 100%;
}

.contact-info h3 {
    color: white;
    font-weight: 700;
    font-family: 'Cairo', 'Poppins', sans-serif;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.contact-info-item {
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-item i {
    font-size: 1.5rem;
    margin-left: 1rem;
    color: var(--secondary-color);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-info-item > div {
    flex: 1;
    min-width: 0;
}

.contact-info-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
    font-family: 'Cairo', 'Poppins', sans-serif;
    font-size: 1rem;
}

.contact-info-item p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    word-break: break-word;
}

/* ========== Footer ========== */
.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 3rem 0 1rem;
}

.footer p {
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.8;
}

.footer h5 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-family: 'Cairo', 'Poppins', sans-serif;
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 400;
}

.footer a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
}

/* ========== Animations ========== */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
}

/* ========== RTL Support ========== */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .navbar-nav .nav-link {
    margin: 0 0.5rem;
}

[dir="rtl"] .contact-info-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .contact-info-item i {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .pricing-card.featured::before {
    right: auto;
    left: -35px;
    transform: rotate(-45deg);
}

/* ========== Responsive Design ========== */

/* Large Tablets and Small Desktops */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .hero-image .fa-cube {
        font-size: 10rem !important;
    }
    
    .hero-image .fa-hammer {
        font-size: 5rem !important;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    .pricing-card {
        padding: 2rem;
    }
    
    .portfolio-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Contact page improvements */
    .contact-form {
        padding: 2.5rem;
    }
    
    .contact-info {
        padding: 2.5rem;
        margin-top: 0;
    }
    
    .contact-form .row > [class*="col-md-6"] {
        margin-bottom: 1.5rem;
    }
    
    /* Home page improvements */
    .hero .row {
        align-items: center;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero h1 {
        text-align: center;
    }
    
    .hero p,
    .hero .lead {
        text-align: center;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .section::before {
        background: 
            radial-gradient(circle at 20% 30%, rgba(26,35,126,0.04) 0%, transparent 45%),
            radial-gradient(circle at 80% 70%, rgba(255,107,53,0.04) 0%, transparent 45%);
    }
    
    .section::after {
        background-size: 35px 35px;
        animation-duration: 22s;
        opacity: 0.4;
    }
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .hero-image .fa-cube {
        font-size: 8rem !important;
    }
    
    .hero-image .fa-hammer {
        font-size: 4rem !important;
    }
    
    /* Home page tablet fixes */
    .hero .row {
        flex-direction: column;
        text-align: center;
    }
    
    .hero .col-lg-6 {
        width: 100%;
        margin-bottom: 2rem;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .hero .col-lg-6:last-child {
        margin-bottom: 0;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero h1 {
        text-align: center;
    }
    
    .hero p,
    .hero .lead {
        text-align: center;
    }
    
    .btn-primary-custom {
        display: block;
        margin: 1.5rem auto 0;
        max-width: 250px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .service-icon {
        font-size: 3rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
    
    .pricing-card.featured {
        transform: scale(1);
        margin-top: 0;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-10px);
    }
    
    .price {
        font-size: 2.5rem;
    }
    
    /* Portfolio page fixes */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .portfolio-item {
        aspect-ratio: 1;
    }
    
    .portfolio-item img,
    .portfolio-item > div {
        height: 100%;
        min-height: 250px;
    }
    
    .portfolio-item > div i {
        font-size: 3rem !important;
    }
    
    .portfolio-overlay {
        padding: 1.5rem;
    }
    
    .portfolio-overlay h3 {
        font-size: 1.3rem;
    }
    
    /* Stats section fixes */
    .row.text-center .col-md-3 {
        margin-bottom: 2rem;
    }
    
    .row.text-center .col-md-3 i {
        font-size: 2.5rem !important;
        margin-bottom: 0.75rem;
    }
    
    .row.text-center .col-md-3 h2 {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem;
    }
    
    .row.text-center .col-md-3 p {
        font-size: 0.95rem;
    }
    
    .contact-form,
    .contact-info {
        padding: 2rem;
        margin-bottom: 2rem;
    }
    
    .contact-form .row > [class*="col-"] {
        margin-bottom: 0;
    }
    
    .contact-form .row > [class*="col-md-6"] {
        margin-bottom: 1.5rem;
    }
    
    .contact-info {
        margin-top: 2rem;
        height: auto;
    }
    
    .contact-info-item {
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
    }
    
    .contact-info-item i {
        margin-bottom: 0.5rem;
    }
    
    .map-container {
        height: 350px;
    }
    
    /* Fix form row spacing on tablet */
    .contact-form .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .contact-form .row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .portfolio-modal {
        padding: 0;
    }
    
    .portfolio-modal-content {
        width: 100%;
        margin: 0;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    
    .portfolio-modal-header {
        padding: 1.2rem;
        position: sticky;
        top: 0;
        z-index: 10;
        border-radius: 10px 10px 0 0;
    }
    
    .portfolio-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .portfolio-modal-close {
        width: 30px;
        height: 30px;
        font-size: 1.3rem;
        top: 0.5rem;
        left: 0.5rem;
    }
    
    .portfolio-modal-body {
        padding: 1.5rem;
        overflow-y: auto;
    }
    
    .portfolio-modal-body h2 {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .portfolio-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .portfolio-info-item {
        padding: 1.2rem;
    }
    
    .portfolio-info-item h4 {
        font-size: 0.85rem;
    }
    
    .portfolio-info-item p {
        font-size: 1rem;
    }
    
    .portfolio-description {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .portfolio-description h4 {
        font-size: 1rem;
    }
    
    .portfolio-description p {
        font-size: 0.95rem;
    }
    
    .success-message-content {
        width: 95%;
        padding: 2rem;
        margin: 20% auto;
    }
    
    .success-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }
    
    .success-icon i {
        font-size: 2.5rem;
    }
    
    .success-message-content h3 {
        font-size: 1.5rem;
    }
    
    .success-message-content p {
        font-size: 1rem;
    }
    
    .btn-success-close {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

/* Mobile Phones */
@media (max-width: 576px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-brand i {
        font-size: 1.2rem !important;
    }
    
    .lang-switcher {
        margin-left: 0.5rem;
    }
    
    .lang-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .hero {
        padding: 80px 0 50px;
    }
    
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero .lead {
        font-size: 1.1rem;
    }
    
    .hero-image {
        margin-top: 1.5rem;
    }
    
    .hero-image .fa-cube {
        font-size: 6rem !important;
    }
    
    .hero-image .fa-hammer {
        font-size: 3rem !important;
    }
    
    .hero .lead {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-primary-custom {
        padding: 0.8rem 2rem;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        margin-bottom: 30px;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .section-title p {
        font-size: 0.95rem;
        margin-top: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
    
    .pricing-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .pricing-card h3 {
        font-size: 1.3rem;
    }
    
    .price {
        font-size: 2rem;
    }
    
    .price span {
        font-size: 1.2rem;
    }
    
    .pricing-features li {
        padding: 0.6rem 0;
        font-size: 0.9rem;
    }
    
    /* Portfolio page mobile fixes */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
        width: 100%;
    }
    
    .portfolio-item {
        aspect-ratio: 1;
        width: 100%;
        min-height: 280px;
    }
    
    .portfolio-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }
    
    .portfolio-item:hover > div {
        transform: scale(1.05);
    }
    
    .portfolio-item:hover > div i {
        transform: scale(1.15) rotate(5deg);
    }
    
    .portfolio-image {
        min-height: 280px;
        border-radius: 15px;
    }
    
    .portfolio-item {
        border-radius: 15px;
    }
    
    .portfolio-overlay {
        padding: 1.5rem;
        opacity: 1 !important;
        background: linear-gradient(to top, rgba(26,35,126,0.92) 0%, rgba(26,35,126,0.65) 30%, rgba(26,35,126,0.25) 60%, transparent 100%);
        z-index: 10;
        border-radius: 15px;
    }
    
    .portfolio-item:hover .portfolio-overlay {
        background: linear-gradient(to top, rgba(26,35,126,0.98) 0%, rgba(26,35,126,0.8) 40%, rgba(26,35,126,0.5) 70%, transparent 100%);
        padding: 1.8rem;
    }
    
    .portfolio-overlay h3 {
        font-size: 1.2rem;
        margin-bottom: 0.4rem;
        font-weight: 700;
        animation: fadeInUp 0.5s ease-out;
    }
    
    .portfolio-category {
        font-size: 0.85rem;
        animation: fadeInUp 0.6s ease-out 0.1s both;
    }
    
    /* Stats section mobile fixes */
    .row.text-center {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row.text-center > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .row.text-center .col-md-3,
    .row.text-center .col-6 {
        margin-bottom: 2rem;
    }
    
    .row.text-center .col-md-3:last-child,
    .row.text-center .col-6:last-child {
        margin-bottom: 0;
    }
    
    .row.text-center .col-md-3 i,
    .row.text-center .col-6 i {
        font-size: 2.5rem !important;
        margin-bottom: 0.75rem;
    }
    
    .row.text-center .col-md-3 h2,
    .row.text-center .col-6 h2 {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem;
        line-height: 1.2;
    }
    
    .row.text-center .col-md-3 p,
    .row.text-center .col-6 p {
        font-size: 0.9rem;
        margin: 0;
    }
    
    /* Home page mobile fixes */
    .hero .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .hero .col-lg-6 {
        padding-left: 0;
        padding-right: 0;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero h1 {
        text-align: center;
    }
    
    .hero p,
    .hero .lead {
        text-align: center;
    }
    
    .btn-primary-custom {
        display: block;
        margin: 0 auto;
        max-width: 250px;
    }
    
    .service-card {
        height: auto;
    }
    
    .section-title {
        padding: 0 1rem;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .section-title p {
        text-align: center;
        padding: 0;
    }
    
    .footer .row {
        text-align: center;
    }
    
    .footer .col-md-4 {
        margin-bottom: 2rem;
    }
    
    .footer .col-md-4:last-child {
        margin-bottom: 0;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-form label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .contact-info {
        padding: 1.5rem;
        margin-top: 2rem;
        height: auto;
    }
    
    .contact-info h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-info-item {
        margin-bottom: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    [dir="rtl"] .contact-info-item {
        align-items: flex-end;
    }
    
    .contact-info-item i {
        font-size: 1.2rem;
        margin-left: 0;
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
    
    [dir="rtl"] .contact-info-item i {
        margin-right: 0;
        margin-left: 0;
    }
    
    .contact-info-item > div {
        width: 100%;
    }
    
    .contact-info-item h4 {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }
    
    .contact-info-item p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-group .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .form-group .row > [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
        margin-bottom: 1.2rem;
    }
    
    .form-group .row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }
    
    .form-control {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
        width: 100%;
    }
    
    textarea.form-control {
        min-height: 100px;
    }
    
    .btn-submit {
        padding: 0.8rem 2rem;
        font-size: 1rem;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .map-container {
        height: 300px;
        margin-top: 1rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer h5 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footer p,
    .footer a {
        font-size: 0.9rem;
    }
    
    .portfolio-modal-content {
        width: 95%;
        margin: 5% auto;
        max-width: 100%;
    }
    
    .portfolio-modal-header {
        padding: 1.2rem;
    }
    
    .portfolio-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .portfolio-modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
        top: 0.75rem;
        left: 0.75rem;
    }
    
    .portfolio-modal-body {
        padding: 1.5rem;
    }
    
    .portfolio-modal-body h2 {
        font-size: 1.5rem;
    }
    
    .portfolio-info-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .portfolio-info-item:last-child {
        margin-bottom: 0;
    }
    
    .portfolio-info-item h4 {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .portfolio-info-item p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .portfolio-description {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .portfolio-description h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .portfolio-description p {
        font-size: 0.95rem;
    }
    
    /* Stats section extra small fixes */
    .row.text-center .col-md-3 i,
    .row.text-center .col-6 i {
        font-size: 2rem !important;
    }
    
    .row.text-center .col-md-3 h2,
    .row.text-center .col-6 h2 {
        font-size: 2rem !important;
    }
    
    .row.text-center .col-md-3 p,
    .row.text-center .col-6 p {
        font-size: 0.85rem;
    }
    
    .success-message-content {
        width: 95%;
        padding: 1.5rem;
        margin: 15% auto;
    }
    
    .success-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1.2rem;
    }
    
    .success-icon i {
        font-size: 2rem;
    }
    
    .success-message-content h3 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .success-message-content p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-success-close {
        padding: 0.7rem 1.8rem;
        font-size: 0.95rem;
        width: 100%;
        max-width: 200px;
    }
}

/* Extra Small Devices */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .btn-primary-custom {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .service-card,
    .pricing-card {
        padding: 1.2rem;
    }
    
    .price {
        font-size: 1.75rem;
    }
    
    .contact-form,
    .contact-info {
        padding: 1.2rem;
    }
    
    .contact-form label {
        font-size: 0.85rem;
    }
    
    .contact-info h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .contact-info-item {
        margin-bottom: 1.2rem;
    }
    
    .contact-info-item i {
        font-size: 1rem;
    }
    
    .contact-info-item h4 {
        font-size: 0.85rem;
    }
    
    .contact-info-item p {
        font-size: 0.85rem;
    }
    
    .form-control {
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
    }
    
    textarea.form-control {
        min-height: 90px;
    }
    
    .btn-submit {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .map-container {
        height: 250px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Landscape Orientation on Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 40px 0;
    }
}

/* Fix for RTL on Mobile */
@media (max-width: 768px) {
    [dir="rtl"] .lang-switcher {
        margin-left: 0;
        margin-right: 0.5rem;
    }
    
    [dir="rtl"] .navbar-nav .nav-link {
        text-align: right;
    }
    
    [dir="ltr"] .navbar-nav .nav-link {
        text-align: left;
    }
}

/* Fix overflow issues */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }
    
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > * {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Contact page specific fixes */
    .contact-form .row,
    .contact-form .form-group .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .contact-form .row > [class*="col-"],
    .contact-form .form-group .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .contact-form .row > [class*="col-md-6"] {
        margin-bottom: 1.2rem;
    }
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
    .btn-primary-custom,
    .btn-submit,
    .btn-success-close,
    .lang-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .navbar-toggler {
        padding: 0.5rem;
        font-size: 1.2rem;
    }
    
    .portfolio-item {
        cursor: pointer;
    }
    
    /* Additional home page fixes */
    .hero {
        min-height: auto;
        display: block;
    }
    
    .hero .container {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Additional fixes for very small screens */
@media (max-width: 400px) {
    .hero {
        padding: 70px 0 40px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .hero .lead {
        font-size: 1rem;
    }
    
    .hero-image .fa-cube {
        font-size: 5rem !important;
    }
    
    .hero-image .fa-hammer {
        font-size: 2.5rem !important;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .btn-primary-custom {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
        max-width: 200px;
    }
    
    /* Portfolio page extra small fixes */
    .portfolio-grid {
        gap: 1rem;
    }
    
    .portfolio-item > div i {
        font-size: 2.5rem !important;
    }
    
    .portfolio-overlay {
        padding: 1rem;
        opacity: 0;
        background: linear-gradient(to top, rgba(26,35,126,0.95), rgba(26,35,126,0.7), transparent);
    }
    
    .portfolio-item:active .portfolio-overlay,
    .portfolio-item:focus .portfolio-overlay {
        opacity: 1;
    }
    
    .portfolio-overlay h3 {
        font-size: 1rem;
        font-weight: 700;
    }
    
    .portfolio-modal {
        padding: 0;
    }
    
    .portfolio-modal-content {
        width: 100%;
        margin: 0;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        overflow-y: auto;
    }
    
    .portfolio-modal-header {
        border-radius: 0;
    }
    
    .portfolio-modal-body {
        padding: 1rem;
    }
    
    .portfolio-info-item {
        padding: 0.8rem;
    }
    
    .portfolio-info-item h4 {
        font-size: 0.75rem;
    }
    
    .portfolio-info-item p {
        font-size: 0.85rem;
    }
    
    .portfolio-description h4 {
        font-size: 0.95rem;
    }
    
    .portfolio-description p {
        font-size: 0.85rem;
    }
    
    /* Stats section extra small */
    .row.text-center .col-md-3 i,
    .row.text-center .col-6 i {
        font-size: 1.75rem !important;
    }
    
    .row.text-center .col-md-3 h2,
    .row.text-center .col-6 h2 {
        font-size: 1.75rem !important;
    }
    
    .row.text-center .col-md-3 p,
    .row.text-center .col-6 p {
        font-size: 0.8rem;
    }
}

/* ========== Loading Animation ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Enhanced Animations ========== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========== Portfolio Modal ========== */
.portfolio-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.portfolio-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 100%;
    max-width: 800px;
    position: relative;
    animation: slideInUp 0.4s ease;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.portfolio-modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
}

.portfolio-modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.portfolio-modal-body {
    padding: 2.5rem;
}

.portfolio-modal-body h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.portfolio-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.portfolio-info-item {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-right: 4px solid var(--secondary-color);
}

.portfolio-info-item h4 {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 700;
    font-family: 'Cairo', 'Poppins', sans-serif;
    letter-spacing: 0.5px;
}

.portfolio-info-item p {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    font-family: 'Cairo', 'Poppins', sans-serif;
}

.portfolio-description {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #ecf0f1;
}

.portfolio-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
    font-weight: 400;
}

/* ========== Enhanced Design Elements ========== */
.navbar-brand {
    position: relative;
    overflow: hidden;
}

.navbar-brand::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: var(--transition);
}

.navbar-brand:hover::before {
    left: 100%;
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(231,76,60,0.1) 0%, transparent 70%);
    transition: var(--transition);
    opacity: 0;
}

.service-card:hover::after {
    opacity: 1;
    top: -100%;
    right: -100%;
}

/* ========== Gradient Text ========== */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== Enhanced Buttons ========== */
.btn-primary-custom {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn-primary-custom:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary-custom span {
    position: relative;
    z-index: 1;
}

/* ========== Map Container ========== */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: relative;
}

.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44,62,80,0.1), rgba(231,76,60,0.1));
    pointer-events: none;
    z-index: 1;
    border-radius: 15px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(20%);
    transition: var(--transition);
}

.map-container:hover iframe {
    filter: grayscale(0%);
}

/* ========== Enhanced Hero Section ========== */
.hero {
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1));
    pointer-events: none;
}

/* ========== Glass Morphism Effect ========== */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========== Smooth Scroll ========== */
html {
    scroll-behavior: smooth;
}

/* ========== Enhanced Portfolio Items ========== */
.portfolio-item {
    cursor: pointer;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44,62,80,0.8), rgba(231,76,60,0.8));
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.portfolio-item:hover::before {
    opacity: 0.3;
}

.portfolio-overlay {
    z-index: 2;
}

/* ========== Success Message Modal ========== */
.success-message-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.success-message-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 15% auto;
    padding: 3rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    animation: slideInDown 0.4s ease;
    border: 2px solid rgba(16, 185, 129, 0.2);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--success-color), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease 0.2s both;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-icon i {
    font-size: 3.5rem;
    color: white;
    animation: checkmark 0.6s ease 0.4s both;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
    }
    50% {
        transform: scale(1.2) rotate(45deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.success-message-content h3 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Cairo', 'Poppins', sans-serif;
}

.success-message-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    font-weight: 400;
}

.btn-success-close {
    background: linear-gradient(135deg, var(--secondary-color), #ff5722);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
    font-family: 'Cairo', 'Poppins', sans-serif;
}

.btn-success-close:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    background: linear-gradient(135deg, #ff5722, var(--secondary-color));
}
