/* ==================== RESEARCH POST UNIQUE STYLES ==================== */
:root {
    --primary: #0ff1ce;
    --secondary: #1a1a2e;
    --accent: #e94560;
    --bg-gradient: linear-gradient(135deg, #232526 0%, #0f2027 100%);
    --glass: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

body.research-post {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: var(--bg-gradient);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.research-post header {
    background: var(--glass);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 1.5rem 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    transition: top 0.3s;
}

.research-post header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    color: var(--primary);
    letter-spacing: 2px;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 8px #0ff1ce44;
}

.research-post .header-subtitle {
    margin: 0;
    font-size: 1rem;
    color: #eee;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.research-post .bg-anim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.research-post .circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.18;
    animation: float 12s infinite linear alternate;
}

.research-post .circle:nth-child(1) {
    width: 320px;
    height: 320px;
    left: 10vw;
    top: 8vh;
}

.research-post .circle:nth-child(2) {
    width: 180px;
    height: 180px;
    left: 70vw;
    top: 60vh;
    animation-delay: 2s;
}

.research-post .circle:nth-child(3) {
    width: 220px;
    height: 220px;
    left: 50vw;
    top: 30vh;
    animation-delay: 4s;
}

.research-post .circle:nth-child(4) {
    width: 140px;
    height: 140px;
    left: 80vw;
    top: 10vh;
    animation-delay: 6s;
}

@keyframes float {
    100% {
        transform: translateY(-40px) scale(1.1);
    }
}

.research-post .search-container {
    position: relative;
    max-width: 500px;
    margin: 1.5rem auto 0;
}

.research-post #page-search {
    width: 100%;
    padding: 0.8rem 1.5rem 0.8rem 3rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: var(--glass);
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.research-post .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
}

/* CARD GRID STYLES */
.card-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 2rem 1rem;
    max-width: 1500px;
    margin: 0 auto;
}

.news-card {
    background: var(--glass);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px rgba(31, 38, 135, 0.5);
}

.news-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.news-author {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.news-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

.read-more-btn {
    margin-top: 1rem;
    color: var(--accent);
    font-weight: bold;
}

/* MODAL STYLES */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.visible {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    background: var(--bg-gradient);
    border: 1px solid var(--glass);
    border-radius: 1rem;
    padding: 2.5rem;
    animation: zoomIn 0.4s cubic-bezier(.68, -.55, .27, 1.55);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-body section {
    all: unset;
    /* Reset section styles inside modal */
}

.modal-body h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    font-size: 2rem;
}

.modal-body p,
.modal-body li,
.modal-body ul,
.modal-body ol {
    font-family: 'Roboto', sans-serif;
    color: #fff;
    line-height: 1.7;
}

.modal-body .highlight {
    color: var(--accent);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================== RESPONSIVE STYLES ==================== */
@media (max-width: 1200px) {
    .card-grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 900px) {
    .card-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.5rem 0.5rem;
    }

    .news-thumb {
        height: 160px;
    }
}

@media (max-width: 600px) {
    .card-grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 0.2rem;
    }

    .news-card {
        min-width: 0;
        border-radius: 0.7rem;
    }

    .news-thumb {
        height: 120px;
    }

    .news-content {
        padding: 1rem;
    }

    .modal-content {
        padding: 1rem;
        max-width: 98vw;
        width: 98vw;
    }

    .modal-body h2 {
        font-size: 1.3rem;
    }
}