/* =========================================
   1C INTEGRATION STYLES (Cloned from CRM)
   ========================================= */

:root {
    --brand-red: #dd0000;
    --text-main: #1a1a1a;
    --text-secondary: #666;
    --bg-gray: #f5f7fa;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.crm-page {
    background: #fff;
    overflow-x: hidden;
}

/* --- COMMON --- */
.section-header {
    margin-bottom: 50px;
    text-align: left;
}

.section-title {
    font-size: 42px !important;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-main);
}

.section-title span {
    color: var(--brand-red);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.5;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--brand-red);
    color: #fff;
    box-shadow: 0 4px 15px rgba(217, 43, 22, 0.3);
}

.btn-primary:hover {
    background: #b02312;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(217, 43, 22, 0.4);
    color: #fff;
}

.btn-secondary {
    background: #f0f2f5;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #e1e4e8;
    color: var(--text-main);
}

/* --- HERO SECTION --- */
.crm-hero {
    padding: 60px 0 80px;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    /* Fallback or specific bg */
    background: #f4f6f9;
    /* Light bg as per screenshot */
    position: relative;
    overflow: hidden;
}

.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #eee;
    font-size: 13px;
    color: #f7a700;
    /* Gold color for star */
    font-weight: 600;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.hero-badge i {
    color: #f7a700;
}

.hero-badge span {
    color: #666;
}

.hero-title {
    font-size: 48px !important;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-main);
}

.hero-title span {
    color: var(--brand-red);
}

.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-phone-mockup {
    max-width: 100%;
    width: 320px;
    /* Adjust based on image */
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 2;
    overflow: hidden;
    border: 8px solid #fff;
}

.hero-floating-card {
    position: absolute;
    background: #fff;
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 3;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 4s ease-in-out infinite;
}

.float-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.float-2 {
    bottom: 20%;
    right: 10%;
    animation-delay: 1.5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* --- PROBLEMS (CONFIGURATIONS) SECTION --- */
/* Reuse .problems-grid but override for 4 columns if needed */
.problems-section {
    padding: 100px 0;
    background: #f9f9f9;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns for configs */
    gap: 30px;
}

.problem-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    padding: 40px 30px;
    position: relative;
    transition: all 0.3s;
    text-align: center;
    /* Center align for configs */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.problem-card:hover {
    box-shadow: 0 10px 40px rgba(221, 0, 0, 0.1);
    /* Reddish shadow */
    border-color: var(--brand-red);
    /* Explicit red border */
    transform: translateY(-7px);
}

/* Hide the left border line from CRM styles if we use full border */
.problem-card::before {
    display: none;
}

.config-icon {
    font-size: 40px;
    color: var(--brand-red);
    margin-bottom: 20px;
}

.problem-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.problem-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.config-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    text-align: left;
    width: 100%;
    border-top: 1px solid #f5f5f5;
    padding-top: 15px;
}

.config-list li {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    line-height: 1.4;
}

.config-list li::before {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--brand-red);
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 11px;
    opacity: 0.7;
}

.config-footer {
    text-align: center;
    margin-top: 50px;
    font-size: 16px;
    color: #666;
}

.config-footer i {
    color: #999;
    margin-right: 5px;
}

.config-footer a {
    color: var(--text-main);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(221, 0, 0, 0.3);
    transition: all 0.3s;
}

.config-footer a:hover {
    color: var(--brand-red);
    border-color: var(--brand-red);
}

/* --- SECTION DIVIDERS --- */
.section-divider {
    position: relative;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9;
    background: transparent;
}

.divider-line {
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.02), #e0e0e0, rgba(0, 0, 0, 0.02));
}

.divider-icon-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-red);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-size: 12px;
}

/* --- COMPONENT BENEFITS TABS --- */
.benefits-section {
    padding: 100px 0;
    background: #fff;
}

.benefits-header {
    margin-bottom: 50px;
    text-align: left;
}

.benefits-title {
    font-size: 42px !important;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-main);
}

.benefits-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
}

.benefits-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0 auto 50px auto;
    background: #fff;
    padding: 4px;
    border-radius: 12px;
    width: 416px;
    height: 60px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

