/* Homepage Specific Styles */

/* Header Container Spacing */
.header-container-sm {
    padding: 20px;
}

.navbar-container-lg {
    padding-right: 10%;
}

/* Section Spacing */
.research-direction-section {
    background: transparent;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
}

.research-direction-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

.recent-achievements-section {
    padding: 40px 0;
    border-bottom: 1px solid #e8e8e8;
}

.recent-achievements-section .container {
    max-width: 100%;
    padding: 0;
}

/* Section Titles */
.section-title-centered {
    margin-bottom: 45px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.section-title-centered h2 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1a3a52;
    letter-spacing: -1px;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.research-charts-centered {
    text-align: center;
    margin-bottom: 45px;
    position: relative;
    z-index: 1;
    font-size: 1rem;
    color: #666;
    font-weight: 300;
    letter-spacing: 0.3px;
}

/* Paper Container Styles */
.papers-container {
    width: 80%;
    margin: 0 auto;
    color: rgb(68, 68, 68);
}

/* Research Chart Percent Display */
.research-chart-percent {
    text-align: center;
    font-size: 1.15em;
    color: #8c0000;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* Link Styles */
a.text-decoration-none {
    text-decoration: none;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: space-between;
    max-width: 400px;
    margin-bottom: 20px;
}

.social-icon {
    transition: transform 0.3s, color 0.3s;
    color: black;
    font-size: 1.5em;
    margin: 0 5px;
}

.custom-icon {
    height: 1.2em;
    width: auto;
    transition: transform 0.3s;
    margin: 0 5px;
}

.social-icon:hover {
    transform: scale(1.2);
    color: black;
}

/* Research Charts Styles */
.research-charts-wrapper {
    margin: 40px 0;
    position: relative;
    z-index: 2;
}

.research-charts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    justify-items: center;
    align-items: center;
    margin: 60px auto 0 auto;
    max-width: 100%;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.research-chart-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    padding: 20px 16px;
    border-radius: 16px;
    border: 1px solid rgba(200, 200, 200, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.320, 1);
    width: 100%;
    max-width: 180px;
    height: auto;
    min-height: 80px;
    font-size: 1.25rem;
    position: relative;
    overflow: visible;
}

.research-chart-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    border-color: rgba(140, 0, 0, 0.15);
}

.research-chart-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, transparent 100%);
    pointer-events: none;
}

.research-chart-item::after {
    display: none;
}

.research-chart-canvas-wrapper {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    position: relative;
    z-index: 10;
}

.research-chart-item-title {
    font-size: 0.8em;
    font-weight: 700;
    color: #1a3a52;
    margin: 0;
    line-height: 1.25;
    text-align: center;
    letter-spacing: 0.2px;
}

.research-chart-item-subtitle {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.research-chart-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.research-chart-percent-btn-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.research-chart-arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0066cc;
    color: #fff;
    font-size: 0.75em;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
}

.research-chart-arrow-btn:hover {
    background: #0052a3;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 102, 204, 0.35);
    color: #fff;
}

.research-chart-item canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 1200px) {
    .research-chart-item {
        max-width: 160px;
    }

    .research-charts-grid {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .research-direction-section {
        padding: 60px 0;
    }

    .section-title-centered h2 {
        font-size: 2.2rem;
    }

    .research-charts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 10px;
    }

    .research-chart-item {
        max-width: 100%;
        padding: 16px 12px;
        gap: 8px;
    }

    .research-chart-canvas-wrapper {
        width: 60px;
        height: 60px;
    }

    .research-chart-item-title {
        font-size: 0.7rem;
    }

    .research-chart-percent {
        font-size: 0.95em;
    }

    .research-chart-arrow-btn {
        width: 24px;
        height: 24px;
        font-size: 0.65em;
    }
}

