/* Archive Pages Unified Styles - News & IR Documents */

/* ========================================
   Hero Sections 
   ======================================== */
.ir-hero,
.news-hero {
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, 
        rgba(99, 179, 237, 0.1) 0%, 
        rgba(236, 72, 153, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.ir-hero::before,
.news-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(99, 179, 237, 0.08) 0%,
        transparent 70%
    );
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.ir-hero h1,
.news-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    background: linear-gradient(135deg, #63B3ED, #EC4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.ir-hero p,
.news-hero p {
    color: #B8C5E0;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Back Button
   ======================================== */
.back-button {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(10, 5, 20, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 179, 237, 0.3);
    border-radius: 50px;
    color: #63B3ED;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(99, 179, 237, 0.1);
    border-color: #63B3ED;
    transform: translateX(-5px);
}

.back-button span:first-child {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.back-button:hover span:first-child {
    transform: translateX(-3px);
}

/* ========================================
   Filter Section
   ======================================== */
.filter-section {
    padding: 40px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 5, 20, 0.5);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1440px;
    margin: 0 auto;
}

.filter-btn {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #B8C5E0;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(99, 179, 237, 0.1);
    border-color: rgba(99, 179, 237, 0.5);
    color: #63B3ED;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #63B3ED, #EC4899);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 179, 237, 0.3);
}

/* ========================================
   Content Grid
   ======================================== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 60px 20px;
    max-width: 1440px;
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out;
}

/* Add stagger animation for cards */
.content-card {
    animation: cardFadeIn 0.6s ease-out forwards;
    opacity: 0;
    position: relative;
}

/* Pulse effect for new cards */
.content-card.new-item {
    animation: cardFadeIn 0.6s ease-out forwards, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 4px 6px rgba(99, 179, 237, 0.1),
            0 1px 3px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    50% {
        box-shadow: 
            0 4px 20px rgba(99, 179, 237, 0.3),
            0 1px 3px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.05),
            0 0 40px rgba(99, 179, 237, 0.2);
    }
}

.content-card:nth-child(1) { animation-delay: 0.1s; }
.content-card:nth-child(2) { animation-delay: 0.2s; }
.content-card:nth-child(3) { animation-delay: 0.3s; }
.content-card:nth-child(4) { animation-delay: 0.4s; }
.content-card:nth-child(5) { animation-delay: 0.5s; }
.content-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Styles */
.content-card,
.news-card,
.ir-document-card {
    background: linear-gradient(135deg, 
        rgba(99, 179, 237, 0.08) 0%, 
        rgba(236, 72, 153, 0.04) 50%,
        rgba(99, 179, 237, 0.06) 100%);
    border: 1px solid rgba(99, 179, 237, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    padding: 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 4px 6px rgba(99, 179, 237, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.content-card:hover,
.news-card:hover,
.ir-document-card:hover {
    background: linear-gradient(135deg, 
        rgba(99, 179, 237, 0.12) 0%, 
        rgba(236, 72, 153, 0.08) 50%,
        rgba(99, 179, 237, 0.10) 100%);
    border-color: rgba(99, 179, 237, 0.5);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(99, 179, 237, 0.25),
        0 10px 20px rgba(236, 72, 153, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Content Card Specific Styles */
.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #63B3ED, #EC4899, #63B3ED);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: shimmer 3s ease-in-out infinite;
}

.content-card:hover::before {
    opacity: 1;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Glow effect on hover */
.content-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle at center,
        rgba(99, 179, 237, 0.15) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.content-card:hover::after {
    opacity: 1;
}

/* Content Card Typography */
.content-card h3 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin-bottom: 15px !important;
    line-height: 1.4 !important;
    transition: all 0.3s ease;
    position: relative;
}

.content-card:hover h3 {
    color: #63B3ED !important;
    transform: translateX(5px);
    text-shadow: 0 0 20px rgba(99, 179, 237, 0.5);
}

.content-card p {
    color: #B8C5E0 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* Content Card Meta Info */
.content-card > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px !important;
}

.content-card span:first-child {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, 
        rgba(99, 179, 237, 0.2) 0%, 
        rgba(236, 72, 153, 0.15) 100%);
    border: 1px solid rgba(99, 179, 237, 0.4);
    border-radius: 20px;
    color: #63B3ED !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content-card:hover span:first-child {
    background: linear-gradient(135deg, 
        rgba(99, 179, 237, 0.3) 0%, 
        rgba(236, 72, 153, 0.25) 100%);
    border-color: #63B3ED;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(99, 179, 237, 0.4);
}

.content-card span:last-child {
    color: #8B95B0 !important;
    font-size: 0.85rem !important;
    transition: color 0.3s ease;
}

.content-card:hover span:last-child {
    color: #B8C5E0 !important;
}

/* Card Image */
.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, 
        rgba(99, 179, 237, 0.2), 
        rgba(236, 72, 153, 0.2));
}

/* Card Content */
.news-card-content,
.ir-document-content {
    padding: 25px;
}

.news-card-category,
.ir-document-type {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 179, 237, 0.2);
    border-radius: 20px;
    color: #63B3ED;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-title,
.ir-document-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-excerpt,
.ir-document-description {
    color: #B8C5E0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta,
.ir-document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.news-card-date,
.ir-document-date {
    color: #8B92A9;
    font-size: 0.85rem;
}

.news-card-link,
.ir-document-link {
    color: #63B3ED;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.news-card-link:hover,
.ir-document-link:hover {
    gap: 10px;
}

.news-card-link::after,
.ir-document-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-link::after,
.ir-document-card:hover .ir-document-link::after {
    transform: translateX(3px);
}

/* IR Document Specific Styles */
.ir-document-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ir-document-icon {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(99, 179, 237, 0.1), 
        rgba(236, 72, 153, 0.05));
    font-size: 3rem;
    color: #63B3ED;
}

.ir-document-size {
    color: #8B92A9;
    font-size: 0.85rem;
}

/* ========================================
   Load More Button
   ======================================== */
.load-more-container {
    text-align: center;
    padding: 40px 20px 80px;
}

.load-more-btn {
    padding: 14px 40px;
    background: linear-gradient(135deg, #63B3ED, #EC4899);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.load-more-btn:hover::before {
    width: 300px;
    height: 300px;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 179, 237, 0.4);
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #8B92A9;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #B8C5E0;
}

.empty-state-text {
    font-size: 1rem;
    color: #8B92A9;
}

/* ========================================
   Loading State
   ======================================== */
.content-grid.loading {
    position: relative;
    min-height: 400px;
}

.content-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(99, 179, 237, 0.2);
    border-top-color: #63B3ED;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .ir-hero,
    .news-hero {
        padding: 100px 20px 40px;
    }
    
    .ir-hero h1,
    .news-hero h1 {
        font-size: 2rem;
    }
    
    .ir-hero p,
    .news-hero p {
        font-size: 1rem;
    }
    
    .back-button {
        top: 20px;
        left: 20px;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .filter-section {
        padding: 30px 15px;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 40px 15px;
    }
    
    .content-card {
        padding: 20px;
    }
    
    .content-card h3 {
        font-size: 1.1rem !important;
    }
    
    .content-card p {
        font-size: 0.9rem !important;
    }
    
    .news-card-title,
    .ir-document-title {
        font-size: 1.1rem;
    }
}

/* ========================================
   Dark Mode Enhancements
   ======================================== */
@media (prefers-color-scheme: dark) {
    .content-card,
    .news-card,
    .ir-document-card {
        background: rgba(255, 255, 255, 0.02);
    }
    
    .filter-btn {
        background: rgba(255, 255, 255, 0.02);
    }
}

/* ========================================
   Detail Modal Styles
   ======================================== */
.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 20, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        background: rgba(10, 5, 20, 0);
    }
    to {
        opacity: 1;
        background: rgba(10, 5, 20, 0.85);
    }
}

.detail-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    margin: 5vh auto;
    background: linear-gradient(135deg,
        rgba(15, 10, 31, 0.98) 0%,
        rgba(10, 5, 20, 0.98) 100%);
    border: 1px solid rgba(99, 179, 237, 0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(99, 179, 237, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes modalSlideOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Modal Header Bar */
.detail-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #63B3ED, #EC4899, #63B3ED);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* Close Button */
.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #B8C5E0;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    background: rgba(236, 72, 153, 0.2);
    border-color: #EC4899;
    color: #EC4899;
    transform: rotate(90deg);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}

/* Modal Body */
#detailModalBody {
    max-height: calc(90vh - 40px);
    overflow-y: auto;
    padding: 20px;
}

/* Custom Scrollbar for Modal */
#detailModalBody::-webkit-scrollbar {
    width: 8px;
}

#detailModalBody::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

#detailModalBody::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #63B3ED, #EC4899);
    border-radius: 4px;
}

#detailModalBody::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4A9FDB, #DA5A87);
}

/* Modal Content Typography */
#detailModalBody h2 {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #63B3ED, #EC4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1.3;
}

#detailModalBody p {
    color: #B8C5E0;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .detail-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 2.5vh auto;
        border-radius: 15px;
    }
    
    #detailModalBody {
        padding: 15px;
    }
    
    #detailModalBody h2 {
        font-size: 1.5rem;
    }
    
    .close-modal {
        top: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
    }
}

/* ========================================
   Animations
   ======================================== */
.content-grid > * {
    animation: fadeInUp 0.6s ease-out both;
}

.content-grid > *:nth-child(1) { animation-delay: 0.1s; }
.content-grid > *:nth-child(2) { animation-delay: 0.2s; }
.content-grid > *:nth-child(3) { animation-delay: 0.3s; }
.content-grid > *:nth-child(4) { animation-delay: 0.4s; }
.content-grid > *:nth-child(5) { animation-delay: 0.5s; }
.content-grid > *:nth-child(6) { animation-delay: 0.6s; }

/* Smooth page transitions */
.page-view {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-view.active {
    opacity: 1;
}