/*
Theme Name: همراه افشین فر
Author: فرهاد افشین فر
Description: قالب شخصی و خدماتی موبایل افشین فر
Version: 1.0
Text Domain: afshinfar
*/

@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Vazir', Tahoma, Arial, sans-serif; }
html, body { overflow-x: hidden; width: 100%; max-width: 100%; }
body { background-color: #17a2b8; position: relative; min-height: 100vh; }

/* پس‌زمینه متحرک */
.background-dots { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.dot { position: absolute; width: 4px; height: 4px; background-color: rgba(255, 255, 255, 0.3); border-radius: 50%; animation: floatDot 15s infinite ease-in-out; }
@keyframes floatDot { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(10px, 10px); } 50% { transform: translate(0, 20px); } 75% { transform: translate(-10px, 10px); } }

/* انیمیشن پس‌زمینه گرادیانت */
.gradient-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; background: linear-gradient(45deg, #17a2b8, #138496, #0f6674, #138496); background-size: 400% 400%; animation: gradientBG 15s ease infinite; }
@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* انیمیشن‌های اصلی */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInLeft { from { transform: translateX(-50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rotateIn { from { transform: rotate(-15deg) scale(0.8); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-20px); } 60% { transform: translateY(-10px); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); } 20%, 40%, 60%, 80% { transform: translateX(5px); } }

/* انیمیشن‌های خروج */
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes slideOutDown { from { transform: translateY(0); opacity: 1; } to { transform: translateY(50px); opacity: 0; } }
@keyframes zoomOut { from { transform: scale(1); opacity: 1; } to { transform: scale(0.5); opacity: 0; } }
@keyframes rotateOut { from { transform: rotate(0) scale(1); opacity: 1; } to { transform: rotate(15deg) scale(0.8); opacity: 0; } }

/* استایل‌های اصلی */
.container { display: flex; flex-direction: column; width: 90%; max-width: 1200px; margin: 50px auto; background-color: #333; border-radius: 15px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); position: relative; z-index: 1; overflow: hidden; animation: fadeIn 1s ease-out; transition: box-shadow 0.5s ease, transform 0.5s ease; }
.container:hover { box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4); transform: translateY(-5px); }
.sidebar { width: 100%; background-color: #2d2d2d; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; overflow: hidden; }
.sidebar::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at top right, rgba(23, 162, 184, 0.2), transparent 70%); z-index: 0; }
.profile-img { width: 150px; height: 150px; border-radius: 50%; overflow: hidden; margin-bottom: 20px; border: 5px solid rgba(255, 255, 255, 0.1); position: relative; z-index: 1; animation: zoomIn 1s ease-out 0.3s both; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); transition: transform 0.5s ease, box-shadow 0.5s ease; }
.profile-img:hover { transform: scale(1.05); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3); }
.profile-img::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, rgba(23, 162, 184, 0.3), transparent); z-index: 2; opacity: 0; transition: opacity 0.5s ease; }
.profile-img:hover::after { opacity: 1; }
.profile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.profile-img:hover img { transform: scale(1.1); }
.name { color: #f5f5f5; font-size: 28px; margin-bottom: 5px; position: relative; z-index: 1; animation: slideInUp 1s ease-out 0.5s both; }
.title { color: #17a2b8; font-size: 16px; margin-bottom: 25px; position: relative; z-index: 1; animation: slideInUp 1s ease-out 0.7s both; }
.social-icons { display: flex; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; position: relative; z-index: 1; animation: fadeIn 1s ease-out 0.9s both; }
.social-icons a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background-color: rgba(255, 255, 255, 0.1); border-radius: 50%; margin: 5px; color: #fff; text-decoration: none; transition: all 0.3s ease; position: relative; overflow: hidden; }
.social-icons a::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #17a2b8; border-radius: 50%; transform: scale(0); transition: transform 0.5s ease; z-index: -1; }
.social-icons a:hover { transform: translateY(-3px); color: #fff; }
.social-icons a:hover::before { transform: scale(1); }
.social-icons a i { transition: transform 0.3s ease; }
.social-icons a:hover i { transform: scale(1.2); }
.website-links { display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; position: relative; z-index: 1; }
.website-links a { display: inline-block; padding: 8px 15px; margin: 5px 0; background-color: rgba(255, 255, 255, 0.1); border-radius: 5px; color: #fff; text-decoration: none; transition: all 0.3s ease; font-size: 14px; width: 100%; max-width: 200px; text-align: center; }
.website-links a:hover { background-color: #17a2b8; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); }
.download-btn { display: inline-block; padding: 10px 30px; background-color: transparent; border: 2px solid #17a2b8; border-radius: 30px; color: #fff; text-decoration: none; font-size: 14px; transition: all 0.5s ease; position: relative; z-index: 1; overflow: hidden; animation: fadeIn 1s ease-out 1.1s both; }
.download-btn::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #17a2b8; z-index: -1; transform: scaleX(0); transform-origin: right; transition: transform 0.5s ease; }
.download-btn:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(23, 162, 184, 0.4); }
.download-btn:hover::before { transform: scaleX(1); transform-origin: left; }
.copyright { margin-top: 20px; color: #777; font-size: 12px; position: relative; z-index: 1; animation: fadeIn 1s ease-out 1.3s both; }

.main-content { width: 100%; padding: 30px 20px; color: #f5f5f5; position: relative; overflow: hidden; }
.main-content::before { content: ''; position: absolute; top: 0; right: 0; width: 100%; height: 100%; background: radial-gradient(circle at bottom left, rgba(23, 162, 184, 0.1), transparent 70%); z-index: 0; }
.section { display: none; opacity: 0; animation: fadeIn 0.5s ease-out forwards; position: relative; z-index: 1; }
.section.active { display: block; opacity: 1; }
.section-title { font-size: 36px; color: #f5f5f5; margin-bottom: 20px; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -10px; right: 0; width: 50px; height: 3px; background-color: #17a2b8; transition: width 0.5s ease; }
.section.active .section-title::after { width: 100px; animation: slideInRight 1s ease-out; }
.section-subtitle { font-size: 20px; color: #17a2b8; margin-bottom: 30px; animation: slideInUp 1s ease-out 0.3s both; }
.navigation { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10; background-color: #333; border-radius: 30px; padding: 10px 20px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); animation: fadeIn 1s ease-out 1.5s both; display: flex; }
.nav-item { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 5px; color: #fff; text-decoration: none; font-size: 18px; border-radius: 50%; transition: all 0.3s ease; position: relative; overflow: hidden; }
.nav-item::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #17a2b8; border-radius: 50%; transform: scale(0); transition: transform 0.5s ease; z-index: -1; }
.nav-item:hover, .nav-item.active { color: #fff; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); }
.nav-item:hover::before, .nav-item.active::before { transform: scale(1); }
.nav-item i { transition: transform 0.3s ease; }
.nav-item:hover i, .nav-item.active i { transform: scale(1.2); }
.about-text { line-height: 1.8; margin-bottom: 30px; position: relative; }
.section.active .about-text { animation: fadeIn 1s ease-out 0.5s both; }
.info-list { display: grid; grid-template-columns: 1fr; gap: 15px; margin-bottom: 30px; }
.section.active .info-list { animation: fadeIn 1s ease-out 0.7s both; }
.info-item { display: flex; transition: transform 0.3s ease; }
.info-item:hover { transform: translateX(5px); }
.info-title { font-weight: bold; margin-left: 10px; color: #17a2b8; }

/* استایل‌های مهارت‌ها */
.skills-container { margin-top: 30px; }
.section.active .skills-container { animation: fadeIn 1s ease-out 0.9s both; }
.skill-item { margin-bottom: 20px; transition: transform 0.3s ease; }
.skill-item:hover { transform: translateX(5px); }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 5px; }
.skill-name { font-weight: bold; }
.skill-percent { color: #17a2b8; }
.skill-progress { height: 10px; background-color: #444; border-radius: 5px; overflow: hidden; position: relative; }
.skill-progress::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent); animation: shimmer 2s infinite; transform: translateX(-100%); }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skill-progress-bar { height: 100%; background: linear-gradient(90deg, #17a2b8, #138496); border-radius: 5px; width: 0; transition: width 1.5s cubic-bezier(0.1, 0.5, 0.1, 1); position: relative; overflow: hidden; }

/* استایل‌های خدمات */
.services-container { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 30px; }
.section.active .services-container { animation: fadeIn 1s ease-out 1.1s both; }
.service-item { background-color: #2d2d2d; padding: 25px; border-radius: 15px; transition: all 0.5s ease; position: relative; overflow: hidden; z-index: 1; }
.service-item::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, rgba(23, 162, 184, 0.1), transparent); z-index: -1; opacity: 0; transition: opacity 0.5s ease; }
.service-item:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); }
.service-item:hover::before { opacity: 1; }
.service-icon { font-size: 36px; color: #17a2b8; margin-bottom: 15px; transition: transform 0.5s ease; }
.service-item:hover .service-icon { transform: scale(1.2) rotate(10deg); animation: pulse 2s infinite; }
.service-title { font-size: 18px; margin-bottom: 15px; position: relative; padding-bottom: 10px; }
.service-title::after { content: ''; position: absolute; bottom: 0; right: 0; width: 30px; height: 2px; background-color: #17a2b8; transition: width 0.5s ease; }
.service-item:hover .service-title::after { width: 50px; }
.service-description { color: #aaa; font-size: 14px; line-height: 1.6; }

/* استایل‌های رزومه */
.timeline-container { position: relative; margin-top: 30px; padding-right: 30px; }
.section.active .timeline-container { animation: fadeIn 1s ease-out 0.5s both; }
.timeline-container::before { content: ''; position: absolute; top: 0; right: 0; height: 100%; width: 2px; background-color: #444; }
.timeline-item { position: relative; padding-bottom: 30px; opacity: 0; transform: translateX(30px); }
.section.active .timeline-item { animation: slideInRight 0.5s ease-out forwards; }
.section.active .timeline-item:nth-child(1) { animation-delay: 0.3s; }
.section.active .timeline-item:nth-child(2) { animation-delay: 0.6s; }
.section.active .timeline-item:nth-child(3) { animation-delay: 0.9s; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; top: 0; right: -39px; width: 16px; height: 16px; border-radius: 50%; background-color: #17a2b8; border: 3px solid #333; z-index: 1; transition: all 0.3s ease; }
.timeline-item:hover .timeline-dot { transform: scale(1.3); box-shadow: 0 0 10px rgba(23, 162, 184, 0.5); }
.timeline-content { background-color: #2d2d2d; padding: 20px; border-radius: 15px; transition: all 0.5s ease; position: relative; overflow: hidden; z-index: 1; display: flex; flex-direction: column; }
.timeline-content::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, rgba(23, 162, 184, 0.1), transparent); z-index: -1; opacity: 0; transition: opacity 0.5s ease; }
.timeline-item:hover .timeline-content { transform: translateX(10px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }
.timeline-item:hover .timeline-content::before { opacity: 1; }
.timeline-date { display: inline-block; padding: 5px 15px; background-color: #17a2b8; color: #fff; border-radius: 20px; font-size: 12px; margin-bottom: 15px; transition: all 0.3s ease; align-self: flex-start; }
.timeline-item:hover .timeline-date { transform: translateY(-3px); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); }
.timeline-title { font-size: 18px; margin-bottom: 5px; }
.timeline-place { color: #17a2b8; font-size: 14px; margin-bottom: 15px; }
.timeline-description { color: #aaa; line-height: 1.6; }
.timeline-image { width: 100%; max-width: 200px; height: auto; border-radius: 10px; margin-top: 15px; transition: transform 0.3s ease; align-self: center; }
.timeline-image:hover { transform: scale(1.05); }
.timeline-link { color: #17a2b8; text-decoration: none; transition: all 0.3s ease; display: inline-block; margin-top: 10px; }
.timeline-link:hover { color: #fff; text-decoration: underline; }

/* استایل‌های تماس */
.contact-info { margin-bottom: 30px; }
.section.active .contact-info { animation: fadeIn 1s ease-out 0.5s both; }
.contact-item { display: flex; align-items: flex-start; margin-bottom: 20px; transition: all 0.3s ease; opacity: 0; transform: translateY(20px); }
.section.active .contact-item { animation: slideInUp 0.5s ease-out forwards; }
.section.active .contact-item:nth-child(1) { animation-delay: 0.3s; }
.section.active .contact-item:nth-child(2) { animation-delay: 0.5s; }
.section.active .contact-item:nth-child(3) { animation-delay: 0.7s; }
.contact-item:hover { transform: translateX(5px); }
.contact-icon { width: 40px; height: 40px; background-color: #2d2d2d; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #17a2b8; font-size: 16px; margin-left: 15px; transition: all 0.3s ease; position: relative; overflow: hidden; z-index: 1; }
.contact-icon::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #17a2b8; border-radius: 50%; transform: scale(0); transition: transform 0.5s ease; }
.contact-item:hover .contact-icon { color: #fff; transform: rotate(360deg); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); }
.contact-item:hover .contact-icon::before { transform: scale(1); }
.contact-text { flex: 1; }
.contact-title { font-weight: bold; margin-bottom: 5px; }
.contact-link { display: inline-block; padding: 10px 20px; background-color: #17a2b8; color: #fff; text-decoration: none; border-radius: 30px; margin-top: 10px; transition: all 0.3s ease; }
.contact-link:hover { background-color: #138496; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); }
.map-container { width: 100%; height: 300px; border-radius: 15px; overflow: hidden; margin-top: 30px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); }
.map-container iframe { width: 100%; height: 100%; border: none; }

/* لیست خدمات/کارها */
.services-list { display: grid; grid-template-columns: 1fr; gap: 15px; margin: 30px 0; }
.service-list-item { background-color: #2d2d2d; padding: 15px; border-radius: 10px; display: flex; align-items: center; transition: all 0.3s ease; }
.service-list-item:hover { transform: translateX(5px); background-color: #3a3a3a; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); }
.service-list-icon { width: 40px; height: 40px; background-color: #17a2b8; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; margin-left: 15px; flex-shrink: 0; }
.service-list-title { font-weight: bold; color: #f5f5f5; }

/* انیمیشن لودینگ */
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #17a2b8; display: flex; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.5s ease, visibility 0.5s; }
.loading-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader { width: 50px; height: 50px; border: 5px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* استایل‌های واکنش‌گرا */
@media (min-width: 768px) {
    .container { flex-direction: row; }
    .sidebar { width: 30%; padding: 40px; }
    .main-content { width: 70%; padding: 50px; }
    .profile-img { width: 180px; height: 180px; }
    .section-title { font-size: 60px; }
    .section-subtitle { font-size: 24px; }
    .info-list { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .services-container { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .services-list { grid-template-columns: repeat(2, 1fr); }
    .navigation { top: 50%; bottom: auto; right: 30px; left: auto; transform: translateY(-50%); flex-direction: column; padding: 15px 5px; }
    .nav-item { width: 50px; height: 50px; margin: 5px 0; font-size: 20px; }
}

/* انیمیشن‌های اضافی */
.floating { animation: floating 3s ease-in-out infinite; }
@keyframes floating { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.typing-cursor { display: inline-block; width: 3px; height: 20px; background-color: #17a2b8; margin-right: 5px; animation: blink 1s step-end infinite; }
@keyframes blink { from, to { opacity: 1; } 50% { opacity: 0; } }

/* انیمیشن‌های ذرات */
.particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 0; pointer-events: none; }
.particle { position: absolute; display: block; width: 5px; height: 5px; background-color: rgba(255, 255, 255, 0.2); border-radius: 50%; }

/* اسکرول بار سفارشی */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #333; }
::-webkit-scrollbar-thumb { background: #17a2b8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #138496; }