/* css/homePage.css - Modern Design inspired by code.html */

.main-content {
    background-color: transparent;
    padding-bottom: 40px;
    padding-top: 24px;
}

/* Hero Section - Carousel + News Panel Grid */
.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Carousel */
.carousel-section {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.carousel-section .el-carousel__item {
    border-radius: var(--radius-xl);
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    z-index: 10;
}

.carousel-overlay .tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-color);
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.carousel-overlay h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.carousel-overlay p {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

/* News Panel (side of carousel) */
.news-panel {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 424px;
}

.news-panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.news-panel-header .tab {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-light);
    cursor: pointer;
    padding-bottom: 12px;
    margin-bottom: -12px;
    border-bottom: 2px solid transparent;
    transition: var(--transition-base);
}

.news-panel-header .tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.news-panel-header .more {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition-base);
}

.news-panel-header .more:hover {
    color: var(--primary-color);
}

.news-panel-header .tab:hover {
    color: var(--primary-color);
}

.news-panel-list {
    flex: 1;
    overflow-y: auto;
}

.news-panel-list li {
    margin-bottom: 16px;
}

.news-panel-list li a {
    display: block;
}

.news-panel-list li h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin: 0 0 4px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition-base);
}

.news-panel-list li:hover h4 {
    color: var(--primary-color);
}

.news-panel-list li .date {
    font-size: 12px;
    color: var(--text-light);
}

/* Headline Section (Blackboard replacement) */
.headline-section {
    background: var(--bg-card);
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-soft);
    border-left: 4px solid var(--primary-color);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.headline-section .badge {
    background: rgba(0, 86, 179, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.headline-section .content {
    flex: 1;
}

.headline-section .content a {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.headline-section .content:hover {
    color: var(--primary-color);
}

.headline-section .content .desc {
    font-size: 14px;
    color: var(--text-light);
    margin-left: 16px;
}

/* News Grid - Two Column Layout */
.news-grid-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

.news-module {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    padding: 20px;
}

.module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.module-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
}

.module-title::before {
    display: none;
}

.module-title.secondary {
    border-left-color: var(--secondary-color);
}

.module-title.blue {
    border-left-color: #3b82f6;
}

.module-tabs {
    display: flex;
    gap: 16px;
}

.module-tabs a,
.module-tabs .tab-link {
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition-base);
}

.module-tabs a:hover,
.module-tabs .tab-link:hover {
    color: var(--primary-color);
}

.module-tabs a.active {
    color: var(--primary-color);
    font-weight: 500;
}

.more-btn {
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
}

.more-btn:hover {
    color: var(--primary-color);
}

/* News List Styles */
.news-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition-base);
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list li:hover {
    background: var(--bg-body);
    margin: 0 -12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}

.news-list li a,
.news-list li .news-item-link {
    display: flex;
    align-items: center;
    width: 100%;
}

.news-list li:hover a,
.news-list li:hover .news-item-link {
    color: var(--primary-color);
}

.news-list li:hover .news-item-link .item-title {
    color: var(--primary-color);
}

.item-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    padding-left: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.item-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-color);
    transition: var(--transition-base);
}

.news-list li:hover .item-title::before {
    background: var(--primary-color);
}

.item-date {
    color: var(--text-light);
    font-size: 12px;
    margin-left: 16px;
    flex-shrink: 0;
}

/* Top News with Image */
.top-news {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.news-img {
    width: 120px;
    height: 80px;
    margin-right: 16px;
    overflow: hidden;
    border-radius: var(--radius-base);
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-img:hover img {
    transform: scale(1.1);
}

.news-info {
    width: calc(100% - 136px);
}

.news-info.full-width {
    width: 100%;
}

.news-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--text-main);
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-date {
    font-size: 12px;
    color: var(--text-light);
}

/* Quick Links / Gradient Cards */
.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.quick-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-radius: var(--radius-xl);
    color: #fff;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: #fff;
}

