@font-face {
    font-family: 'IRANSansWeb';
    src: url('/assets/IRANSansWeb.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

[dir="rtl"] .nav-container, [dir="rtl"] .nav-links {
    flex-direction: row-reverse;
    direction: ltr;
}

[dir="rtl"] .card-icon,
[dir="rtl"] .contact-item svg {
    margin-left: 10px;
    margin-right: 0;
}

[dir="rtl"] .line-number {
    padding-left: 15px;
    padding-right: 0;
    text-align: left;
}

[dir="rtl"] .progress-header {
    flex-direction: row-reverse;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'IRANSansWeb', Tahoma, sans-serif !important;
}

body {
    background: linear-gradient(135deg, #0a1a2f 0%, #102a47 100%);
    color: #f0f6fc;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
}

h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

p {
    font-size: 16px;
    color: rgba(240, 246, 252, 0.8);
    margin-bottom: 15px;
}

/* Gradient Text */
.gradient-title {
    background: linear-gradient(135deg, #f0f6fc 0%, #b8c7e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.accent-gradient {
    background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header */
header {
    padding: 20px 0;
    border-bottom: 1px solid #30363d;
    position: relative;
    z-index: 50;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[dir="rtl"] .logo {
    direction: rtl;
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
}
.logo span:last-child {
    background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #f0f6fc;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #00d2ff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
    transition: width 0.3s ease;
}

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

/* Hamburger Menu */
.menu-toggle {
    display: none;
    position: relative;
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #f0f6fc;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 10px; }
.menu-toggle span:nth-child(3) { top: 20px; }

.menu-toggle.active span:nth-child(1) {
    top: 10px;
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-45deg);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 100px 0 80px;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.hero-buttons {
    display: flex;
    margin-top: 25px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
    color: #f0f6fc;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.4s ease;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(137, 87, 229, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid #30363d;
    margin-left: 15px;
}

.btn-secondary:hover {
    border-color: #00d2ff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 15px rgba(0, 210, 255, 0.2);
}

/* Floating Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(30px);
    z-index: 1;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: #00d2ff;
    top: -100px;
    right: -50px;
    animation: float 6s ease-in-out infinite, move 20s ease-in-out infinite alternate;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: #3a7bd5;
    bottom: -70px;
    left: 10%;
    animation: float 8s ease-in-out infinite, move 18s ease-in-out infinite alternate;
}

.orb-3 {
    width: 150px;
    height: 150px;
    background: #0088cc;
    top: 40%;
    right: 15%;
    animation: float 7s ease-in-out infinite, move 15s ease-in-out infinite alternate;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes move {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(50px, -30px) rotate(90deg); }
    50% { transform: translate(20px, 40px) rotate(180deg); }
    75% { transform: translate(-30px, 20px) rotate(270deg); }
}

/* Features Section */
.features {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: rgba(22, 27, 34, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 25px rgba(0, 210, 255, 0.2);
    border-color: #00d2ff;
}

.card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 27, 34, 0.5);
    border-radius: 12px;
    margin-bottom: 20px;
}

.card-icon svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: #00d2ff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Terminal Section */
.terminal-section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.terminal {
    background-color: rgba(13, 17, 23, 0.95);
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Consolas', 'Courier New', monospace;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    direction: ltr;
    text-align: left;
}

.terminal-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #30363d;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.terminal-title {
    margin-left: 15px;
    font-size: 14px;
    color: rgba(240, 246, 252, 0.6);
}

.terminal-body {
    overflow-x: auto;
    max-height: 400px;
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: rgba(13, 17, 23, 0.5);
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(58, 123, 213, 0.5);
    border-radius: 4px;
}

.code-line {
    display: flex;
    margin-bottom: 8px;
}

.line-number {
    color: #8b949e;
    padding-right: 15px;
    min-width: 30px;
    text-align: right;
    user-select: none;
}

.code-text {
    flex: 1;
}

.keyword { color: #ff7b72; }
.function { color: #d2a8ff; }
.string { color: #a5d6ff; }
.comment { color: #8b949e; }
.variable { color: #79c0ff; }

/* Progress Section */
.progress-section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.progress-container {
    background-color: rgba(22, 27, 34, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.progress-item {
    margin-bottom: 25px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-label {
    font-weight: 600;
}

.progress-value {
    color: #00d2ff;
}

.progress-bar {
    height: 8px;
    background-color: #30363d;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
    width: 0;
    animation: fillProgress 2s ease-out forwards;
}

@keyframes fillProgress {
    from { width: 0; }
    to { width: var(--progress-width); }
}

/* Contact Section */
.contact {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.contact-card {
    background-color: rgba(22, 27, 34, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    transition: all 0.4s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 25px rgba(0, 210, 255, 0.2);
    border-color: #00d2ff;
}

.contact-info {
    margin: 20px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    stroke: #00d2ff;
}

/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid #30363d;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 25px rgba(0, 210, 255, 0.2);
    position: relative;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    color: #8b949e;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: #00d2ff;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(13, 17, 23, 0.7);
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #f0f6fc;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00d2ff;
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.3);
}

.form-message {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.form-message svg {
    width: 60px;
    height: 60px;
    stroke: #27c93f;
    margin-bottom: 15px;
}

/* RTL Support for Modal */
[dir="rtl"] .close-button {
    right: auto;
    left: 15px;
}

[dir="rtl"] .form-group label {
    text-align: right;
}

/* Responsive styles */
@media (max-width: 992px) {
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    h3 { font-size: 18px; }
    p { font-size: 15px; }
    
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 28px; }
    h2 { font-size: 22px; }
    
    /* Show menu toggle on mobile */
    .menu-toggle {
        display: block;
    }
    
    /* Hide nav links by default on mobile */
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(10, 26, 47, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 100;
        padding: 20px;
    }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
        direction: rtl;
    }
    
    .nav-links a {
        font-size: 20px;
        margin: 15px 0;
    }
    
    .hero { 
        padding: 60px 0 40px; 
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    /* Adjust hero buttons */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        margin-bottom: 15px;
        text-align: center;
    }
    
    .btn-secondary {
        margin-left: 0;
    }
    
    /* Adjust cards */
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    /* Adjust terminal */
    .terminal {
        font-size: 13px;
    }
    
    .terminal-body {
        max-height: 300px;
    }
    
    /* Reduce orb visibility */
    .orb {
        opacity: 0.15;
        filter: blur(25px);
    }
    
    /* Adjust padding */
    .features, 
    .terminal-section, 
    .progress-section, 
    .contact {
        padding: 50px 0;
    }
    
    /* RTL mobile adjustments */
    [dir="rtl"] .nav-container {
        flex-direction: row;
    }
    
    [dir="rtl"] .menu-toggle {
        margin-right: 0;
        margin-left: 15px;
    }
}

@media (max-width: 480px) {
    /* Smaller font sizes */
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 16px; }
    p { font-size: 14px; }
    
    /* Adjust padding */
    .container {
        padding: 0 15px;
    }
    
    /* Smaller cards with more padding */
    .card {
        padding: 20px;
    }
    
    /* Terminal adjustments */
    .terminal {
        padding: 15px;
        font-size: 11px;
    }
    
    /* Form adjustments */
    .form-group input {
        padding: 10px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    /* Contact card */
    .contact-card {
        padding: 25px;
    }
    
    /* Modal adjustments */
    .modal-content {
        padding: 25px 20px;
    }
}

/* Fix for iOS form zoom */
@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Fix scrolling issues */
html, body {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Improve touch targets */
@media (max-width: 768px) {
    .nav-links a, .btn, .contact-item, .close-button {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .contact-item {
        min-height: 44px;
    }
}