/* تنظیمات پیشفرض */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* رنگ‌های تم تلگرام */
    --tg-primary: #3390ec;
    --tg-primary-dark: #2b7fd4;
    --tg-primary-light: #5ba3f0;
    --tg-secondary: #0088cc;
    --tg-bg: #ffffff;
    --tg-bg-secondary: #f4f4f5;
    --tg-bg-dark: #e5e5e5;
    --tg-text: #000000;
    --tg-text-secondary: #707579;
    --tg-border: #e0e0e0;
    --tg-hover: #f0f0f0;
    --tg-success: #4caf50;
    --tg-shadow: rgba(0, 0, 0, 0.1);
    --tg-shadow-hover: rgba(51, 144, 236, 0.2);
    
    /* گرادیانت تلگرام */
    --tg-gradient: linear-gradient(135deg, #3390ec 0%, #0088cc 100%);
    --tg-gradient-hover: linear-gradient(135deg, #2b7fd4 0%, #0077b5 100%);
    --tg-gradient-dark: linear-gradient(135deg, #1e6bb8 0%, #005a8a 100%);
    
    /* فاصله‌گذاری مینیمال */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transition */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', sans-serif;
    background-color: var(--tg-bg-secondary);
    color: var(--tg-text);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header/Navbar - مینیمال و شبیه تلگرام */
.navbar {
    background: var(--tg-bg) !important;
    padding: var(--spacing-sm) 0;
    box-shadow: 0 1px 3px var(--tg-shadow);
    border-bottom: 1px solid var(--tg-border);
    transition: var(--transition);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    box-shadow: 0 2px 8px var(--tg-shadow);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--tg-primary) !important;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: var(--transition);
    text-decoration: none;
}

.navbar-brand img {
    height: 45px;
    width: auto;
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.1) rotate(5deg);
}

.navbar-brand:hover {
    color: var(--tg-primary-dark) !important;
    transform: scale(1.02);
}

/* Hero Content Wrapper - برای چیدمان لوگو و متن */
.hero-content-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-xxl);
    flex-wrap: wrap;
}

.hero-text-content {
    flex: 1;
    min-width: 300px;
    text-align: right;
}

/* Hero Logo - حرفه‌ای و بزرگ */
.hero-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    animation: logoFadeInScale 1.5s ease-out;
}

.hero-logo {
    max-width: 280px;
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: logoFloat 3s ease-in-out infinite;
    cursor: pointer;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 0 0 2px rgba(51, 144, 236, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 0 20px rgba(51, 144, 236, 0.1);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    padding: 8px;
}

.hero-logo:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 12px 24px rgba(51, 144, 236, 0.5));
    border-color: rgba(51, 144, 236, 0.5);
    box-shadow: 
        0 0 0 4px rgba(51, 144, 236, 0.4),
        0 12px 32px rgba(51, 144, 236, 0.3),
        inset 0 0 30px rgba(51, 144, 236, 0.2);
}

@keyframes logoFadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.hero-logo.pulse {
    animation: logoPulse 2s ease-in-out infinite;
}

.hero-logo.rotate {
    animation: logoRotate 2s linear infinite;
}

@keyframes logoRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.logo-container {
    display: inline-block;
    width: 45px;
    height: 45px;
    margin-left: var(--spacing-sm);
    vertical-align: middle;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--tg-bg);
    padding: 3px;
    transition: var(--transition);
    border: 2px solid rgba(51, 144, 236, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo-container:hover {
    transform: scale(1.1);
    border-color: var(--tg-primary);
    box-shadow: 0 4px 12px rgba(51, 144, 236, 0.3);
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.navbar-nav .nav-link {
    color: var(--tg-text) !important;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md) !important;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    margin: 0 4px;
    font-size: 0.95rem;
}

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

/* Hamburger Menu - منوی همبرگر */
.navbar-toggler {
    border: 2px solid var(--tg-primary);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    background-color: transparent;
    transition: var(--transition);
}

.navbar-toggler:hover {
    background-color: var(--tg-hover);
    border-color: var(--tg-primary-dark);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(51, 144, 236, 0.25);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%233390ec' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 28px;
    height: 28px;
    display: block;
    transition: var(--transition);
    opacity: 1;
}

.navbar-toggler:hover .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%232b7fd4' stroke-linecap='round' stroke-miterlimit='10' stroke-width='4' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    transform: scale(1.1);
}

