/**
 * FermoCar - Premium Stylesheet
 * Brand Colors: #0F1E45, #00C27E, #1F6FEB
 */

/* ============================================
   CSS Variables - Brand Colors
============================================ */
:root {
    /* Primary Brand Colors */
    --fc-blue: #0F1E45;
    --fc-blue-light: #1a2d5a;
    --fc-green: #00C27E;
    --fc-green-dark: #00a86b;
    --fc-azure: #1F6FEB;
    
    /* Neutrals */
    --fc-light: #F5F7FA;
    --fc-graphite: #161A1D;
    --fc-text: #1F2933;
    --fc-text-muted: #52606D;
    --fc-border: #E4E7EB;
    
    /* Spacing */
    --section-padding: 80px;
    --section-padding-mobile: 60px;
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(15, 30, 69, 0.06);
    --shadow-md: 0 4px 20px rgba(15, 30, 69, 0.1);
    --shadow-lg: 0 10px 40px rgba(15, 30, 69, 0.15);
}

/* ============================================
   Base & Typography
============================================ */
body {
    font-family: var(--font-body);
    color: var(--fc-text);
    line-height: 1.7;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--fc-blue);
    line-height: 1.3;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--fc-text);
}

a {
    color: var(--fc-azure);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--fc-blue);
}

/* ============================================
   Layout
============================================ */
.section {
    padding: var(--section-padding) 0;
}

.section-light {
    background: var(--fc-light);
}

.section-dark {
    background: var(--fc-blue);
    color: #ffffff;
}

.section-dark h2,
.section-dark h3 {
    color: #ffffff;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   Buttons
============================================ */
.btn {
    font-family: var(--font-heading);
    font-weight: 500;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--fc-green);
    border-color: var(--fc-green);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--fc-green-dark);
    border-color: var(--fc-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 194, 126, 0.4);
}

.btn-outline-light {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.btn-outline-light:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--fc-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.btn-azure {
    background: var(--fc-azure);
    border-color: var(--fc-azure);
    color: #ffffff;
}

.btn-azure:hover {
    background: #0d5bdb;
    border-color: #0d5bdb;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 78, 194, 0.4);
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.1rem;
}

.btn-whatsapp {
    background: #25D366;
    border-color: #25D366;
    color: #ffffff;
}

.btn-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-white {
    background: transparent;
    border-color: rgb(179, 177, 176);
    color: #000;
}

.btn-white:hover {
    border-color: var(--fc-border);
    color: var(--fc-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 229, 226, 0.4);
}

/* ============================================
   Header / Navigation
============================================ */
.navbar {
    padding: 1rem 0;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    z-index: 1030;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2rem;
    color: var(--fc-blue) !important;
}

.navbar-brand span {
    color: var(--fc-green-dark);
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--fc-text) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--fc-azure) !important;
}

.navbar .btn {
    margin-left: 0.5rem;
}

/* Top bar */
.top-bar {
    background: var(--fc-graphite);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.8);
}

.top-bar a:hover {
    color: #ffffff;
}

/* ============================================
   Hero Section
============================================ */
.hero {
    background: var(--fc-blue);
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    color: #ffffff;
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.hero .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.7;
}

.hero-features {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0;
}

.hero-features li {
    color: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1rem;
}

.hero-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--fc-green);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Hero Form */
.hero-form {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-lg);
}

.hero-form h3 {
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}

.hero-form .form-label {
    font-weight: 500;
    color: var(--fc-text);
}

/* ============================================
   Cards
============================================ */
.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: #ffffff;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-body {
    padding: 2rem;
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    background: var(--fc-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--fc-azure);
    font-size: 1.75rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--fc-text-muted);
    line-height: 1.7;
}

/* Service Card */
.service-card {
    text-align: center;
    padding: 0;
}

.service-card .card-icon {
    margin: 0 auto 1.5rem;
    width: 80px;
    height: 80px;
    font-size: 2rem;
    background: rgba(31, 111, 235, 0.1);
}

/* Step Card */
.step-card {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--fc-azure);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    font-family: var(--font-heading);
}