/* Community Intro Section with Hexagons */
.community-intro-section {
    padding: 120px 0;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

.community-intro-wrapper {
    display: flex;
    align-items: center;
    gap: 90px;
}

.community-intro-content {
    flex: 1;
    min-width: 0;
}

.community-intro-title {
    font-size: 72px;
    font-weight: 900;
    color: #8c0000;
    margin-bottom: 36px;
    line-height: 1.2;
}

.community-intro-subtitle {
    font-size: 30px;
    color: #333;
    margin-bottom: 24px;
    line-height: 1.6;
}

.community-intro-slogan {
    font-size: 26px;
    color: #0066cc;
    margin-bottom: 32px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.community-intro-text {
    font-size: 24px;
    color: #555;
    line-height: 1.8;
    max-width: 750px;
}

.hexagon-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.hexagon-grid {
    position: relative;
    width: 570px;
    height: 510px;
}

.hexagon {
    position: absolute;
    width: 210px;
    height: 210px;
    cursor: pointer;
    overflow: hidden;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.hexagon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hexagon:hover {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.hexagon-center {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.hexagon-top {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    z-index: 2;
}

.hexagon-top-left {
    left: 0;
    top: 20%;
    z-index: 1;
}

.hexagon-bottom-left {
    left: 0;
    bottom: 20%;
    z-index: 1;
}

.hexagon-bottom {
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 2;
}

@media (max-width: 1200px) {
    .community-intro-wrapper {
        gap: 60px;
    }

    .community-intro-title {
        font-size: 63px;
    }

    .community-intro-text {
        font-size: 22px;
    }

    .hexagon-grid {
        width: 480px;
        height: 420px;
    }

    .hexagon {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .community-intro-section {
        padding: 90px 0;
    }

    .community-intro-wrapper {
        flex-direction: column;
        gap: 60px;
    }

    .community-intro-title {
        font-size: 54px;
    }

    .hexagon-container {
        width: 100%;
    }

    .hexagon-grid {
        width: 100%;
        max-width: 450px;
        height: 360px;
        margin: 0 auto;
    }

    .hexagon {
        width: 150px;
        height: 150px;
    }
}

.research-charts-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.research-charts-subtitle {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

/* Research Dropdown Container */
.research-dropdown-container {
    position: relative;
    width: 100%;
    margin-top: 20px;
    min-height: 0;
}

/* Research Dropdown Styles */
.research-dropdown {
    display: none;
    position: absolute;
    background: #ffffff;
    border-top: 3px solid #FF6384;
    border-radius: 10px;
    padding: 20px 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: dropdownSlide 0.2s ease-out;
    max-width: 280px;
    width: 280px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.research-dropdown.show {
    display: block;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 500px;
    }
}

.research-dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.research-dropdown-item:last-child {
    border-bottom: none;
}

.research-dropdown-item:hover {
    background-color: #f9f9f9;
    transform: translateX(3px);
}

.research-dropdown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    margin-right: 10px;
    flex-shrink: 0;
}

.research-dropdown-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
}

.research-dropdown-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.research-dropdown-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

@media (max-width: 600px) {
    .research-dropdown-item {
        padding: 10px 12px;
    }

    .research-dropdown-value {
        font-size: 16px;
    }
}

/* Paper Card Image Height */
.paper-card .card-img-top {
    height: 300px !important;
    object-fit: cover !important;
}

/* Recent Achievements - New Layout */
.paper-achievement-card {
    background: transparent;
    border-radius: 0;
    padding: 20px 0;
    transition: box-shadow 0.3s ease;
    border-bottom: 1px solid #d0d0d0;
    margin-bottom: 200px;
    min-height: 600px;
}

.paper-achievement-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.paper-achievement-card:hover {
    box-shadow: none;
}

.paper-achievement-row {
    display: grid;
    grid-template-columns: 1fr 4fr;
    gap: 40px;
    align-items: stretch;
}

.paper-achievement-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: sticky;
    top: 100px;
    background: #fff;
    z-index: 10;
    padding: 10px 0;
    height: fit-content;
}

.paper-title {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.6;
    color: #333;
    margin-bottom: 0;
}

.paper-title a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.paper-title a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.paper-learn-more-btn {
    display: block;
    width: fit-content;
    background: #2563eb;
    color: #fff;
    padding: 8px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    margin-top: 20px;
}

.paper-learn-more-btn:hover {
    background: #1e40af;
    transform: translateY(-2px);
}

.paper-achievement-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
}

.paper-image-wrapper {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
}

.paper-architecture-img {
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    border: none;
    display: block;
}

.paper-image-placeholder {
    width: 300px;
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 8px;
}

.paper-achievement-info {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-top: auto;
}

.paper-date {
    font-size: 0.95rem;
    color: #999;
    margin: 8px 0 16px 0;
    font-weight: 500;
}

.paper-buttons {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
}

.paper-demo-btn {
    display: inline-block;
    background: #fff;
    color: #2563eb;
    padding: 8px 20px;
    border-radius: 50px;
    border: none;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.paper-demo-btn:hover {
    background: #f0f7ff;
    color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.paper-image-container {
    width: 100%;
}

.paper-video-container {
    width: 100%;
    background: transparent;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paper-video-container .plyr {
    border-radius: 24px;
}

.paper-demo-video {
    max-width: 100%;
    height: auto;
    width: auto;
    display: block;
}

.paper-tags {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.paper-tags .badge {
    font-size: 1rem !important;
}

.paper-tag-btn {
    display: inline-block;
    color: #fff;
    font-size: 0.85em;
    padding: 6px 12px;
    margin-right: 4px;
    margin-bottom: 6px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.paper-tag-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #fff;
}

.paper-authors {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.paper-authors a {
    color: #2563eb;
    text-decoration: none;
}

.paper-authors a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .paper-achievement-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .paper-achievement-left {
        padding-right: 0;
    }

    .paper-image-wrapper {
        min-height: 250px;
    }

    .paper-architecture-img {
        max-height: 320px;
    }
}

@media (max-width: 768px) {
    .paper-achievement-card {
        padding: 16px;
    }

    .paper-achievement-row {
        gap: 16px;
    }

    .paper-title {
        font-size: 1.1rem;
    }

    .paper-image-wrapper {
        min-height: 200px;
    }

    .paper-achievement-info {
        padding: 12px;
    }

    .paper-authors {
        font-size: 0.9rem;
    }
}