/* === AI Company Website - Full Improved CSS === */

/* ---------- Root Variables ---------- */
:root {
    --c-primary: #00d4ff;
    --c-secondary: #6a5acd;
    --c-accent: #c0c0ff;
    --c-bg-dark: #0a0a0a;
    --c-bg-dark-2: #101021;
    --c-bg-card: rgba(26, 26, 46, 0.9);
    --c-text-main: #ffffff;
    --c-text-muted: #c0c0c0;

    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-strong: 0 25px 60px rgba(0, 0, 0, 0.7);

    --transition-fast: 0.2s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.4s ease;
}

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--c-bg-dark);
    color: var(--c-text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00b8e6, #5a4cb2);
}

/* ---------- Navbar ---------- */
.navbar {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.25);
    padding: 14px 0;
    transition: var(--transition);
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--c-primary) !important;
    letter-spacing: 0.04em;
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-secondary));
    transition: var(--transition);
}

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

/* ---------- Hero Section ---------- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
    background: radial-gradient(circle at top left, #1a1a3a 0, #0a0a0a 45%, #060611 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.16), transparent 70%);
    top: -80px;
    right: -120px;
    filter: blur(4px);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    margin-bottom: 18px;
}

.badge-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.hero-title {
    font-size: 3.6rem;
    font-weight: 800;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary), var(--c-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2.1s ease-in-out infinite alternate;
    line-height: 1.2;
}

.title-word {
    display: block;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 18px rgba(0, 212, 255, 0.35));
    }
    to {
        filter: drop-shadow(0 0 30px rgba(106, 90, 205, 0.6));
    }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--c-text-muted);
    max-width: 600px;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 35px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 25px;
}

.stat-item {
    text-align: center;
    min-width: 90px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-primary);
}

.stat-label {
    color: var(--c-text-muted);
    font-size: 0.9rem;
}

/* ---------- Buttons ---------- */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    border: none;
    padding: 13px 30px;
    border-radius: 999px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-slow);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.4);
}

.btn-primary-custom:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 40px rgba(0, 212, 255, 0.55);
    color: #fff;
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--c-primary);
    padding: 11px 28px;
    border-radius: 999px;
    font-weight: 600;
    color: var(--c-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition-slow);
}

.btn-outline-custom:hover {
    background: var(--c-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.4);
}

.btn-sm {
    padding: 7px 18px;
    font-size: 0.9rem;
}

/* ---------- Section Headers ---------- */
.section-title {
    font-size: 2.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--c-text-muted);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 50px;
}

/* ---------- Services Section ---------- */
.services-section {
    padding: 90px 0;
    background: #0f0f0f;
}

.service-card {
    background: var(--c-bg-card);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition-slow);
    backdrop-filter: blur(12px);
    height: 100%;
    box-shadow: var(--shadow-soft);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: var(--shadow-strong);
}

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

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

.service-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.service-description {
    color: var(--c-text-muted);
    font-size: 0.98rem;
}

/* ---------- Portfolio Section ---------- */
.portfolio-section {
    padding: 90px 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #15152b 50%, #101021 100%);
    position: relative;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 1200'%3E%3Cpath fill='rgba(106,90,205,0.06)' d='M0 0 1200 0 0 1200z'/%3E%3C/svg%3E");
    opacity: 0.9;
    pointer-events: none;
}

.empty-state {
    padding: 50px 20px;
    text-align: center;
    color: var(--c-text-muted);
}

.portfolio-card {
    position: relative;
    background: var(--c-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(106, 90, 205, 0.35);
    overflow: hidden;
    transition: var(--transition-slow);
    backdrop-filter: blur(12px);
    height: 100%;
    box-shadow: var(--shadow-soft);
    z-index: 1;
}

.portfolio-card:hover {
    transform: translateY(-12px) scale(1.015);
    box-shadow: var(--shadow-strong);
    border-color: rgba(0, 212, 255, 0.65);
}

.portfolio-image {
    height: 190px;
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(40deg, rgba(0, 0, 0, 0.35), transparent 60%);
}

.portfolio-content {
    padding: 22px 22px 20px;
}

.portfolio-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.portfolio-description {
    color: var(--c-text-muted);
    font-size: 0.96rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 16px;
}

.tech-tag {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.16), rgba(106, 90, 205, 0.16));
    color: var(--c-primary);
    border: 1px solid rgba(0, 212, 255, 0.4);
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.tech-tag:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(106, 90, 205, 0.3));
    transform: translateY(-2px);
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* animation برای پروژه جدید */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-card.new-project {
    animation: fadeInUp 0.6s ease-out;
}

/* ---------- Contact Section ---------- */
.contact-section {
    padding: 90px 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #101021 45%, #15152b 100%);
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 1200'%3E%3Cpath fill='rgba(0,212,255,0.03)' d='M0 1200 1200 0 1200 1200z'/%3E%3C/svg%3E");
    opacity: 1;
    pointer-events: none;
}

.contact-card {
    background: var(--c-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 212, 255, 0.25);
    padding: 32px 26px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-soft);
    height: 100%;
}

.contact-card-title,
.contact-form-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 22px;
    text-align: center;
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px 18px;
    background: rgba(0, 212, 255, 0.06);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 212, 255, 0.18);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.18), transparent);
    transition: 0.55s ease;
}

.contact-item:hover::before {
    left: 100%;
}

.contact-item:hover {
    border-color: rgba(0, 212, 255, 0.7);
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(6px);
}