/* Come Funziona Page */
.step-number i {
    font-size: 2rem;
}

.badge {
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ============================================
   Forms
============================================ */
.form-control,
.form-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--fc-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--fc-azure);
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--fc-text);
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--fc-green);
    border-color: var(--fc-green);
}

/* Wizard Form */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--fc-border);
}

.wizard-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.wizard-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--fc-light);
    border: 2px solid var(--fc-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 600;
    color: var(--fc-text-muted);
}

.wizard-step.active .wizard-step-number {
    background: var(--fc-azure);
    border-color: var(--fc-azure);
    color: #ffffff;
}

.wizard-step.completed .wizard-step-number {
    background: var(--fc-green);
    border-color: var(--fc-green);
    color: #ffffff;
}

.wizard-step-label {
    font-size: 0.875rem;
    color: var(--fc-text-muted);
}

.wizard-step.active .wizard-step-label {
    color: var(--fc-azure);
    font-weight: 500;
}

/* ============================================
   Section Headers
============================================ */
.section-header {
    text-align: center;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--fc-text-muted);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   SEO Content Section
============================================ */
.seo-content-block {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.seo-content-block p {
    color: var(--fc-text);
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.seo-content-block h3 {
    color: var(--fc-blue);
    font-size: 1.375rem;
    font-weight: 600;
}

/* Video Section */
.video-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--fc-graphite);
    color: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-md);
    padding: 4rem 2rem;
    box-shadow: var(--shadow-lg);
}

.video-placeholder i {
    font-size: 4rem;
    opacity: 0.5;
    margin-bottom: 1.5rem;
}

.video-placeholder h5 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.video-placeholder p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.9375rem;
}

/* ============================================
   FAQ / Accordion
============================================ */
.accordion {
    border-radius: var(--radius-md);
}

.accordion-item {
    border: 2px solid var(--fc-border) !important;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm);
    background: #ffffff;
    transition: all 0.3s ease;
    overflow: visible !important;
}

.accordion-item:first-of-type {
    border-top: 2px solid var(--fc-border) !important;
}

.accordion-item:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(31, 111, 235, 0.3) !important;
}

.accordion-button {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.0625rem;
    padding: 1.25rem 1.5rem;
    background: transparent !important;
    color: var(--fc-text);
    border: none !important;
    border-radius: var(--radius-md) !important;
    transition: all 0.3s ease;
}

.accordion-button.collapsed {
    background: transparent !important;
}

