/* ==========================================
   VIPSAMOCHODY - Harmony & Polish
   Consistent spacing, transitions, polish
   ========================================== */

/* === GLOBAL IMPROVEMENTS === */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Better focus states */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* === CONSISTENT SPACING === */
section {
    scroll-margin-top: 100px;
}

/* Breathing room between sections */
.hero-new + .stats-banner {
    margin-top: 0;
}

.stats-banner + .featured-new {
    margin-top: 0;
}

/* === SECTION HEADERS HARMONY === */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-3xl);
    animation: fadeInUp 0.8s ease-out;
}

.section-subtitle {
    animation: fadeIn 0.6s ease-out;
}

.section-title,
.section-title-new {
    animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.section-description {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
    max-width: 700px;
    margin: 0 auto;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Stagger animation for lists */
.services-list .service-item-new {
    animation: slideInLeft 0.6s ease-out backwards;
}

.services-list .service-item-new:nth-child(1) {
    animation-delay: 0.1s;
}

.services-list .service-item-new:nth-child(2) {
    animation-delay: 0.2s;
}

.services-list .service-item-new:nth-child(3) {
    animation-delay: 0.3s;
}

.services-list .service-item-new:nth-child(4) {
    animation-delay: 0.4s;
}

/* Process steps stagger */
.process-step {
    animation: fadeInUp 0.8s ease-out backwards;
}

.process-step:nth-child(1) {
    animation-delay: 0.1s;
}

.process-step:nth-child(3) {
    animation-delay: 0.2s;
}

.process-step:nth-child(5) {
    animation-delay: 0.3s;
}

.process-step:nth-child(7) {
    animation-delay: 0.4s;
}

/* === HOVER IMPROVEMENTS === */
.btn-new,
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-new::after,
.btn-primary::after,
.btn-secondary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-new:hover::after,
.btn-primary:hover::after,
.btn-secondary:hover::after {
    width: 400px;
    height: 400px;
}

/* === CARD IMPROVEMENTS === */
.service-item-new,
.testimonial-card-new,
.process-step {
    transition: all var(--transition-base);
}

/* Subtle parallax on scroll */
@media (prefers-reduced-motion: no-preference) {
    .hero-image-main,
    .services-image-card {
        transition: transform 0.3s ease-out;
    }
}

/* === LOADING STATES === */
.loading-container {
    text-align: center;
    padding: var(--space-4xl);
    color: var(--color-gray-400);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--color-gray-700);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-lg);
}

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

/* === STAT BANNER IMPROVEMENTS === */
.stat-banner-item {
    animation: fadeInUp 0.8s ease-out backwards;
}

.stat-banner-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-banner-item:nth-child(3) {
    animation-delay: 0.2s;
}

.stat-banner-item:nth-child(5) {
    animation-delay: 0.3s;
}

.stat-banner-item:nth-child(7) {
    animation-delay: 0.4s;
}

/* === HERO IMPROVEMENTS === */
.hero-new-left {
    animation: slideInLeft 1s ease-out;
}

.hero-new-right {
    animation: slideInRight 1s ease-out;
}

.hero-badge {
    animation: fadeIn 0.8s ease-out 0.3s backwards;
}

.hero-new-features .hero-new-feature {
    animation: fadeInUp 0.8s ease-out backwards;
}

.hero-new-features .hero-new-feature:nth-child(1) {
    animation-delay: 0.5s;
}

.hero-new-features .hero-new-feature:nth-child(2) {
    animation-delay: 0.6s;
}

.hero-new-features .hero-new-feature:nth-child(3) {
    animation-delay: 0.7s;
}

/* === CARS GRID IMPROVEMENTS === */
.cars-grid-new .car-card {
    animation: fadeInUp 0.8s ease-out backwards;
}

.cars-grid-new .car-card:nth-child(1) {
    animation-delay: 0.1s;
}

.cars-grid-new .car-card:nth-child(2) {
    animation-delay: 0.2s;
}

.cars-grid-new .car-card:nth-child(3) {
    animation-delay: 0.3s;
}

.cars-grid-new .car-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* === LINK IMPROVEMENTS === */
a {
    transition: all var(--transition-base);
}

.btn-text-link {
    position: relative;
}

.btn-text-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.btn-text-link:hover::after {
    width: 100%;
}

/* === CTA SECTION IMPROVEMENTS === */
.cta-section {
    animation: fadeIn 1s ease-out;
}

.cta-title {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.cta-description {
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.cta-buttons {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.cta-features .cta-feature {
    animation: fadeIn 0.8s ease-out backwards;
}

.cta-features .cta-feature:nth-child(1) {
    animation-delay: 0.5s;
}

.cta-features .cta-feature:nth-child(2) {
    animation-delay: 0.6s;
}

.cta-features .cta-feature:nth-child(3) {
    animation-delay: 0.7s;
}

/* === SCROLL REVEAL (Intersection Observer ready) === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* === IMAGE LAZY LOAD === */
img {
    transition: opacity 0.3s ease-out;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === SELECTION === */
::selection {
    background: var(--color-primary);
    color: var(--color-black);
}

::-moz-selection {
    background: var(--color-primary);
    color: var(--color-black);
}

/* === IMPROVED SCROLLBAR === */
::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-900);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-700);
    border-radius: 10px;
    border: 3px solid var(--color-gray-900);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* === BETTER PRINT STYLES === */
@media print {
    .navbar,
    .footer,
    .cta-section,
    .carousel-btn {
        display: none;
    }
    
    * {
        background: white !important;
        color: black !important;
    }
}
