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

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    direction: rtl;
    background-color: #f8f9fa;
}

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

/* Top Banner */
.top-banner {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 8px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.banner-text {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.banner-link {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    margin: 0 5px;
}

.banner-link:hover {
    color: #f8f9fa;
}

.banner-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.banner-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    top: 41px; /* Height of banner */
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar {
    padding: 1rem 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-logo i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 20px;
}

.user-greeting {
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.1);
}

/* Hero Section */
.hero-section {
    padding: 160px 0 80px; /* Increased top padding for banner */
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,107,107,0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

.btn.full-width {
    width: 100%;
}

/* Card Designer Section */
.create-section {
    padding: 80px 0;
    background: white;
}

.create-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.card-designer {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.designer-sidebar {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.template-selector h3,
.customization-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Responsive template grid */
@media (min-width: 768px) {
    .templates-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (min-width: 1024px) {
    .templates-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.template-item {
    cursor: pointer;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.template-item:hover,
.template-item.active {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}

.template-preview {
    height: 80px;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid #ddd;
}

.modern-template {
    background: linear-gradient(45deg, #667eea, #764ba2);
    position: relative;
}

.modern-template::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
}

.classic-template {
    background: linear-gradient(45deg, #2c3e50, #34495e);
}

.minimal-template {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
}

/* New Modern Templates */
.gradient-template {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}

.gradient-template::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.dark-elegant-template {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    position: relative;
}

.dark-elegant-template::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00cec9, #55a3ff, #a29bfe, #fd79a8);
}

.dark-elegant-template::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.neon-template {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    border: 1px solid #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    position: relative;
}

.neon-template::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7, #dda0dd, #98d8c8);
    border-radius: inherit;
    z-index: -1;
    animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.sunset-template {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 25%, #fecfef 50%, #ffecd2 100%);
    position: relative;
    overflow: hidden;
}

.sunset-template::before {
    content: '☀️';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    opacity: 0.8;
}

.sunset-template::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to top, rgba(255,255,255,0.3), transparent);
}

.ocean-template {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #2193b0 100%);
    position: relative;
    overflow: hidden;
}

.ocean-template::before {
    content: '🌊';
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 20px;
    opacity: 0.7;
}

.ocean-template::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to top, rgba(255,255,255,0.2), transparent);
    animation: wave 4s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.retro-template {
    background: linear-gradient(135deg, #ff9a8b 0%, #ff6a88 25%, #ff99ac 50%, #c44569 100%);
    position: relative;
}

.retro-template::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.forest-template {
    background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
    position: relative;
    overflow: hidden;
}

.forest-template::before {
    content: '🌲';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    opacity: 0.8;
}

.forest-template::after {
    content: '🌿';
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 16px;
    opacity: 0.6;
}

.cosmic-template {
    background: linear-gradient(135deg, #0c0c0c 0%, #2c1810 50%, #4a0e4e 100%);
    position: relative;
    overflow: hidden;
}

.cosmic-template::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(2px 2px at 20px 30px, #eee, transparent),
                      radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.5), transparent),
                      radial-gradient(1px 1px at 90px 40px, #fff, transparent),
                      radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.8), transparent);
    background-size: 150px 100px;
    animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.cosmic-template .card-header h3 {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glassmorphism-template {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    color: #333;
}

.glassmorphism-template::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    border-radius: inherit;
    z-index: -1;
}

.glassmorphism-template .card-header h3 {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glassmorphism-template .contact-item i {
    color: #667eea;
}

/* New Beautiful Templates */
.crystal-template {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.crystal-template::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        rgba(255,0,150,0.1),
        rgba(0,204,255,0.1),
        rgba(255,255,0,0.1),
        rgba(255,0,150,0.1));
    border-radius: inherit;
    z-index: -1;
    animation: crystalShift 6s ease-in-out infinite;
}

@keyframes crystalShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.crystal-template .card-header h3 {
    background: linear-gradient(45deg, #ff0096, #00ccff, #ff0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.sunshine-template {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 25%, #ff9a8b 50%, #fecfef 75%, #fecfef 100%);
    position: relative;
    overflow: hidden;
}

.sunshine-template::before {
    content: '☀️';
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 28px;
    opacity: 0.8;
    animation: sunshineGlow 4s ease-in-out infinite alternate;
}

[dir="rtl"] .sunshine-template::before {
    right: auto;
    left: 20px;
}

@keyframes sunshineGlow {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

.sunshine-template::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(255,255,255,0.4), transparent);
}

.moonlight-template {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.moonlight-template::before {
    content: '🌙';
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 26px;
    opacity: 0.9;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
}

[dir="rtl"] .moonlight-template::before {
    right: auto;
    left: 20px;
}

.moonlight-template::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(3px 3px at 50px 40px, rgba(255,255,255,0.8), transparent),
                      radial-gradient(2px 2px at 120px 80px, rgba(255,255,255,0.6), transparent),
                      radial-gradient(1px 1px at 200px 60px, rgba(255,255,255,0.4), transparent);
    background-size: 200px 100px;
    animation: starTwinkle 5s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.moonlight-template .card-header h3 {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
}

.moonlight-template .contact-item {
    color: #e0e0e0;
}

.moonlight-template .contact-item i {
    color: #00ccff;
}

.rainbow-template {
    background: linear-gradient(135deg,
        #ff0000 0%, #ff7f00 14%, #ffff00 28%, #00ff00 42%,
        #0000ff 56%, #4b0082 70%, #9400d3 84%, #ff0000 100%);
    position: relative;
    overflow: hidden;
}

.rainbow-template::before {
    content: '🌈';
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 24px;
    opacity: 0.9;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

[dir="rtl"] .rainbow-template::before {
    right: auto;
    left: 20px;
}

.rainbow-template::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to top, rgba(255,255,255,0.3), transparent);
}

.rainbow-template .card-header h3 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: 700;
}

.rainbow-template .contact-item {
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.rainbow-template .contact-item i {
    color: #ffffff;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.3));
}

.fire-template {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 25%, #ff4757 50%, #ff3838 75%, #ff6b35 100%);
    position: relative;
    overflow: hidden;
}

.fire-template::before {
    content: '🔥';
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 24px;
    opacity: 0.9;
    animation: fireFlicker 2s ease-in-out infinite alternate;
}

[dir="rtl"] .fire-template::before {
    right: auto;
    left: 20px;
}

@keyframes fireFlicker {
    0% { transform: scale(1) rotate(-5deg); }
    100% { transform: scale(1.1) rotate(5deg); }
}

.fire-template::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to top,
        rgba(255,255,255,0.1),
        rgba(255,107,53,0.2),
        rgba(255,71,87,0.1),
        transparent);
}

.fire-template .card-header h3 {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.fire-template .contact-item {
    color: #ffeaa7;
}

.fire-template .contact-item i {
    color: #ffecd2;
}

.ice-template {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 25%, #6c5ce7 50%, #a29bfe 75%, #74b9ff 100%);
    position: relative;
    overflow: hidden;
}

.ice-template::before {
    content: '🧊';
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 24px;
    opacity: 0.9;
    filter: drop-shadow(0 0 10px rgba(116,185,255,0.5));
}

[dir="rtl"] .ice-template::before {
    right: auto;
    left: 20px;
}

.ice-template::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(255,255,255,0.2), transparent);
    backdrop-filter: blur(5px);
}

.ice-template .card-header h3 {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255,255,255,0.8);
}

.ice-template .contact-item {
    color: #e8f4fd;
}

.ice-template .contact-item i {
    color: #b2d4f0;
}

.aurora-template {
    background: linear-gradient(135deg,
        #ff6b6b 0%, #ee5a24 16.67%, #ff9a8b 33.33%,
        #00cec9 50%, #55a3ff 66.67%, #a29bfe 83.33%, #ff6b6b 100%);
    position: relative;
    overflow: hidden;
}

.aurora-template::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        rgba(255,255,255,0.1) 0%,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0.05) 75%,
        rgba(255,255,255,0.1) 100%);
    animation: auroraFlow 8s ease-in-out infinite;
}

