.terms-page {
    direction: rtl;
    text-align: right;
    font-family: 'yekanbakh', 'IRANSans', 'Vazir', Tahoma, sans-serif;
}

@keyframes terms-tpfadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.terms-page .animate__tpfadeUp {
    animation-name: terms-tpfadeUp;
}

@keyframes terms-fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.terms-page .animate__fadeInLeft {
    animation-name: terms-fadeInLeft;
}

@keyframes terms-fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.terms-page .animate__fadeInRight {
    animation-name: terms-fadeInRight;
}

@keyframes terms-fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.terms-page .animate__fadeInUp {
    animation-name: terms-fadeInUp;
}

@keyframes terms-header-shine {
    0%, 100% { 
        transform: translate(-30%, -30%); 
    }
    50% { 
        transform: translate(-20%, -20%); 
    }
}

@keyframes terms-pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.7; 
    }
}

html {
    scroll-behavior: smooth;
}

/* ==================== بک‌گراند‌های داینامیک ==================== */
.bg-blur-top {
    width: 300px;
    height: 200px;
    border-radius: 50%;
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    filter: blur(200px);
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
}

@media (min-width: 1024px) {
    .bg-blur-top {
        width: 500px;
        height: 400px;
    }
}

.bg-blur-bottom {
    width: 300px;
    height: 200px;
    border-radius: 50%;
    position: absolute;
    z-index: -1;
    bottom: 0;
    right: 0;
    filter: blur(200px);
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(249, 115, 22, 0.08) 100%);
}

@media (min-width: 1024px) {
    .bg-blur-bottom {
        width: 500px;
        height: 400px;
    }
}

.terms-header-section {
    background: linear-gradient(135deg, #eab308 0%, #f97316 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
}

@media (min-width: 1024px) {
    .terms-header-section {
        padding: 4rem 0;
    }
}

.terms-header-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: terms-header-shine 3s ease-in-out infinite;
}

.terms-header-title {
    font-size: 1.875rem;
    font-weight: bold;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .terms-header-title {
        font-size: 2.25rem;
    }
}

.terms-header-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 42rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.terms-header-divider {
    width: 6rem;
    height: 0.25rem;
    background: rgba(255, 255, 255, 0.5);
    margin: 1.5rem auto 0;
    border-radius: 9999px;
    position: relative;
    z-index: 1;
}

.last-update {
    display: inline-block;
}

.update-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 9999px;
    color: #eab308;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.update-badge:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(249, 115, 22, 0.15) 100%);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.2);
}

.update-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #eab308;
    animation: terms-pulse 2s ease-in-out infinite;
}

.sidebar-nav {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border: 1px solid #f1f5f9;
    position: sticky;
    top: 2rem;
    transition: all 0.3s ease;
}

.sidebar-nav:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-title::before {
    content: '';
    width: 4px;
    height: 1.25rem;
    background: linear-gradient(135deg, #eab308 0%, #f97316 100%);
    border-radius: 9999px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-link {
    display: block;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, #eab308 0%, #f97316 100%);
    border-radius: 9999px;
    transition: height 0.3s ease;
}

.sidebar-link:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(249, 115, 22, 0.08) 100%);
    color: #eab308;
    padding-right: 1.5rem;
}

.sidebar-link:hover::before {
    height: 60%;
}

.sidebar-link.active {
    background: linear-gradient(135deg, #eab308 0%, #f97316 100%);
    color: white;
    font-weight: bold;
    padding-right: 1.5rem;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

.terms-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

@media (min-width: 1024px) {
    .terms-card {
        padding: 2rem;
    }
}

.terms-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #eab308 0%, #f97316 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.terms-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-4px);
}

.terms-card:hover::before {
    opacity: 1;
}

.terms-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8fafc;
}

.terms-number {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #eab308 0%, #f97316 100%);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.terms-card:hover .terms-number {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 6px 16px rgba(234, 179, 8, 0.4);
}

.terms-title {
    font-size: 1.375rem;
    font-weight: bold;
    color: #1e293b;
    margin: 0;
}

@media (min-width: 1024px) {
    .terms-title {
        font-size: 1.5rem;
    }
}

.terms-content {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.terms-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.03) 0%, rgba(249, 115, 22, 0.03) 100%);
    border: 1px solid rgba(234, 179, 8, 0.08);
    transition: all 0.3s ease;
    color: #4b5563;
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0;
    position: relative;
    padding-right: 2.5rem;
}

.terms-item::before {
    content: '•';
    position: absolute;
    right: 1rem;
    top: 0.75rem;
    color: #eab308;
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.7;
}

.terms-item:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.06) 0%, rgba(249, 115, 22, 0.06) 100%);
    border-color: rgba(234, 179, 8, 0.15);
    transform: translateX(-4px);
}

.confirmation-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 2px solid rgba(234, 179, 8, 0.2);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.confirmation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.05) 0%, rgba(249, 115, 22, 0.05) 100%);
    z-index: 0;
}

.confirmation-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-color: rgba(234, 179, 8, 0.3);
}

.confirmation-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, #eab308 0%, #f97316 100%);
    box-shadow: 0 8px 20px rgba(234, 179, 8, 0.35);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.confirmation-card:hover .confirmation-icon {
    transform: scale(1.1) rotate(360deg);
}

.confirmation-icon svg {
    width: 2rem;
    height: 2rem;
    color: white;
}

.confirmation-content {
    position: relative;
    z-index: 1;
}

.confirmation-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.confirmation-text {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.8;
    max-width: 36rem;
    margin: 0 auto 1.5rem;
}

.confirmation-btn-wrapper {
    display: flex;
    justify-content: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #eab308 0%, #f97316 100%);
    color: white;
    font-weight: bold;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(234, 179, 8, 0.4);
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9375rem;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px -10px rgba(234, 179, 8, 0.5);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:focus-visible {
    outline: 2px solid #eab308;
    outline-offset: 2px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 9999px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #eab308 0%, #f97316 100%);
    border-radius: 9999px;
}

@media (max-width: 1024px) {
    .sidebar-nav {
        position: static;
        margin-bottom: 2rem;
    }
    
    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .sidebar-menu li {
        flex: 1 1 auto;
    }
    
    .sidebar-link {
        text-align: center;
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    .sidebar-link:hover {
        padding-right: 1rem;
    }
    
    .sidebar-link::before {
        display: none;
    }
}

@media (max-width: 640px) {
    .terms-card {
        padding: 1rem;
    }
    
    .terms-header-section {
        padding: 2rem 0;
    }
    
    .terms-header-title {
        font-size: 1.5rem;
    }
    
    .terms-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
        border-radius: 0.75rem;
    }
    
    .terms-title {
        font-size: 1.125rem;
    }
    
    .terms-item {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
        padding-right: 2rem;
    }
    
    .terms-item::before {
        right: 0.75rem;
        font-size: 1rem;
    }
    
    .confirmation-card {
        padding: 1.5rem;
    }
    
    .sidebar-menu {
        flex-direction: column;
    }
    
    .sidebar-menu li {
        flex: 1 1 100%;
    }
}

@media print {
    .terms-header-section,
    .sidebar-nav,
    .bg-blur-top,
    .bg-blur-bottom,
    .btn-primary {
        display: none;
    }
    
    .terms-card,
    .confirmation-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
        break-inside: avoid;
    }
    
    body {
        background: white;
    }
    
    .terms-item:hover {
        transform: none;
        background: none;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

*:focus-visible {
    outline: 2px solid #eab308;
    outline-offset: 2px;
}
