/* Companies Page Specific Styles */

.companies-hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, var(--white) 0%, var(--light-gray) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-tagline {
    font-size: 1rem;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-graphic {
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.companies-svg {
    width: 100%;
    height: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--light-gray);
}

.hero-stat {
    text-align: center;
}

.hero-stat h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

/* Company Detail Sections */
.company-detail {
    padding: 100px 0;
    background: var(--white);
}

.company-detail.alt-bg {
    background: var(--light-gray);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: stretch;
    min-height: 600px;
}

.detail-grid.reverse {
    grid-template-columns: 1fr 1.2fr;
}

.detail-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-logo {
    width: 150px;
    height: 150px;
    margin-bottom: 2rem;
}

.logo-svg-large {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

.company-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.company-tagline {
    font-size: 1.5rem;
    color: var(--primary-red);
    margin-bottom: 2rem;
    font-weight: 600;
}

.company-description {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 3rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-item {
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: 15px;
    transition: var(--transition);
}

.inf-services .service-item {
    background: var(--white);
    border: 1px solid var(--light-gray);
}

.service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.service-item p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Company Stats */
.company-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    justify-content: center;
}

.company-stats-inline {
    display: flex;
    gap: 2.5rem;
    margin: 2rem 0 3rem;
    padding: 2rem;
    background: var(--light-gray);
    border-radius: 15px;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 0.3rem;
}

.stat-item p {
    color: var(--gray);
    font-weight: 500;
}

/* Services grid on right side */
.services-right {
    margin-top: 0;
    margin-bottom: 2rem;
}

/* Animated graphics container */
.animated-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.animated-graphic-top {
    width: 100%;
    height: auto;
}

/* Detail graphic container */
.detail-graphic {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
    min-height: 100%;
}

/* CTA Section */
.cta-section {
    background: var(--black);
    color: var(--white);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.cta-section .btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    transition: all 0.3s ease;
}

.cta-section .btn-secondary:hover {
    background: var(--primary-red);
    color: var(--white);
}

/* Animated Graphics */
.animated-graphic {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* Newsletter CTA */
.newsletter-cta {
    padding: 100px 0;
    background: var(--black);
    text-align: center;
}

.newsletter-cta .section-title {
    color: var(--white);
}

.newsletter-cta .section-lead {
    color: var(--light-gray);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes subtlePulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.15; }
}

@keyframes gentleMove {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(5px, -5px); }
    50% { transform: translate(-5px, 5px); }
    75% { transform: translate(3px, 3px); }
}

.detail-graphic svg {
    animation: float 6s ease-in-out infinite;
}

/* Background animations */
.company-detail {
    position: relative;
    overflow: hidden;
}

.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
}

/* Floating particles for XAK Media */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 50%;
    opacity: 0;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation: floatUp 15s linear infinite;
}

.particle:nth-child(2) {
    top: 50%;
    left: 80%;
    animation: floatUp 18s linear infinite 2s;
}

.particle:nth-child(3) {
    top: 80%;
    left: 30%;
    animation: floatUp 20s linear infinite 4s;
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    10% {
        opacity: 0.3;
        transform: translateY(-30px) scale(1);
    }
    90% {
        opacity: 0.3;
        transform: translateY(-300px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-400px) scale(0);
    }
}

/* Growth lines for XAK Media */
.growth-line {
    position: absolute;
    width: 2px;
    height: 0;
    background: linear-gradient(to top, transparent, var(--primary-red), transparent);
    opacity: 0.2;
}

.growth-line:nth-child(4) {
    left: 20%;
    bottom: 0;
    animation: growUp 8s ease-in-out infinite;
}

.growth-line:nth-child(5) {
    left: 70%;
    bottom: 0;
    animation: growUp 10s ease-in-out infinite 3s;
}

@keyframes growUp {
    0%, 100% {
        height: 0;
    }
    50% {
        height: 200px;
    }
}

/* Lab particles for INF */
.lab-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--black);
    border-radius: 50%;
    opacity: 0.1;
}