.contact-icon {
    font-size: 1.4rem;
    color: var(--c-primary);
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.contact-item-title {
    font-size: 1rem;
    font-weight: 600;
}

.contact-item-text {
    font-size: 0.9rem;
    color: var(--c-text-muted);
    margin: 0;
}

/* فرم تماس */
.contact-form-card {
    background: var(--c-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 212, 255, 0.25);
    padding: 32px 26px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-soft);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--c-text-main);
}

.form-control {
    width: 100%;
    background: rgba(0, 212, 255, 0.07);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 212, 255, 0.25);
    padding: 12px 16px;
    color: var(--c-text-main);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control::placeholder {
    color: rgba(192, 192, 192, 0.6);
}

.form-control:focus {
    outline: none;
    background: rgba(0, 212, 255, 0.14);
    border-color: var(--c-primary);
    box-shadow: 0 0 0 0.18rem rgba(0, 212, 255, 0.28);
}

.form-control:invalid:not(:focus) {
    border-color: rgba(244, 67, 54, 0.5);
}

/* checkbox */
.form-check {
    margin-top: 12px;
}

.form-check-input {
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.4);
}

.form-check-input:checked {
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    border-color: var(--c-primary);
}

.form-check-label {
    color: var(--c-text-muted);
    font-size: 0.85rem;
    margin-right: 6px;
}

.form-check-label a {
    color: var(--c-primary);
    text-decoration: none;
}

.form-check-label a:hover {
    color: var(--c-secondary);
}

/* خطاها */
.form-error {
    color: #dc3545;
    font-size: 0.82rem;
    margin-top: 4px;
    display: none;
}

.form-error.show {
    display: block;
}

/* دکمه ارسال فرم */
.btn-block {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* لودینگ فرم */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
}

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

/* ---------- Footer ---------- */
.footer {
    background: linear-gradient(135deg, #050509 0%, #0c0c17 100%);
    padding: 40px 0 26px;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    text-align: center;
    color: var(--c-text-muted);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 22px;
}

.social-link {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(106, 90, 205, 0.2));
    border: 1px solid rgba(0, 212, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-primary);
    font-size: 1.15rem;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.4), rgba(106, 90, 205, 0.4));
    color: #fff;
}

/* ---------- Floating Buttons ---------- */
.add-project-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(192, 192, 192, 0.4);
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.5);
    backdrop-filter: blur(10px);
    transition: var(--transition-slow);
    z-index: 1000;
}

.add-project-btn:hover {
    transform: scale(1.12) rotate(90deg);
    box-shadow: 0 16px 40px rgba(0, 212, 255, 0.7);
}

/* scroll to top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 8px 22px rgba(0, 212, 255, 0.5);
    transition: var(--transition);
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.7);
}

/* ---------- Modal Styles ---------- */
.modal {
    backdrop-filter: blur(18px);
}

.modal-content {
    background: linear-gradient(145deg, rgba(10, 10, 10, 0.96), rgba(20, 20, 40, 0.98));
    border-radius: var(--radius-lg);
    border: 2px solid rgba(0, 212, 255, 0.35);
    color: var(--c-text-main);
    box-shadow: var(--shadow-strong);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 212, 255, 0.35);
    padding: 20px 24px 15px;
    background: rgba(0, 212, 255, 0.06);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.modal-body {
    padding: 22px 24px 20px;
    background: rgba(5, 5, 15, 0.9);
}

.modal-footer {
    border-top: 1px solid rgba(0, 212, 255, 0.25);
    padding: 14px 24px 18px;
    background: rgba(0, 212, 255, 0.03);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: var(--transition);
}

.btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* فرم‌ها داخل مودال */
.modal .form-label {
    color: var(--c-primary);
    font-weight: 600;
    font-size: 0.96rem;
}

.modal .form-control {
    background: rgba(0, 212, 255, 0.09);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 212, 255, 0.35);
    padding: 11px 15px;
    color: var(--c-text-main);
    font-size: 0.95rem;
}

.modal .form-control:focus {
    background: rgba(0, 212, 255, 0.17);
    border-color: var(--c-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.25);
}

/* دکمه‌ها در مودال */
.modal .btn-secondary {
    background: rgba(192, 192, 192, 0.12);
    border: 1px solid rgba(192, 192, 192, 0.4);
    color: var(--c-text-muted);
    padding: 9px 24px;
    border-radius: 999px;
    transition: var(--transition);
}

.modal .btn-secondary:hover {
    background: rgba(192, 192, 192, 0.22);
    color: #fff;
}

.modal .btn-primary-custom {
    padding: 10px 26px;
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.45);
}

/* --- انیمیشن باز شدن مودال --- */
.modal.fade .modal-dialog {
    transform: translateY(-30px);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-section {
        padding-top: 100px;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }

    .hero-section {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-primary-custom,
    .btn-outline-custom {
        width: 100%;
    }

    .hero-stats {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .services-section,
    .portfolio-section,
    .contact-section {
        padding: 70px 0;
    }

    .contact-card,
    .contact-form-card {
        padding: 26px 20px;
    }

    .add-project-btn {
        width: 58px;
        height: 58px;
        bottom: 20px;
        right: 20px;
    }

    .scroll-to-top {
        bottom: 20px;
        left: 20px;
    }
}

.brand-icon {
    font-size: 1.6rem;
    margin-left: 6px;
    color: var(--c-primary);
}

.portfolio-icon {
    font-size: 3.5rem;
    color: white;
    opacity: 0.9;
}


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

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

    .portfolio-content {
        padding: 18px;
    }

    .contact-card-title,
    .contact-form-title {
        font-size: 1.25rem;
    }
}
