/* ══════════════════════════════════════════════════════════
   COMPANIES PAGE STYLES
   ══════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────
   COMPANIES GRID
   ────────────────────────────────────────────────────────── */
.comp-grid {
    padding: 80px 24px 100px;
    background: var(--bg-deep);
}

.comp-grid__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* ──────────────────────────────────────────────────────────
   COMPANY CARD
   ────────────────────────────────────────────────────────── */
.comp-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.comp-card.revealed {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--delay, 0s);
}

.comp-card__inner {
    background: var(--bg-card);
    border: 1px solid rgba(214, 175, 102, 0.15);
    border-radius: 16px;
    padding: 32px 24px 28px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.comp-card__inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(214, 175, 102, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.comp-card:hover .comp-card__inner {
    transform: translateY(-8px);
    border-color: rgba(214, 175, 102, 0.35);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 32px rgba(214, 175, 102, 0.15);
}

.comp-card:hover .comp-card__inner::before {
    opacity: 1;
}

/* ──────────────────────────────────────────────────────────
   LOGO WITH GRADIENT RING
   ────────────────────────────────────────────────────────── */
.comp-card__logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    position: relative;
}

.comp-card__logo-ring {
    position: absolute;
    inset: -4px;
    background: conic-gradient(
        from 0deg,
        var(--gold),
        var(--gold-light),
        var(--gold),
        var(--gold-light),
        var(--gold)
    );
    border-radius: 50%;
    opacity: 0.4;
    transition: opacity 0.4s ease, transform 0.4s ease;
    animation: ringRotate 8s linear infinite;
}

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

.comp-card:hover .comp-card__logo-ring {
    opacity: 0.8;
    box-shadow: 0 0 24px rgba(214, 175, 102, 0.4);
}

.comp-card__logo img,
.comp-card__logo-placeholder {
    position: absolute;
    inset: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    border-radius: 50%;
    object-fit: contain;
    background: var(--bg-deep);
    padding: 16px;
}

.comp-card__logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.comp-card__logo-placeholder .material-symbols-outlined {
    font-size: 48px;
    opacity: 0.6;
}

/* ──────────────────────────────────────────────────────────
   CARD CONTENT
   ────────────────────────────────────────────────────────── */
.comp-card__name {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--gold);
    margin: 0 0 12px;
    line-height: 1.3;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comp-card__sector {
    display: inline-block;
    padding: 6px 18px;
    background: linear-gradient(135deg, rgba(214, 175, 102, 0.15), rgba(214, 175, 102, 0.08));
    border: 1px solid rgba(214, 175, 102, 0.25);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gold-light);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.comp-card__desc {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.94rem;
    line-height: 1.7;
    margin: 0 0 24px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ──────────────────────────────────────────────────────────
   CTA BUTTON
   ────────────────────────────────────────────────────────── */
.comp-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gold), var(--gold-hover));
    color: var(--bg-deep);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: auto;
}

.comp-card__btn .material-symbols-outlined {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.comp-card__btn:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    box-shadow: 0 8px 24px rgba(214, 175, 102, 0.35);
    transform: translateY(-2px);
}

/* RTL Support */
[dir="rtl"] .comp-card__btn .material-symbols-outlined {
    transform: scaleX(-1);
}

.comp-card__btn:hover .material-symbols-outlined {
    transform: translateX(4px);
}

[dir="rtl"] .comp-card__btn:hover .material-symbols-outlined {
    transform: translateX(-4px) scaleX(-1);
}

/* ──────────────────────────────────────────────────────────
   RESPONSIVE
   ────────────────────────────────────────────────────────── */

