/**
 * Companies Page - Ultra Professional World-Class Design
 * التصميم الأكثر احترافية لصفحة الشركات
 */

/* تم إزالة تحميل الخطوط الخارجية واستخدام خط Cairo الموحد */

/* Hero Section - Matching Contact Page Style */
.companies-hero {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0a0a0a;
    /* padding managed by companies.php inline styles only */
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image: radial-gradient(circle, #fff 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50px, -50px); }
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(212, 170, 64, 0.1) 0%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    color: white;
}

/* Hero Badge - دائرة الأيقونة */
.companies-hero .hero-badge {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #D4AA40, #BF9835) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 48px;
    color: #000000 !important;
    animation: pulse 2s infinite;
    box-shadow: 0 10px 40px rgba(212, 170, 64, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.companies-hero .hero-badge i {
    color: #000000 !important;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Hero Title */
.companies-hero .hero-title {
    font-family: 'Cairo', sans-serif;
    margin-bottom: 20px;
}

.companies-hero .hero-title .title-main {
    display: block;
    font-size: 48px;
    font-weight: bold;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

/* Hero Subtitle - الوصف */
.companies-hero .hero-subtitle {
    font-family: 'Cairo', sans-serif;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 100%;
    margin: 0 auto 25px;
    line-height: 1.6;
}

.companies-hero .hero-subtitle::before,
.companies-hero .hero-subtitle::after {
    display: none;
}

/* Hero Features */
.companies-hero .hero-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.companies-hero .feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(212, 170, 64, 0.15);
    border: 1px solid rgba(212, 170, 64, 0.3);
    padding: 10px 20px;
    border-radius: 30px;
    color: #ffffff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.companies-hero .feature-item:hover {
    background: rgba(212, 170, 64, 0.25);
    transform: translateY(-3px);
}

.companies-hero .feature-item i {
    font-size: 20px;
    color: #D4AA40;
}

/* Floating Shapes - Hidden for cleaner look */
.floating-shape {
    display: none;
}

/* Companies Section - Magazine Style Grid */
.companies-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    position: relative;
}

.companies-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 170, 64, 0.3) 20%,
        rgba(212, 170, 64, 0.3) 80%,
        transparent
    );
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 35px;
    margin-top: 50px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Company Card - Luxury Design */
.company-card {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    border-radius: 20px;
    overflow: hidden;
    min-height: 520px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    border: 1px solid rgba(212, 170, 64, 0.2);
}

.company-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 80px rgba(212, 170, 64, 0.2);
    border-color: #D4AA40;
}

.card-background {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.card-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.company-card:hover .card-background img {
    transform: scale(1.15);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.9) 100%
    );
    transition: all 0.6s ease;
}

.company-card:hover .card-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.95) 100%
    );
}

.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.company-logo {
    width: 85px;
    height: 85px;
    margin-bottom: 20px;
    padding: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(212, 170, 64, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    position: relative;
    z-index: 1;
}

.company-logo::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #D4AA40 0%, #BF9835 25%, #A58230 50%, #BF9835 75%, #D4AA40 100%);
    border-radius: 18px;
    z-index: -1;
    opacity: 0.9;
    transition: opacity 0.4s ease;
}

.company-logo::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
    border-radius: 2px;
}

.company-card:hover .company-logo {
    transform: translateY(-8px) scale(1.08);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.25),
        0 0 50px rgba(212, 170, 64, 0.35);
}

.company-card:hover .company-logo::before {
    opacity: 1;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; filter: brightness(1.2); }
}

.company-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.4s ease;
}

.company-card:hover .company-logo img {
    transform: scale(1.05);
}

.company-name {
    font-family: 'Cairo', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #D4AA40;
    margin-bottom: 15px;
    line-height: 1.3;
    transition: all 0.4s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.company-card:hover .company-name {
    transform: translateX(10px);
}

[dir="rtl"] .company-card:hover .company-name {
    transform: translateX(-10px);
}

.company-description {
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #F2E8C9;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 85px;
    text-align: center;
}

.company-features {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(212, 170, 64, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 170, 64, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    color: #D4AA40;
    transition: all 0.3s ease;
}

.feature-badge:hover {
    background: rgba(212, 170, 64, 0.3);
    transform: translateY(-2px);
}

.feature-badge i {
    font-size: 1rem;
    color: #D4AA40;
}

.card-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-view-company {
    flex: 1;
    padding: 15px 30px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    color: #000000;
    border: none;
    border-radius: 50px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    position: relative;
}

.btn-view-company::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #A58230, #8B6914);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-view-company:hover::before {
    transform: translateX(0);
}

.btn-view-company span,
.btn-view-company i {
    position: relative;
    z-index: 1;
    transition: color 0.4s ease;
}

.btn-view-company:hover span,
.btn-view-company:hover i {
    color: #F2E8C9;
}

.btn-view-company:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 170, 64, 0.3);
}

