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

html {
    scroll-behavior: smooth;
}

body {
    font-family: IRANSansX, 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

/* Dark theme base */
:root {
    --bg: #ffffff;
    --text: #1f2937;
    --muted: #4a5568;
    --card: #ffffff;
    --border: #e5e7eb;
    --hero-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --about-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --ar-bg: linear-gradient(135deg, #ffffff 0%, #f3f6ff 100%);
    --features-bg: #ffffff;
    --contact-bg: #ffffff;
    --portfolio-bg: #ffffff;
}

.theme-dark {
    --bg: #0b1220;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --card: #0f172a;
    --border: #1f2a44;
    --hero-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --about-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --ar-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --features-bg: #0b1220;
    --contact-bg: #0b1220;
    --portfolio-bg: #0b1220;
}

body { background: var(--bg); color: var(--text); }
.feature-description, .section-description, .about-description, .contact-description, .stat-label { color: var(--muted); }
.feature-card, .contact-form, .ar-step, .portfolio-card, .modal-dialog { background: var(--card); border-color: var(--border); }
.navbar { background: rgba(255,255,255,0.9); }
.theme-dark .navbar { background: rgba(15,23,42,0.75); border-bottom-color: var(--border); }
.btn-secondary { border-color: #667eea; }
.hero { background: var(--hero-bg); }
.about { background: var(--about-bg); }
.ar-section { background: var(--ar-bg); }
.features { background: var(--features-bg); }
.contact { background: var(--contact-bg); }
.portfolio { background: var(--portfolio-bg); }

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border);
}

.theme-dark .navbar {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: var(--border);
}

.theme-dark .navbar .nav-link {
    color: var(--text);
}

.theme-dark .navbar .bar {
    background: var(--text);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.5rem;
    font-family: 'Vazirmatn', IRANSansX, 'Inter', sans-serif;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.9rem;
    border-radius: 10px;
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--hero-bg);
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    animation: slideInLeft 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.icon-btn, .lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    transition: all .2s ease;
}

.icon-btn:hover, .lang-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,0.08); }
.icon { display: none; }
.icon.sun { display: inline-block; }
.flag { display: none; }
.flag-en { display: inline-block; }
.lang-label { font-weight: 700; font-size: .9rem; }

.hero-image {
    display: flex;
    justify-content: center;
    animation: slideInRight 1s ease-out;
}

.hero-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.card-header {
    background: #f7fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
}

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

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

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca3f; }

