/* ==========================================================================
   AUDIT HERO
   ========================================================================== */

.audit-hero {
    background: linear-gradient(160deg, var(--navy) 0%, #0d2147 50%, #0f3070 100%);
    color: var(--white);
    padding: 140px 0 100px;
    position: relative;
    overflow: hidden;
}

.audit-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(45, 140, 240, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 140, 240, 0.07) 1px, transparent 1px);
    background-size: 60px 60px;
}

.audit-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.audit-hero-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.audit-hero-title span {
    background: linear-gradient(90deg, var(--sky), var(--light-sky));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.audit-hero-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

/* ==========================================================================
   AUDIT SERVICES (обновлённые)
   ========================================================================== */

.audit-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch; /* Все карточки одинаковой высоты */
}

.audit-service-card {
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 16px;
    padding: 32px 28px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.audit-service-card:hover {
    border-color: var(--sky);
    box-shadow: 0 12px 40px rgba(30, 95, 194, 0.12);
    transform: translateY(-4px);
}

.audit-service-card .service-icon {
    font-size: 36px;
    margin-bottom: 16px;
    display: block;
}

.audit-service-card .service-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
    line-height: 1.3;
}

.audit-service-card .service-desc {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 16px;
}

.audit-service-card .service-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: auto; /* Отталкивает цену вниз */
}

.audit-service-card .service-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--gray-700);
}

.audit-service-card .service-list li::before {
    content: '✓';
    color: var(--mid-blue);
    font-weight: 700;
    flex-shrink: 0;
}

/* ==========================================================================
   SERVICE PRICES (обновлённые)
   ========================================================================== */

.service-price {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1.5px solid var(--gray-200);
    display: flex;
    align-items: baseline;
    gap: 6px;
    justify-content: center;
    flex-shrink: 0; /* Не сжимается */
}

.service-price .price-label {
    font-size: 14px;
    color: var(--gray-400);
    font-weight: 500;
}

.service-price .price-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--mid-blue);
    line-height: 1;
    font-family: var(--font);
}

.audit-service-card:hover .service-price .price-value {
    color: var(--sky);
    transform: scale(1.05);
    transition: all 0.3s;
}

/* ==========================================================================
   RESPONSIVE (обновлённый)
   ========================================================================== */

@media (max-width: 1024px) {
    .audit-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-audit-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cert-slide img {
        height: 240px;
    }

    .service-price .price-value {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .audit-hero {
        padding: 120px 0 80px;
    }

    .audit-services-grid {
        grid-template-columns: 1fr;
    }

    .why-audit-grid {
        grid-template-columns: 1fr;
    }

    .cert-slide img {
        height: 220px;
    }

    .carousel-wrapper {
        padding: 0 50px;
    }

    .service-price .price-value {
        font-size: 22px;
    }

    .service-price {
        margin-top: 20px;
        padding-top: 16px;
    }
}

@media (max-width: 480px) {
    .audit-hero-title {
        font-size: 28px;
    }

    .cert-slide img {
        height: 200px;
    }

    .carousel-wrapper {
        padding: 0 40px;
    }

    .service-price .price-value {
        font-size: 20px;
    }

    .service-price .price-label {
        font-size: 12px;
    }
}

/* ==========================================================================
   CERTIFICATES CAROUSEL (ИСПРАВЛЕННАЯ)
   ========================================================================== */

.certificates-section {
    background: var(--gray-100);
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    padding: 0 60px;
    box-sizing: border-box;
}

.carousel-viewport {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 calc(25% - 15px);
    height: 280px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.carousel-slide:hover {
    box-shadow: 0 8px 30px rgba(30, 95, 194, 0.2);
    transform: translateY(-4px);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(15%);
    transition: all 0.3s;
}

.carousel-slide:hover img {
    filter: grayscale(0);
}

.cert-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 95, 194, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.carousel-slide:hover .cert-overlay {
    opacity: 1;
}

.cert-zoom {
    font-size: 42px;
    color: var(--white);
    animation: zoomPulse 1.5s ease-in-out infinite;
}

@keyframes zoomPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--mid-blue);
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.carousel-btn:hover {
    background: var(--mid-blue);
    color: var(--white);
    border-color: var(--mid-blue);
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-200);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.carousel-dot.active {
    background: var(--mid-blue);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: var(--sky);
}

/* ==========================================================================
   IMAGE POPUP
   ========================================================================== */

.image-popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.image-popup.open {
    display: flex;
}

.image-popup img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}

.image-popup-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--navy);
}

.image-popup-close:hover {
    background: var(--mid-blue);
    color: var(--white);
    transform: rotate(90deg);
}

/* ==========================================================================
   WHY AUDIT
   ========================================================================== */

.why-audit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.why-audit-item {
    background: var(--gray-100);
    border: 1.5px solid var(--gray-200);
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    transition: all 0.3s;
}

.why-audit-item:hover {
    border-color: var(--sky);
    background: var(--white);
    box-shadow: 0 12px 40px rgba(30, 95, 194, 0.1);
    transform: translateY(-4px);
}

.why-audit-icon {
    font-size: 42px;
    margin-bottom: 16px;
    display: block;
}

.why-audit-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
    line-height: 1.3;
}

.why-audit-desc {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1200px) {
    .carousel-slide {
        flex: 0 0 calc(33.333% - 13px);
    }
}

@media (max-width: 992px) {
    .audit-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-audit-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .carousel-slide {
        flex: 0 0 calc(50% - 10px);
        height: 260px;
    }

    .carousel-container {
        padding: 0 50px;
    }
}

@media (max-width: 768px) {
    .audit-hero {
        padding: 120px 0 80px;
    }

    .audit-services-grid {
        grid-template-columns: 1fr;
    }

    .why-audit-grid {
        grid-template-columns: 1fr;
    }

    .carousel-slide {
        flex: 0 0 100%;
        height: 240px;
    }

    .carousel-container {
        padding: 0 40px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .audit-hero-title {
        font-size: 28px;
    }

    .carousel-slide {
        height: 220px;
    }

    .carousel-container {
        padding: 0 36px;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .image-popup {
        padding: 20px;
    }
}