/* 
 * Mahanaim Empire - Fail-Safe Styles
 * Author: Senior Web Developer
 */

/* --- Font Imports --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'Oughter';
    /* Ensure these paths match where you uploaded the font in File Manager */
    src: url('../fonts/oughter.otf') format('opentype'),
        url('../fonts/oughter.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* --- Variables --- */
:root {
    --color-arsenic: #B4B4B1;
    --color-sand: #E6CFA6;
    --color-dark: #222222;
    --color-offwhite: #F7F6F3;
    --color-pure-white: #ffffff;

    --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-dark);
    color: var(--color-offwhite);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Layout Utility --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* --- Header Section --- */
header {
    padding: 40px 0;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* FIX: Removed opacity:0 so content is always visible */
.brand-wrapper {
    margin-bottom: 20px;
    transform: translateY(0);
}

.brand-logo-text {
    font-family: 'Oughter', serif;
    font-size: 4rem;
    color: var(--color-sand);
    letter-spacing: 2px;
    line-height: 1.1;
    text-transform: capitalize;
}

.brand-subtitle {
    font-family: 'Poppins', sans-serif;
    color: var(--color-arsenic);
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 10px;
}

.hero-statement {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
    color: var(--color-offwhite);
    font-weight: 300;
    font-size: 1.1rem;
}

/* --- Cards Container --- */
.subsidiary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 80px;
    position: relative;
    z-index: 10;
}

/* --- Subsidiary Cards --- */
.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 40px 30px;
    text-decoration: none;
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* FIX: Removed opacity:0 */
    backdrop-filter: blur(10px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-sand), transparent);
    transform: scaleX(0);
    transition: var(--transition-slow);
    transform-origin: left;
}

.card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card:hover::before {
    transform: scaleX(1);
}

/* --- Logo Styling --- */
.card-logo-wrapper {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    width: 100%;
}

.card-logo {
    max-width: 140px;
    max-height: 100%;
    width: auto;
    object-fit: contain;
    transition: var(--transition-slow);
    filter: grayscale(100%) contrast(0.8) brightness(1.2);
    opacity: 0.9;
}

.card:hover .card-logo {
    filter: grayscale(0%) contrast(1) brightness(1);
    opacity: 1;
    transform: scale(1.05);
}

.card h2 {
    font-family: 'Oughter', serif;
    font-size: 2rem;
    color: var(--color-offwhite);
    margin-bottom: 15px;
    font-weight: normal;
}

.card p {
    color: #999;
    font-size: 0.95rem;
    margin-bottom: 30px;
    flex-grow: 1;
}

.card-cta {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--color-arsenic);
    color: var(--color-sand);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    transition: var(--transition-fast);
}

.card:hover .card-cta {
    background-color: var(--color-sand);
    color: var(--color-dark);
    border-color: var(--color-sand);
}

/* --- Decorative Background Elements --- */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230, 207, 166, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.glow-1 {
    top: -200px;
    left: -100px;
}

.glow-2 {
    bottom: -200px;
    right: -100px;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 40px 0;
    color: var(--color-arsenic);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
    position: relative;
    z-index: 10;
}

.footer-links {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer-links a {
    color: var(--color-offwhite);
    margin: 0 10px;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-sand);
}

@media (max-width: 768px) {
    .brand-logo-text {
        font-size: 2.8rem;
    }

    .subsidiary-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 30px 20px;
    }
}

/* --- Featured Insight Section --- */
.featured-section {
    margin-top: 100px;
    margin-bottom: 60px;
    position: relative;
    z-index: 10;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.featured-label {
    color: var(--color-arsenic);
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.featured-title {
    font-family: 'Oughter', serif;
    font-size: 3rem;
    color: var(--color-sand);
    line-height: 1;
}

.view-all-link {
    color: var(--color-offwhite);
    text-decoration: none;
    border-bottom: 1px solid var(--color-sand);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.view-all-link:hover {
    color: var(--color-sand);
}

.featured-card {
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    height: 400px;
    display: flex;
    align-items: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-slow);
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: var(--color-sand);
}

.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 10%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
    transition: var(--transition-slow);
}

.featured-card:hover .featured-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 10%, rgba(0, 0, 0, 0.4) 100%);
}

.featured-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    max-width: 600px;
}