.card-content {
    padding: 30px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.code-line {
    margin-bottom: 10px;
}

.code-keyword { color: #d73a49; }
.code-variable { color: #6f42c1; }
.code-operator { color: #24292e; }
.code-string { color: #032f62; }
.code-function { color: #6f42c1; }
.code-bracket { color: #24292e; }

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 5%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 20%;
    animation-delay: 4s;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--features-bg);
}

/* AR section */
.ar-section {
    padding: 100px 0;
    background: var(--ar-bg);
}

.ar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.phone-mockup {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    border-radius: 36px;
    padding: 16px 12px 24px;
    background: #0f172a;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    position: relative;
}

.camera-bar {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 6px;
    background: #111827;
    border-radius: 6px;
}

.ar-scene {
    background: radial-gradient(120% 80% at 50% 20%, #1f2937, #111827);
    border-radius: 24px;
    height: 560px;
    position: relative;
    overflow: hidden;
}

.ar-marker {
    position: absolute;
    left: 16px;
    top: 16px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: #0f172a;
    background: #a7f3d0;
    font-weight: 700;
}

.hotspot {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hotspot:hover { transform: translateY(-3px) scale(1.03); }

.ar-features {
    display: grid;
    gap: 1.25rem;
}

.ar-cta {
    margin-top: 2rem;
    text-align: center;
}

.ar-cta .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.ar-step {
    background: var(--card);
    border-radius: 16px;
    padding: 1.25rem 1.25rem;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.ar-step h3 { color: var(--text); margin: 0.35rem 0; }
.ar-step p { color: var(--muted); }

.badge {
    display: inline-block;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 700;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1rem;
    font-family: 'Vazirmatn', IRANSansX, 'Inter', sans-serif;
}

.section-description {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--muted);
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--about-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-description {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--muted);
    font-weight: 500;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

/* Timeline */
.timeline { margin-top: 2rem; display: grid; gap: 1rem; }
.timeline-item { display: grid; grid-template-columns: 80px 1fr; gap: 1rem; align-items: start; }
.timeline-year { font-weight: 800; color: #4f46e5; }

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--contact-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info .section-title {
    text-align: left;
    margin-bottom: 1rem;
}

.contact-description {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--muted);
}

.contact-item i {
    color: #667eea;
    font-size: 1.2rem;
    width: 20px;
}

.contact-form {
    background: var(--card);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    background: var(--card);
    color: var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a8b3c5; /* higher contrast in dark mode */
    opacity: 1;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #a0aec0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #667eea;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #4a5568;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #667eea;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    color: #a0aec0;
}

/* Portfolio */
.portfolio { padding: 100px 0; background: var(--portfolio-bg); }
.portfolio-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.5rem; }
.portfolio-controls .btn { border-radius: 999px; }
.btn-filter.active { background: #667eea; color: #fff; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.portfolio-card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.06); transition: transform .2s ease, box-shadow .2s ease; background: var(--card); }
.portfolio-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.12); }
.portfolio-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.portfolio-info { padding: 1rem; }
.portfolio-info h3 { margin-bottom: .25rem; color: var(--text); }
.portfolio-info p { color: var(--muted); }

/* Modal */
.modal { position: fixed; inset: 0; display: none; z-index: 2000; }
.modal.open { display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); }
.modal-dialog { position: relative; background: var(--card); border: 1px solid var(--border); width: min(520px, 92%); margin: 0 auto; border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,0.35); padding: 1rem 1rem 1.25rem; z-index: 1; }
.modal-close { position: absolute; right: 10px; top: 10px; border: none; background: transparent; font-size: 1.1rem; cursor: pointer; color: #64748b; }
.modal-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f1f5f9; border-radius: 10px; padding: 6px; gap: 6px; margin-bottom: 1rem; }
.modal-tab { border: none; background: transparent; padding: .6rem 1rem; border-radius: 8px; cursor: pointer; font-weight: 600; color: #475569; }
.modal-tab.active { background: #fff; color: #111827; box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.auth-form.hidden { display: none; }
.auth-form .form-group input { background: var(--card); color: var(--text); }
.auth-note { margin-top: .75rem; }

/* Dashboard */
.dashboard { 
    display: grid; 
    grid-template-columns: 240px 1fr; 
    gap: 1.25rem; 
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.dash-sidebar { position: sticky; top: 90px; height: calc(100vh - 110px); border-right: 1px solid var(--border); padding: 1rem; }
.dash-sidebar ul { list-style: none; display: grid; gap: 8px; }
.dash-sidebar li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--muted); cursor: pointer; }
.dash-sidebar li.active, .dash-sidebar li:hover { background: rgba(102,126,234,0.08); color: #4f46e5; }
.dash-main { 
    padding: 0 1rem 2rem; 
    width: 100%;
    overflow: hidden;
}
.dash-cards { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 1rem; 
    margin-bottom: 1.5rem; 
    width: 100%;
    max-width: 100%;
    align-items: stretch;
}
.dash-card { 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: 14px; 
    padding: 1rem; 
    box-shadow: 0 8px 24px rgba(0,0,0,0.06); 
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dash-card h4 { 
    color: var(--muted); 
    margin-bottom: .35rem; 
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
}
.dash-num { 
    font-weight: 800; 
    font-size: 1.4rem; 
    color: var(--text); 
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
}
.dash-section { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; }
.activity { list-style: none; display: grid; gap: .6rem; }
.activity .badge { background: #e0e7ff; color: #3730a3; }

/* WebAR Styles */
.webar-hero {
    background: linear-gradient(135deg, var(--hero-bg) 0%, rgba(102,126,234,0.1) 100%);
    padding: 100px 0 40px; /* pull next section up */
    text-align: center;
}

.webar-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text);
}

.webar-content p {
    font-size: 1.2rem; /* restore original size */
    color: var(--muted);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.webar-features {
    display: flex;
    justify-content: center;
    gap: 0.75rem; /* tighter */
    flex-wrap: wrap;
}

.feature-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem; /* smaller pill */
    background: var(--card);
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.feature-item i {
    color: #4f46e5;
    font-size: 1.1rem;
}

.ar-experience {
    padding: 32px 0 64px; /* reduce top padding to pull content up */
    background: var(--bg);
}

.ar-demo {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.ar-viewer {
    background: var(--card);
    border-radius: 16px; /* slightly tighter */
    padding: 1.25rem; /* tighter */
    border: 1px solid var(--border);
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ar-container {
    width: 100%;
    height: 360px;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.ar-loading, .ar-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ar-controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* tighter */
}

.ar-controls .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.ar-info {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border);
}

.ar-info h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.ar-info ol {
    list-style: none;
    counter-reset: step-counter;
}

.ar-info li {
    counter-increment: step-counter;
    margin-bottom: 0.75rem;
    padding-left: 2rem;
    position: relative;
    color: var(--muted);
}

.ar-info li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: #4f46e5;
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.tech-features {
    padding: 64px 0; /* was 80 */
    background: var(--card);
}

.tech-features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tech-card {
    background: var(--bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.tech-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.tech-icon i {
    font-size: 2rem;
    color: white;
}

.tech-card h3 {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.3rem;
}

.tech-card p {
    color: var(--muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tech-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tech-tag {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.ar-posts {
    padding: 64px 0; /* was 80 */
    background: var(--bg);
}

.ar-posts h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.post-image {
    height: 200px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-image i {
    font-size: 3rem;
    color: white;
}

.post-content {
    padding: 1.5rem;
}

.post-content h3 {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.2rem;
}

.post-content p {
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.post-date {
    color: var(--muted);
}

.post-category {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .webar-content h1 {
        font-size: 2rem;
    }
    
    .webar-features {
        flex-direction: column;
        align-items: center;
    }
    
    .ar-demo {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}
/* Enhanced WebAR Styles */
.ar-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.ar-scene {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
}

.ar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.ar-info-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    max-width: 300px;
}

.ar-info-panel h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #4f46e5;
}

.ar-info-panel p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.ar-controls-panel {
    display: flex;
    gap: 0.5rem;
}

.ar-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ar-btn:hover {
    background: #3730a3;
}

.feature-selector {
    margin-bottom: 2rem;
}

.feature-selector h3 {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.2rem;
}

.feature-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-btn {
    background: var(--card);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-weight: 500;
}

.feature-btn:hover {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.05);
}

.feature-btn.active {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.tech-card {
    background: var(--bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: #4f46e5;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.1), transparent);
    transition: left 0.5s ease;
}

.tech-card:hover::before {
    left: 100%;
}

.tech-demo-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    width: 100%;
}

.tech-demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.tech-demo-btn:active {
    transform: translateY(0);
}

/* Test button - pleasant green style */
.tech-test-btn {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #ffffff !important;
    border: none;
    padding: 0.75rem 1.5rem; /* match .tech-demo-btn */
    border-radius: 25px;
    font-weight: 600; /* match .tech-demo-btn */
    font-size: 0.95rem; /* slightly smaller like demo */
    line-height: 1.2;
    display: inline-block;
    text-align: center;
    width: 100%;
    margin-top: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);
}

.tech-test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(16, 185, 129, 0.35);
    filter: brightness(1.03);
}

.tech-test-btn:active { transform: translateY(0); }

/* AR Instructions Updates */
#ar-instructions {
    transition: all 0.3s ease;
}

.ar-instruction-step {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.ar-instruction-step.active {
    opacity: 1;
    color: #4f46e5;
    font-weight: 600;
}

@media (max-width: 768px) {
    .feature-buttons {
        flex-direction: column;
    }
    
    .ar-info-panel {
        position: relative;
        top: auto;
        left: auto;
        margin: 1rem;
        max-width: none;
    }
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dash-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--card);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        border-bottom: 1px solid var(--border);
    }

    /* Ensure RTL mobile menu stacks vertically like LTR */
    [dir="rtl"] .nav-menu {
        flex-direction: column;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .ar-grid { grid-template-columns: 1fr; }
    .dashboard { grid-template-columns: 1fr; }
    .dash-sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
    .dash-cards { grid-template-columns: 1fr; }
}

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

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

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-card {
        transform: none;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px 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); }
}