.quick-link-card.blue {
    background: linear-gradient(135deg, #6366f1, #3b82f6);
}

.quick-link-card.orange {
    background: linear-gradient(135deg, #fb923c, #ef4444);
}

.quick-link-card.cyan {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.quick-link-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.quick-link-card p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.quick-link-card .icon {
    font-size: 40px;
    opacity: 0.8;
}

.quick-link-card::after {
    content: "";
    position: absolute;
    bottom: -32px;
    right: -32px;
    width: 128px;
    height: 128px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    filter: blur(40px);
    transition: transform 0.5s;
}

.quick-link-card:hover::after {
    transform: scale(1.5);
}

/* Member Units */
.module-section {
    margin-bottom: 40px;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.member-item {
    cursor: pointer;
}

.member-item .img-box {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 12px;
}

.member-item .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.member-item:hover .img-box img {
    transform: scale(1.1);
}

.member-item .name {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition-base);
}

.member-item:hover .name {
    color: var(--primary-color);
}

/* Figures */
.figure-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.figure-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.figure-item .img-box {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    margin-bottom: 12px;
    transition: var(--transition-base);
}

.figure-item:hover .img-box {
    border-color: var(--primary-color);
}

.figure-item .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.figure-item .name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    background: var(--bg-body);
    padding: 6px 16px;
    border-radius: 9999px;
    transition: var(--transition-base);
}

.figure-item:hover .name {
    background: var(--primary-color);
    color: #fff;
}

.figure-item.featured .img-box {
    border: 4px solid var(--secondary-color);
}

.figure-item.featured .name {
    background: var(--secondary-color);
    color: #fff;
    font-weight: 700;
}

/* Banner Section */
.banner-section {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: 160px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
}

.banner-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-section .overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 138, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.banner-section .overlay h2 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin: 0 0 16px 0;
}

.banner-section .tags {
    display: flex;
    gap: 16px;
}

.banner-section .tags span {
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 9999px;
    font-size: 14px;
    backdrop-filter: blur(4px);
}

/* Special Events */
.event-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.event-item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.event-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.5s;
}

.event-item:hover img {
    transform: scale(1.1);
}

.event-item .title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    transition: var(--transition-base);
}

.event-item .title:hover {
    background: rgba(0, 86, 179, 0.85);
}

/* Links Section */
.link-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 40px;
}

.link-section .section-title {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 16px;
}

.link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.link-list a,
.link-list .link-item {
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-base);
}

.link-list a:hover,
.link-list .link-item:hover {
    color: var(--primary-color);
}

.link-list .divider {
    color: var(--border-color);
}

/* Ad Section */
.ad-section {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 24px 0;
}

.ad-section img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

/* Download Cards */
.download-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.download-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-base);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.download-card:hover {
    box-shadow: var(--shadow-md);
}

.download-card.blue {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
}

.download-card.orange {
    background: rgba(251, 146, 60, 0.05);
    border-color: rgba(251, 146, 60, 0.2);
}

.download-card .icon-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-card.blue .icon-box {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.download-card.orange .icon-box {
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
}

.download-card .text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.download-card .btn {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: #fff;
}

.download-card.blue .btn {
    background: var(--primary-color);
    cursor: pointer;
}

.download-card.orange .btn {
    background: #fb923c;
    cursor: pointer;
}

/* Dark Mode Styles */
html.dark .news-panel,
html.dark .news-module,
html.dark .headline-section,
html.dark .link-section,
html.dark .download-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html.dark .news-panel-header,
html.dark .module-header {
    border-bottom-color: var(--border-color);
}

html.dark .news-list li {
    border-bottom-color: var(--border-color);
}

html.dark .news-list li:hover {
    background: #374151;
}

html.dark .figure-item .name {
    background: #374151;
    color: var(--text-main);
}

html.dark .figure-item:hover .name {
    background: var(--primary-color);
    color: #fff;
}

html.dark .download-card.blue {
    background: rgba(59, 130, 246, 0.1);
}

html.dark .download-card.orange {
    background: rgba(251, 146, 60, 0.1);
}