.accordion-button:not(.collapsed) {
    background: var(--fc-azure) !important;
    color: #ffffff;
    box-shadow: none !important;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.accordion-button:hover {
    background: rgba(31, 111, 235, 0.05) !important;
}

.accordion-button:not(.collapsed):hover {
    background: #0d5bdb !important;
}

.accordion-button:focus {
    box-shadow: none !important;
    border-color: transparent;
    outline: none;
}

.accordion-button::after {
    filter: brightness(0);
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

.accordion-collapse {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.accordion-body {
    padding: 1.5rem;
    color: var(--fc-text);
    line-height: 1.8;
    background: #ffffff;
    border-top: 2px solid var(--fc-border) !important;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Убираем дефолтные стили Bootstrap */
.accordion-item:first-of-type .accordion-button {
    border-top-left-radius: var(--radius-md) !important;
    border-top-right-radius: var(--radius-md) !important;
}

.accordion-item:last-of-type .accordion-button.collapsed {
    border-bottom-left-radius: var(--radius-md) !important;
    border-bottom-right-radius: var(--radius-md) !important;
}

/* ============================================
   CTA Section
============================================ */
.cta-section {
    background: var(--fc-blue);
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Footer
============================================ */
.footer {
    background: var(--fc-graphite);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 30px;
}

.footer h5 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    margin-top: 1rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
}

.footer a:hover {
    color: var(--fc-green);
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline;
    color: var(--fc-green);
}

.footer-brand span {
    color: #ffffff;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    font-size: 0.875rem;
}

/* ============================================
   WhatsApp Floating Button
============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #ffffff;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

/* ============================================
   Mobile Fixed CTA Bar
============================================ */
.mobile-cta-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 0.75rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.mobile-cta-bar .btn {
    flex: 1;
    padding: 0.6rem;
    font-size: 0.875rem;
}

/* ============================================
   Utilities
============================================ */
.text-green {
    color: var(--fc-green) !important;
}

.text-azure {
    color: var(--fc-azure) !important;
}

.text-blue {
    color: var(--fc-blue) !important;
}

.bg-light-custom {
    background: var(--fc-light) !important;
}

.fw-semibold {
    font-weight: 600;
}

/* ============================================
   Responsive
============================================ */

/* Desktop средний: 1200px - 1399px */
@media (max-width: 1399px) {
    .hero h1 {
        font-size: 2.4rem;
    }
    
    .hero .btn-lg {
        padding: 0.85rem 1.75rem;
        font-size: 1rem;
    }
    
    .hero .d-flex.gap-3 {
        gap: 0.75rem !important;
    }
}

/* Desktop маленький: 992px - 1199px */
@media (max-width: 1199px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .lead {
        font-size: 1rem;
    }
    
    .hero .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Планшет: до 991px */
@media (max-width: 991px) {
    :root {
        --section-padding: 70px;
    }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero-form {
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    :root {
        --section-padding: 50px;
    }
    
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero h1 {
        font-size: 1.875rem;
    }
    
    .hero-features {
        columns: 1;
    }
    
    /* Кнопки на мобильных - на всю ширину */
    .hero .d-flex.flex-wrap {
        flex-direction: column;
    }
    
    .hero .btn-lg {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .mobile-cta-bar {
        display: flex;
        gap: 0.5rem;
    }
    
    .whatsapp-float {
        bottom: 80px;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }

    .footer-bottom{
        margin-bottom: 80px;
    }
    
    /* SEO Section Mobile */
    .seo-content-block {
        padding: 1.5rem;
    }
    
    .seo-content-block h2 {
        font-size: 1.375rem;
    }
    
    .seo-content-block p {
        font-size: 1rem;
    }
    
    .video-placeholder {
        padding: 3rem 1.5rem;
    }
    
    .video-placeholder i {
        font-size: 3rem;
    }
}

@media (max-width: 576px) {
    .top-bar {
        font-size: 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .hero h1 {
        font-size: 1.625rem;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
}

/* ============================================
   Animations
============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

/* ============================================
   Экраны с ограниченной высотой (ноутбуки)
============================================ */
@media (max-height: 800px) and (min-width: 992px) {
    /* Компактный navbar */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand img {
        height: 40px !important;
    }
    
    .navbar-brand {
        font-size: 1.6rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.9rem;
    }
    
    .navbar .btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Hero - чуть компактнее */
    .hero {
        padding: 35px 0;
    }
    
    .hero h1 {
        font-size: 2.4rem;
        margin-bottom: 1rem;
    }
    
    .hero .lead {
        font-size: 1rem;
    }
    
    .hero-features li {
        padding: 0.3rem 0;
        padding-left: 2rem;
        font-size: 0.95rem;
    }
    
    .hero-form {
        padding: 1.5rem;
    }
    
    .hero-form h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
}

/* Selection */
::selection {
    background: var(--fc-azure);
    color: #ffffff;
}


/* ============================================
   Sticky Footer Fix
============================================ */
.content-wrapper {
    padding-bottom: 1px;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.wizard-step {
    flex: 1;
    text-align: center;
}

.wizard-step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef !important;
    color: #6c757d !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.wizard-step.active .wizard-step-number {
    background: #1F6FEB !important;
    color: white !important;
}

.wizard-step.completed .wizard-step-number {
    background: #28a745 !important;
    color: white !important;
}

.wizard-step-label {
    font-size: 0.875rem;
    color: #6c757d;
}

.wizard-step.active .wizard-step-label {
    color: #1F6FEB !important;
    font-weight: 600 !important;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    transition: all 0.3s;
}

.social-icons a:hover {
    transform: translateY(-3px);
}