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

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

/* Entry Animations */
/* Entry Animations moved to design-system.css */

.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 set inline in PHP */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 0;
}

.companies-hero.hero-light {
    position: relative;
}

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

/* Specific overlay logic for when an image is present */


.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: var(--text-inverse);
    max-width: 724px;
    margin: 0 auto;
    font-weight: 400;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.25),
        0 6px 20px rgba(0, 0, 0, 0.25);
    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;
}

/* Button Refinements for Hero */
.companies-hero-actions .btn-primary,
.companies-hero-actions .btn-secondary {
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
}

.companies-hero-actions .btn-primary svg,
.companies-hero-actions .btn-secondary svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: -1px;
}

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

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

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

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



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

.companies-grid-intro {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 991px) {
    .companies-grid-intro {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* 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:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
}

/* Large Card (Partner pre váš rast) */
.companies-card-large {
    background: white;
}

/* 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;
}

.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;
}

/* 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-section {
    padding: var(--section-spacing-desktop) 20px;
}

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

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

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

.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%;
    align-items: flex-start;
}

.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: var(--h4-size);
    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);
    width: 100%;
    padding: var(--section-spacing-desktop) 20px;
}

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

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

/* Reset old process-section styles if any */
.process-section {
    margin-bottom: 0;
    background-color: transparent;
    padding: 0;
    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 h3 {
    font-size: var(--h4-size);
    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;
}

.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;
    height: 32px;
}

.why-us-content h3 {
    font-size: var(--h4-size);
    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;
}



/* ═══════════════════════════════════════════════════════════════════════
   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) {
    .companies-hero {
        padding: var(--hero-padding-top-mobile) 0 var(--hero-padding-bottom-mobile);
    }

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

    .companies-intro {
        padding: 2rem;
    }

    .services-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: 2rem;
        /* Space for scrollbar/shadow */
        margin: 0 -20px;
        /* Expand to full width */
        padding-left: 20px;
        /* Restore left padding */
        padding-right: 20px;
        /* Restore right padding for last item visibility */
        -webkit-overflow-scrolling: touch;
        scroll-padding-left: 20px;
    }

    /* Hide scrollbar for cleaner look */
    .services-grid::-webkit-scrollbar {
        display: none;
    }

    .services-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .services-grid>[class*="col-"] {
        flex: 0 0 85vw;
        /* Fixed width for slider items */
        width: 85vw;
        max-width: 85vw;
        scroll-snap-align: start;
        padding-right: 0;
        /* Bootstrap override */
        padding-left: 0;
        /* Bootstrap override */
        margin-bottom: 0;
    }

    .service-card {
        height: 100%;
    }

    /* Reduce Service Icon Size on Mobile */
    .service-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .service-icon svg {
        width: 24px;
        height: 24px;
    }

    .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;
        /* Reduce Step Icon Size on Mobile */
        width: 40px;
        height: 40px;
        font-size: 1rem;
        box-shadow: 0 0 0 6px var(--bg-subtle);
    }

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

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

.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;
    }
}

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

.zig-zag-item:not(:first-child) {
    padding-top: var(--section-spacing-desktop);
}

@media (max-width: 991px) {
    .zig-zag-item:not(:first-child) {
        padding-top: 75px;
    }
}

@media (max-width: 768px) {
    .zig-zag-item:not(:first-child) {
        padding-top: var(--section-spacing-mobile);
    }
}


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

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

@media (max-width: 768px) {
    .zig-zag-item {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Na mobile obrázky stredované */
    .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) {
    .zig-zag-item:not(:last-child) {
        padding-bottom: var(--section-spacing-mobile);
    }
}

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

/* Prvý item - obrázok vľavo */
.zig-zag-item:first-child .zig-zag-image {
    justify-content: flex-start;
}

/* Reverse item (druhý) - obrázok vpravo */
.zig-zag-item.zig-zag-reverse .zig-zag-image {
    justify-content: flex-end;
}

.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;
    /* Square images */
}

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

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

.zig-zag-content h2 {
    margin-bottom: 1rem;
}

.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);
}

/* Service Card Styling Update */
.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%;
    position: relative;
    overflow: hidden;
    /* Subtle background pattern */
    background-image: radial-gradient(circle at 100% 0%, rgba(253, 198, 0, 0.03) 0%, transparent 25%),
        radial-gradient(circle at 0% 100%, rgba(0, 85, 136, 0.03) 0%, transparent 25%);
}


@media (hover: hover) {
    .service-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
        border-color: var(--primary);
        background-color: white;
        background-image: radial-gradient(circle at 100% 0%, rgba(253, 198, 0, 0.08) 0%, transparent 30%),
            radial-gradient(circle at 0% 100%, rgba(0, 85, 136, 0.08) 0%, transparent 30%);
    }
}


.industries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Service Icon Styling (migrated from Tool Icon) */
.service-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-subtle);
    color: var(--dark-hero);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.service-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
}

@media (hover: hover) {
    .service-card:hover .service-icon {
        background: var(--primary);
        color: white;
    }
}

.industry-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--text);
    transition: all 0.3s ease;
}

.industry-box:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    transform: translateX(5px);
}

.industry-box svg {
    color: var(--primary);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Utilities */
.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}


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

.mt-2 {
    margin-top: 2rem;
}

/* Slider Pagination Dots */
.slider-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
    padding-bottom: 1rem;
}

.slider-dot {
    width: 10px;
    height: 10px;
    background-color: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider-dot.active {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.2);
}

@media (min-width: 769px) {
    .slider-pagination {
        display: none;
    }
}