﻿:root {
    --primary-color: #4e54c8;
    --secondary-color: #8f94fb;
    --glass-color: rgba(255, 255, 255, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    overflow-x: hidden;
}

/* Glassmorphism effect */
.glass-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: all 0.3s ease;
}

    .glass-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
    }

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color);
}

.nav-link {
    font-weight: 500;
    margin: 0 10px;
    position: relative;
}

    .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: var(--primary-color);
        transition: width 0.3s ease;
    }

    .nav-link:hover::after {
        width: 100%;
    }

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.btn-custom {
    background: white;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

    .btn-custom:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

/* About Section */
.about-section {
    padding: 100px 0;
}

.section-title {
    font-weight: 700;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

    .section-title::after {
        content: '';
        position: absolute;
        width: 50%;
        height: 4px;
        bottom: -10px;
        left: 0;
        background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
        border-radius: 2px;
    }

/* Skills Section */
.skills-section {
    padding: 100px 0;
    background: rgba(245, 247, 250, 0.7);
}

.skill-item {
    margin-bottom: 30px;
}

.skill-name {
    font-weight: 600;
    margin-bottom: 10px;
}

.progress {
    height: 10px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
}

/* Experience Section */
.experience-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.timeline {
    position: relative;
    padding-left: 50px;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 20px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    }

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

    .timeline-item::before {
        content: '';
        position: absolute;
        left: -40px;
        top: 5px;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: var(--primary-color);
        border: 4px solid white;
    }

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
}

/* Portfolio Carousel */
.portfolio-section {
    padding: 100px 0;
    background: rgba(245, 247, 250, 0.7);
}

.portfolio-item {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.portfolio-img {
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(78, 84, 200, 0.8), rgba(143, 148, 251, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Counter Section */
.counter-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.counter-item {
    text-align: center;
}

.counter-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.counter-text {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
}

.contact-form .form-control {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

    .contact-form .form-control:focus {
        box-shadow: 0 0 0 0.25rem rgba(78, 84, 200, 0.25);
    }

/* Footer with Animated Wave */
.footer {
    position: relative;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding-top: 100px;
    overflow: hidden;
    min-height: 200px;
}

.wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 105%;
    height: 100px;
    animation: waveMove 5s infinite ease-in-out;
}

@keyframes waveMove {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-65px);
    }

    100% {
        transform: translateX(0);
    }
}

/* Floating Action Button */
.fab-container {
    position: fixed;
    bottom: 20px;
    right: 50px;
}

.fab-main {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(78, 84, 200, .8);
    color: white;
    border: none;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 10;
    transition: transform 0.3s;
}

.fab-options {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.fab-option {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(78, 84, 200, .4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 6px var(--secondary-color);
    font-size: 15px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) translate(0, 0);
    text-decoration: none;
}

@keyframes moveFromCenter {
    0% {
        transform: translate(-50%, -50%) translate(0, 0);
        opacity: 0;
    }

    100% {
        transform: var(--final-transform);
        opacity: 1;
    }
}

.fab-container.open .fab-option {
    animation: moveFromCenter 0.5s ease forwards;
    pointer-events: auto;
}

/* Blogs Section */
.blogs-section {
    padding: 100px 0;
}

.blog-content img {
    width: 100% !important;
    height: auto !important;
}

#blogs {
    margin-top: 2rem;
}

/* Responsive Adjustments */
input {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

textarea {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.btn-primary {
    background-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: var(--secondary-color);
    }

@media (min-width: 1000px) {
    .fab-main {
        display: none;
    }
}

@media (max-width: 1000px) {
    nav {
        display: none!important;
    }
    .hero-section {
        height: 100vh;
        background-image: url("../img/AliMartin.png");
        background-position: center;
        background-size: cover;
    }
    /* منوی ناوبری را در موبایل نمایش می‌دهیم (حذف display:none) */

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline {
        padding-left: 30px;
    }

        .timeline::before {
            left: 10px;
        }

    .timeline-item::before {
        left: -25px;
    }
}

[data-observe] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

    [data-observe].visible {
        opacity: 1;
        transform: translateY(0);
    }


.footer {
    position: relative;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding-top: 100px;
    overflow: hidden;
    min-height: 200px;
}

.wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 105%;
    height: 100px;
    animation: waveMove 5s infinite ease-in-out;
}

@keyframes waveMove {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-65px);
    }

    100% {
        transform: translateX(0);
    }
}


.fab-container {
    position: fixed;
    bottom: 20px;
    right: 50px;
}

.fab-main {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(78, 84, 200, .8);
    color: white;
    border: none;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 10;
    transition: transform 0.3s;
}

.fab-options {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.fab-option {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(78, 84, 200, .4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 6px var(--secondary-color);
    font-size: 15px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) translate(0, 0);
    text-decoration: none;
}

@keyframes moveFromCenter {
    0% {
        transform: translate(-50%, -50%) translate(0, 0);
        opacity: 0;
    }

    100% {
        transform: var(--final-transform);
        opacity: 1;
    }
}

.fab-container.open .fab-option {
    animation: moveFromCenter 0.5s ease forwards;
    pointer-events: auto;
}

.blog-content img {
    width: 100% !important;
    height: auto !important;
}

#blogs
{ margin-top: 2rem;}


#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(143, 148, 251, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
/* --- انیمیشن swing: 90° راست → 0 → 90° چپ → 0 --- */
@keyframes swing {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(90deg);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}
/* --- آیکن چرخان --- */
#loader img {
    width: 300px;
    height: 300px;
    animation: swing 3s ease-in-out infinite;
}

i {
    color: var(--primary-color) !important;
    margin: .5rem;
    font-size: 1.25rem;
}

    i:hover {
        color: var(--secondary-color) !important;
        transform: translateY(-3px);
        animation-delay:  .5s;
        box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
    }