/* ============================================
   EFEREN GRUP - ŞİRKETLERİMİZ BÖLÜMÜ
   Premium skewed design matching project style
   ============================================ */

.companies-section {
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.companies-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(45deg, transparent 48%, rgba(220, 38, 38, 0.02) 49%, rgba(220, 38, 38, 0.02) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(220, 38, 38, 0.02) 49%, rgba(220, 38, 38, 0.02) 51%, transparent 52%);
    background-size: 60px 60px;
    opacity: 0.5;
    pointer-events: none;
}

.companies-section .heading span,
.companies-section .heading h2 {
    color: #000000;
}

/* Grid Layout */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Company Item */
.company-item {
    perspective: 1500px;
}

/* Premium Card */
.company-card-premium {
    position: relative;
    height: 450px;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.company-card-premium:hover {
    transform: translateY(-20px) rotateX(5deg);
}

/* Background Layer */
.company-card-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
    transition: all 0.5s ease;
    z-index: 1;
}

.company-card-premium:hover .company-card-bg {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    clip-path: polygon(0 0, 100% 0, 93% 100%, 0% 100%);
}

/* Skew Shape Layer - LARGE */
.company-card-skew {
    position: absolute;
    top: 50%;
    right: -80px;
    width: 250px;
    height: 550px;
    transform: translateY(-50%) skew(-20deg, 0deg);
    background: linear-gradient(135deg, var(--company-color, #dc2626), transparent);
    opacity: 0.08;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2;
    pointer-events: none;
}

.company-card-premium:hover .company-card-skew {
    opacity: 0.15;
    width: 280px;
    height: 580px;
    right: -70px;
}

/* Glowing Border */
.company-card-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-left: 2px solid rgba(220, 38, 38, 0.3);
    border-bottom: 2px solid rgba(220, 38, 38, 0.2);
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
    transition: all 0.5s ease;
}

.company-card-premium:hover .company-card-bg::before {
    border-left-color: var(--company-color, #dc2626);
    border-bottom-color: var(--company-color, #dc2626);
    box-shadow:
        inset 0 0 60px rgba(220, 38, 38, 0.1),
        0 0 40px rgba(220, 38, 38, 0.2);
}

/* Content Layer */
.company-card-content {
    position: relative;
    z-index: 3;
    height: 100%;
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header with Number and Icon */
.company-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.company-number {
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    color: rgba(255, 255, 255, 0.1);
    font-family: 'Arial Black', sans-serif;
    transition: all 0.4s ease;
}

.company-card-premium:hover .company-number {
    color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.company-icon-premium {
    width: 80px;
    height: 80px;
    background: rgba(220, 38, 38, 0.1);
    border: 2px solid rgba(220, 38, 38, 0.2);
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.company-icon-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--company-color, #dc2626), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.company-card-premium:hover .company-icon-premium {
    transform: skew(-10deg, 0deg) scale(1.05);
    border-color: var(--company-color, #dc2626);
    background: rgba(220, 38, 38, 0.2);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.3);
}

.company-card-premium:hover .company-icon-premium::before {
    opacity: 0.3;
}

.company-icon-premium img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: brightness(1);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.company-card-premium:hover .company-icon-premium img {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 10px var(--company-color, #dc2626));
}

.icon-placeholder {
    color: #ffffff;
    font-size: 32px;
}

/* Body Content */
.company-body {
    flex: 1;
}

.company-name {
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.2;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.company-location-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    background: rgba(220, 38, 38, 0.15);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.company-card-premium:hover .company-name {
    color: var(--company-color, #dc2626);
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.company-card-premium:hover .company-location-badge {
    background: var(--company-color, #dc2626);
    color: #000000;
    border-color: var(--company-color, #dc2626);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
    transform: translateY(-1px);
}

.company-sector-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 8px 20px;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
    margin-bottom: 20px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    transition: all 0.3s ease;
}

.company-card-premium:hover .company-sector-tag {
    background: var(--company-color, #dc2626);
    color: #000000;
    border-color: var(--company-color, #dc2626);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

.company-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #b3b3b3;
    margin-top: 15px;
}

/* Footer */
.company-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.company-logo-box {
    flex: 1;
    max-width: 180px;
}

.company-logo-box img {
    width: 100%;
    height: auto;
    max-height: 50px;
    object-fit: contain;
    filter: brightness(1) invert(0) !important;
    opacity: 1 !important;
    transition: all 0.3s ease;
}

.company-card-premium:hover .company-logo-box img {
    filter: brightness(1.1) invert(0) !important;
    transform: translateX(5px) scale(1.05);
}

.company-arrow {
    width: 50px;
    height: 50px;
    background: rgba(220, 38, 38, 0.1);
    border: 2px solid rgba(220, 38, 38, 0.3);
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-size: 18px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.company-arrow:hover {
    background: var(--company-color, #dc2626);
    border-color: var(--company-color, #dc2626);
    color: #000000;
    transform: skew(-10deg) scale(1.1);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
}

.company-arrow i {
    transition: transform 0.3s ease;
}

.company-arrow:hover i {
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 1200px) {
    .companies-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }

    .company-card-premium {
        height: 420px;
    }
}

@media (max-width: 768px) {
    .companies-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .company-card-premium {
        height: 400px;
    }

    .company-name {
        font-size: 26px;
    }

    .company-number {
        font-size: 56px;
    }

    .company-card-skew {
        width: 200px;
        height: 500px;
    }
}

/* Animation on Load */
.company-item {
    opacity: 0;
    animation: fadeInScale 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.company-item:nth-child(1) { animation-delay: 0.1s; }
.company-item:nth-child(2) { animation-delay: 0.2s; }
.company-item:nth-child(3) { animation-delay: 0.3s; }
.company-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .company-item,
    .company-card-premium,
    .company-card-premium * {
        animation: none !important;
        transition: none !important;
    }
}