.lab-particle:nth-child(1) {
    top: 15%;
    left: 15%;
    animation: bubble 12s ease-in-out infinite;
}

.lab-particle:nth-child(2) {
    top: 60%;
    left: 25%;
    animation: bubble 15s ease-in-out infinite 2s;
}

.lab-particle:nth-child(3) {
    top: 30%;
    right: 20%;
    animation: bubble 18s ease-in-out infinite 4s;
}

.lab-particle:nth-child(4) {
    bottom: 20%;
    right: 15%;
    animation: bubble 14s ease-in-out infinite 6s;
}

@keyframes bubble {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -20px) scale(1.1);
    }
    50% {
        transform: translate(-20px, -40px) scale(0.9);
    }
    75% {
        transform: translate(40px, -10px) scale(1.05);
    }
}

/* Trending arrows for INF */
.trending-arrow {
    position: absolute;
    width: 40px;
    height: 2px;
    background: var(--primary-red);
    opacity: 0;
}

.trending-arrow::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--primary-red);
    border-right: 2px solid var(--primary-red);
    transform: rotate(45deg);
}

.trending-arrow:nth-child(5) {
    bottom: 30%;
    left: 5%;
    transform: rotate(45deg);
    animation: trendUp 6s ease-in-out infinite;
}

.trending-arrow:nth-child(6) {
    top: 40%;
    right: 10%;
    transform: rotate(30deg);
    animation: trendUp 8s ease-in-out infinite 3s;
}

@keyframes trendUp {
    0%, 100% {
        opacity: 0;
        transform: translateX(0) translateY(0) rotate(45deg);
    }
    20%, 80% {
        opacity: 0.3;
    }
    50% {
        transform: translateX(50px) translateY(-50px) rotate(45deg);
    }
}

/* Shooting stars for XAK Consulting */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(to left, transparent, var(--primary-red));
    transform: translateX(-100px);
}

.shooting-star:nth-child(1) {
    top: 20%;
    right: 0;
    animation: shoot 5s linear infinite;
}

.shooting-star:nth-child(2) {
    top: 50%;
    right: 0;
    animation: shoot 7s linear infinite 2s;
}

.shooting-star:nth-child(3) {
    top: 80%;
    right: 0;
    animation: shoot 6s linear infinite 4s;
}

@keyframes shoot {
    0% {
        transform: translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(-100vw);
        opacity: 0;
    }
}

/* System nodes for XAK Consulting */
.system-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--light-gray);
    border: 2px solid var(--primary-red);
    border-radius: 50%;
    opacity: 0.3;
}

.system-node:nth-child(4) {
    top: 25%;
    left: 10%;
    animation: pulse 4s ease-in-out infinite;
}

.system-node:nth-child(5) {
    bottom: 30%;
    left: 20%;
    animation: pulse 4s ease-in-out infinite 1.5s;
}

.system-node:nth-child(6) {
    top: 60%;
    right: 15%;
    animation: pulse 4s ease-in-out infinite 3s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.6;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .detail-grid,
    .detail-grid.reverse {
        grid-template-columns: 1fr;
        gap: 3rem;
        min-height: auto;
    }

    .detail-graphic {
        order: -1;
        padding: 2rem 0;
    }

    .detail-grid.reverse .detail-graphic {
        order: 0;
    }
    
    .animated-image-container {
        margin-bottom: 2rem;
    }
    
    .services-right {
        margin-bottom: 2rem;
    }
    
    .bg-animation {
        display: none;
    }
}

@media (max-width: 768px) {
    .companies-hero {
        padding: 120px 20px 60px;
    }

    .company-title {
        font-size: 2.5rem;
    }

    .company-tagline {
        font-size: 1.25rem;
    }

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

    .company-stats {
        flex-wrap: wrap;
        gap: 2rem;
        justify-content: center;
    }

    .stat-item {
        flex: 1 1 calc(33.333% - 2rem);
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .company-title {
        font-size: 2rem;
    }

    .detail-logo {
        width: 120px;
        height: 120px;
    }

    .company-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-item {
        flex: 1 1 100%;
    }
}