/* Service Detail Page Styles */
/* CSS variables are defined in design-system.css */

/* ═══════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.companies-hero {
    background-color: var(--dark-hero);
    color: var(--text-inverse);
    padding: var(--hero-padding-top-desktop) 0 var(--hero-padding-bottom-desktop);
    text-align: center;
    position: relative;
    width: 100%;
    /* background-image: url(/wp-content/uploads/2025/11/companies-hero.jpg); */
    /* Placeholder */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.companies-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(33, 48, 53, 0.9) 0%, rgba(22, 22, 21, 0.95) 100%);
    z-index: 0;
}



.companies-hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 0 var(--container-padding, 20px);
}


.companies-hero-label {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.companies-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin: 0 0 1.5rem 0;
    color: white;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.companies-hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.35rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

/* Hero Divider */
.hero-divider {
    position: absolute;
    top: 92px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(var(--container-width, 1280px) - 40px);
    max-width: calc(100% - 40px);
    height: 1px;
    background-color: var(--divider);
    border: none;
    z-index: 2;
}

@media (max-width: 1023px) {
    .hero-divider {
        top: 68px;
    }
}

.companies-hero-actions {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   CONTAINER & GENERAL
   ═══════════════════════════════════════════════════════════════════════ */

.companies-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 5;
}

/* Reset padding for nested container in full width section */
.process-section-full .companies-container {
    padding: 0;
    margin-top: 0;
}

/* Ensure subsequent containers have correct spacing */
.companies-container+.companies-container {
    padding-top: 0;
    margin-top: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   ZIG-ZAG SECTION
   ═══════════════════════════════════════════════════════════════════════ */

/* Remove top padding when Zig-Zag section follows Hero */
.companies-hero+.zig-zag-section {
    padding-top: 0;
    margin-top: 0;
}

.zig-zag-section {
    padding: var(--section-spacing-desktop) 20px;
}

@media (max-width: 991px) {
    .zig-zag-section {
        padding: 75px 20px;
    }
}

@media (max-width: 768px) {
    .zig-zag-section {
        padding: var(--section-spacing-mobile) 20px;
    }
}

.section-header-center {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 0;
}

/* Section spacing - consistent 6.25rem between sections */
.process-section,
.why-us-section,
.companies-cta {
    margin-top: 0;
    /* Removed margin-top to fix spacing */
    margin-bottom: 0;
    padding: 0;
    /* Removed padding to avoid double spacing */
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text);
    margin: 0 0 1rem;
}

.title-divider {
    width: 80px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* Reset h2 margins in zig-zag section to match other pages */
.zig-zag-content h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}


/* ═══════════════════════════════════════════════════════════════════════
   INTRO GRID SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.companies-grid-intro {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.companies-grid-intro .companies-card-large {
    max-width: 900px;
    width: 100%;
}

/* Intro section with image - full width, doesn't interfere with hero */
.companies-grid-intro-with-image.companies-intro-with-image {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--section-spacing-desktop) var(--container-padding, 20px);
    margin-bottom: var(--section-spacing-desktop);
    position: relative;
    z-index: 1;
    width: 100%;
}

.companies-grid-intro-with-image.companies-intro-with-image .companies-intro-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    flex-wrap: wrap;
}

.companies-grid-intro-with-image.companies-intro-with-image .companies-intro-content {
    flex: 1;
    min-width: 300px;
    max-width: 640px;
}

.companies-grid-intro-with-image.companies-intro-with-image .companies-intro-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.companies-grid-intro-with-image.companies-intro-with-image .companies-intro-image {
    flex: 0 0 40%;
    max-width: 500px;
    min-width: 300px;
}

.companies-grid-intro-with-image.companies-intro-with-image .companies-intro-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}


