/* ==========================================================================
   ORTHO DESIGN SYSTEM — RESEARCH PORTAL COMPONENT STYLES
   ========================================================================== */

/* --- Page Structure Rules --- */
body {
    background:
        radial-gradient(ellipse 1000px 700px at 6% -8%, rgba(30,39,75,0.14), transparent 55%),
        radial-gradient(ellipse 900px 650px at 100% 105%, rgba(122,170,102,0.12), transparent 55%),
        linear-gradient(160deg, #e9ebf1 0%, #dfe2ea 50%, #e6eae1 100%);
    color: #10142a;            /* Dark navy for core legibility */
    min-height: 100vh;
}

/* Base Wrapper Matrix */
.research-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 4rem;
    position: relative;
    z-index: 5;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ==========================================================================
   HERO FEATURE CARD
   ========================================================================== */
.research-hero {
    width: 100%;
}

.hero-card-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background: #ffffff; /* Clean card background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(30,39,75,0.08); /* Soft navy-tinted border edge */
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(16,20,42,0.12);
}

.hero-image-pane {
    width: 100%;
    height: 420px;
    overflow: hidden;
}

.hero-pane-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
}

.hero-card-layout:hover .hero-pane-img {
    transform: scale(1.03);
    opacity: 1;
}

.hero-text-pane {
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background: #ffffff;
}

.featured-title {
    font-size: 2rem;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #10142a; /* Dark navy headline */
    margin: 1.25rem 0;
}

.featured-meta {
    font-size: 0.9rem;
    color: #64748b; /* Muted cool slate metadata */
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.meta-tag {
    color: #1e274b; /* Navy secondary accent color */
    font-weight: 600;
}

/* Modern Inline Link Arrow Button */
.inline-cta-btn {
    font-size: 0.95rem;
    font-weight: 700;
    color: #10142a;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: color 0.2s ease, gap 0.2s ease;
}

.inline-cta-btn i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.inline-cta-btn:hover {
    color: #7aaa66; /* Sage hover transition */
}

.inline-cta-btn:hover i {
    transform: translateX(4px);
}

/* ==========================================================================
   FILTER & SEARCH CONTROLS RIBBON
   ========================================================================== */
.filter-ribbon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.7); /* Sleek light frost ribbon */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1rem 2rem;
    border-radius: 40px;
    border: 1px solid rgba(30,39,75,0.12);
}

.categories-cluster {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.filter-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.cat-select {
    display: none;
}

.cat-link {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: #5b6578; /* Muted slate text */

    /* Perfect Center Core Matrix */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    /* Box Geometry Metrics */
    height: 44px; /* Balanced bounding height for a premium pill element */
    padding: 0 1.25rem;
    border-radius: 22px;
    line-height: 1;

    transition: all 0.22s ease;
}

.cat-link:hover {
    color: #10142a;
    background: rgba(30,39,75,0.06); /* Soft floating link glow */
}

.cat-link.active {
    color: #ffffff;
    background-color: #1e274b; /* Navy brand focus state */
    font-weight: 600;
}

/* Search Architecture */
.search-wrapper-input {
    position: relative;
    width: 340px;
}

.search-inner-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.9rem;
    pointer-events: none;
}

.search-wrapper-input input {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(30,39,75,0.12);
    border-radius: 30px;
    padding: 0.65rem 1.25rem 0.65rem 2.75rem;
    font-size: 0.9rem;
    color: #10142a;
    outline: none;
    transition: all 0.25s ease;
}

.search-wrapper-input input:focus {
    background: #ffffff;
    border-color: #1e274b; /* Focused input accents matching the design system */
    box-shadow: 0 4px 12px rgba(30,39,75,0.15);
}

/* Divider Tighter Management */
.section-divider {
    border: 0;
    height: 1px;
    background: rgba(30,39,75,0.08);
    margin: -0.5rem 0;
}

/* ==========================================================================
   ARTICLES CONFIGURATION MATRIX (3-COLUMN SYSTEM)
   ========================================================================== */
.content-layout {
    width: 100%;
    padding-bottom: 3rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    align-items: stretch;
    width: 100%;
}

.article-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    will-change: transform;
}

.article-card {
    background: #ffffff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(30,39,75,0.08);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-shadow: 0 10px 30px rgba(16,20,42,0.08);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                background-color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Premium Elevating Hover States */
.article-card-link:hover .article-card {
    transform: translateY(-6px);
    background: #ffffff;
    border-color: rgba(30,39,75,0.3); /* Electric edge glow on link focus */
    box-shadow: 0 20px 40px rgba(16,20,42,0.16);
}

.card-img-frame {
    width: 100%;
    height: 210px;
    overflow: hidden;
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.05);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.3s ease;
}

