/* ============================================
   Autokar4u.pl — Custom Styles
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Root Variables --- */
:root {
    --red-primary: #E31E24;
    --red-dark: #b8171c;
    --red-light: #ff4d52;
    --navy: #0f172a;
    --navy-light: #1e293b;
    --navy-lighter: #334155;
    --gold: #f59e0b;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    color: #1e293b;
    background: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--navy);
}
::-webkit-scrollbar-thumb {
    background: var(--red-primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--red-light);
}

/* --- Glassmorphism --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.glass-white {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.gradient-text-gold {
    background: linear-gradient(135deg, var(--gold), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Parallax Hero --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../img/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transform: scale(1.05);
    transition: transform 0.5s ease;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.85) 0%,
        rgba(15, 23, 42, 0.6) 50%,
        rgba(227, 30, 36, 0.3) 100%
    );
}

/* --- Pulse CTA --- */
.pulse-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pulse-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: var(--red-primary);
    border-radius: inherit;
    opacity: 0;
    animation: pulse-ring 2s ease-out infinite;
    z-index: -1;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.9);
        opacity: 0.6;
    }
    70% {
        transform: scale(1.15);
        opacity: 0;
    }
    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

.pulse-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(227, 30, 36, 0.4);
}

/* --- Shine Effect --- */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.shine-effect:hover::after {
    transform: translateX(100%);
}

/* --- Service Cards --- */
.service-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--red-primary), var(--red-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    border-color: rgba(227, 30, 36, 0.2);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card .icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--red-primary), var(--red-light));
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.4s ease;
}

.service-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 25px rgba(227, 30, 36, 0.3);
}

/* --- Stats Counter Section --- */
.stats-section {
    background: linear-gradient(135deg, var(--navy) 0%, #1e1b4b 50%, var(--navy-light) 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(227, 30, 36, 0.15), transparent 70%);
}

.stats-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1), transparent 70%);
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* --- Fleet Cards --- */
.fleet-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.fleet-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.fleet-card img {
    transition: transform 0.6s ease;
}

.fleet-card:hover img {
    transform: scale(1.05);
}

/* --- Feature Badges --- */
.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--red-dark);
    transition: all 0.3s ease;
}

.feature-badge:hover {
    background: var(--red-primary);
    color: white;
    border-color: var(--red-primary);
    transform: translateY(-2px);
}

/* --- CTA Section --- */
.cta-section {
    background: linear-gradient(135deg, var(--red-primary) 0%, #9f1239 50%, var(--navy) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* --- Contact Form --- */
.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #1e293b;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--red-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(227, 30, 36, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

/* --- Floating Shapes --- */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* --- Navigation --- */
.nav-fixed {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-solid {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* --- Mobile Menu --- */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-overlay {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- Section Dividers --- */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* --- About Feature Items --- */
.about-feature {
    position: relative;
    padding: 2rem;
    border-radius: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.4s ease;
}

.about-feature:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.about-feature .feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.about-feature:hover .feature-icon {
    transform: scale(1.1);
}

/* --- Footer --- */
.footer-section {
    background: linear-gradient(180deg, var(--navy) 0%, #020617 100%);
}

.footer-link {
    color: #94a3b8;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--red-light);
    transform: translateX(4px);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
}

/* --- Loading State --- */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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

/* --- Marquee Text --- */
.marquee-track {
    display: flex;
    animation: marquee 30s linear infinite;
    width: max-content;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   POPUP WIZARD STYLES
   ============================================ */

/* Overlay */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Card */
.popup-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: popupSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Close button */
.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    font-size: 14px;
}

.popup-close:hover {
    background: rgba(227, 30, 36, 0.1);
    color: var(--red-primary);
}

/* Progress bar */
.wizard-progress {
    height: 4px;
    background: #f1f5f9;
    overflow: hidden;
}

.wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--red-primary), var(--red-light));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

/* Steps */
.wizard-step {
    animation: wizardFadeIn 0.35s ease;
}

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

/* Body */
.popup-body {
    padding: 32px 28px;
    position: relative;
}

.popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    color: var(--red-primary);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.popup-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--navy);
    margin: 0 0 8px;
    line-height: 1.3;
}

.popup-desc {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* Step badge */
.wizard-step-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* Back button */
.wizard-back {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    font-size: 13px;
}

.wizard-back:hover {
    background: #e2e8f0;
    color: var(--navy);
}

/* Input large */
.wizard-input-lg {
    font-size: 18px !important;
    padding: 16px 20px !important;
    text-align: center;
    font-weight: 600;
}

/* Field */
.popup-field {
    margin-bottom: 4px;
}

.popup-field-error {
    display: none;
    color: var(--red-primary);
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

/* Submit / Next button */
.popup-submit {
    width: 100%;
    padding: 14px 24px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 12px;
}

.popup-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(227, 30, 36, 0.3);
}

.popup-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.wizard-btn-next {
    width: 100%;
    margin-top: 16px;
}

/* Skip button */
.wizard-skip {
    width: 100%;
    padding: 10px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    margin-top: 4px;
}

.wizard-skip:hover {
    color: var(--red-primary);
}

/* Consent checkbox */
.popup-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.5;
    cursor: pointer;
    margin-top: 12px;
}

.popup-consent input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--red-primary);
}

.popup-consent a {
    color: var(--red-primary);
}

/* Success state */
.popup-success {
    padding: 48px 32px;
    text-align: center;
}

.popup-success-icon {
    font-size: 48px;
    color: #10b981;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 480px) {
    .popup-card {
        max-width: 100%;
        border-radius: 20px;
    }
    .popup-body {
        padding: 24px 20px;
    }
    .wizard-input-lg {
        font-size: 16px !important;
        padding: 14px 16px !important;
    }
    .popup-title {
        font-size: 1.2rem;
    }
}