@media (max-width: 991px) {
    .companies-grid-intro {
        padding: 0;
    }

    .companies-grid-intro .companies-card-large {
        max-width: 100%;
    }

    .companies-grid-intro-with-image.companies-intro-with-image .companies-intro-content-wrapper {
        flex-direction: column;
    }

    .companies-grid-intro-with-image.companies-intro-with-image .companies-intro-content {
        max-width: 100%;
    }

    .companies-grid-intro-with-image.companies-intro-with-image .companies-intro-image {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* CARDS */
.companies-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 3rem;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.companies-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(253, 198, 0, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.companies-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
}

.companies-card:hover::before {
    opacity: 1;
}

/* Large Card (Partner pre váš rast) */
.companies-card-large {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid rgba(253, 198, 0, 0.1);
}

.companies-card-large::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
    opacity: 0.3;
}

/* Highlight Card (Odvetvia) */
.companies-card-highlight {
    background: linear-gradient(135deg, var(--dark-hero) 0%, var(--dark-deep) 100%);
    color: white;
    border: none;
}

.companies-card-highlight .companies-card-title {
    color: white;
}

.companies-card-highlight .intro-text {
    color: rgba(255, 255, 255, 0.8);
}

.companies-card-highlight .companies-icon-wrapper {
    background: rgba(255, 255, 255, 0.1);
}

.companies-card-highlight .companies-icon-wrapper svg {
    color: var(--primary);
}

/* Card Header */
.companies-card-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.companies-card-highlight .companies-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.companies-icon-wrapper {
    width: 52px;
    height: 52px;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.companies-card:hover .companies-icon-wrapper {
    transform: rotate(5deg) scale(1.05);
}

.companies-icon-wrapper svg {
    color: var(--text);
    width: 24px;
    height: 24px;
}

.companies-card-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    line-height: 1.2;
}

/* Intro Text Styling */
.intro-text-lead {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.intro-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.intro-text p {
    margin-bottom: 1rem;
}

.intro-text p:last-child {
    margin-bottom: 0;
}

/* Industry List inside Highlight Card */
.companies-industry-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.companies-industry-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    transition: background 0.3s ease;
}

.companies-industry-list li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.companies-industry-list li svg {
    color: var(--primary);
    width: 16px;
    height: 16px;
}

@media (max-width: 480px) {
    .companies-industry-list {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   SERVICES SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 0;
}

.service-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
    background: white;
}

.service-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.05);
    line-height: 1;
    margin-bottom: -1.5rem;
    margin-left: -0.5rem;
}

.service-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 1.5rem 0 1rem;
    color: var(--text);
}

.service-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   PROCESS SECTION (Ako spolupráca prebieha)
   ═══════════════════════════════════════════════════════════════════════ */

/* Full width background wrapper */
.process-section-full {
    background-color: var(--bg-subtle);
    margin: 0;
    padding: var(--section-spacing-desktop) 20px;
    width: 100%;
}

@media (max-width: 991px) {
    .process-section-full {
        padding: 75px 20px;
    }
}

@media (max-width: 768px) {
    .process-section-full {
        padding: var(--section-spacing-mobile) 20px;
    }
}

/* Process section base styles */
.process-section {
    background-color: transparent;
    border-radius: 0;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    padding-top: 2rem;
}

/* Line connecting steps */
.process-steps::before {
    content: "";
    position: absolute;
    top: 57px;
    /* Align with center of 50px icon + 2rem padding-top (32px + 25px) */
    left: 12.5%;
    /* Center of first column (25% / 2) */
    right: 12.5%;
    /* Center of last column */
    height: 2px;
    background: var(--border-light);
    z-index: 0;
}

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

.step-icon-wrapper {
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid var(--primary);
    color: var(--dark-hero);
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 10px var(--bg-subtle);
    /* Creates gap in the line matching section bg */
}

