/* Mobile-First Modern Design Utilities - Based on kashan.ir patterns */

/* Color Scheme */
:root {
    --primary-color: #00386B;
    --primary-dark: #004B8C;
    --accent-color: #E7B553;
    --light-bg: #f8f9fa;
    --border-color: #e9ecef;
    --text-dark: #333;
    --text-light: #666;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 5px 40px rgba(0,0,0,0.16);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Rounded Containers */
.rounded-pill {
    border-radius: 50px;
}

.rounded-xl {
    border-radius: 12px;
}

.rounded-lg {
    border-radius: 10px;
}

.rounded-md {
    border-radius: 8px;
}

.rounded-sm {
    border-radius: 6px;
}

/* Shadows */
.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-none {
    box-shadow: none;
}

/* Hover Animations */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: var(--shadow-lg);
}

.hover-color {
    transition: color 0.3s ease;
}

.hover-color:hover {
    color: var(--accent-color);
}

/* Text Colors */
.text-primary {
    color: var(--primary-color);
}

.text-accent {
    color: var(--accent-color);
}

.text-muted {
    color: var(--text-light);
}

/* Background Colors */
.bg-primary-light {
    background-color: #f0f4f8;
}

.bg-accent-light {
    background-color: #fff9f0;
}

/* Gradient Backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.gradient-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, #d4a254 100%);
}

/* Borders */
.border-top-primary {
    border-top: 4px solid var(--primary-color);
}

.border-bottom-primary {
    border-bottom: 4px solid var(--primary-color);
}

.border-left-primary {
    border-left: 4px solid var(--primary-color);
}

.border-primary {
    border: 2px solid var(--primary-color);
}

.border-accent {
    border: 2px solid var(--accent-color);
}

/* Spacing */
.spacing-xs {
    padding: 4px;
    margin: 4px;
}

.spacing-sm {
    padding: 8px;
    margin: 8px;
}

.spacing-md {
    padding: 12px;
    margin: 12px;
}

.spacing-lg {
    padding: 16px;
    margin: 16px;
}

.spacing-xl {
    padding: 20px;
    margin: 20px;
}

/* ============================================
   COMPONENT STYLES
   ============================================ */

/* Badge Styles */
.badge-custom {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-accent {
    background-color: var(--accent-color);
    color: #333;
}

/* Card Enhancements */
.card-modern {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 16px;
    font-weight: 700;
}

/* Button Enhancements */
.btn-modern {
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-modern.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-modern.btn-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, #d4a254 100%);
    color: #333;
}

.btn-modern.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: white;
}

.btn-modern.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Icon Boxes */
.icon-box {
    text-align: center;
    padding: 24px;
    border-radius: 12px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.icon-box:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.icon-box i {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.icon-box:hover i {
    color: var(--accent-color);
}

.icon-box h4 {
    font-weight: 700;
    margin: 12px 0 8px;
}

.icon-box p {
    margin: 0;
    font-size: 14px;
}

/* Testimonial Cards */
.testimonial-card {
    border-radius: 12px;
    padding: 20px;
    background-color: white;
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 12px;
    border: 3px solid var(--primary-color);
}

.testimonial-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 10px;
}

.testimonial-name {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 14px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
}

.timeline-item {
    margin-bottom: 20px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 2px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-content {
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* Stats Display */
.stat-box {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 16px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-light);
    font-size: 14px;
}

.feature-list li::before {
    content: '\f058';
    font-family: 'FontAwesome';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 900;
}

/* Divider */
.divider {
    height: 4px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    margin: 24px 0;
    border: none;
}

.divider-accent {
    background: linear-gradient(to right, transparent, var(--accent-color), transparent);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-slide-down {
    animation: slideInDown 0.5s ease-out;
}

.animate-slide-up {
    animation: slideInUp 0.5s ease-out;
}

.animate-fade-scale {
    animation: fadeInScale 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   MOBILE UTILITIES
   ============================================ */

@media screen and (max-width: 768px) {
    /* Hide on mobile */
    .d-mobile-none {
        display: none !important;
    }
    
    /* Show only on mobile */
    .d-mobile-block {
        display: block !important;
    }
    
    .d-mobile-flex {
        display: flex !important;
    }
    
    .d-mobile-inline {
        display: inline !important;
    }
    
    /* Mobile padding */
    .p-mobile-0 { padding: 0 !important; }
    .p-mobile-1 { padding: 4px !important; }
    .p-mobile-2 { padding: 8px !important; }
    .p-mobile-3 { padding: 12px !important; }
    .p-mobile-4 { padding: 16px !important; }
    
    /* Mobile margin */
    .m-mobile-0 { margin: 0 !important; }
    .m-mobile-1 { margin: 4px !important; }
    .m-mobile-2 { margin: 8px !important; }
    .m-mobile-3 { margin: 12px !important; }
    .m-mobile-4 { margin: 16px !important; }
    
    /* Mobile text alignment */
    .text-mobile-center { text-align: center !important; }
    .text-mobile-right { text-align: right !important; }
    .text-mobile-left { text-align: left !important; }
    
    /* Mobile font sizes */
    .fs-mobile-xs { font-size: 11px !important; }
    .fs-mobile-sm { font-size: 12px !important; }
    .fs-mobile-base { font-size: 13px !important; }
    .fs-mobile-md { font-size: 14px !important; }
    .fs-mobile-lg { font-size: 16px !important; }
}

/* ============================================
   RESPONSIVE GRID
   ============================================ */

@media screen and (max-width: 768px) {
    .grid-responsive {
        display: grid;
        gap: 12px;
    }
    
    .grid-responsive-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-responsive-1 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .no-print,
    .no-print * {
        display: none !important;
    }
    
    body {
        background-color: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    :root {
        --shadow-sm: 0 1px 4px rgba(0,0,0,0.2);
        --shadow-md: 0 2px 8px rgba(0,0,0,0.3);
        --shadow-lg: 0 4px 16px rgba(0,0,0,0.4);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
