:root {
    --primary: #ef4123; /* 1C Red */
    --primary-dark: #c93017;
    --secondary: #333333;
    --text: #444444;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --border: #dddddd;
    --accent-bg: #fff5f2;
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
    --container-width: 1140px;
}

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

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--white);
}

h1, h2, h3, h4, .logo-text {
    font-family: 'Roboto Condensed', sans-serif;
    color: var(--secondary);
    font-weight: 700;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 3px solid var(--primary);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-home {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.logo-block {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

.logo-img {
    height: 40px !important;
    width: auto !important;
    max-height: 40px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.logo-text-wrapper {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.logo-text {
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
}

.logo-slogan {
    font-size: 12px;
    color: #777;
    font-weight: 400;
}

.header-contacts {
    display: flex;
    gap: 20px;
    align-items: center;
}

.contact-link {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 700;
    font-size: 14px;
    transition: color 0.2s;
}

.contact-link:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid var(--primary);
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn:not(.btn-primary) {
    color: var(--primary);
    background: transparent;
}

.btn:not(.btn-primary):hover {
    background: var(--accent-bg);
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #fff 0%, var(--light-bg) 100%);
    border-bottom: 1px solid var(--border);
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-motto {
    font-size: 22px;
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 25px;
    line-height: 1.4;
    font-style: italic;
    position: relative;
    display: inline-block;
}

.hero-motto::before, .hero-motto::after {
    content: '"';
    font-size: 30px;
    color: var(--primary);
    font-weight: bold;
}

.hero h1 .highlight {
    color: var(--primary);
    display: block;
    margin-top: 10px;
}

.section-title .highlight {
    color: var(--primary);
}

.hero h1 span {
    color: var(--primary);
}

.hero-sub {
    font-size: 20px;
    margin-bottom: 30px;
    color: #666;
}

.hero-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.benefit-item {
    font-size: 15px;
    padding: 10px;
    border-left: 3px solid var(--primary);
    background: var(--white);
    box-shadow: var(--shadow);
}

/* Services Section */
.services {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    position: relative; z-index: 10001;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 10px auto 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.service-card {
    padding: 30px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.card-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 14px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.price {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

/* Tariffs Section */
.tariffs {
    padding: 60px 0;
    background: var(--light-bg);
}

.tariffs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.tariff-card {
    background: var(--white);
    padding: 40px 30px;
    border: 1px solid var(--border);
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative; z-index: 10001;
}

.tariff-card.featured {
    border: 2px solid var(--primary);
    box-shadow: 0 10px 30px rgba(239, 65, 35, 0.1);
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.tariff-price {
    font-size: 32px;
    font-weight: 700;
    margin: 20px 0;
    color: var(--secondary);
}

.tariff-price span {
    font-size: 16px;
    color: #888;
}

.tariff-list {
    list-style: none;
    margin-bottom: 30px;
    text-align: left;
}

.tariff-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.tariff-target {
    font-size: 13px;
    font-style: italic;
    color: #777;
    margin-bottom: 20px;
}

/* Config Selection */
.config-selection {
    padding: 60px 0;
}

.section-desc {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 18px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.config-item {
    padding: 20px;
    background: var(--light-bg);
    border: 1px solid var(--border);
}

.config-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.config-item p {
    font-size: 14px;
    margin-bottom: 15px;
}

.config-time {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
}

.config-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 18px;
    color: var(--secondary);
}

/* Hosting Section */
.hosting {
    padding: 60px 0;
    background: var(--secondary);
    color: var(--white);
}

.hosting-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.hosting-text .section-title {
    color: var(--white);
}

.hosting-text .section-title::after {
    background: var(--white);
}

.hosting-list {
    list-style: none;
    margin: 25px 0;
}

.hosting-list li {
    margin-bottom: 15px;
    font-size: 17px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.hosting-list li::before {
    content: '✓';
    color: var(--primary);
    font-weight: bold;
}

.hosting-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

/* Adaptation Section */
.adaptation {
    padding: 60px 0;
}

.adaptation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.case-box, .consulting-box {
    padding: 30px;
    background: var(--light-bg);
    border: 1px solid var(--border);
}

.case-box h3, .consulting-box h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

.case-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.case-item strong {
    display: block;
    margin-bottom: 5px;
}

.consulting-list {
    list-style: none;
}

.consulting-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative; z-index: 10001;
}

.consulting-list li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Why Us Section */
.why-us {
    padding: 60px 0;
    background: var(--light-bg);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.why-item {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

/* Steps Section */
.steps {
    padding: 60px 0;
}

.steps-flow {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    position: relative; z-index: 10001;
}

.step-num {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.step h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.step p {
    font-size: 13px;
}

/* Portfolio Section */
.portfolio {
    padding: 60px 0;
    background: var(--light-bg);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-card {
    padding: 25px;
    background: var(--white);
    border: 1px solid var(--border);
}

.portfolio-card h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary);
}

.res {
    margin-top: 15px;
    padding: 10px;
    background: var(--accent-bg);
    font-weight: 700;
    font-size: 14px;
}

/* Reviews Section */
.reviews {
    padding: 60px 0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.review-card {
    padding: 25px;
    border: 1px solid var(--border);
    background: var(--light-bg);
    }

.review-text {
    font-style: italic;
    margin-bottom: 20px;
}

.review-author {
    text-align: right;
    font-size: 14px;
}

/* Form Section */
.cta-form {
    padding: 80px 0;
    background: var(--accent-bg);
}

.form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.form-wrapper h2 {
    font-size: 24px;
    margin-bottom: 30px;
}

.main-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 16px;
}

.btn-full {
    margin-top: 10px;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 40px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-info .footer-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.footer-contacts a {
    display: block;
    color: var(--white);
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 15px;
}

.socials {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.socials a {
    padding: 5px 10px;
    border: 1px solid var(--white);
    color: var(--white);
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 12px;
    color: #888;
}

/* Notification styles */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    background: var(--secondary);
    color: var(--white);
    border-left: 5px solid var(--primary);
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 10000;
    font-size: 15px;
    animation: slideIn 0.3s ease-out;
    max-width: 350px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Programs Vitrina */
.programs-vitrina {
    padding: 60px 0;
    background: var(--white);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.program-card {
    padding: 30px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.program-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transform: translateY(-8px);
}

.program-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.program-icon svg, 
.program-icon svg path {
    fill: var(--primary) !important;
}

.program-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.5;
}

.btn-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    transition: color 0.2s;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Case Preview in Main Page */
.case-preview {
    padding: 60px 0;
    background: var(--light-bg);
}

.case-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.case-preview-logo {
    max-width: 200px;
    height: auto;
}

.case-preview-text {
    flex: 1;
}

@media (max-width: 768px) {
    .case-preview-wrapper {
        flex-direction: column;
        text-align: center;
    }
}

/* Case Page Styles */
.case-page {
    line-height: 1.6;
    color: var(--secondary);
}

.case-hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.case-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.case-client-logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
}

.case-meta {
    font-size: 18px;
    color: #666;
    margin-top: 10px;
}

.case-section {
    padding: 60px 0;
}

.case-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.case-info h2, .case-task h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 24px;
}

.case-stats {
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.stat-item {
    background: var(--white);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
    flex: 1;
    font-weight: 400;
}

.stat-item span {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.case-list {
    list-style: none;
    padding: 0;
}

.case-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
}

.case-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.solution-item {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow);
}

.sol-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.solution-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--secondary);
}

.results-wrapper {
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.result-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
}

.result-icon {
    font-size: 24px;
    margin-bottom: 15px;
}

.testimonial {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-content {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    position: relative;
    box-shadow: var(--shadow);
}

.testimonial-content p {
    font-size: 20px;
    font-style: italic;
    margin-bottom: 20px;
    color: #444;
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 14px;
}

@media (max-width: 768px) {
    .case-grid {
        grid-template-columns: 1fr;
    }
    .case-hero h1 {
        font-size: 28px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .header-contacts {
        flex-direction: column;
        gap: 10px;
    }
    .hero h1 {
        font-size: 32px;
    }
    .adaptation-grid {
        grid-template-columns: 1fr;
    }
    .steps-flow {
        flex-direction: column;
        gap: 30px;
    }
    .step {
        min-width: 100%;
    }
}

/* Cleverence Page Styles */
.content-section {
    padding: 60px 0;
}
.content-section.bg-light {
    background: var(--light-bg);
}
.info-block {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.info-block p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
}
.cta-section {
    padding: 80px 0;
    background: var(--accent-bg);
    text-align: center;
}
.cta-wrapper {
    max-width: 700px;
    margin: 0 auto;
}
.cta-wrapper p {
    font-size: 18px;
    margin-bottom: 30px;
}
.cleverence-hero {
    background: linear-gradient(135deg, #fff 0%, #eef2f7 100%);
}

/* Image Modal Styles */
.pdf-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.pdf-modal.open {
    display: flex;
}

.pdf-modal-content {
    position: relative;
    z-index: 10000;
    max-width: 92vw;
    max-height: 92vh;
    background: #fff;
    border-radius: 8px;
    overflow: auto;
    padding: 44px 12px 12px;
}

.close-modal {
    position: absolute;
    top: 0;
    right: 6px;
    color: #333;
    background: #fff;
    font-size: 36px;
    line-height: 44px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.2s;
    padding: 0 10px;
}

.close-modal:hover {
    color: var(--primary);
}

#pdf-viewer {
    width: 100%;
    height: 100%;
}

#pdf-viewer img {
    display: block;
    margin: 0 auto;
    max-width: 86vw;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #fff;
}