.article-card-link:hover .card-img {
    transform: scale(1.02);
    filter: contrast(1.05);
}

.card-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-inline-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1e274b; /* Navy card tag */
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: #10142a; /* Dark navy for clean headlines */
    margin: 0 0 0.85rem 0;
}

.card-excerpt {
    font-size: 0.92rem;
    color: #5b6578; /* Medium slate paragraph spacing */
    line-height: 1.55;
    margin: 0 0 1.75rem 0;
    flex-grow: 1;
}

.card-date {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

/* ==========================================================================
   PUBLISHED-PAPER CARDS (embedded from Google Scholar records)
   ========================================================================== */
.paper-card-head {
    padding: 1.5rem 1.75rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.paper-card-icon {
    color: #1e274b;
    font-size: 1.3rem;
}

.paper-cite-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #5b6578;
    background: rgba(30,39,75,0.05);
    border: 1px solid rgba(30,39,75,0.12);
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    white-space: nowrap;
}

.paper-card .card-body {
    padding-top: 1.1rem;
}

.card-date-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.card-scholar-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e274b;
}

/* ==========================================================================
   INTEGRATED SUBSCRIPTION BLOCK
   ========================================================================== */
.newsletter-card {
    background: #1e274b; /* Bold navy brand matrix */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 2.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 15px 35px rgba(16,20,42,0.25);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.newsletter-card:hover {
    transform: translateY(-6px);
}

.newsletter-top {
    display: flex;
    flex-direction: column;
}

.envelope-icon {
    font-size: 2.2rem;
    color: #7aaa66; /* Sage envelope */
    margin-bottom: 1.25rem;
}

.newsletter-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.newsletter-bottom {
    margin-top: 2rem;
}

.wide-btn {
    width: 100%;
    background-color: #ffffff !important;
    color: #1e274b !important; /* Navy text pop against the white pill */
    padding: 0.85rem 1.5rem !important;
    border-radius: 30px !important;
    box-shadow: none !important;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
}

.wide-btn:hover {
    transform: translateY(-2px);
    background-color: #f3f4f6 !important;
}

.sidebar-footer {
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.25rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.social-icons a:hover {
    background: #7aaa66;
    color: #ffffff;
}

/* ==========================================================================
   EMPTY RUNTIME CONTAINER
   ========================================================================== */
.empty-state-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 2rem;
    background: #ffffff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px dashed rgba(30,39,75,0.15);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1e274b;
}

.empty-state-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #10142a;
    margin-bottom: 0.5rem;
}

.empty-state-card p {
    font-size: 0.92rem;
    color: #5b6578;
    max-width: 360px;
    line-height: 1.5;
}

/* ==========================================================================
   BREAKPOINTS & RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1200px) {
    .research-wrapper { padding: 2rem; }
    .articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-card-layout { grid-template-columns: 1fr; }
    .hero-image-pane { height: 320px; }
    .hero-text-pane { padding: 2.5rem; }
}

@media (max-width: 820px) {
    .filter-ribbon {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        border-radius: 20px;
        padding: 1.5rem;
    }
    .categories-cluster {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        width: 100%;
    }
    .filter-links {
        display: none;
    }
    .cat-select {
        display: block;
        width: 100%;
        height: 44px;
        padding: 0 2.5rem 0 1.25rem;
        border-radius: 22px;
        border: 1px solid rgba(30,39,75,0.12);
        background: #ffffff;
        color: #10142a;
        font-size: 0.9rem;
        font-weight: 500;
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6578' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 16px;
    }
    .cat-select:focus {
        outline: none;
        border-color: #1e274b;
    }
    .search-wrapper-input {
        width: 100%;
        order: -1;
    }
    .research-hero {
        display: none;
    }
    .newsletter-card {
        display: none !important;
    }
    .articles-grid { grid-template-columns: 1fr; gap: 1rem; }
}

@media (min-width: 821px) {
    .mobile-only-card {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .research-wrapper { padding: 1.5rem 1.25rem; gap: 1rem; }
    .hero-text-pane { padding: 1.75rem; }
    .featured-title { font-size: 1.4rem; margin: 1rem 0; }
    .hero-image-pane { height: 200px; }
    .filter-links { gap: 0.5rem; }
    .cat-link { padding: 0 1rem; height: 38px; font-size: 0.82rem; }
    .card-body { padding: 1.4rem; }
    .newsletter-card { padding: 1.75rem; }
}
