/* ===== MHT-CET 2026 Official Updates Hub ===== */
/* Style.css — Main Stylesheet File */

/* ===== GLOBAL RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    background: #f0f4f9;
    color: #1a2c3e;
    line-height: 1.5;
}

/* ===== LAYOUT & CONTAINERS ===== */
header {
    background: linear-gradient(135deg, #0a3a4b, #0f4c5f);
    color: white;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: #5a6b7a;
}

/* ===== COMPONENTS ===== */

/* Typography */
header h1 {
    font-size: 2rem;
}

header h1 span {
    background: #e67e22;
    padding: 0.2rem 0.8rem;
    border-radius: 40px;
    font-size: 0.8rem;
    display: inline-block;
    margin-left: 0.5rem;
}

#notices-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #1b1d1d;
    font-size: 2rem;
    font-weight: 700;
}

/* Search Bar */
#searchInput {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    font-size: 1rem;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1rem 0;
}

.stat-item {
    background: white;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    min-width: 130px;
}

.stat-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #0c4e6e;
}

/* News Cards */
.news-card {
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    border-left: 4px solid #e67e22;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    /* Background color dynamically handled by JavaScript getCategoryColor() */
}

.news-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.news-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #0c4e6e;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.6rem;
    font-size: 0.7rem;
}

/* Badges & Chips */
.date-chip {
    background: #eef2f7;
    padding: 0.2rem 0.7rem;
    border-radius: 24px;
}

.group-tag {
    background: #e9ecef;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.7rem;
}

.verify-badge {
    background: #e0f2e9;
    color: #1f6e43;
    padding: 0.2rem 0.7rem;
    border-radius: 24px;
}

/* Details Panel & Fallbacks */
#notice-details {
    background: white;
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#detail-title {
    color: #0c4e6e;
    margin-bottom: 10px;
}

#detail-description {
    margin-top: 10px;
    color: #555;
    line-height: 1.6;
}

/* Status Banners */
#status-banner {
    margin: 1rem 0;
    padding: 0.5rem;
    border-radius: 8px;
    background: #e8f5e9;
    text-align: center;
    font-size: 0.9rem;
}

#status-message, .auto-status {
    text-align: center;
    font-size: 0.85rem;
    margin: 0.4rem 0;
    color: #4a5a68;
}

/* ===== BUTTONS ===== */
#refresh-button {
    background: #e67e22;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin: 1rem auto;
    transition: background 0.2s ease;
}

#refresh-button:hover {
    background: #d35400;
}

.view-btn {
    background: #0c4e6e;
    color: white;
    border: none;
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    transition: background 0.2s ease, transform 0.1s ease;
    align-self: center;
}

.view-btn:hover {
    background: #093a52;
    transform: scale(1.05);
}

.official-btn {
    display: inline-block;
    margin-top: 15px;
    background: #0c4e6e;
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.official-btn:hover {
    background: #093a52;
}

#topBtn {
    display: block;
    position: fixed;
    bottom: 15px;
    right: 15px;
    background: #e67e22;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    z-index: 9999;
    transition: background 0.2s ease;
}

#topBtn:hover {
    background: #d35400;
}

/* ===== ANIMATIONS & LOADERS ===== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    gap: 0.5rem;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e67e22;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.loading-card {
    animation: pulse-loading 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-loading {
    0% { opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */

/* Tablets (Max-width: 768px) */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    #notices-section h2 {
        font-size: 1.6rem;
    }

    .news-card {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .view-btn {
        align-self: flex-start;
        width: 100%;
        text-align: center;
        padding: 0.5rem;
    }

    .stats-row {
        gap: 0.5rem;
    }

    .stat-item {
        min-width: 45%;
    }
}

/* Mobile Devices (Max-width: 480px) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
    }

    #notices-section h2 {
        font-size: 1.3rem;
    }

    .stat-item {
        min-width: 100%;
        text-align: center;
    }

    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    #topBtn {
        width: 35px;
        height: 35px;
        font-size: 14px;
        bottom: 12px;
        right: 12px;
    }
}