.btn-view-products {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 170, 64, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid #D4AA40;
    border-radius: 50%;
    color: #D4AA40;
    font-size: 1.2rem;
    transition: all 0.4s ease;
}

.btn-view-products:hover {
    background: #D4AA40;
    color: #000000;
    transform: rotate(360deg) scale(1.1);
}

/* Card Shine Effect */
.card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateX(-200%);
    transition: transform 1.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 3;
    pointer-events: none;
}

.company-card:hover .card-shine {
    transform: rotate(45deg) translateX(200%);
}

/* Statistics Section - Premium Counter Design */
.companies-stats {
    padding: 100px 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.companies-stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle at 30% 50%,
        rgba(212, 170, 64, 0.1) 0%,
        transparent 50%
    );
}

.stats-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    text-align: center;
    padding: 50px 30px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent,
        rgba(255, 255, 255, 0.05)
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.stat-card:hover::before {
    transform: translateX(0);
}

.stat-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    border-radius: 50%;
    font-size: 2rem;
    color: #000000;
    box-shadow: 0 20px 40px rgba(212, 170, 64, 0.3);
    position: relative;
}

.stat-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.5;
    filter: blur(15px);
}

.stat-number {
    font-family: 'Cairo', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    color: #D4AA40;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    color: #F2E8C9;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* CTA Section - Glassmorphism Design */
.companies-cta {
    padding: 120px 0;
    background: linear-gradient(
        135deg,
        #D4AA40 0%,
        #BF9835 50%,
        #A58230 100%
    );
    position: relative;
    overflow: hidden;
}

.companies-cta::before,
.companies-cta::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.companies-cta::before {
    width: 800px;
    height: 800px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    top: -400px;
    right: -400px;
    animation: rotate 30s linear infinite;
}

.companies-cta::after {
    width: 600px;
    height: 600px;
    background: radial-gradient(
        circle,
        rgba(0, 0, 0, 0.1) 0%,
        transparent 70%
    );
    bottom: -300px;
    left: -300px;
    animation: rotate 25s linear infinite reverse;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.cta-content h2 {
    font-family: 'Cairo', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: #000000;
    margin-bottom: 20px;
    line-height: 1.3;
}

.cta-content p {
    font-family: 'Cairo', sans-serif;
    font-size: 1.25rem;
    color: rgba(0, 0, 0, 0.8);
    margin-bottom: 40px;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta-primary,
.btn-cta-secondary {
    padding: 18px 40px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.btn-cta-primary {
    background: #000000;
    color: #D4AA40;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-cta-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    background: #1a1a1a;
}

.btn-cta-secondary {
    background: transparent;
    color: #000000;
    border: 2px solid #000000;
}

.btn-cta-secondary:hover {
    background: #000000;
    color: #D4AA40;
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@media (max-width: 992px) {
    .companies-hero {
        min-height: auto;
        /* padding managed by companies.php inline styles only */
    }

    .companies-hero .hero-title .title-main {
        font-size: 40px;
    }

    .companies-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .cta-content h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .companies-hero {
        min-height: auto;
        /* padding managed by companies.php inline styles only */
    }

    .companies-hero .hero-badge {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }

    .companies-hero .hero-title .title-main {
        font-size: 32px;
    }

    .companies-hero .hero-subtitle {
        font-size: 16px;
        padding: 0 15px;
    }

    .companies-hero .hero-features {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

    .companies-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .company-card {
        min-height: 450px;
    }

    .stats-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .cta-content {
        padding: 60px 30px;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-content p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .companies-hero {
        min-height: auto;
        /* padding managed by companies.php inline styles only */
    }

    .companies-hero .hero-title .title-main {
        font-size: 28px;
    }

    .companies-hero .hero-subtitle {
        font-size: 14px;
    }

    .companies-hero .hero-badge {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .stats-wrapper {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 3rem;
    }

    .cta-content {
        padding: 50px 20px;
        border-radius: 25px;
    }
}

/* Print Styles */
@media print {
    .companies-hero {
        min-height: auto;
        /* padding managed by companies.php inline styles only */
    }

    .floating-shape {
        display: none;
    }

    .company-card {
        break-inside: avoid;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

/* Dark Mode Support - Already dark themed */
@media (prefers-color-scheme: dark) {
    .companies-section {
        background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    }

    .company-card {
        background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .company-card {
        border: 2px solid currentColor;
    }

    .btn-view-company,
    .btn-cta-primary {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}