.featured-tag {
    background: var(--color-sand);
    color: var(--color-dark);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.featured-content h3 {
    font-family: 'Oughter', serif;
    font-size: 2.5rem;
    color: var(--color-pure-white);
    margin-bottom: 15px;
    line-height: 1.1;
}

.featured-content p {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Admin Utilities --- */
.admin-table-container {
    overflow-x: auto;
}

.btn-icon-action {
    color: var(--color-offwhite);
    padding: 5px;
    font-size: 1.1rem;
    transition: 0.2s;
}

.btn-icon-action:hover {
    color: var(--color-sand);
    transform: scale(1.1);
}

.btn-glow {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    border: 1px solid var(--color-sand);
    color: var(--color-sand);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition-fast);
    box-shadow: 0 0 10px rgba(230, 207, 166, 0.1);
}

.btn-glow:hover {
    background-color: var(--color-sand);
    color: var(--color-dark);
    box-shadow: 0 0 20px rgba(230, 207, 166, 0.4);
}

@media (max-width: 768px) {
    .featured-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .featured-title {
        font-size: 2.5rem;
    }

    .featured-content h3 {
        font-size: 1.8rem;
    }

    .featured-card {
        height: 500px;
    }
}

/* --- TenderAdmin Spotlight --- */
.spotlight-section {
    position: relative;
    margin-bottom: 80px;
    padding: 60px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(124, 58, 237, 0.2);
    /* Violet hint */
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: var(--transition-slow);
}

.spotlight-section:hover {
    border-color: rgba(124, 58, 237, 0.5);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.spotlight-bg-glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, rgba(37, 99, 235, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    transition: var(--transition-slow);
}

.spotlight-section:hover .spotlight-bg-glow {
    transform: scale(1.1);
    opacity: 0.8;
}

.spotlight-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.spotlight-label {
    display: inline-block;
    color: #a78bfa;
    /* Violet-400 */
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 600;
}

.spotlight-title {
    font-family: 'Oughter', serif;
    font-size: 3.5rem;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1;
}

.spotlight-desc {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.btn-spotlight {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition-fast);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
}

.btn-spotlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(124, 58, 237, 0.4);
    color: #fff;
}

.spotlight-visual {
    position: relative;
    z-index: 1;
    font-size: 12rem;
    color: rgba(255, 255, 255, 0.03);
    transform: rotate(-15deg);
    transition: var(--transition-slow);
}

.spotlight-section:hover .spotlight-visual {
    transform: rotate(0deg) scale(1.1);
    color: rgba(124, 58, 237, 0.1);
}

@media (max-width: 900px) {
    .spotlight-section {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
        padding: 40px 30px;
    }

    .spotlight-visual {
        position: absolute;
        bottom: -20px;
        right: -20px;
        font-size: 8rem;
    }

    .spotlight-title {
        font-size: 2.5rem;
    }
}

/* --- Legacy Section --- */
.legacy-section {
    text-align: center;
    padding: 60px;
    margin-bottom: 80px;
    margin-top: 60px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.legacy-section:hover {
    border-color: rgba(230, 207, 166, 0.3);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.legacy-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.legacy-label {
    display: block;
    color: var(--color-arsenic);
    font-size: 0.9rem;
    letter-spacing: 4px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.legacy-title {
    font-family: 'Oughter', serif;
    font-size: 3rem;
    color: var(--color-sand);
    margin-bottom: 25px;
}

.legacy-desc {
    max-width: 700px;
    margin: 0 auto 40px auto;
    color: var(--color-offwhite);
    font-size: 1.1rem;
    font-weight: 300;
}

.legacy-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: normal;
    color: var(--color-pure-white);
    font-family: 'Oughter', serif;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--color-sand);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stat-divider {
    height: 40px;
    width: 1px;
    background: var(--color-arsenic);
    opacity: 0.3;
}

@media (max-width: 600px) {
    .legacy-stats {
        flex-direction: column;
        gap: 30px;
    }

    .stat-divider {
        display: none;
    }

    .legacy-title {
        font-size: 2.2rem;
    }
}

/* --- AI Spotlight Section (FutureWorkforce) --- */
.ai-section {
    position: relative;
    margin-bottom: 60px;
    padding: 60px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(14, 165, 233, 0.2);
    /* Cyan hint */
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: var(--transition-slow);
}

.ai-section:hover {
    border-color: rgba(14, 165, 233, 0.5);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.ai-bg-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, rgba(16, 185, 129, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    transition: var(--transition-slow);
}

.ai-section:hover .ai-bg-glow {
    transform: scale(1.1);
    opacity: 0.8;
}

.ai-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.ai-label {
    display: inline-block;
    color: #38bdf8;
    /* Sky-400 */
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 600;
}

.ai-title {
    font-family: 'Oughter', serif;
    font-size: 3.5rem;
    background: linear-gradient(135deg, #fff 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1;
}

.ai-desc {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.btn-ai {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition-fast);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.2);
}

.btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(14, 165, 233, 0.4);
    color: #fff;
}

.ai-visual {
    position: relative;
    z-index: 1;
    font-size: 12rem;
    color: rgba(255, 255, 255, 0.03);
    transform: rotate(15deg);
    transition: var(--transition-slow);
}

.ai-section:hover .ai-visual {
    transform: rotate(0deg) scale(1.1);
    color: rgba(14, 165, 233, 0.1);
}

@media (max-width: 900px) {
    .ai-section {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
        padding: 40px 30px;
    }

    .ai-visual {
        position: absolute;
        bottom: -20px;
        right: -20px;
        font-size: 8rem;
    }

    .ai-title {
        font-size: 2.5rem;
    }

    .btn-ai {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        padding: 12px 20px;
        font-size: 0.9em;
    }
}

/* --- Hero Highlights --- */
.hero-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.highlight-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(230, 207, 166, 0.1);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    text-align: left;
    transition: var(--transition-slow);
}

.highlight-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-sand);
    transform: translateY(-5px);
}

.highlight-icon {
    font-size: 1.5rem;
    color: var(--color-sand);
    background: rgba(230, 207, 166, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.highlight-text h3 {
    font-family: 'Oughter', serif;
    font-size: 1.2rem;
    color: var(--color-sand);
    margin-bottom: 8px;
}

.highlight-text p {
    font-size: 0.9rem;
    color: #999;
    line-height: 1.5;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .highlight-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* --- Fancy Divider --- */
.fancy-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-sand), transparent);
    margin: 60px auto;
    width: 80%;
    max-width: 800px;
    opacity: 0.4;
    position: relative;
}

.fancy-divider::after {
    content: '◈';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--color-dark);
    padding: 0 15px;
    color: var(--color-sand);
    font-size: 1.2rem;
}

/* --- Back Button Styling --- */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--color-arsenic);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-sand);
    border-color: var(--color-sand);
    transform: translateX(-5px);
}