/* devKs Welcome Page CSS */

/* Import Arabic font - Tajawal */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* Import English font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700;900&display=swap');

:root {
    --primary-color: #3498db; /* Blue - representing technology */
    --secondary-color: #9b59b6; /* Purple - representing creativity */
    --accent-color: #2ecc71; /* Green accent for highlights */
    --dark-color: #2c3e50; /* Dark blue for text */
    --light-color: #ecf0f1; /* Light background */
    --gray-color: #95a5a6; /* Gray for subtle elements */
    --gradient-1: linear-gradient(135deg, var(--primary-color) 0%, #56CCF2 100%);
    --gradient-2: linear-gradient(135deg, var(--secondary-color) 0%, #8e44ad 100%);
    --gradient-code: linear-gradient(90deg, #333 0%, #444 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Tajawal', Arial, sans-serif;
    height: 100%;
    color: var(--dark-color);
    background: linear-gradient(135deg, var(--light-color) 0%, #dfe6e9 100%);
    overflow-x: hidden;
}

/* Language specific styling */
html[lang="en"][dir="ltr"] body {
    font-family: 'Poppins', Arial, sans-serif;
}

html[lang="ar"][dir="rtl"] body {
    font-family: 'Tajawal', Arial, sans-serif;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

html[dir="ltr"] .language-switcher {
    right: 20px;
    left: auto;
}

html[dir="rtl"] .language-switcher {
    left: 20px;
    right: auto;
}

.language-btn {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    padding: 8px 15px;
    color: var(--primary-color);
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.language-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.language-btn i {
    margin-left: 8px;
    animation: rotate 5s infinite linear;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.welcome-container {
    height: 100%;
    padding: 2rem;
    background: url('bg-pattern.svg') repeat, linear-gradient(135deg, var(--light-color) 0%, #dfe6e9 100%);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Particles background overlay */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.welcome-container > .row {
    position: relative;
    z-index: 2;
}

.logo {
    max-width: 180px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.15));
    transition: all 0.5s ease;
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Services Section */
.services-section {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    overflow: visible;
    opacity: 1 !important; /* Ensure visibility */
    visibility: visible !important;
}

.services-section .row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
    opacity: 1 !important;
    visibility: visible !important;
}

.service-item {
    width: 100%;
}

.service-card {
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
	

    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1 !important; /* Ensure visibility */
    visibility: visible !important;
    min-height: 250px; /* Minimum height to avoid layout issues */
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 240, 255, 0.9) 100%);
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    margin-bottom: 1.5rem;
    color: white;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(10deg);
}

.service-card h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.service-card p {
    color: var(--gray-color);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 0;
}

/* Code Animation */
.code-container {
    width: 100%;
    max-width: 700px;
    margin: 2rem auto;
    border-radius: 10px;
    overflow: hidden;
}

.code-block {
    background: var(--gradient-code);
    padding: 1.5rem;
    color: #f8f8f2;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.code-line {
    margin-bottom: 0.25rem;
    white-space: pre;
    animation: typeCode 2s linear;
}

@keyframes typeCode {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

.keyword {
    color: #ff79c6;
}

.function {
    color: #50fa7b;
}

.variable {
    color: #8be9fd;
}

.string {
    color: #f1fa8c;
}

.number {
    color: #bd93f9;
}

/* Contact Form */
.contact-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.contact-form .form-control {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    background-color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    height: auto;
}

.contact-form textarea.form-control {
    min-height: 150px;
}

.contact-form .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
    border-color: var(--primary-color);
    background-color: white;
}

.contact-form .btn {
    border-radius: 50px;
    padding: 1rem 3rem;
    background: var(--gradient-1);
    border: none;
    color: white;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    font-size: 1.1rem;
}

.contact-form .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.5);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient-1);
    color: white;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    background: var(--gradient-2);
    transform: translateY(-5px) rotate(10deg) scale(1.2);
    color: white;
    box-shadow: 0 10px 25px rgba(155, 89, 182, 0.4);
}

/* Typography */
h1.display-4 {
    position: relative;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
    letter-spacing: 1px;
    font-weight: 800;
}

h1.display-4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 3px;
}

h2 {
    color: var(--secondary-color);
    font-weight: 700;
}

h3 {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 3px;
}

/* Footer text styling */
.footer-text {
    font-size: 0.9rem;
    color: var(--gray-color);
    opacity: 0.8;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes fadeInRotate {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-30deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Success and error messages */
.alert-success {
    background-color: var(--accent-color);
    color: white;
    border-radius: 10px;
    padding: 1rem;
    animation: fadeInScale 0.4s ease;
    border: none;
}

.alert-danger {
    background-color: #e74c3c;
    color: white;
    border-radius: 10px;
    padding: 1rem;
    animation: fadeInScale 0.4s ease;
    border: none;
}

@keyframes fadeInScale {
    0% { 
        opacity: 0; 
        transform: scale(0.8);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
    }
}

/* Added for RTL/LTR support */
html[dir="ltr"] .form-control {
    text-align: left;
}

html[dir="rtl"] .form-control {
    text-align: right;
}

.loaded body {
    animation: fadein 1s ease;
}

@keyframes fadein {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Responsive styles */
@media (max-width: 1200px) {
    .services-section .row {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 20px;
    }
}

@media (max-width: 768px) {
    h1.display-4 {
        font-size: 2.3rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .welcome-container {
        padding: 1rem;
        overflow-x: hidden;
    }
    
    .service-card {
        padding: 1.5rem 1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .code-block {
        font-size: 0.8rem;
        padding: 1rem;
    }
    
    .services-section .row {
        grid-template-columns: 1fr;
        grid-gap: 15px;
    }
}

@media (max-width: 576px) {
    .services-section .row {
        grid-gap: 10px;
    }
}