/* Hero Section - مینیمال */
.hero-section {
    background: var(--tg-gradient);
    padding: var(--spacing-xxl) 0;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Typography for Telbot Land */
.hero-typography {
    margin-bottom: var(--spacing-xl);
    direction: ltr;
    text-align: center;
}

.hero-section {
    text-align: center;
}

.hero-content-wrapper {
    text-align: center;
}

.brand-typography {
    font-family: 'Bubblegum Sans', 'Fredoka', 'Comfortaa', cursive, sans-serif;
    font-size: 5.5rem;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
    text-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 2px 10px rgba(255, 255, 255, 0.2),
        0 0 30px rgba(51, 144, 236, 0.4);
    display: inline-block;
    direction: ltr;
    color: #ffffff;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.3);
    text-stroke: 2px rgba(255, 255, 255, 0.3);
}

.brand-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) rotateX(90deg) scale(0.8);
    animation: letterReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: var(--delay);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.brand-letter:hover {
    transform: translateY(-15px) scale(1.3) rotateZ(-5deg);
    color: rgba(255, 255, 255, 1);
    text-shadow: 
        0 8px 30px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(51, 144, 236, 0.8);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.brand-space {
    display: inline-block;
    width: 20px;
}

@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(90deg) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px) rotateX(0deg) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg) scale(1);
    }
}

