/* ===== Global Styles ===== */
:root {
    --primary-color: #0056b3;
    --secondary-color: #ff8c00;
    --dark-bg: #1a1a1a;
    --light-bg: #f8f9fa;
    --text-dark: #333;
    --text-light: #f0f0f0;
    --accent-color: #17a2b8;
    --border-color: #dee2e6;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    transition: var(--transition);
    overflow-x: hidden;
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-in-out 2.5s forwards;
}

.loading-container {
    text-align: center;
}

.loading-logo {
    width: 150px;
    height: 150px;
    margin-bottom: 30px;
    animation: slideDown 0.8s ease-out;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

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

/* ===== Navigation Bar ===== */
.navbar-custom {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    padding: 1rem 0;
}

body.dark-mode .navbar-custom {
    background: #2a2a2a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 24px;
    color: var(--primary-color) !important;
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.brand-text {
    font-family: 'Cairo', sans-serif;
}

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: var(--transition);
    position: relative;
}

body.dark-mode .navbar-nav .nav-link {
    color: var(--text-light) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.btn-theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    padding: 5px 10px;
}

.btn-theme-toggle:hover {
    transform: rotate(20deg);
}

.language-selector {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

body.dark-mode .language-selector {
    background: #2a2a2a;
    color: var(--text-light);
    border-color: #444;
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 100px 20px 20px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    50% { background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); }
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

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

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.95;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.cta-button {
    background: var(--secondary-color);
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.cta-button:hover {
    background: #ff7700;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 140, 0, 0.4);
}

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

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

/* ===== Section Styles ===== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--primary-color);
}

body.dark-mode .section-title {
    color: var(--accent-color);
}

.title-underline {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 2px;
    animation: expandWidth 0.6s ease-out;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100px;
    }
}

/* ===== About Section ===== */
.about-section {
    background: white;
    transition: var(--transition);
}

body.dark-mode .about-section {
    background: #2a2a2a;
}

.about-image-container {
    position: relative;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.about-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: slideInLeft 0.8s ease-out;
}

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

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-dark);
}

body.dark-mode .about-text {
    color: var(--text-light);
}

.features-list {
    list-style: none;
    margin-top: 30px;
}

.features-list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.6s ease-out;
}

.features-list i {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

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

/* ===== Services Section ===== */
.services-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    transition: var(--transition);
}

body.dark-mode .services-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.service-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    animation: fadeInUp 0.6s ease-out;
}

body.dark-mode .service-card {
    background: #2a2a2a;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    color: var(--secondary-color);
    transform: scale(1.2);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

body.dark-mode .service-title {
    color: var(--accent-color);
}

.service-description {
    color: #666;
    line-height: 1.6;
}

body.dark-mode .service-description {
    color: #aaa;
}

/* ===== Works Section ===== */
.works-section {
    background: white;
    transition: var(--transition);
}

body.dark-mode .works-section {
    background: #2a2a2a;
}

.work-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out;
}

body.dark-mode .work-card {
    background: #2a2a2a;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.work-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: var(--transition);
}

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

.work-content {
    padding: 20px;
}

.work-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

body.dark-mode .work-title {
    color: var(--accent-color);
}

.work-description {
    color: #666;
    line-height: 1.6;
}

body.dark-mode .work-description {
    color: #aaa;
}

/* ===== Contact Section ===== */
.contact-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: var(--transition);
}

.contact-info {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    animation: slideInLeft 0.6s ease-out;
}

.contact-item i {
    font-size: 2rem;
    color: var(--secondary-color);
    min-width: 50px;
    text-align: center;
}

.contact-item h5 {
    font-weight: 700;
    margin-bottom: 5px;
}

.contact-item p {
    margin: 0;
    opacity: 0.95;
}

.contact-item a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--secondary-color);
}

.contact-form {
    animation: slideInRight 0.6s ease-out;
}

.contact-form .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
}

.contact-form .form-control:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.3);
}

.contact-form .btn-primary {
    background: var(--secondary-color);
    border: none;
    width: 100%;
    font-weight: 600;
    transition: var(--transition);
}

.contact-form .btn-primary:hover {
    background: #ff7700;
    transform: translateY(-2px);
}

/* ===== Footer ===== */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 50px 0 20px;
    transition: var(--transition);
}

body.dark-mode .footer {
    background: #0d0d0d;
}

.footer h5 {
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.8;
}

.footer-links a:hover {
    color: var(--secondary-color);
    opacity: 1;
    padding-right: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    opacity: 0.8;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .navbar-nav .nav-link {
        margin: 5px 0;
    }

    .contact-item {
        flex-direction: column;
    }

    .contact-item i {
        min-width: auto;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .service-card,
    .work-card {
        margin-bottom: 20px;
    }
}

/* ===== Scroll Animation ===== */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

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

/* ===== Print Styles ===== */
@media print {
    .navbar-custom,
    .footer,
    .contact-form {
        display: none;
    }
}
