/* index.css - استایل‌های صفحه اصلی */

/* ============================
   HERO SECTION
============================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-height) + var(--space-3xl));
    position: relative;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.hero__gradient {
    position: absolute;
    top: -30%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(226, 10, 62, 0.1) 0%, transparent 70%);
    filter: blur(80px);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
}

@media (min-width: 992px) {
    .hero__grid {
        grid-template-columns: 1.2fr 1fr;
        align-items: center;
    }
}

.hero__content {
    max-width: 600px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(226, 10, 62, 0.1);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(226, 10, 62, 0.2);
}

.hero__title {
    margin-bottom: var(--space-lg);
}

.hero__description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: var(--space-2xl);
    max-width: 500px;
}

.hero__actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Profile Card */
.profile-card {
    background: linear-gradient(145deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    margin: 0 auto;
}

.profile-card__avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 4px;
    position: relative;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: calc(var(--radius-lg) - 2px);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    overflow: hidden;
}

.avatar svg {
    width: 80%;
    height: 80%;
}

.status-indicator {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 16px;
    height: 16px;
    background: #10B981;
    border: 3px solid var(--surface);
    border-radius: 50%;
}

.profile-card__name {
    text-align: center;
    margin-bottom: var(--space-xs);
}

.profile-card__role {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat__number {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat__label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================
   SECTION HEADER
============================ */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-header__title {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-md);
}

.section-header__title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
}

.section-header__description {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================
   PROJECTS SECTION
============================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-2xl);
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.project-card__image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-card__image img {
    transform: scale(1.1);
}

.project-card__badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.project-card__content {
    padding: var(--space-xl);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-card__meta {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-xs);
}

.project-card__title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.project-card__description {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}

.project-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--primary);
    transition: gap var(--transition);
}

.project-card__link:hover {
    gap: 0.75rem;
}

/* ============================
   SKILLS SECTION
============================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-2xl);
}

.skill-category {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: transform var(--transition);
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.skill-category__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.skill-category__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(226, 10, 62, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.skill-item {
    margin-bottom: var(--space-lg);
}

.skill-item__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
    font-weight: 600;
}

.skill-item__percentage {
    color: var(--primary);
    font-weight: 800;
}

.progress {
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress__fill {
    height: 100%;
    border-radius: var(--radius-full);
    width: 0;
    transition: width 1s ease;
}

.progress__fill--frontend {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.progress__fill--backend {
    background: linear-gradient(90deg, var(--secondary), #60A5FA);
}

.progress__fill--product {
    background: linear-gradient(90deg, var(--accent), #34D399);
}

/* ============================
   BLOG SECTION (نوشته‌ها)
============================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.blog-card__image-link {
    display: block;
    height: 200px;
    overflow: hidden;
}

.blog-card__image {
    width: 100%;
    height: 100%;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.1);
}

.blog-card__content {
    padding: var(--space-xl);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card__meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.blog-card__title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.blog-card__excerpt {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.blog-card__category {
    background: var(--surface-2);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.view-more-container {
    text-align: center;
    margin-top: var(--space-xl);
}

/* ============================
   PODCASTS SECTION
============================ */
.podcasts-grid {
    display: grid;
    gap: var(--space-2xl);
}

.podcast-card {
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    color: white;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition);
}

@media (min-width: 768px) {
    .podcast-card {
        grid-template-columns: 1fr auto;
    }
}

.podcast-card:hover {
    transform: translateY(-4px);
}

.podcast-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    z-index: 1;
}

.podcast-card--337 {
    background: linear-gradient(135deg, #DC2626, #991B1B);
}

.podcast-card--comicod {
    background: linear-gradient(135deg, #2563EB, #1E40AF);
}

.podcast-card__content {
    position: relative;
    z-index: 2;
}

.podcast-card__tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(10px);
}

.podcast-card__title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: var(--space-lg);
}

.podcast-card__description {
    opacity: 0.9;
    margin-bottom: var(--space-xl);
}

.podcast-card__visual {
    position: relative;
    z-index: 2;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0 auto;
}

/* ============================
   CONTACT SECTION
============================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
}

@media (min-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.contact-info__title {
    margin-bottom: var(--space-lg);
}

.contact-info__description {
    color: var(--text-muted);
    margin-bottom: var(--space-2xl);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.contact-detail__icon {
    width: 56px;
    height: 56px;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-detail__text h4 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contact-detail__text p {
    font-weight: 700;
}

.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-4px);
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(226, 10, 62, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ============================
   RESPONSIVE DESIGN - INDEX
============================ */
@media (max-width: 768px) {
    .hero {
        padding-top: calc(var(--header-height) + var(--space-2xl));
    }

    .hero__actions {
        flex-direction: column;
    }

    .profile-card {
        padding: var(--space-xl);
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .podcast-card {
        padding: var(--space-xl);
    }

    .contact-form {
        padding: var(--space-xl);
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }

    .hero__description {
        font-size: 1rem;
    }

    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* استایل برای پیام‌های فرم */
.form-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    animation: slideDown 0.3s ease;
}

.alert--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert__close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.alert__close:hover {
    opacity: 1;
}

/* استایل برای فیلدهای خطادار */
.form-control.error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.form-control.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* انیمیشن */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}