/* --- BENTO BOX GRID LAYOUT --- */

:root {
    --primary: #1a73e8;
    /* Google Blue */
    --bg: #ffffff;
    --card-bg: #f8f9fa;
    --text: #202124;
    --text-muted: #5f6368;
    --border: #dadce0;
    --radius: 28px;
    /* Modern Bento Radius */
    --hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

/* --- BENTO GRID SYSTEM --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 24px;
    margin-bottom: 60px;
}

/* --- STANDARD CARD STYLING --- */
.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--hover-shadow);
    background: #fff;
}

/* --- TYPOGRAPHY & TAGS --- */
.bento-card .tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1.2px;
    margin-bottom: 0;
    /* Header handles spacing */
    display: flex;
    align-items: center;
    gap: 6px;
}

.bento-card h1 {
    font-size: 3rem;
    margin: 10px 0;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}

.bento-card h2 {
    font-size: 1.6rem;
    margin: 0 0 10px 0;
    font-weight: 700;
    color: var(--text);
}

.bento-card h3 {
    font-size: 1.4rem;
    margin: 0 0 10px 0;
    font-weight: 600;
    color: var(--text);
}

.bento-card p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 90%;
    line-height: 1.5;
}

.bento-card .arrow {
    align-self: flex-end;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    margin-top: 20px;
}

.bento-card:hover .arrow {
    transform: translateX(6px);
    color: var(--primary);
}

/* --- HEADER / ICON STYLING --- */
.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.card-header .material-icons,
.card-header .material-symbols-outlined {
    font-size: 20px;
    color: var(--primary);
}




/* --- SPECIAL CARD VARIANTS --- */

/* 1. Identity Hero (Span 3 columns) */
.identity-hero {
    grid-column: span 3;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    border: 1px solid #c2e0ff;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

/* Subtle wireframe/dot grid on the right */
.identity-hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background-image: radial-gradient(var(--primary) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    mask-image: linear-gradient(to right, transparent, black);
    -webkit-mask-image: linear-gradient(to right, transparent, black);
    pointer-events: none;
    z-index: 0;
}

.identity-hero>* {
    position: relative;
    z-index: 2;
}

.identity-hero p {
    max-width: 90%;
    font-size: 1.05 rem;
    margin-bottom: 30px;
}

.identity-hero h1 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 16px;
}


/* 2. Featured Content Full Wide (Span 3 columns) */
.featured-content-full-wide {
    grid-column: span 3;
    display: flex;
    flex-direction: row-reverse;
    padding: 0;
    overflow: hidden;
    background: var(--card-bg);
}

.featured-content-full-wide .image-container {
    flex: 0 0 40%;
    /* Takes 40% width */
    background-color: var(--card-bg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}

.featured-content-full-wide .content-container {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Style for the arrow in the image container */
.featured-content-full-wide .image-container .arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    /* Default color */
}

/* 3. Dark Mode Card (For deep tech) */
.dark-card {
    background: var(--primary);
    color: white;
    border: 1px solid #FFFFFF;
    /* Reserve border space */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-card .tag {
    color: #ffffff;
    transition: color 0.3s;
}

.dark-card h3 {
    color: #ffffff;
}

.dark-card:hover h3 {
    color: var(--text);
}

.dark-card p {
    color: #bdc1c6;
    transition: color 0.3s;
}

.dark-card .arrow {
    color: white;
    transition: color 0.3s transform 0.3s;
}

.dark-card .card-header .material-icons {
    color: #ffffff;
}

/* Dark Card Hover Interaction */
.dark-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    color: var(--text);
    border-color: var(--border);
}

.dark-card:hover .tag,
.dark-card:hover .card-header .material-icons,
.dark-card:hover .arrow {
    color: var(--primary);
}

.dark-card:hover p {
    color: var(--text-muted);
}

.dark-card:hover .arrow {
    transform: translateX(6px);
}


/* --- LAYOUT HELPERS --- */
.cta-button {
    display: inline-flex;
    align-items: center;
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.cta-button:hover {
    background: #1557b0;
    text-decoration: none;
    color: white;
}

.col-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}

.col-stack>.bento-card {
    flex: 1;
    /* Distribute height equally */
}

.span-2 {
    grid-column: span 2;
}


/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .identity-hero,
    .featured-content-full-wide,
    .span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .identity-hero,
    .featured-content-full-wide,
    .span-2,
    .col-stack {
        grid-column: span 1;
    }

    /* Featured Content Mobile Layout Refinement */
    .featured-content-full-wide {
        flex-direction: column-reverse;
        height: auto;
    }

    .featured-content-full-wide .image-container {
        width: 100%;
        height: 200px;
    }

    .featured-content-full-wide .content-container {
        padding: 24px;
    }

    .bento-card h1 {
        font-size: 2.2rem;
    }
}