/* ══════════════════════════════════════════════════
   X-FACTOR PAGE STYLING (KKSOFT AEC)
   ══════════════════════════════════════════════════ */

.xfactor-hero {
    background: linear-gradient(180deg, #0d0d0d 0%, #141414 100%);
    border-bottom: 1px solid var(--border);
    padding: clamp(4rem, 10vw, 8rem) 0;
}

.xfactor-grid-section {
    padding: var(--section-pad) 0;
}

/* Card layout matching layout rules */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

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

/* Reusable Grid Card Component styling */
.grid-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.grid-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.card-image-placeholder {
    height: 180px;
    background: linear-gradient(135deg, #1f1f1f 0%, #0d0d0d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.card-image-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(201, 168, 76, 0.1) 0%, transparent 70%);
}

.card-image-placeholder svg {
    width: 48px;
    height: 48px;
    fill: #c9a84c;
    opacity: 0.8;
}

.grid-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.grid-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.grid-card-tag {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--grey);
}

.grid-card-tag.accent {
    background: rgba(201, 168, 76, 0.1);
    border-color: rgba(201, 168, 76, 0.2);
    color: #c9a84c;
}

.grid-card h3 {
    font-family: var(--font-head);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 0.75rem;
    color: var(--white);
}

.grid-card-desc {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--grey);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.grid-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-meta-text {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--grey-light);
}

.card-btn {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 16px;
    border-radius: 20px;
    background: transparent;
    border: 1px solid var(--white);
    color: var(--white);
    cursor: pointer;
    transition: background var(--ease), color var(--ease);
}

.card-btn:hover {
    background: var(--white);
    color: var(--bg);
}

/* Dynamic modal custom layouts */
.xfactor-modal-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.xfactor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: #252525;
    border: 2px solid #c9a84c;
    flex-shrink: 0;
}

.xfactor-modal-title-area h3 {
    font-family: var(--font-head);
    font-size: 1.75rem;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.xfactor-modal-title-area p {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--grey);
}

/* Rating Stars */
.stars {
    color: #ffd700;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Details Blocks */
.xf-detail-block {
    margin-bottom: 1.5rem;
}

.xf-detail-block h4 {
    font-family: var(--font-head);
    font-size: 1.2rem;
    color: #c9a84c;
    margin-bottom: 0.5rem;
}

.xf-detail-block p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--off-white);
    line-height: 1.7;
}

/* System Workflow timelines */
.system-workflow-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.system-step-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    position: relative;
    border-left: 3px solid #c9a84c;
}

.system-step-card h5 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.system-step-card p {
    font-size: 0.9rem;
    color: var(--grey);
}

/* Galleries */
.modal-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-gallery-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #1a1a1a;
}

/* Video embed wrapper */
.video-embed-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #000;
    margin-bottom: 1.5rem;
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
