/* Bento Grid Styles for Research Page */

:root {
    --bento-gap: 20px;
    --card-radius: 24px;
}

body {
    background-color: #0b0c10; /* Dark premium background */
    color: #ffffff;
}

/* Ensure the navbar matches the dark theme */
.w3l-bootstrap-header .navbar {
    background-color: #121212 !important;
}
.w3l-bootstrap-header .navbar-brand,
.w3l-bootstrap-header .nav-link {
    color: #ffffff !important;
}
.w3l-bootstrap-header .navbar-brand:hover,
.w3l-bootstrap-header .nav-link:hover {
    color: #66fcf1 !important;
}

.research-hero {
    padding: 100px 0 50px 0;
    text-align: center;
}

.research-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #66fcf1, #45a29e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.research-hero p {
    font-size: 1.2rem;
    color: #c5c6c7;
    max-width: 600px;
    margin: 0 auto;
}

/* Bento Grid Container */
.bento-container {
    max-width: 1200px;
    margin: 0 auto 100px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 350px;
    gap: var(--bento-gap);
}

/* Bento Card Base */
.bento-card {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    background-color: #1f2833;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.bento-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 252, 241, 0.2);
    color: #fff;
}

/* Background Image Layer */
.bento-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.bento-card:hover .bento-bg {
    transform: scale(1.08);
}

/* Glassmorphism Gradient Overlay */
.bento-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(11, 12, 16, 0.95) 0%, rgba(11, 12, 16, 0.4) 50%, rgba(11, 12, 16, 0.1) 100%);
    z-index: 2;
    transition: background 0.4s ease;
}

.bento-card:hover .bento-overlay {
    background: linear-gradient(to top, rgba(11, 12, 16, 0.95) 0%, rgba(69, 162, 158, 0.6) 50%, rgba(102, 252, 241, 0.3) 100%);
}

/* Content Layer */
.bento-content {
    position: relative;
    z-index: 3;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bento-card:hover .bento-content {
    transform: translateY(0);
}

.bento-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
    line-height: 1.2;
}

.bento-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.bento-card:hover .bento-content p {
    opacity: 1;
}

/* Grid Spans */
.span-2-col {
    grid-column: span 2;
}

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

.span-3-col {
    grid-column: span 3;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .bento-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .span-3-col {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .bento-container {
        grid-template-columns: 1fr;
    }
    .span-2-col, .span-3-col {
        grid-column: span 1;
    }
    .bento-content p {
        opacity: 1;
    }
    .bento-content {
        transform: translateY(0);
    }
}