.process-step:hover .step-icon-wrapper {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.step-content {
    display: block;
}

.process-step::after {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-steps {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 600px;
        margin: 0 auto;
    }

    .process-steps::before {
        display: none;
    }

    /* Vertical line connecting steps on mobile */
    .process-step:not(:last-child)::after {
        content: "";
        display: block;
        position: absolute;
        left: 25px;
        /* Center of 50px icon */
        top: 50px;
        /* Bottom of icon */
        bottom: -2rem;
        /* Extend through the gap to the next item */
        width: 2px;
        background: var(--border-light);
        transform: translateX(-50%);
        z-index: -1;
    }

    .process-step {
        display: flex;
        gap: 1.5rem;
        text-align: left;
        align-items: flex-start;
    }

    .step-content h3 {
        margin-top: 0;
    }

    .step-icon-wrapper {
        margin: 0;
        flex-shrink: 0;
    }
}

.step-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════
   WHY US SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.why-us-section {
    padding: var(--section-spacing-desktop) 20px;
}

@media (max-width: 991px) {
    .why-us-section {
        padding: 75px 20px;
    }
}

@media (max-width: 768px) {
    .why-us-section {
        padding: var(--section-spacing-mobile) 20px;
    }
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.why-us-item {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: none;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.why-us-item:hover {
    border-color: var(--border-light);
    /* No transform or shadow on hover to match candidates */
}

.why-us-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--bg-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.why-us-icon svg {
    width: 32px;
    /* Explicit size */
    height: 32px;
    /* Explicit size */
    color: var(--primary);
    /*fill: currentColor;*/
}

.why-us-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text);
}

.why-us-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}



/* ═══════════════════════════════════════════════════════════════════════
   CTA SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.companies-cta {
    padding: var(--section-spacing-desktop) 20px;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    background: var(--cta-bg, #19262B);
    color: #ffffff;
}

@media (max-width: 768px) {
    .companies-cta {
        padding: var(--section-spacing-mobile) 20px;
    }

    .companies-cta .cta-global-title {
        margin-bottom: 0.5rem;
    }
}

.companies-cta .cta-global-content {
    max-width: 1024px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.companies-cta .cta-global-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.companies-cta .cta-global-text {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

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

/* ═══════════════════════════════════════════════════════════════════════
   ZIG-ZAG SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.companies-zig-zag {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}

.zig-zag-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.zig-zag-reverse .zig-zag-image {
    order: 2;
}

.zig-zag-reverse .zig-zag-content {
    order: 1;
}

.zig-zag-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.zig-zag-image img {
    width: 512px;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    object-fit: cover;
    aspect-ratio: 1/1;
}

.zig-zag-content {
    padding: 1rem;
}

.zig-zag-content .companies-card-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.zig-zag-content .intro-text-lead {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.zig-zag-content .intro-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-steps {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 600px;
        margin: 0 auto;
    }

    .process-steps::before {
        display: none;
    }

    /* Vertical line connecting steps on mobile */
    .process-step:not(:last-child)::after {
        content: "";
        position: absolute;
        left: 25px;
        /* Center of 50px icon */
        top: 50px;
        /* Bottom of icon */
        bottom: -2rem;
        /* Extend through the gap to the next item */
        width: 2px;
        background: var(--border-light);
        transform: translateX(-50%);
        z-index: -1;
    }

    .process-step {
        display: flex;
        gap: 1.5rem;
        text-align: left;
        align-items: flex-start;
    }

    .step-content h3 {
        margin-top: 0;
    }

    .step-icon-wrapper {
        margin: 0;
        flex-shrink: 0;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* Zig-Zag Responsive */
    .zig-zag-item {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .zig-zag-image {
        justify-content: center;
        margin: 0 auto;
    }

    .zig-zag-reverse .zig-zag-image {
        order: -1;
        /* Image always on top on mobile */
    }

    .zig-zag-reverse .zig-zag-content {
        order: 1;
    }

    .zig-zag-content {
        padding: 0;
        text-align: center;
    }

    .zig-zag-content .companies-card-header {
        justify-content: center;
    }

    .zig-zag-content .companies-icon-wrapper {
        margin: 0 auto;
    }

    .zig-zag-content .companies-card-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .companies-hero {
        padding: var(--hero-padding-top-mobile) 0 var(--hero-padding-bottom-mobile);
    }

    .companies-hero-title {
        font-size: 2.5rem !important;
    }

    .companies-intro {
        padding: 2rem;
    }

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

    .process-steps {
        /* Ensure vertical layout on mobile */
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .process-step {
        flex-direction: row;
        /* Keep icon left, text right layout from 991px query */
        align-items: flex-start;
        text-align: left;
    }

    .step-icon-wrapper {
        margin: 0;
        /* Reset margin from desktop center layout */
        margin-right: 1.5rem;
        /* Add spacing between icon and text */
        flex-shrink: 0;
    }

    .why-us-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}