:root {
    --lexis-color: #5e3a1b;
    --argus-color: #3b839b;
    --primary-blue: #0080ff;
    --bright-blue: #3b82f6;
    --electric-blue: #60a5fa;
    --navy: #0f172a;
    --dark-blue: #1e3a8a;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-light: #f1f5f9;
    --border: #e2e8f0;
}

/* === Global Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* === Header === */
.header {
    display: flex;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem 3rem;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border);
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    margin-top: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.lexis-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #5e3a1b;
    margin-top: 1rem;
    text-shadow: 0 1px 2px rgba(94, 58, 27, 0.25);
}

/* === Section Heading === */
.section-heading {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3rem;
    position: relative;
}

.section-heading::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--electric-blue));
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* === Agents Grid === */
/*.agents-grid {*/
/*    display: grid;*/
/*    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));*/
/*    gap: 2.5rem;*/
/*    justify-items: center;*/
/*    padding: 0 2rem;*/
/*}*/
.agents-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    padding: 0 2rem;
}


/* === Agent Card Flip === */

.agent-card {
    width: 300px;
    height: 400px;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.agent-card:hover .card-inner {
    transform: rotateY(180deg);
}

/* === Front & Back Faces === */
.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

/* === Front Side === */
.card-front {
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    padding-top: 2.3rem;
    text-align: center;
    transition: all 0.3s ease;
}

.agent-card:hover .card-front {
    box-shadow: 0 12px 30px rgba(0, 128, 255, 0.15);
    border-color: var(--primary-blue);
    transform: translateY(-5px);
}

.card-front img.agent-img {
    width: 75%;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid rgba(0, 128, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    transition: all 0.3s ease;
}

/* .card-front h3 {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
} */

.card-front .short-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.short-desc {
    margin-top: 10px;
}

/* === Back Side === */
.card-back {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    color: white;
    transform: rotateY(180deg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-back h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.card-back p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

/* === Buttons === */
.view-btn {
    margin-top: 1.5rem;
    background: white;
    color: var(--primary-blue);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.view-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* === Footer === */
.footer {
    background: linear-gradient(135deg, var(--navy) 0%, #1a2332 100%);
    margin-top: 20px;
    color: #cbd5e1;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* === Responsive Fixes === */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.25rem;
    }

    .agent-card {
        width: 100%;
        max-width: 320px;
        height: 380px;
    }

    .card-front img.agent-img {
        width: 80%;
    }
}

@media (max-width: 1024px) {
    .agents-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 per row on tablets */
    }
}

@media (max-width: 640px) {
    .agents-grid {
        grid-template-columns: repeat(1, 1fr);
        /* 1 per row on mobile */
    }
    .agent-card {
        height: 390px;
    }
}


/* === LEXIS OVERRIDES (MUST BE LAST) === */

.agent-card.lexis-card .card-front.lexis-front {
    background: linear-gradient(to bottom, #FFFDF8, #FAF8F2, #EEEADD) !important;
    /*border-color: rgba(164, 126, 59, 0.3) !important;*/
    border: 2px solid #C0C0C0 !important;
    color: var(--lexis-color);
}

.agent-card.lexis-card:hover .card-front.lexis-front {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    /* stronger on hover */
    transform: translateY(-3px);
    /* subtle lift */
}

.agent-card.lexis-card .card-back.lexis-back {
    background: linear-gradient(135deg, #C9A86A, #5A4534) !important;
    color: white !important;
    /*border: 2px solid #C0C0C0 !important;*/
    /* SILVER BORDER */
}

.agent-card.lexis-card .lexis-btn {
    background: linear-gradient(to right, #A47E3B, #3C2A21) !important;
    color: white !important;
    border-radius: 0.75rem !important;
    border: none !important;
    /*border: 2px solid #C0C0C0 !important;*/
}

.agent-card.lexis-card .lexis-btn:hover {
    background: linear-gradient(to right, #B89044, #4C382D) !important;
    transform: scale(1.05);
}

/* =======================
      NOVA THEME
======================= */

.nova-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
    letter-spacing: 1px;
}

/* FRONT */
.agent-card.nova-card .card-front.nova-front {
    background: linear-gradient(to bottom, #ffffff, #f0f6ff);
    border: 2px solid #d0e4ff;
    color: #003A78;
}

.agent-card.nova-card:hover .card-front.nova-front {
    box-shadow: 0 12px 28px rgba(0, 102, 204, 0.25);
    transform: translateY(-3px);
}

/* BACK */
.agent-card.nova-card .card-back.nova-back {
    background: linear-gradient(312deg, #003A78, #1e60c9);
    color: white;
}

/* BUTTON */
.agent-card.nova-card .nova-btn {
    background: linear-gradient(to right, #003A78, #1E60C9) !important;
    color: white !important;
    border-radius: 0.75rem !important;
    border: none !important;
}

.agent-card.nova-card .nova-btn:hover {
    background: linear-gradient(to right, #004893, #2A72D6) !important;
    transform: scale(1.05);
}



/* =======================
      ARGUS THEME
======================= */

.argus-title {
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

/* FRONT */
.agent-card.argus-card .card-front.argus-front {
    background: linear-gradient(to bottom, #f5fcff, #e7f7fa);
    border: 2px solid #b9e3ec;
    color: #3b839b;
}

.agent-card.argus-card:hover .card-front.argus-front {
    box-shadow: 0 12px 28px rgba(59, 131, 155, 0.25);
    transform: translateY(-3px);
}

/* BACK */
.agent-card.argus-card .card-back.argus-back {
    background: linear-gradient(135deg, #3b839b, #1e556b);
    color: white;
}

/* BUTTON */
.agent-card.argus-card .argus-btn {
    background: linear-gradient(to right, #3B839B, #1E556B) !important;
    color: white !important;
    border-radius: 0.75rem !important;
    border: none !important;
}

.agent-card.argus-card .argus-btn:hover {
    background: linear-gradient(to right, #4A93AC, #24657F) !important;
    transform: scale(1.05);
}



/* =======================
      MAGPIE THEME
======================= */

.magpie-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
    letter-spacing: 1px;
}

.magpie-dark {
    color: #002033;
}

.magpie-light {
    color: #0DB3D9;
}

/* FRONT */
.agent-card.magpie-card .card-front.magpie-front {
    background: linear-gradient(to bottom, #ffffff, #eefaff);
    border: 2px solid #c5ecf5;
    color: #002033;
}

.agent-card.magpie-card:hover .card-front.magpie-front {
    box-shadow: 0 12px 28px rgba(0, 140, 180, 0.28);
    transform: translateY(-3px);
}

/* BACK */
.agent-card.magpie-card .card-back.magpie-back {
    background: linear-gradient(135deg, #002033, #0DB3D9);
    color: white;
}

/* BUTTON */
.agent-card.magpie-card .magpie-btn {
    background: linear-gradient(to right, #0DB3D9, #002033) !important;
    color: white !important;
    border-radius: 0.75rem !important;
    border: none !important;
}

.agent-card.magpie-card .magpie-btn:hover {
    background: linear-gradient(to right, #19C7F0, #00304A) !important;
    transform: scale(1.05);
}

/* FRONT (Darker, premium, drone look) */
.agent-card.magpie-card .card-front.magpie-front {
    background: linear-gradient(180deg,
            #0A1A26 0%,
            /* deep drone navy */
            #02273A 45%,
            /* medium midnight blue */
            #003B4E 100%
            /* slightly teal navy */
        );
    border: 2px solid rgba(0, 180, 220, 0.35);
    color: #E6F7FF;
    box-shadow: 0 4px 15px rgba(0, 50, 70, 0.3);
    transition: all 0.35s ease;
}

/* Hover Effect (teal glow) */
.agent-card.magpie-card:hover .card-front.magpie-front {
    box-shadow: 0 16px 32px rgba(0, 180, 220, 0.35);
    transform: translateY(-4px);
    border-color: rgba(13, 179, 217, 0.6);
}

/* MAGPIE - Inspired by actual magpie iridescence */
/* MAGPIE - Inspired by actual magpie iridescence */

.magpie-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
    letter-spacing: 1px;
}

.magpie-dark {
    color: #0A0F1C;
    /* Deep black-blue */
}

.magpie-light {
    color: #4CC9F0;
    /* Bright cyan-blue */
}

/* FRONT - Iridescent magpie effect */
.agent-card.magpie-card .card-front.magpie-front {
    background: linear-gradient(135deg, #A3CEF1, #FFFFFF);
    border: 2px solid rgba(76, 201, 240, 0.4);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(10, 15, 28, 0.4),
        inset 0 1px 3px rgba(163, 206, 241, 0.1);
    transition: all 0.35s ease;
}

/* Hero image background - darker to match card */
.agent-card.magpie-card .agent-img {
    background: linear-gradient(135deg, #A3CEF1, #FFFFFF);
    /* OR if you want it to match the iridescent effect: */
    /* background: linear-gradient(135deg, #274C77, #6096BA) !important; */
}

/* Hover - Shimmer effect like magpie feathers */
.agent-card.magpie-card:hover .card-front.magpie-front {
    box-shadow: 0 16px 32px rgba(76, 201, 240, 0.3),
        0 0 25px rgba(96, 150, 186, 0.2),
        inset 0 1px 5px rgba(163, 206, 241, 0.2);
    transform: translateY(-4px);
    border-color: rgba(76, 201, 240, 0.7);
    background: linear-gradient(135deg, #A3CEF1, #FFFFFF);
}

/* BACK - Pure white with subtle elements */
.agent-card.magpie-card .card-back.magpie-back {
    background: linear-gradient(135deg,
            #0A0F1C 0%,
            /* Deep black */
            #1B2845 25%,
            /* Midnight blue */
            #274C77 50%,
            /* Steel blue */
            #6096BA 75%,
            /* Periwinkle */
            #A3CEF1 100%
            /* Light sky blue */
        );
    color: #0A0F1C;
    /*border: 2px solid rgba(39, 76, 119, 0.15);*/
}

/* Optional: Add subtle accent to back card title */
.agent-card.magpie-card .card-back h2 {
    background: linear-gradient(135deg,
            #0A0F1C 0%,
            /* Deep black */
            #1B2845 25%,
            /* Midnight blue */
            #274C77 50%,
            /* Steel blue */
            #6096BA 75%,
            /* Periwinkle */
            #A3CEF1 100%
            /* Light sky blue */
        );
    -webkit-background-clip: text;
    /* -webkit-text-fill-color: transparent; */
    background-clip: text;
    color: white;
}

/* BUTTON - Metallic blue gradient */
.agent-card.magpie-card .magpie-btn {
    background: linear-gradient(to right, #274C77, #6096BA) !important;
    color: white !important;
    border-radius: 0.75rem !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(39, 76, 119, 0.3);
}

.agent-card.magpie-card .magpie-btn:hover {
    background: linear-gradient(to right, #1B2845, #4CC9F0) !important;
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(76, 201, 240, 0.4);
}

/* Title Image Base Class */
.agent-title-img {
    display: block;
    margin: 0.6rem auto;
    height: auto;
}

/* Scaled Titles */
.lexis-title-img {
    width: 80px;
}

.nova-title-img {
    width: 80px;
}

/* .argus-title-img {
    width: 46px;
} */

.magpie-title-img {
    width: 6rem;
}

/* Optional: Slightly larger on bigger screens */
@media (min-width: 1400px) {
    .lexis-title-img {
        width: 90px;
    }

    .nova-title-img {
        width: 80px;
    }

    /* .argus-title-img {
        width: 70px;
    } */

    .magpie-title-img {
        width: 100px;
    }
}