/* Custom CSS for Personal Website */

/* General Styles */
body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
}

.text-primary {
    color: #007bff !important;
}

.bg-primary {
    background-color: #007bff !important;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* Header & Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
}

/* Footer */
footer {
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.social-icons a {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: #f8f9fa;
    color: #007bff;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #007bff;
    color: #ffffff;
    transform: translateY(-3px);
}

/* Hero Section */
.hero-section {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-title {
    position: relative;
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #007bff;
}

/* Services Cards */
.service-card {
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card i {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Portfolio Styles */
.portfolio-filter {
    margin-bottom: 30px;
}

.portfolio-filter button {
    border: none;
    background-color: transparent;
    padding: 8px 20px;
    margin: 0 5px 10px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.portfolio-filter button.active,
.portfolio-filter button:hover {
    background-color: #007bff;
    color: #ffffff;
}

.portfolio-item {
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.portfolio-item img {
    transition: all 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* Contact Form */
.contact-form {
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-info-box {
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.contact-info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-info-box i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 15px;
}

/* Resume Page Styles */
.resume-page {
    padding: 2rem 0;
}

.section-title {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #007bff;
}

.section-title h2 {
    color: #007bff;
    font-size: 1.8rem;
}

.timeline {
    position: relative;
    padding: 1rem;
}

.timeline-item {
    border-right: 2px solid #007bff;
    padding: 0 20px 20px 0;
    margin-bottom: 20px;
    position: relative;
}

.timeline-item:before {
    content: '';
    position: absolute;
    right: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
}

.timeline-date {
    color: #6c757d;
    font-style: italic;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-info h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.progress {
    height: 10px;
    border-radius: 5px;
}

.progress-bar {
    background-color: #007bff;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item:after,
.timeline-item:before {
    content: " ";
    display: table;
}

.timeline-item:after {
    clear: both;
}

.timeline-panel {
    position: relative;
    float: right;
    width: 46%;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.timeline-item:nth-child(even) .timeline-panel {
    float: left;
}

.timeline-badge {
    position: absolute;
    top: 16px;
    right: 50%;
    margin-right: -13px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #007bff;
    z-index: 1;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .hero-section {
        padding: 70px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .timeline:before {
        right: 40px;
    }
    
    .timeline-panel {
        width: calc(100% - 90px);
        float: left;
    }
    
    .timeline-item:nth-child(even) .timeline-panel {
        float: left;
    }
    
    .timeline-badge {
        right: 40px;
        margin-right: 0;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
}

/* RTL Specific Styles */
html[dir="rtl"] .timeline:before {
    right: auto;
    left: 50%;
    margin-right: 0;
    margin-left: -1px;
}

html[dir="rtl"] .timeline-panel {
    float: left;
}

html[dir="rtl"] .timeline-item:nth-child(even) .timeline-panel {
    float: right;
}

html[dir="rtl"] .timeline-badge {
    right: auto;
    left: 50%;
    margin-right: 0;
    margin-left: -13px;
}

@media (max-width: 991px) {
    html[dir="rtl"] .timeline:before {
        right: auto;
        left: 40px;
    }
    
    html[dir="rtl"] .timeline-panel {
        float: right;
    }
    
    html[dir="rtl"] .timeline-item:nth-child(even) .timeline-panel {
        float: right;
    }
    
    html[dir="rtl"] .timeline-badge {
        right: auto;
        left: 40px;
        margin-left: 0;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #007bff;
    color: #fff;
    text-align: center;
    line-height: 40px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

html[dir="rtl"] .back-to-top {
    right: auto;
    left: 20px;
}

/* Home Page */
.jumbotron {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Resume Page */
.resume-item {
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.resume-item h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
}

.resume-item h5 {
    color: #007bff;
    font-weight: 500;
    margin-bottom: 10px;
}

/* Services Page */
.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #007bff;
}

/* Portfolio Page */
.portfolio-filter button {
    margin: 0 5px 10px;
    border-radius: 30px;
    padding: 8px 20px;
}

.portfolio-item {
    margin-bottom: 30px;
    transition: all 0.5s ease;
}

.portfolio-item img {
    height: 200px;
    object-fit: cover;
}

/* Contact Page */
.contact-info {
    padding: 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.contact-info:hover {
    background-color: #f8f9fa;
}

.contact-info i {
    color: #007bff;
    margin-bottom: 15px;
}

/* Admin Dashboard */
.admin-sidebar {
    background-color: #343a40;
    min-height: calc(100vh - 56px);
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 5px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-sidebar .nav-link i {
    margin-right: 10px;
}

/* Form Styles */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 1rem;
    }
    
    .portfolio-filter button {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
}

/* RTL Specific Adjustments */
[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* Custom Font Import */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');