/* Tablet: 2 columns */
@media (max-width: 1024px) {
    .comp-grid__inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    
    .comp-card__logo {
        width: 100px;
        height: 100px;
    }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
    .comp-grid {
        padding: 60px 20px 80px;
    }
    
    .comp-grid__inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .comp-card__inner {
        padding: 28px 20px 24px;
    }
    
    .comp-card__logo {
        width: 90px;
        height: 90px;
        margin-bottom: 20px;
    }
    
    .comp-card__name {
        font-size: 1.2rem;
        min-height: auto;
    }
    
    .comp-card__desc {
        font-size: 0.9rem;
    }
    
    .comp-card__btn {
        padding: 11px 24px;
        font-size: 0.88rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .comp-grid {
        padding: 50px 16px 70px;
    }
    
    .comp-card__logo {
        width: 80px;
        height: 80px;
    }
    
    .comp-card__name {
        font-size: 1.1rem;
    }
}

/* ══════════════════════════════════════════════════════════
   COMPANIES GRID + MODAL (NEW)
   ══════════════════════════════════════════════════════════ */

/* Grid Section */
.cg-section {
    padding: 60px 24px 80px;
    max-width: 1280px;
    margin: 0 auto;
}

.cg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Card */
.cg-card {
    cursor: pointer;
    position: relative;
}

.cg-card__inner {
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.cg-card__glow {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(214,175,102,0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.cg-card:hover .cg-card__inner {
    background: rgba(255,255,255,0.07);
    border-color: rgba(214,175,102,0.2);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3), 0 0 30px rgba(214,175,102,0.08);
}

.cg-card:hover .cg-card__glow { opacity: 1; }

/* Logo / Icon */
.cg-card__logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(15,35,34,0.8);
    border: 1px solid rgba(214,175,102,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

.cg-card__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cg-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(214,175,102,0.1), rgba(214,175,102,0.03));
    border: 1px solid rgba(214,175,102,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cg-card__icon .material-symbols-outlined {
    font-size: 28px;
    color: var(--gold, #d6af66);
    opacity: 0.7;
}

.cg-card__name {
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    margin: 4px 0 0;
    line-height: 1.3;
}

.cg-card__sector {
    font-size: 0.72rem;
    color: var(--gold, #d6af66);
    opacity: 0.7;
    letter-spacing: 0.04em;
}

.cg-card__arrow {
    margin-top: auto;
    padding-top: 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s;
}

.cg-card__arrow .material-symbols-outlined {
    font-size: 18px;
    color: var(--gold, #d6af66);
}

.cg-card:hover .cg-card__arrow {
    opacity: 1;
    transform: translateY(0);
}

/* ── Modal ── */
.cg-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s;
    padding: 24px;
}

.cg-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cg-modal {
    position: relative;
    background: linear-gradient(160deg, rgba(20,99,94,0.95), rgba(15,35,34,0.98));
    border: 1px solid rgba(214,175,102,0.15);
    border-radius: 20px;
    padding: 40px;
    max-width: 580px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 40px rgba(214,175,102,0.08);
}

.cg-modal-overlay.active .cg-modal {
    transform: translateY(0) scale(1);
}

.cg-modal__close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    transition: all 0.3s;
}

[dir="ltr"] .cg-modal__close {
    left: auto;
    right: 16px;
}

.cg-modal__close:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.cg-modal__header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.cg-modal__logo {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: rgba(15,35,34,0.9);
    border: 1px solid rgba(214,175,102,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 8px;
}

.cg-modal__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cg-modal__logo .material-symbols-outlined {
    font-size: 28px;
    color: var(--gold, #d6af66);
}

.cg-modal__name {
    font-size: 1.35rem;
    font-weight: 500;
    color: #fff;
    margin: 0 0 4px;
}

.cg-modal__sector {
    font-size: 0.78rem;
    color: var(--gold, #d6af66);
    opacity: 0.8;
    letter-spacing: 0.03em;
}

.cg-modal__divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(214,175,102,0.2), transparent);
    margin: 24px 0;
}

.cg-modal__desc {
    font-size: 0.95rem;
    line-height: 1.9;
    color: rgba(255,255,255,0.75);
    margin: 0 0 20px;
}

.cg-modal__highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.cg-hl-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(214,175,102,0.06);
    border: 1px solid rgba(214,175,102,0.12);
    border-radius: 999px;
    color: rgba(214,175,102,0.8);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.cg-modal__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: var(--gold, #d6af66);
    color: #0f2322;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.cg-modal__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(214,175,102,0.3);
}

.cg-modal__btn .material-symbols-outlined {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 1024px) {
    .cg-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .cg-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .cg-card__inner { padding: 24px 16px; }
    .cg-modal { padding: 28px 24px; }
    .cg-section { padding: 40px 16px 60px; }
}

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