/* Manual Tabs Override */
.crm-page .crm-tabs {
    display: inline-flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 50px;
    background: #fff;
    padding: 5px;
    border-radius: 60px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.crm-page .tab-btn {
    padding: 12px 30px;
    border-radius: 50px;
    background: transparent;
    color: #666;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.crm-page .tab-btn.active {
    background: var(--brand-red) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(217, 43, 22, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crm-page .benefit-card {
    background: #fff;
    /* White background */
    border: 1px solid #eee;
    /* Light border */
    padding: 30px;
    border-radius: 16px;
    transition: 0.3s;
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

/* Remove box shadow on normal state, add on hover */
.crm-page .benefit-card:hover {
    border-color: var(--brand-red);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
}

/* Ensure transparent override is REMOVED/RESET to CRM style */
.crm-page .benefit-card {
    background: #fff !important;
    border: 1px solid #eee;
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background: #fef0ef;
    /* Light pink background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--brand-red);
    margin-bottom: 20px;
}

.benefit-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.benefit-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.metric-chip {
    display: inline-block;
    background: #e8f5e8;
    color: #2d5a2d;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.metric-chip.green {
    background: #e6f4ea;
    color: #1e8e3e;
}

.metric-chip.red {
    background: #fce8e6;
    color: #d93025;
}

/* Responsive */
@media (max-width: 1200px) {

    .problems-grid,
    .tab-content.active {
        grid-template-columns: repeat(2, 1fr);
    }

    .packages-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {

    .problems-grid,
    .tab-content.active {
        grid-template-columns: 1fr;
    }
}

/* --- TARIFFS (From Support Component) --- */
.section-tariffs {
    background: #f9f9f9;
    padding: 100px 0;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns */
    gap: 30px;
    margin-bottom: 35px;
}

@media (max-width: 1200px) {
    .packages-grid {
        grid-template-columns: 1fr;
    }
}

.package-card {
    background: white;
    border-radius: 20px;
    padding: 35px 30px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
}

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

.package-card.featured {
    border: 2px solid var(--brand-red);
    transform: scale(1.02);
    z-index: 2;
}

.package-card.featured:hover {
    transform: scale(1.02) translateY(-5px);
}

.package-card.featured::before {
    content: 'Выгодный';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-red);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-header {
    margin-bottom: 25px;
    text-align: center;
}

.package-name {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.package-target {
    color: var(--brand-red);
    background: #fff5f5;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.package-description {
    color: #666;
    font-size: 15px;
    line-height: 1.4;
    display: block;
    margin-bottom: 20px;
}

.package-price {
    margin-bottom: 25px;
    text-align: center;
}

.price-amount {
    font-size: 36px;
    font-weight: 800;
    color: #1a1a1a;
}

.price-period {
    color: #999;
    font-size: 16px;
    margin-left: 5px;
}

.price-note {
    color: #999;
    font-size: 13px;
    margin-top: 5px;
}

.package-timeline {
    background: transparent;
    border: none;
    border-left: 3px solid var(--brand-red);
    padding: 0 0 0 15px;
    margin-bottom: 25px;
}

.timeline-item {
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-item strong {
    color: #1a1a1a;
    font-weight: 700;
}

.package-details {
    margin-bottom: 25px;
}

.details-toggle {
    background: none;
    border: none;
    color: var(--brand-red);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.details-toggle:hover {
    opacity: 0.8;
}

.details-toggle i {
    transition: transform 0.3s ease;
}

.details-toggle.expanded i {
    transform: rotate(180deg);
}

.details-content {
    display: none;
    animation: slideDown 0.3s ease;
    padding-top: 15px;
}

.details-content.show {
    display: block;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 6px 0;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.feature-list li::before {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #28a745;
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 12px;
}

.feature-list.optional li::before {
    content: '\f111';
    font-size: 8px;
    color: #ffc107;
    margin-top: 6px;
}

.feature-chip {
    display: inline-block;
    background: #e8f5e8;
    color: #2d5a2d;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}

.feature-chip.optional {
    background: #fff3cd;
    color: #856404;
}

.feature-chip.metric {
    background: #e3f2fd;
    color: #1565c0;
}

.feature-chip.negative {
    background: #f8d7da;
    color: #721c24;
}

.package-btn {
    width: 100%;
    padding: 15px;
    background: var(--brand-red);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.package-btn:hover {
    background: #b02312;
    transform: translateY(-2px);
}

.package-btn.secondary {
    background: transparent;
    color: var(--brand-red);
    border: 2px solid var(--brand-red);
}

.package-btn.secondary:hover {
    background: var(--brand-red);
    color: white;
}

/* Custom Calculator CTA */
.custom-calculator-cta {
    background: #2c3e50;
    border-radius: 20px;
    padding: 40px 50px;
    margin: 0;
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-calculator-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(221, 0, 0, 0.15) 0%, transparent 70%);
}

.cta-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: white !important;
}

.cta-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    color: white !important;
}

.cta-button {
    background: white;
    color: var(--brand-red);
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 20px;
    position: relative;
    z-index: 2;
}

.cta-button:hover {
    color: #b02312;
    transform: translateY(-2px);
}

/* --- STEPS (Roadmap) --- */
.steps-section {
    padding: 100px 0;
    background: #fff;
    /* Optional alternate bg if it touches another white block */
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.step-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    min-height: 220px;
}

.step-card:hover {
    border-color: var(--brand-red);
    box-shadow: 0 10px 30px rgba(221, 0, 0, 0.15);
    transform: translateY(-5px);
}

.step-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.step-icon {
    font-size: 32px;
    color: var(--brand-red);
}

.step-num {
    font-size: 80px;
    font-weight: 900;
    color: #f9f9f9;
    line-height: 1;
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 1;
    transition: 0.3s;
    user-select: none;
}

.step-card:hover .step-num {
    color: #fff0ef;
}

.step-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    color: #1a1a1a;
}

.step-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

@media (max-width: 1200px) {
    .custom-calculator-cta {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        text-align: center;
    }

    .cta-button {
        margin-left: 0;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

.custom-calculator-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(221, 0, 0, 0.15) 0%, transparent 70%);
}

.cta-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: white !important;
}

.cta-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    color: white !important;
}

.cta-button {
    background: white;
    color: var(--brand-red);
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 20px;
    position: relative;
    z-index: 2;
}

.cta-button:hover {
    color: #b02312;
    transform: translateY(-2px);
}

@media (max-width: 1200px) {
    .custom-calculator-cta {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        text-align: center;
    }

    .cta-button {
        margin-left: 0;
    }
}