.hero-section h1,
.hero-section h2 {
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section .lead {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.95;
    line-height: 1.7;
}

/* Buttons - استایل تلگرام */
.btn {
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: var(--tg-primary);
    color: white;
    box-shadow: 0 2px 8px var(--tg-shadow-hover);
}

.btn-primary:hover {
    background: var(--tg-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--tg-shadow-hover);
    color: white;
}

.btn-light {
    background: white;
    color: var(--tg-primary);
    box-shadow: 0 2px 8px var(--tg-shadow);
}

.btn-light:hover {
    background: var(--tg-bg-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--tg-shadow);
    color: var(--tg-primary);
}

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

.btn-outline-light:hover {
    background: white;
    color: var(--tg-primary);
    transform: translateY(-2px);
}

/* Sections - مینیمال */
.section {
    padding: var(--spacing-xxl) 0;
}

.section:nth-child(even) {
    background-color: var(--tg-bg-secondary);
}

.section h2 {
    font-weight: 700;
    color: var(--tg-text);
    margin-bottom: var(--spacing-md);
    font-size: 2rem;
}

.section p {
    color: var(--tg-text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

/* Cards - مینیمال */
.card {
    transition: var(--transition);
    border: 1px solid var(--tg-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px var(--tg-shadow);
    height: 100%;
    background: var(--tg-bg);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--tg-shadow);
    border-color: var(--tg-primary-light);
}

/* Card Tilt Effect */
.card-tilt {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.card-tilt:hover {
    box-shadow: 0 12px 32px var(--tg-shadow-hover);
}

.card-body {
    padding: var(--spacing-lg);
}

.card-title {
    font-weight: 700 !important;
    color: var(--tg-text) !important;
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

.card-text {
    color: var(--tg-text-secondary) !important;
    line-height: 1.7;
    font-size: 0.95rem;
}

.card-body h4 {
    color: var(--tg-text) !important;
    font-weight: 700 !important;
    margin-bottom: var(--spacing-md);
}

.card-body p {
    color: var(--tg-text-secondary) !important;
}

.card-body strong {
    color: var(--tg-text) !important;
    font-weight: 600;
}

/* Portfolio Grid - مینیمال */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.portfolio-item {
    background: var(--tg-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px var(--tg-shadow);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--tg-border);
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--tg-shadow);
    border-color: var(--tg-primary-light);
}

.portfolio-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Image Zoom */
.img-zoom {
    transition: transform 0.5s ease;
    cursor: pointer;
}

.portfolio-content {
    padding: var(--spacing-md);
}

.portfolio-content h3 {
    font-weight: 700;
    color: var(--tg-text);
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.portfolio-content p {
    color: var(--tg-text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Video Grid - مینیمال */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.video-item {
    background: var(--tg-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px var(--tg-shadow);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--tg-border);
}

.video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--tg-shadow);
    border-color: var(--tg-primary-light);
}

.video-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: var(--transition);
}

.video-item:hover img {
    transform: scale(1.05);
}

.video-title {
    font-size: 0.95rem;
    color: var(--tg-text);
    text-align: center;
    padding: var(--spacing-md);
    font-weight: 600;
}

/* Footer - حرفه‌ای و زیبا */
footer {
    position: relative;
    margin-top: var(--spacing-xxl);
    overflow: hidden;
}

.footer-main {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: var(--spacing-xxl) 0 var(--spacing-xl);
    z-index: 1;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.footer-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--tg-primary) 0%, 
        var(--tg-secondary) 50%, 
        var(--tg-primary) 100%);
    animation: gradientShift 3s ease infinite;
}

.footer-main::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(51, 144, 236, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

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

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

.footer-content {
    padding-bottom: var(--spacing-xl);
}

.footer-section {
    margin-bottom: var(--spacing-lg);
}

.footer-title {
    color: var(--tg-primary-light);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid rgba(51, 144, 236, 0.3);
    display: flex;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-title i {
    color: var(--tg-primary-light);
    font-size: 1.2rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.footer-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.stat-item i {
    color: var(--tg-success);
    font-size: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    padding: 5px 0;
}

.footer-links a:hover {
    color: white;
    padding-right: var(--spacing-sm);
    transform: translateX(-5px);
}

.footer-links a i {
    color: var(--tg-primary-light);
    font-size: 1rem;
    margin-left: var(--spacing-sm);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: rgba(51, 144, 236, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(51, 144, 236, 0.2);
    transition: var(--transition);
}

.footer-contact li:hover {
    background: rgba(51, 144, 236, 0.2);
    border-color: var(--tg-primary);
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(51, 144, 236, 0.2);
}

.footer-contact li i {
    color: var(--tg-primary-light);
    font-size: 1.3rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-contact li div {
    flex: 1;
}

.footer-contact li strong {
    display: block;
    color: white;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.footer-contact li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-contact li a:hover {
    color: var(--tg-primary-light);
    text-decoration: underline;
}

.social-links-footer {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.social-link-footer {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(51, 144, 236, 0.1);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid rgba(51, 144, 236, 0.2);
}

.social-link-footer:hover {
    background: rgba(51, 144, 236, 0.25);
    color: white;
    transform: translateX(-5px);
    border-color: var(--tg-primary);
    box-shadow: 0 4px 12px rgba(51, 144, 236, 0.3);
}

.social-link-footer i {
    font-size: 1.2rem;
    color: var(--tg-primary-light);
}

.footer-cta {
    margin-top: var(--spacing-md);
}

.footer-bottom {
    position: relative;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 100%);
    padding: var(--spacing-md) 0;
    border-top: 2px solid rgba(51, 144, 236, 0.3);
    z-index: 1;
    width: 100%;
    position: relative;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--tg-primary) 50%, 
        transparent 100%);
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-bottom-left,
.footer-bottom-right {
    flex: 1;
    min-width: 250px;
}

.footer-bottom-left {
    text-align: right;
}

.footer-bottom-right {
    text-align: left;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 400;
}

.footer-bottom strong {
    color: var(--tg-primary-light);
    font-weight: 600;
}

.footer-bottom .text-danger {
    color: #ff6b6b !important;
    animation: heartbeat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(255, 107, 107, 0.5));
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Forms - مینیمال */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--tg-border);
    padding: var(--spacing-sm) var(--spacing-md);
    transition: var(--transition);
    background: var(--tg-bg);
    color: var(--tg-text);
}

.form-control:focus, .form-select:focus {
    border-color: var(--tg-primary);
    box-shadow: 0 0 0 3px var(--tg-shadow-hover);
    outline: none;
}

/* Tables - مینیمال */
.table {
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--tg-border);
}

.table-hover tbody tr {
    transition: var(--transition);
}

.table-hover tbody tr:hover {
    background-color: var(--tg-hover);
}

/* Badges */
.badge {
    font-size: 0.85rem;
    padding: 0.4em 0.8em;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Performance Optimizations */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== RESPONSIVE - موبایل مینیمال ========== */

/* موبایل کوچک (تا 576px) */
@media (max-width: 575.98px) {
    :root {
        --spacing-xs: 6px;
        --spacing-sm: 10px;
        --spacing-md: 12px;
        --spacing-lg: 16px;
        --spacing-xl: 24px;
        --spacing-xxl: 32px;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .navbar {
        padding: var(--spacing-xs) 0;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .logo-container {
        width: 32px;
        height: 32px;
    }
    
    .hero-section {
        padding: var(--spacing-xl) 0;
        min-height: 50vh;
    }
    
    .brand-typography {
        font-size: 2.8rem;
        letter-spacing: 3px;
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
        text-stroke: 1px rgba(255, 255, 255, 0.3);
    }
    
    .hero-section h1,
    .hero-section h2 {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-section .lead {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .section h2 {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .section p {
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-text {
        font-size: 0.9rem;
    }
    
    .portfolio-grid,
    .video-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        margin-top: var(--spacing-lg);
    }
    
    .portfolio-item img,
    .video-item img {
        height: 180px;
    }
    
    .portfolio-content,
    .video-title {
        padding: var(--spacing-sm);
        font-size: 0.85rem;
    }
    
    .btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.9rem;
    }
    
    .contact-table {
        width: 100%;
        margin: var(--spacing-md) 0;
        font-size: 0.85rem;
    }
    
    .contact-table th,
    .contact-table td {
        padding: var(--spacing-sm);
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
    }
    
    .footer-main {
        padding: var(--spacing-xl) 0 var(--spacing-lg);
    }
    
    .footer-section {
        margin-bottom: var(--spacing-lg);
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .footer-links a,
    .social-link-footer {
        font-size: 0.9rem;
    }
    
    .footer-contact li {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-contact li i {
        margin: 0 auto var(--spacing-xs);
    }
    
    .hero-content-wrapper {
        flex-direction: column;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .hero-logo-container {
        order: -1;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-text-content {
        text-align: center;
        width: 100%;
    }
    
    .hero-logo {
        max-width: 200px;
        width: 200px;
        height: 200px;
    }
    
    .hero-typography {
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .footer-bottom-left,
    .footer-bottom-right {
        text-align: center;
        width: 100%;
    }
}

/* دسکتاپ (768px به بالا) */
@media (min-width: 768px) {
    .hero-content-wrapper {
        flex-direction: row;
        align-items: center;
        text-align: right;
    }
    
    .hero-logo-container {
        order: 0;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .hero-text-content {
        text-align: right;
        flex: 1;
    }
    
    .hero-typography {
        text-align: center;
    }
}

/* تبلت (576px تا 768px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .brand-typography {
        font-size: 3.8rem;
        letter-spacing: 5px;
        -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.3);
        text-stroke: 1.5px rgba(255, 255, 255, 0.3);
    }
    
    .hero-section h1,
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .section h2 {
        font-size: 1.75rem;
    }
    
    .portfolio-grid,
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

/* تبلت بزرگ (768px تا 992px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .brand-typography {
        font-size: 4.5rem;
        letter-spacing: 6px;
        -webkit-text-stroke: 1.8px rgba(255, 255, 255, 0.3);
        text-stroke: 1.8px rgba(255, 255, 255, 0.3);
    }
    
    .portfolio-grid,
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* دسکتاپ (992px به بالا) */
@media (min-width: 992px) {
    .portfolio-grid,
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn {
        display: none;
    }
}

/* Dark Mode Support (اختیاری) */
@media (prefers-color-scheme: dark) {
    :root {
        --tg-bg: #1e1e1e;
        --tg-bg-secondary: #2a2a2a;
        --tg-bg-dark: #333333;
        --tg-text: #ffffff;
        --tg-text-secondary: #b0b0b0;
        --tg-border: #3a3a3a;
        --tg-hover: #2a2a2a;
    }
}

/* ========== ANIMATED GRID ========== */
.animated-grid-section {
    position: relative;
    width: 100%;
    padding: 0;
    overflow: hidden;
    z-index: 1;
}

/* Footer Background Grid */
.animated-grid-section.footer-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
}

.animated-grid-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    height: 100%;
}

.animated-grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 400px;
    margin: 0 auto;
}

.square {
    width: 100%;
    height: 100%;
    background: var(--tg-primary);
    border-radius: var(--radius-sm);
    opacity: 0.4;
    color: var(--tg-primary);
    transform: scale(0);
    transition: opacity 0.3s ease;
    box-shadow: 0 0 0 0 currentColor;
}

.square:hover {
    opacity: 0.6;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .animated-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(8, 1fr);
        gap: 6px;
        min-height: 500px;
    }
    
    .animated-grid-section.footer-background {
        opacity: 0.12;
    }
}

@media (max-width: 576px) {
    .animated-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(11, 1fr);
        gap: 4px;
        min-height: 600px;
    }
    
    .animated-grid-section.footer-background {
        opacity: 0.1;
    }
}