@keyframes auroraFlow {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.aurora-template::after {
    content: '✨';
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 20px;
    opacity: 0.8;
    animation: sparkle 3s ease-in-out infinite;
}

[dir="rtl"] .aurora-template::after {
    right: auto;
    left: 20px;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
}

.aurora-template .card-header h3 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
}

.aurora-template .contact-item {
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.aurora-template .contact-item i {
    color: #ffeaa7;
}

.velvet-template {
    background: linear-gradient(135deg, #2d1b69 0%, #11998e 25%, #38ef7d 50%, #11998e 75%, #2d1b69 100%);
    position: relative;
    overflow: hidden;
}

.velvet-template::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.2) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.velvet-template::after {
    content: '💎';
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 22px;
    opacity: 0.9;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.5));
}

[dir="rtl"] .velvet-template::after {
    right: auto;
    left: 20px;
}

.velvet-template .card-header h3 {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
    font-weight: 700;
}

.velvet-template .contact-item {
    color: #e8f8f5;
}

.velvet-template .contact-item i {
    color: #38ef7d;
}

.galaxy-template {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 30%, #16213e 60%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.galaxy-template::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 40px 30px, #ffffff, transparent),
        radial-gradient(1px 1px at 90px 50px, rgba(255,255,255,0.8), transparent),
        radial-gradient(3px 3px at 130px 70px, #a29bfe, transparent),
        radial-gradient(1px 1px at 160px 40px, rgba(255,71,87,0.8), transparent),
        radial-gradient(2px 2px at 200px 80px, #00cec9, transparent);
    background-size: 250px 120px;
    animation: galaxyTwinkle 6s ease-in-out infinite alternate;
}

@keyframes galaxyTwinkle {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.galaxy-template::after {
    content: '🌌';
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 24px;
    opacity: 0.8;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
}

[dir="rtl"] .galaxy-template::after {
    right: auto;
    left: 20px;
}

.galaxy-template .card-header h3 {
    background: linear-gradient(45deg, #a29bfe, #fd79a8, #00cec9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.galaxy-template .contact-item {
    color: #e0e0e0;
}

.galaxy-template .contact-item i {
    color: #a29bfe;
}

/* Form Styles */
.card-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

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

/* Card Preview */
.card-preview {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.preview-container {
    display: flex;
    justify-content: center;
}

.business-card {
    width: 100%;
    max-width: 400px;
    perspective: 1000px;
}

.card-front {
    width: 100%;
    height: 250px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.card-front:hover {
    transform: rotateY(5deg) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.card-template {
    width: 100%;
    height: 100%;
    padding: 20px;
    border-radius: 10px;
    color: white;
    direction: rtl;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modern-template,
.classic-template,
.minimal-template,
.gradient-template,
.dark-elegant-template,
.neon-template,
.sunset-template,
.ocean-template,
.retro-template,
.forest-template,
.cosmic-template,
.glassmorphism-template {
    width: 100%;
    height: 100%;
    padding: 20px;
    border-radius: 10px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modern-template {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.classic-template {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.minimal-template {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    border: 2px solid #e9ecef;
}

.card-header {
    text-align: right;
    margin-bottom: 15px;
    padding-right: 70px;
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

.card-header p {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

[dir="rtl"] .contact-item {
    direction: rtl;
}

.contact-item:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .contact-item:hover {
    transform: translateX(5px);
}

.contact-item i {
    width: 16px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.contact-item:hover i {
    opacity: 1;
}

/* Gallery Section */
.gallery-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.gallery-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

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

/* Advertisement Section */
.advertisement-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 0;
    margin-top: 4rem;
}

.advertisement-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    max-width: 900px;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.advertisement-card:hover {
    transform: translateY(-5px);
}

.ad-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}

.ad-icon {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(255,107,107,0.3);
}

.ad-text h3 {
    color: #333;
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.ad-text p {
    color: #666;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.ad-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ad-features li {
    color: #555;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ad-features li i {
    color: #28a745;
    font-size: 0.8rem;
}

.ad-action {
    text-align: center;
}

.ad-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}

.ad-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102,126,234,0.4);
    color: white;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0.5rem 0;
    color: #95a5a6;
}

.footer-bottom a {
    color: #3498db;
    text-decoration: none;
}

    .footer-bottom a:hover {
        text-decoration: underline;
    }

/* Card View Layout */
.card-view-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.card-display {
    flex: 1;
}

/* QR Code Section */
.qr-section {
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(102,126,234,0.1);
    min-width: 280px;
}

.qr-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.qr-code-container {
    text-align: center;
}

.qr-code {
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.qr-loading {
    color: #666;
    text-align: center;
}

.qr-loading i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.qr-info {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.qr-error {
    color: #dc3545;
    text-align: center;
}

.qr-error i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Responsive Card View */
@media (max-width: 768px) {
    .card-view-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .qr-section {
        order: -1;
        min-width: unset;
        max-width: 400px;
        margin: 0 auto;
    }

    .qr-code {
        width: 120px;
        height: 120px;
    }
}

/* Logo Upload Styles */
.logo-upload-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
}

.logo-upload-section h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.logo-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo-preview {
    width: 100px;
    height: 100px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.logo-preview:hover {
    border-color: #667eea;
    background: rgba(102,126,234,0.1);
}

.logo-preview i {
    font-size: 2rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.logo-preview span {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.logo-info {
    margin-top: 1rem;
    text-align: center;
}

.logo-info small {
    color: #666;
    font-size: 11px;
}

/* Logo in card preview */
.card-logo {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
}
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card View Styles */
.card-view-container {
    min-height: 100vh;
    background: #f8f9fa;
}

.card-view-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-view-main {
    padding: 80px 0 40px;
}

.card-display {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.business-card-view {
    width: 100%;
    max-width: 500px;
    perspective: 1000px;
    direction: rtl;
}

.business-card-view .card-front {
    width: 100%;
    height: 300px;
}

.business-card-view .card-template {
    height: 100%;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.card-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.contact-link:hover {
    opacity: 0.7;
}

.error-message {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.error-message i {
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-message h2 {
    color: #333;
    margin-bottom: 1rem;
}

/* Print Styles */
@media print {
    .card-view-header,
    .card-actions {
        display: none;
    }

    .card-display {
        margin-bottom: 0;
    }

    .business-card-view {
        max-width: none;
        width: 100%;
    }

    .card-front {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

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

    .banner-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .banner-close {
        position: absolute;
        top: 5px;
        right: 10px;
    }

    .header {
        top: 60px; /* Adjusted for mobile banner height */
    }

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

    .card-designer {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .create-section h2,
    .gallery-section h2 {
        font-size: 2rem;
    }

    .templates-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-front:hover {
        transform: none;
    }

    /* Responsive Advertisement */
    .ad-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }

    .ad-icon {
        margin: 0 auto;
    }

    .advertisement-card {
        padding: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .card-actions {
        flex-direction: column;
        align-items: center;
    }

    .business-card-view .card-front {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .designer-sidebar {
        padding: 1.5rem;
    }

    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}