/* Import Odia Font */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600;800&display=swap');

.kohinoor-theme {
    font-family: 'Baloo 2', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fffaf0; /* Off-white paper look */
    border: 2px solid #8b0000;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Header Styling */
.panjika-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #8b0000; /* Deep Maroon */
    color: #ffd700; /* Gold */
    padding: 15px;
    border-radius: 4px 4px 0 0;
    margin-bottom: 10px;
}

.panjika-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: #ffd700;
}

.nav-btn {
    background: #ffd700;
    color: #8b0000;
    border: none;
    padding: 8px 15px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #fff;
}

/* Weekday Headers */
.panjika-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #8b0000;
    color: #fff;
    text-align: center;
    font-weight: bold;
    padding: 10px 0;
}

/* Calendar Grid */
.panjika-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* 7 Columns Desktop */
    gap: 2px;
    background-color: #ccc; /* Border effect */
    border: 1px solid #ccc;
}

.day-cell {
    background-color: #fff;
    min-height: 120px;
    padding: 5px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.day-cell:hover {
    background-color: #fff8dc; /* Light yellow hover */
}

.day-cell.empty {
    background-color: #f9f9f9;
    cursor: default;
}

.day-cell.today {
    border: 2px solid #8b0000;
    background-color: #fff0f0;
}

/* Cell Content */
.date-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: #8b0000;
}

.tithi-small {
    font-size: 0.85rem;
    color: #333;
}

.festival-tag {
    background-color: #ffd700;
    color: #8b0000;
    font-size: 0.75rem;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: bold;
    text-align: center;
    margin-top: 2px;
}

/* Modal Styling */
.panjika-modal.hidden {
    display: none;
}

.panjika-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px); /* Blur Effect */
}

.modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 500px;
    padding: 20px;
    border-radius: 8px;
    border: 4px solid #8b0000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 10000;
}

.close-modal {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 2rem;
    color: #8b0000;
    cursor: pointer;
}

.modal-details h3 {
    color: #8b0000;
    border-bottom: 2px solid #ffd700;
    padding-bottom: 10px;
}

.detail-row {
    margin: 10px 0;
    font-size: 1.1rem;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}

.detail-label {
    font-weight: bold;
    color: #555;
}

/* Responsive Logic */
@media (max-width: 768px) {
    /* Mobile: Collapse to 3 columns as requested */
    .panjika-weekdays {
        display: none; /* Hide weekdays in card view or use short form */
    }
    
    .panjika-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .day-cell {
        min-height: 100px;
        text-align: center;
    }
    
    .panjika-header h2 {
        font-size: 1.2rem;
    }
    
    /* Hide empty slots on mobile card view to save space */
    .day-cell.empty {
        display: none;
    }
}