/* ══════════════════════════════════════════════════
   X-FACTOR PAGE STYLING (KKSOFT AEC) - B&W DARK THEME
   ══════════════════════════════════════════════════ */

/* Force X-Factor Page Body background to be Black */
body.xfactor-page {
    background: #000000 !important;
    color: #ffffff !important;
}

body.xfactor-page h1,
body.xfactor-page h2,
body.xfactor-page h3,
body.xfactor-page h4,
body.xfactor-page h5,
body.xfactor-page h6 {
    color: #ffffff !important;
    font-family: var(--font-head);
}

body.xfactor-page p,
body.xfactor-page span,
body.xfactor-page div,
body.xfactor-page li {
    color: #cccccc !important;
}

/* Header style override for X-Factor page */
body.xfactor-page #main-header {
    background: rgba(0, 0, 0, 0.95) !important;
    border-bottom: 1px solid #222222 !important;
}

body.xfactor-page #main-header.scrolled {
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.5) !important;
}

body.xfactor-page .logo img,
body.xfactor-page .footer-logo img {
    filter: brightness(0) invert(1) !important; /* Force logo to be white */
}

body.xfactor-page .nav-links a {
    color: #aaaaaa !important;
}

body.xfactor-page .nav-links a::after {
    background: #ffffff !important;
}

body.xfactor-page .nav-links a:hover,
body.xfactor-page .nav-links a.active {
    color: #ffffff !important;
}

body.xfactor-page #menu-toggle span {
    background: #ffffff !important;
}

/* Hero Section */
.xfactor-hero {
    background: #000000 !important;
    border-bottom: 1px solid #222222 !important;
    padding: clamp(3rem, 7vw, 5rem) 0 !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.xfactor-hero .hero-inner {
    width: 100% !important;
}

.xfactor-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem) !important;
    font-weight: 500 !important;
    margin: 0 0 1rem 0 !important;
    letter-spacing: -0.02em;
    color: #ffffff !important;
}

.xfactor-hero h1 em {
    font-style: normal;
    color: #ffffff !important;
}

.xfactor-hero p {
    font-size: clamp(1rem, 2.5vw, 1.2rem) !important;
    max-width: 600px;
    line-height: 1.6;
    color: #aaaaaa !important;
    margin: 0 auto !important; /* Centered */
}

/* Grid Sections */
.xfactor-grid-section {
    padding: clamp(3rem, 6vw, 5rem) 0 !important;
    background: #050505 !important;
    border-bottom: 1px solid #111111 !important;
}

.xfactor-grid-section.dark-section {
    background: #000000 !important;
}

/* Grid Headers */
.careers-grid-header h2 {
    color: #ffffff !important;
    font-size: 2rem !important;
    font-weight: 500 !important;
}

.careers-grid-header .sec-label {
    font-family: var(--font-ui);
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888888 !important;
    margin-bottom: 0.5rem;
}

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

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

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

/* Reusable Grid Card Component styling */
.grid-card {
    background: #121212 !important;
    border: 1px solid #222222 !important;
    border-radius: 8px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    transition: border-color var(--ease), box-shadow var(--ease);
}

.grid-card:hover {
    border-color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1) !important;
    transform: none !important;
}

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

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

.grid-card-tag {
    font-family: var(--font-ui);
    font-size: 0.7rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    background: #222222 !important;
    border: 1px solid #333333 !important;
    color: #cccccc !important;
    font-weight: 500;
}

.grid-card-tag.accent {
    background: #222222 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.grid-card h3 {
    font-family: var(--font-head);
    font-size: 1.3rem !important;
    font-weight: 500 !important;
    margin: 0 0 0.75rem 0 !important;
    color: #ffffff !important;
}

.grid-card-desc {
    font-family: var(--font-body);
    font-size: 0.9rem !important;
    color: #888888 !important;
    line-height: 1.6 !important;
    margin: 0 0 1.5rem 0 !important;
    flex-grow: 1;
}

.grid-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid #222222 !important;
}

.card-meta-text {
    font-family: var(--font-ui);
    font-size: 0.75rem !important;
    color: #666666 !important;
    font-weight: 500;
}

/* B&W Buttons */
.card-btn {
    font-family: var(--font-ui);
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 16px;
    border-radius: 4px !important;
    background: #ffffff !important;
    border: 1px solid #ffffff !important;
    color: #000000 !important;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.card-btn:hover {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* 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 #222222 !important;
}

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

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

/* Rating Stars - B&W gray stars */
.stars {
    color: #ffffff !important;
    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: #ffffff !important;
    margin-bottom: 0.5rem;
}

.xf-detail-block p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #cccccc !important;
    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: #121212 !important;
    border: 1px solid #222222 !important;
    border-radius: 8px;
    padding: 1.25rem;
    position: relative;
    border-left: 3px solid #ffffff !important;
}

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

.system-step-card p {
    font-size: 0.9rem;
    color: #888888 !important;
}

/* 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 #222222 !important;
    background: #1a1a1a;
}

/* Video embed wrapper */
.video-embed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #222222 !important;
    background: #000;
    margin-bottom: 1.5rem;
}

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

/* Footer override for X-Factor */
body.xfactor-page .site-footer {
    background: #000000 !important;
    border-top: 1px solid #222222 !important;
}

body.xfactor-page .site-footer h4,
body.xfactor-page .site-footer p,
body.xfactor-page .site-footer a,
body.xfactor-page .site-footer li,
body.xfactor-page .site-footer span {
    color: #ffffff !important;
}

body.xfactor-page .footer-links a {
    color: #aaaaaa !important;
}

body.xfactor-page .footer-links a:hover {
    color: #ffffff !important;
}

body.xfactor-page .footer-bottom p {
    color: #666666 !important;
}

body.xfactor-page .social-icon {
    border-color: #333333 !important;
    color: #aaaaaa !important;
}

body.xfactor-page .social-icon:hover {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
}

/* ── Override global gold accent styles ── */
.hover-gold,
.hover-gold em {
    color: #ffffff !important;
}

.hover-gold::after {
    background: #ffffff !important;
}
