/* SmartSolTech - Main Styles */

/* Tailwind Base (if not loading properly) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

/* Root Variables */
:root {
    --primary-color: #3B82F6;
    --secondary-color: #8B5CF6;
    --accent-color: #10B981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-padding {
    padding: 4rem 0;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3b82f6;
    text-decoration: none;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: #3b82f6;
    background-color: #eff6ff;
}

.mobile-menu {
    overflow: hidden;
}

.mobile-menu.show {
    max-height: 500px;
}

/* Button Hover Effects */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: translateY(0);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
    transform: translateY(0);
}

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

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

.portfolio-item {
    border-radius: 1rem;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(139, 92, 246, 0.8));
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Contact Form */
.contact-form {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Calculator Styles */
.calculator-step {
    animation: fadeIn 0.5s ease-in-out;
}

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

.option-card {
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.option-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

/* Hero Section Animations */
.hero-content {
    animation: heroFadeIn 1s ease-out;
}

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

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

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

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

/* Typography */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-new {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.status-in-progress {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .calculator-step {
        padding: 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f9fafb;
        --text-light: #d1d5db;
        --bg-light: #1f2937;
        --border-color: #374151;
    }
    
    body {
        background-color: #111827;
        color: var(--text-dark);
    }
    
    .card-hover, .service-card, .contact-form, .option-card {
        background: #1f2937;
        border-color: var(--border-color);
    }
    
    .form-control {
        background: #374151;
        border-color: #4b5563;
        color: white;
    }
    
    .form-control:focus {
        border-color: var(--primary-color);
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .contact-form, .mobile-menu {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .portfolio-item, .service-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* Accessibility */
.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 styles for better accessibility */
.form-control:focus,
.btn:focus,
.option-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Calculator Styles */
.calculator-step {
    display: none;
    animation: fadeInUp 0.5s ease-in-out;
}

.calculator-step.active {
    display: block;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step Indicators */
.calculator-progress-wrapper {
    position: relative;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    transform: scale(1.1);
}

.step-indicator.completed .step-number {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    transform: scale(1.05);
}

.step-indicator.completed .step-number::after {
    content: '✓';
    position: absolute;
    font-size: 14px;
    font-weight: bold;
}

.step-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
    transition: color 0.3s ease;
}

.step-indicator.active .step-label {
    color: #3B82F6;
    font-weight: 600;
}

.step-indicator.completed .step-label {
    color: #10B981;
    font-weight: 600;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 1rem;
    position: relative;
    top: -15px;
}

/* Selection indicators */
.selection-indicator {
    transition: all 0.3s ease;
}

.service-option.selected .selection-indicator,
.complexity-option.selected .selection-indicator,
.timeline-option.selected .selection-indicator {
    opacity: 1 !important;
}

.service-option.selected .selection-indicator .w-6,
.complexity-option.selected .selection-indicator .w-6,
.timeline-option.selected .selection-indicator .w-6 {
    background: #3B82F6;
    border-color: #3B82F6;
    position: relative;
}

.service-option.selected .selection-indicator .w-6::after,
.complexity-option.selected .selection-indicator .w-6::after,
.timeline-option.selected .selection-indicator .w-6::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.service-option,
.complexity-option,
.timeline-option {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-width: 2px;
}

/* Calculator specific improvements */
.calculator-step {
    width: 100%;
}

/* Better spacing and padding for calculator */
.calculator-step .service-option,
.calculator-step .complexity-option,
.calculator-step .timeline-option {
    margin: 0.5rem 0;
    padding: 1.5rem;
}

/* Ensure text doesn't touch edges */
.calculator-step h2,
.calculator-step h3,
.calculator-step h4,
.calculator-step p {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Responsive padding for service options */
@media (max-width: 640px) {
    .calculator-step .service-option,
    .calculator-step .complexity-option,
    .calculator-step .timeline-option {
        padding: 1rem;
        margin: 0.25rem 0;
    }
    
    .calculator-step .space-y-4 > *,
    .calculator-step .space-y-8 > * {
        margin-top: 0.75rem;
    }
}

/* Compact service options for full width layout */
.service-option.compact {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.service-option.compact .w-14 {
    width: 3rem;
    height: 3rem;
}

.service-option.compact h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.service-option.compact p {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Table-style layout for complexity and timeline */
.complexity-option,
.timeline-option {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.complexity-option .w-16,
.timeline-option .w-16 {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem auto;
}

.complexity-option h4,
.timeline-option h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.complexity-option p,
.timeline-option p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

/* Enhanced button styles */
.next-step,
.prev-step,
.restart-calculator {
    font-weight: 600;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

/* Better result card styling */
#step-3 .relative {
    max-width: none;
}

#step-3 #final-price {
    word-break: break-word;
}

/* Service Options Hover Effects */
.service-option[data-service="web"]:hover {
    border-color: #3B82F6 !important;
}

.service-option[data-service="mobile"]:hover {
    border-color: #10B981 !important;
}

.service-option[data-service="design"]:hover {
    border-color: #8B5CF6 !important;
}

.service-option[data-service="marketing"]:hover {
    border-color: #F59E0B !important;
}

/* Complexity Options Hover Effects */
.complexity-option[data-value="simple"]:hover {
    border-color: #10B981 !important;
}

.complexity-option[data-value="medium"]:hover {
    border-color: #F59E0B !important;
}

.complexity-option[data-value="complex"]:hover {
    border-color: #EF4444 !important;
}

/* Timeline Options Hover Effects */
.timeline-option[data-value="standard"]:hover {
    border-color: #3B82F6 !important;
}

.timeline-option[data-value="rush"]:hover {
    border-color: #F97316 !important;
}

.timeline-option[data-value="extended"]:hover {
    border-color: #059669 !important;
}

.service-option:hover,
.complexity-option:hover,
.timeline-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
}

/* Selected states with specific colors */
.service-option[data-service="web"].selected {
    border-color: #3B82F6 !important;
}

.service-option[data-service="mobile"].selected {
    border-color: #10B981 !important;
}

.service-option[data-service="design"].selected {
    border-color: #8B5CF6 !important;
}

.service-option[data-service="marketing"].selected {
    border-color: #F59E0B !important;
}

.complexity-option[data-value="simple"].selected {
    border-color: #10B981 !important;
}

.complexity-option[data-value="medium"].selected {
    border-color: #F59E0B !important;
}

.complexity-option[data-value="complex"].selected {
    border-color: #EF4444 !important;
}

.timeline-option[data-value="standard"].selected {
    border-color: #3B82F6 !important;
}

.timeline-option[data-value="rush"].selected {
    border-color: #F97316 !important;
}

.timeline-option[data-value="extended"].selected {
    border-color: #059669 !important;
}

.service-option.selected,
.complexity-option.selected,
.timeline-option.selected {
    background: linear-gradient(135deg, #EBF8FF, #F0F9FF) !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

/* Dark mode adjustments for selected states */
.dark .service-option.selected,
.dark .complexity-option.selected,
.dark .timeline-option.selected {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.1)) !important;
    border-color: #60A5FA !important;
}

/* Price Display Animation */
#final-price {
    animation: priceReveal 1.2s ease-in-out;
}

@keyframes priceReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateY(180deg);
    }
    50% {
        transform: scale(1.1) rotateY(90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

/* Calculator Progress Bar */
.calculator-progress {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.calculator-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #06B6D4);
    border-radius: 3px;
    transition: width 0.6s ease-in-out;
    width: 33.33%;
    position: relative;
    overflow: hidden;
}

.calculator-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.calculator-progress-bar.step-1 {
    width: 33.33%;
}

.calculator-progress-bar.step-2 {
    width: 66.66%;
}

.calculator-progress-bar.step-3 {
    width: 100%;
}

/* Button hover effects */
.group:hover .fas {
    transform: translateX(2px);
}

/* Calculator Mobile Improvements */
@media (max-width: 768px) {
    .service-option,
    .complexity-option,
    .timeline-option {
        margin-bottom: 1rem;
    }
    
    #final-price {
        font-size: 2.5rem;
    }
    
    .step-connector {
        display: none;
    }
    
    .calculator-progress-wrapper .flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-indicator {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        margin-bottom: 0;
    }
}

/* Hero секции - компактные для внутренних страниц */
.hero-section-compact {
    min-height: 40vh !important;
    max-height: 50vh !important;
    padding: 4rem 0 !important;
}

.hero-section-compact h1 {
    font-size: 3rem !important;
    margin-bottom: 1rem !important;
}

.hero-section-compact p {
    font-size: 1.125rem !important;
    opacity: 0.9 !important;
}

@media (max-width: 768px) {
    .hero-section-compact {
        min-height: 30vh !important;
        padding: 3rem 0 !important;
    }
    
    .hero-section-compact h1 {
        font-size: 2.5rem !important;
    }
}

/* Полноэкранный Hero только для главной */
.hero-section {
    min-height: 100vh !important;
}