/* Global Reset & Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Lexend', sans-serif;
    background-color: #ffffff;
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: calc(50% + var(--grid-x, 0px)) calc(50% + var(--grid-y, 0px));
    color: #1a1a1a;
    padding: 20px;
    overflow-x: hidden;
    min-height: 100vh;
}

#cursor-blob {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.10) 0%, rgba(74, 222, 128, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
}

.container {
    max-width:850px;
    margin: 0 auto;
    flex: 1;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.header-box {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(2, 223, 113, 0.5);
    border-radius: 12px;
    padding: 30px 24px;
    text-align: center;
    margin-bottom: 30px;
}

.header-box h1 {
    font-size: 3.4rem;
    color: #065f46; /* Deep emerald */
    text-shadow: 2px 2px 0px rgba(74, 222, 128, 0.2);
    font-weight: 900;
    letter-spacing: -1.5px;
    margin-bottom: 8px;
}

.header-box .subtitle {
    color: #666;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.subtitle {
    color: #666;
    font-size: 1rem;
}

/* Controls Bar */
.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.counter-text {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.search-container {
    width: 350px;
}

#searchInput {
    font-weight: bold;

    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #065f46;
    border-radius: 8px;
    color: #000;
    outline: none;
    transition: border-color 0.2s;
}

#searchInput:focus {
    border-color: #4ade80;
}

/* Desktop Program Rows */
.programs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.program-row {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    /* Distinguishable Border */
    border: 2px solid #4ade80; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    
    border-radius: 14px;
    padding: 18px 24px;
    display: grid;
    grid-template-columns: 48px 1fr 120px 100px;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow Effect */
.program-row::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        500px circle at var(--mouse-x) var(--mouse-y),
        rgba(74, 222, 128, 0.1),
        transparent 80%
    );
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.program-row:hover::before {
    opacity: 1;
}

.program-row:hover {
    transform: scale(1.01);
    background: rgba(255, 255, 255, 0.95);
    border-color: #22c55e;
    box-shadow: 0 10px 20px rgba(74, 222, 128, 0.2);
}

.program-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.program-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.program-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.program-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
}

.tag-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: nowrap;
}

.program-category {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.program-socials {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    align-items: center;
}

.social-link {
    color: #999;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.social-link:hover {
    color: #000;
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.program-status {
    display: flex;
    justify-content: flex-end;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
}

.status-active {
    background: rgba(74, 222, 128, 0.2);
    color: #16a34a;
}

.status-closed {
    background: rgba(248, 113, 113, 0.2);
    color: #dc2626;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    padding: 32px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #999;
    font-size: 1.8rem;
    cursor: pointer;
}

#modalTitle {
    font-size: 1.8rem;
    color: #000;
    margin-bottom: 12px;
}

#modalCategory {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-label {
    color: #999;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.detail-content {
    color: #333;
    line-height: 1.6;
    font-size: 1rem;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn {
    flex: 1;
    padding: 14px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: #4ade80;
    color: #000;
}

.btn-secondary {
    background: #f0f0f0;
    color: #000;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.page-btn {
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
}

.page-btn.active {
    background: #4ade80;
    color: #000;
    border-color: #4ade80;
    font-weight: 800;
}

.site-footer {
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.site-footer a {
    color: #065f46; /* Matching your title's emerald green */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #4ade80; /* Brighter green on hover */
    text-decoration: underline;
}

/* MOBILE RESPONSIVE - Keeping your exact queries */
@media (max-width: 750px) {
    .container { width: 95%; }
    .header-box h1 { font-size: 2rem; }
    .controls-row { flex-direction: column-reverse; align-items: stretch; }
    .search-container { width: 100%; }
    .program-row {
        grid-template-columns: 56px 1fr auto;
        padding: 10px 16px;
        gap: 16px;
    }
    .program-info { flex-direction: column; align-items: flex-start; gap: 8px; }
    .tag-group { flex-wrap: wrap; }
    .mobile-right-stack {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 12px;
    }
}